diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a975f0c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,76 @@ +[*.cs] + +# CS8618: Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + +error_prone.large_struct_threshold = 128 +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +[*.{cs,vb}] +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +[*.{cs,vb}] +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case diff --git a/CodeWalker.Benchmarks/Benchmarks.cs b/CodeWalker.Benchmarks/Benchmarks.cs index acf4ff9..6aa2e6c 100644 --- a/CodeWalker.Benchmarks/Benchmarks.cs +++ b/CodeWalker.Benchmarks/Benchmarks.cs @@ -1,189 +1,199 @@ using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Diagnosers; +using BenchmarkDotNet.Disassemblers; using BenchmarkDotNet.Environments; using BenchmarkDotNet.Jobs; using CodeWalker.Core.Utils; using CodeWalker.GameFiles; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; +using SharpDX; using System; using System.Buffers.Binary; using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using System.Text; using System.Threading.Tasks; using System.Web; using System.Xml; using System.Xml.Linq; +using static System.Net.Mime.MediaTypeNames; namespace CodeWalker.Benchmarks { + //[InProcess] + [ShortRunJob] [MemoryDiagnoser] public class Benchmarks { - public const string markup = @" - vehshare - - - - brabusgt600brabusgt600 - brabusgt600 - GT 600 - BRABUS - null - null - null - null - - null - ta176m177 - LAYOUT_LOW - BULLET_COVER_OFFSET_INFO - EXPLOSION_INFO_DEFAULT - - DEFAULT_FOLLOW_VEHICLE_CAMERA - MID_BOX_VEHICLE_AIM_CAMERA - VEHICLE_BONNET_CAMERA_NEAR_EXTRA_HIGH - DEFAULT_POV_CAMERA - - - - - - - - - - - - - - VFXVEHICLEINFO_CAR_BULLET - - - - - - - - - - - - - - - - - - - - - - 60.000000 - 80.000000 - 100.000000 - 120.000000 - 500.000000 - 500.000000 - - - - - - - - - - - SWANKNESS_3 - - FLAG_SPORTS FLAG_RICH_CAR FLAG_NO_BROKEN_DOWN_SCENARIO FLAG_RECESSED_TAILLIGHT_CORONAS FLAG_NO_HEAVY_BRAKE_ANIMATION - VEHICLE_TYPE_CAR - VPT_FRONT_AND_BACK_PLATES - VDT_BANSHEE - VC_SPORT - VWT_HIEND - - docktrailer - trailers - trailers2 - trailers3 - trailers4 - tanker - trailerlogs - tr2 - trflat - - - - - S_M_Y_Cop_01 - - - - - - - - - - - - WHEEL_FRONT_RIGHT_CAMERA - WHEEL_FRONT_LEFT_CAMERA - WHEEL_REAR_RIGHT_CAMERA - WHEEL_REAR_LEFT_CAMERA - - - - - - - - - - - LOW_BULLET_FRONT_LEFT - LOW_BULLET_FRONT_RIGHT - - - + //private class Config : ManualConfig + //{ + // public Config() + // { + // AddDiagnoser(new MemoryDiagnoser(new MemoryDiagnoserConfig(true))); + // AddDiagnoser(new DisassemblyDiagnoser(new DisassemblyDiagnoserConfig())); + + + // } + //} + private static string markup = "\r\n"; + private List listClass; + private List listStruct; + private PooledList pooledListClass; + private PooledList pooledListStruct; + + public class SimpleType + { + public int Value1; + } + + public class SimpleType2 : SimpleType + { + public int Value2; + } + + public class SimpleType3 + { + public long Value1; + public long Value2; + public long Value3; + + public SimpleType3() + { + Value1 = random.Next(); + Value2 = random.Next(); + Value3 = random.Next(); + } + } + + private SimpleType[] intArr; + private List intList; + private static Random random = new Random(42); + public struct BigStruct + { + public long Value1; + public long Value2; + public long Value3; + public long Value4; + public long Value5; + public long Value6; + public long Value7; + public long Value8; + public BigStruct() + { + Value1 = random.Next(); + Value2 = random.Next(); + Value3 = random.Next(); + Value4 = random.Next(); + Value5 = random.Next(); + Value6 = random.Next(); + Value7 = random.Next(); + Value8 = random.Next(); + } + public BigStruct(long value1, long value2, long value3, long value4, long value5, long value6, long value7, long value8) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + Value5 = value5; + Value6 = value6; + Value7 = value7; + Value8 = value8; + } + public static BigStruct operator +(in BigStruct left, in BigStruct right) + { + return new BigStruct( + left.Value1 + right.Value1, + left.Value2 + right.Value2, + left.Value3 + right.Value3, + left.Value4 + right.Value4, + left.Value5 + right.Value5, + left.Value6 + right.Value6, + left.Value7 + right.Value7, + left.Value8 + right.Value8 + ); + } + } + [Params(10, 100, 1000)] + public int Length { get; set; } = 10000; + [Params(100)] + public int Chance { get; set; } = 25; + public ArrayOfChars64 chars64; + private BigStruct[] vectors = new BigStruct[0]; + private BigStruct vector; - - - - vehicles_banshee_interior - brabusgt600 - + private byte valueByte; + private uint valueUint; + private uint[] data; + private MetaName[] Values; - - -"; + private int randomValue; - private byte[] data; - private RpfFileEntry fileEntry; + private uint[] ushorts = new uint[0]; + + private string Str = "iakslgbhfibnrihbderpiugaehigoI BIHGVUIVDSOUFVBOUADGBOIUYfgiuywetrg872q13rh9872`134tgyihsbaopuJGUIYODGBFIOUFgvbouailksdbhnfp"; [GlobalSetup] public void Setup() { - data = new byte[2048]; - var random = new Random(42); - for (int i = 0; i < data.Length; i++) + random = new Random(42); + + valueByte = 0; + valueUint = 0; + + ushorts = new uint[Length]; + + for (int i = 0; i < Length; i++) { - data[i] = (byte)random.Next(byte.MinValue, byte.MaxValue); + ushorts[i] = (uint)random.Next(0, int.MaxValue); } - GTA5Keys.LoadFromPath("C:\\Program Files\\Rockstar Games\\Grand Theft Auto V", ""); + + var hashes = MemoryMarshal.Cast(ushorts); + + for (int i = 0; i < Length; i++) + { + Console.WriteLine($"{ushorts[i]} -> {hashes[i]}"); + } + + //Console.WriteLine("Setup done"); + + //XElement? result = null; + //var _doc = new XmlDocument(); + //_doc.LoadXml(markup); + + //var doc = XDocument.Load(new XmlNodeReader(_doc)); + //Console.WriteLine(doc.Root); + + //data = new byte[2048]; + //var random = new Random(42); + //for (int i = 0; i < data.Length; i++) + //{ + // data[i] = (byte)random.Next(byte.MinValue, byte.MaxValue); + //} + //GTA5Keys.LoadFromPath("C:\\Program Files\\Rockstar Games\\Grand Theft Auto V", ""); + + //rotation = new Quaternion(random.NextFloat(-1.0f, 1.0f), random.NextFloat(-1.0f, 1.0f), random.NextFloat(-1.0f, 1.0f), random.NextFloat(-1.0f, 1.0f)); + //translation = new Vector3(random.NextFloat(-1.0f, 1.0f), random.NextFloat(-1.0f, 1.0f), random.NextFloat(-1.0f, 1.0f)); + //scale = random.NextFloat(-1.0f, 1.0f); + //matrix = Matrix.AffineTransformation(scale, rotation, translation); } //[Benchmark(Baseline = true)] @@ -200,16 +210,155 @@ namespace CodeWalker.Benchmarks // vehiclesFile.Load(data, fileEntry); //} - [Benchmark] - public void DecryptNGSpan() + //[Benchmark(Baseline = true)] + //public uint SwapBytes() + //{ + // var result = test; + // for (int i = 0; i < 1000; i++) + // { + // result = MetaTypes.SwapBytes(result); + // } + // return result; + //} + + //[Benchmark] + //public uint ReverseEndianness() + //{ + // var result = test; + // for (int i = 0; i < 1000; i++) + // { + // result = BinaryPrimitives.ReverseEndianness(result); + // } + + // return result; + //} + + //[Benchmark] + //public int IndexOf() + //{ + // return Str.IndexOf('\0'); + //} + + //[Benchmark] + //public int IndexOfAsSpan() + //{ + // return Str.AsSpan().IndexOf('\0'); + //} + + private PooledList getPooledListClass() { - GTACrypto.DecryptNG(data.AsSpan(), "kaas", 2048); + var list = new PooledList(); + for (int i = 0; i < Length; i++) + { + list.Add(new SimpleType3()); + } + + return list; + } + + private PooledList getPooledListStruct() + { + var list = new PooledList(); + for (int i = 0; i < Length; i++) + { + list.Add(new BigStruct()); + } + + return list; + } + + private List getListClass() + { + var list = new List(); + for (int i = 0; i < Length; i++) + { + list.Add(new SimpleType3()); + } + + return list; + } + + private List getListStruct() + { + var list = new List(); + for (int i = 0; i < Length; i++) + { + list.Add(new BigStruct()); + } + + return list; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private void inVectorOperator() + { + var vect = Vector256.Create(data.AsSpan()); + var shiftVect = Vector256.Create(10); + var leftShiftVect = Vector256.Create(6); + + + } + + private uint joaatLower(Span span) + { + uint h = 0; + for (int i = 0; i < span.Length; i++) + { + h += toLower(span[i]); + h += h << 10; + h ^= h >> 6; + } + + return h; + } + + private uint joaat(Span span) + { + uint h = 0; + for (int i = 0; i < span.Length; i++) + { + h += span[i]; + h += h << 10; + h ^= h >> 6; + } + + return h; + } + + private void toLowerVectorized(Span span) + { + Ascii.ToLowerInPlace(span, out _); + } + + private char toLower(char c) + { + return ('A' <= c && c <= 'Z') ? (char)(c | 0x20) : c; + } + + private void toLowerPleb(Span span) + { + for (int i = 0; i < span.Length; i++) + { + span[i] = toLower(span[i]); + } + } + + + + [Benchmark] + public void ReverseEndianness() + { + //BinaryPrimitives.ReverseEndianness(MemoryMarshal.Cast(ushorts), MemoryMarshal.Cast(ushorts)); } [Benchmark] - public void DecryptNG() + public void SwapBytes() { - GTACrypto.DecryptNG(data, "kaas", 2048); + var _ushorts = ushorts; + for (int i = 0; i < _ushorts.Length; i++) + { + _ushorts[i] = MetaTypes.SwapBytes(_ushorts[i]); + } } } } diff --git a/CodeWalker.Benchmarks/CodeWalker.Benchmarks.csproj b/CodeWalker.Benchmarks/CodeWalker.Benchmarks.csproj index 69ad967..abffe71 100644 --- a/CodeWalker.Benchmarks/CodeWalker.Benchmarks.csproj +++ b/CodeWalker.Benchmarks/CodeWalker.Benchmarks.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 Exe false CodeWalker.Benchmarks @@ -8,8 +8,12 @@ Copyright © 2023 1.0.0.0 1.0.0.0 - latest - true + latest + true + enable + AnyCPU + pdbonly + true @@ -19,37 +23,37 @@ - - + + - - - - - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - + \ No newline at end of file diff --git a/CodeWalker.Benchmarks/Program.cs b/CodeWalker.Benchmarks/Program.cs index 4966c50..1267ce1 100644 --- a/CodeWalker.Benchmarks/Program.cs +++ b/CodeWalker.Benchmarks/Program.cs @@ -16,6 +16,10 @@ namespace CodeWalker.Benchmarks static void Main(string[] args) { +#if DEBUG + var benchmarks = new Benchmarks(); + benchmarks.Setup(); + //var benchmarks = new Benchmarks(); //benchmarks.Setup(); @@ -28,8 +32,9 @@ namespace CodeWalker.Benchmarks //benchmarks.GlobalCleanup(); //ParseBuffer(); - +#else BenchmarkRunner.Run(); +#endif } } } diff --git a/CodeWalker.Core/CodeWalker.Core.csproj b/CodeWalker.Core/CodeWalker.Core.csproj index b5b3626..83a03f1 100644 --- a/CodeWalker.Core/CodeWalker.Core.csproj +++ b/CodeWalker.Core/CodeWalker.Core.csproj @@ -1,22 +1,28 @@  - net6.0 + net8.0 latest true - annotations + enable + + + - + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/CodeWalker.Core/GameFiles/FileTypes/AwcFile.cs b/CodeWalker.Core/GameFiles/FileTypes/AwcFile.cs index 0ed6b34..58db58a 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/AwcFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/AwcFile.cs @@ -8,6 +8,7 @@ using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; using System.Xml; using System.Runtime.InteropServices; +using CodeWalker.Core.Utils; namespace CodeWalker.GameFiles { @@ -345,7 +346,8 @@ namespace CodeWalker.GameFiles } public static void WriteXmlNode(AwcFile f, StringBuilder sb, int indent, string wavfolder, string name = "AudioWaveContainer") { - if (f == null) return; + if (f == null) + return; AwcXml.OpenTag(sb, indent, name); f.WriteXml(sb, indent + 1, wavfolder); AwcXml.CloseTag(sb, indent, name); @@ -1014,7 +1016,7 @@ namespace CodeWalker.GameFiles { var export = !string.IsNullOrEmpty(wavfolder); var fname = Name?.Replace("/", "")?.Replace("\\", "") ?? "0x0"; - byte[] fdata = null; + byte[] fdata; if (MidiChunk != null) { fname += ".midi"; @@ -1038,8 +1040,10 @@ namespace CodeWalker.GameFiles File.WriteAllBytes(filepath, fdata); } } - catch - { } + catch(Exception ex) + { + Console.WriteLine(ex); + } } if (StreamFormat != null) { @@ -1107,8 +1111,10 @@ namespace CodeWalker.GameFiles } } } - catch - { } + catch(Exception ex) + { + Console.WriteLine(ex); + } } @@ -1363,7 +1369,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - var hash = "0x" + (StreamInfo?.Id.ToString("X") ?? "0").PadLeft(8, '0') + ": "; + var hash = "0x" + (StreamInfo?.Id.ToString("X8") ?? "0000000") + ": "; if (FormatChunk != null) { return hash + FormatChunk?.ToString() ?? "AwcAudio"; @@ -1876,7 +1882,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Id.ToString() + ", " + Codec.ToString() + ": " + Samples.ToString() + " samples, " + SamplesPerSecond.ToString() + " samples/sec, headroom: " + Headroom.ToString(); + return $"{Id}, {Codec}: {Samples} samples, {SamplesPerSecond} samples/sec, headroom: {Headroom}"; } } @@ -1905,7 +1911,7 @@ namespace CodeWalker.GameFiles resentry.SystemFlags = BitConverter.ToUInt32(data, 8); resentry.GraphicsFlags = BitConverter.ToUInt32(data, 12); - if (rsc7 != 0x37435352) + if (rsc7 != (uint)FileHeader.RSC7) { } //testing.. if (version != 46) //46 is Clip Dictionary... { } @@ -2163,7 +2169,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "gesture: " + (Gestures?.Length ?? 0).ToString() + " items"; + return $"gesture: {Gestures?.Length ?? 0} items"; } } @@ -2198,32 +2204,26 @@ namespace CodeWalker.GameFiles public void WriteLine(StringBuilder sb) { sb.Append(UnkUint1.ToString()); - sb.Append(" "); + sb.Append(' '); sb.Append(FloatUtil.ToString(UnkFloat1)); - sb.Append(" "); + sb.Append(' '); sb.Append(UnkUshort1.ToString()); - sb.Append(" "); + sb.Append(' '); sb.Append(UnkUshort2.ToString()); sb.AppendLine(); } public void ReadLine(string s) { - var split = s.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); - var list = new List(); - foreach (var str in split) + Span ranges = stackalloc Range[5]; + var span = s.AsSpan(); + span.Split(ranges, ' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); + + if (ranges.Length >= 4) { - var tstr = str.Trim(); - if (!string.IsNullOrEmpty(tstr)) - { - list.Add(tstr); - } - } - if (list.Count >= 4) - { - uint.TryParse(list[0], out uint u1); - FloatUtil.TryParse(list[1], out float f1); - ushort.TryParse(list[2], out ushort s1); - ushort.TryParse(list[3], out ushort s2); + uint.TryParse(span[ranges[0]], out uint u1); + FloatUtil.TryParse(span[ranges[1]], out float f1); + ushort.TryParse(span[ranges[2]], out ushort s1); + ushort.TryParse(span[ranges[3]], out ushort s2); UnkUint1 = u1; UnkFloat1 = f1; UnkUshort1 = s1; @@ -2247,7 +2247,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return UnkUint1.ToString() + ", " + UnkFloat1.ToString() + ", " + UnkUshort1.ToString() + ", " + UnkUshort2.ToString(); + return $"{UnkUint1}, {UnkFloat1}, {UnkUshort1}, {UnkUshort2}"; } } @@ -2326,7 +2326,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "granulargrains: " + (GranularGrains?.Length ?? 0).ToString() + " items"; + return $"granulargrains: {(GranularGrains?.Length ?? 0)} items"; } } @@ -2410,7 +2410,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Identifier.ToString() + ": " + UnkUint1.ToString() + ": " + GrainCount.ToString() + " items"; + return $"{Identifier}: {UnkUint1}: {GrainCount} items"; } } @@ -2456,7 +2456,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "granularloops: " + (GranularLoops?.Length ?? 0).ToString() + " items"; + return $"granularloops: {GranularLoops?.Length ?? 0} items"; } } @@ -2576,7 +2576,7 @@ namespace CodeWalker.GameFiles break; } - return Name.ToString() + ": " + valstr + ", " + SampleOffset.ToString() + ", " + Unused.ToString(); + return $"{Name}: {valstr}, {SampleOffset}, {Unused}"; } } @@ -3029,15 +3029,22 @@ namespace CodeWalker.GameFiles public static string GetXml(AwcFile awc, string outputFolder = "") { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (awc != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - AwcFile.WriteXmlNode(awc, sb, 0, outputFolder); - } + sb.AppendLine(XmlHeader); - return sb.ToString(); + if (awc != null) + { + AwcFile.WriteXmlNode(awc, sb, 0, outputFolder); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); + } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs index 37c97ec..0363214 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs @@ -109,10 +109,10 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders foreach (var poly in polys) //split along borders { var verts = poly.Vertices; - if (verts == null) - { continue; }//ignore empty polys.. + if (verts is null) + continue;//ignore empty polys.. if (verts.Length < 3) - { continue; }//not enough verts for a triangle! + continue;//not enough verts for a triangle! Vector2I gprev = NavGrid.GetCellPos(verts[0]); int split1 = 0; @@ -156,13 +156,18 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders verts1.Clear(); verts2.Clear(); - for (int i = 0; i < split1; i++) verts1.Add(verts[i]); + for (int i = 0; i < split1; i++) + verts1.Add(verts[i]); + verts1.Add(sp1); verts1.Add(sp2); - for (int i = split2end; i < verts.Length; i++) verts1.Add(verts[i]); + + for (int i = split2end; i < verts.Length; i++) + verts1.Add(verts[i]); verts2.Add(sp1); - for (int i = split1; i < split2end; i++) verts2.Add(verts[i]); + for (int i = split1; i < split2end; i++) + verts2.Add(verts[i]); verts2.Add(sp2); poly1.Vertices = verts1.ToArray(); @@ -203,9 +208,9 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders var verts = poly.Vertices; var ec = edges?.Length ?? 0; if (ec <= 0) - { continue; }//shouldn't happen - no edges? + continue;//shouldn't happen - no edges? if (ec != poly.Vertices?.Length) - { continue; }//shouldn't happen + continue;//shouldn't happen var split1beg = polysplit.Split1 - 1; var split1end = polysplit.Split1; @@ -256,22 +261,22 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders foreach (var poly in newpolys) //fix any untouched edges that joined to split polys { - if (poly.Edges?.Length != poly.Vertices?.Length) - { continue; }//shouldn't happen (no edges?) + if (poly.Edges is null || poly.Vertices is null || poly.Edges.Length != poly.Vertices.Length) + continue;//shouldn't happen (no edges?) + for (int i = 0; i < poly.Edges.Length; i++) { var edge = poly.Edges[i]; var vert = poly.Vertices[i]; if (edge == null) - { continue; }//shouldn't happen + continue;//shouldn't happen if (edge.Poly1 != edge.Poly2) - { continue; }//shouldn't happen? + continue;//shouldn't happen? if (edge.Poly1 == null) - { continue; }//probably this edge joins to nothing + continue;//probably this edge joins to nothing - YnvPolySplit polysplit; - if (polysplits.TryGetValue(edge.Poly1, out polysplit)) + if (polysplits.TryGetValue(edge.Poly1, out var polysplit)) { var newpoly = polysplit.GetNearest(vert); if (newpoly == null) @@ -287,7 +292,7 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders return newpolys; } - private Vector3 GetSplitPos(Vector3 a, Vector3 b, bool xaxis) + private Vector3 GetSplitPos(in Vector3 a, in Vector3 b, bool xaxis) { Vector3 ca = NavGrid.GetCellRel(a); Vector3 cb = NavGrid.GetCellRel(b); @@ -311,19 +316,19 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders return a + (b - a) * Math.Min(Math.Max(f, 0.0f), 1.0f); } - private bool IsValidSplit(Vector3 s1, Vector3 s2, Vector3 v1a, Vector3 v1b, Vector3 v2a, Vector3 v2b) + private bool IsValidSplit(in Vector3 s1, in Vector3 s2, in Vector3 v1a, in Vector3 v1b, in Vector3 v2a, in Vector3 v2b) { - if (XYEqual(s1, s2)) return false; - if (XYEqual(s1, v1a)) return false; - if (XYEqual(s1, v1b)) return false; - if (XYEqual(s2, v2a)) return false; - if (XYEqual(s2, v2b)) return false; + if (XYEqual(in s1, in s2)) return false; + if (XYEqual(in s1, in v1a)) return false; + if (XYEqual(in s1, in v1b)) return false; + if (XYEqual(in s2, in v2a)) return false; + if (XYEqual(in s2, in v2b)) return false; return true; } - private bool XYEqual(Vector3 v1, Vector3 v2) + private bool XYEqual(in Vector3 v1, in Vector3 v2) { - return ((v1.X == v2.X) && (v1.Y == v2.Y)); + return v1.X == v2.X && v1.Y == v2.Y; } private class YnvPolySplit @@ -335,8 +340,8 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders public int Split2; public YnvPoly GetNearest(Vector3 v) { - if (New1?.Vertices == null) return New2; - if (New2?.Vertices == null) return New1; + if (New1?.Vertices is null) return New2; + if (New2?.Vertices is null) return New1; float len1 = float.MaxValue; float len2 = float.MaxValue; for (int i = 0; i < New1.Vertices.Length; i++) @@ -357,11 +362,11 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders return New1; } } - private YnvPolySplit TryGetSplit(Dictionary polysplits, YnvPoly poly) + private YnvPolySplit? TryGetSplit(Dictionary polysplits, YnvPoly poly) { - if (poly == null) return null; - YnvPolySplit r = null; - polysplits.TryGetValue(poly, out r); + if (poly == null) + return null; + _ = polysplits.TryGetValue(poly, out var r); return r; } @@ -379,7 +384,7 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders if (ynv == null) { ynv = new YnvFile(); - ynv.Name = "navmesh[" + cell.FileX.ToString() + "][" + cell.FileY.ToString() + "]"; + ynv.Name = $"navmesh[{cell.FileX}][{cell.FileY}]"; ynv.Nav = new NavMesh(); ynv.Nav.SetDefaults(false); ynv.Nav.AABBSize = new Vector3(NavGrid.CellSize, NavGrid.CellSize, 0.0f); @@ -411,14 +416,13 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders foreach (var poly in polys) { poly.CalculatePosition(); - var pos = poly.Position; var verts = poly.Vertices; - if (verts != null) + if (verts is not null) { - foreach (var vert in verts) + foreach (ref var vert in verts.AsSpan()) { - bbmin = Vector3.Min(bbmin, vert); - bbmax = Vector3.Max(bbmax, vert); + Vector3.Min(ref bbmin, ref vert, out bbmin); + Vector3.Max(ref bbmax, ref vert, out bbmax); } } } @@ -460,7 +464,9 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders float zmax = float.MinValue; foreach (var poly in ynv.Polys) { - foreach (var vert in poly.Vertices) + if (poly.Vertices is null) + continue; + foreach (ref var vert in poly.Vertices.AsSpan()) { zmin = Math.Min(zmin, vert.Z); zmax = Math.Max(zmax, vert.Z); diff --git a/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs b/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs index 7ff9866..7b78075 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; @@ -28,6 +29,7 @@ namespace CodeWalker.GameFiles public CInteriorProxy[] AllCInteriorProxies { get; set; } public BoundsStoreItem[] AllBoundsStoreItems { get; set; } + [SkipLocalsInit] public void Load(byte[] data, RpfFileEntry entry) { FileEntry = entry; @@ -36,6 +38,7 @@ namespace CodeWalker.GameFiles using BinaryReader br = new BinaryReader(ms); Span charArr = stackalloc char[100]; + var length = 0; for (int i = 0; (i < 100) && (i < data.Length); i++) { @@ -56,10 +59,10 @@ namespace CodeWalker.GameFiles uint structcount = 0; uint modlen; bool indates = false; - var dates = new List(); - var allMapNodes = new List(); - var allCInteriorProxies = new List(); - var allBoundsStoreItems = new List(); + using var dates = new PooledList(); + using var allMapNodes = new PooledList(); + using var allCInteriorProxies = new PooledList(); + using var allBoundsStoreItems = new PooledList(); for (int i = 100; i < data.Length; i++) { byte b = data[i]; @@ -68,7 +71,6 @@ namespace CodeWalker.GameFiles if (b == 0xA) { lastn = i; - string line = new string(charArr.Slice(0, length)); switch (charArr.Slice(0, length)) { case "": @@ -125,6 +127,7 @@ namespace CodeWalker.GameFiles { } //just testing else { + string line = new string(charArr.Slice(0, length)); dates.Add(new CacheFileDate(line));//eg: 2740459947 (hash of: platform:/data/cdimages/scaleform_frontend.rpf) 130680580712018938 8944 } break; @@ -204,7 +207,6 @@ namespace CodeWalker.GameFiles mapnode.InteriorProxyListToArray(); } - br.Dispose(); ms.Dispose(); @@ -407,7 +409,7 @@ namespace CodeWalker.GameFiles public string ToCacheFileString() { - return FileName.Hash.ToString() + " " + TimeStamp.ToFileTimeUtc().ToString() + " " + FileID.ToString(); + return $"{FileName.Hash} {TimeStamp.ToFileTimeUtc()} {FileID}"; } public void WriteXml(StringBuilder sb, int indent) @@ -425,7 +427,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return FileName.ToString() + ", " + TimeStamp.ToString() + ", " + FileID.ToString(); + return $"{FileName}, {TimeStamp}, {FileID}"; } } @@ -478,10 +480,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Name.ToString() + ", " + - Min.ToString() + ", " + - Max.ToString() + ", " + - Layer.ToString(); + return $"{Name}, {Min}, {Max}, {Layer}"; } } @@ -775,19 +774,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Unk01.ToString() + ", " + - Unk02.ToString() + ", " + - Unk03.ToString() + ", " + - Name.ToString() + ", " + - Parent.ToString() + ", " + - Position.ToString() + ", " + - Orientation.ToString() + ", " + - BBMin.ToString() + ", " + - BBMax.ToString() + ", " + - Unk11.ToString() + ", " + - Unk12.ToString() + ", " + - Unk13.ToString() + ", " + - Unk14.ToString(); + return $"{Unk01}, {Unk02}, {Unk03}, {Name}, {Parent}, {Position}, {Orientation}, {BBMin}, {BBMax}, {Unk11}, {Unk12}, {Unk13}, {Unk14}"; } } @@ -796,10 +783,10 @@ namespace CodeWalker.GameFiles public MetaHash Name { get; set; } public MetaHash ParentName { get; set; } public uint ContentFlags { get; set; } - public Vector3 streamingExtentsMin { get; set; } - public Vector3 streamingExtentsMax { get; set; } - public Vector3 entitiesExtentsMin { get; set; } - public Vector3 entitiesExtentsMax { get; set; } + public Vector3 streamingExtentsMin; + public Vector3 streamingExtentsMax; + public Vector3 entitiesExtentsMin; + public Vector3 entitiesExtentsMax; public byte Unk1 { get; set; } public byte Unk2 { get; set; } public byte Unk3 { get; set; } @@ -912,15 +899,12 @@ namespace CodeWalker.GameFiles public void AddChildToList(MapDataStoreNode child) { - if (ChildrenList == null) - { - ChildrenList = new List(); - } + ChildrenList ??= new List(); ChildrenList.Add(child); } public void ChildrenListToArray() { - if (ChildrenList != null) + if (ChildrenList is not null) { Children = ChildrenList.ToArray(); ChildrenList = null; //plz get this GC @@ -928,15 +912,12 @@ namespace CodeWalker.GameFiles } public void AddInteriorToList(CInteriorProxy iprx) { - if (InteriorProxyList == null) - { - InteriorProxyList = new List(); - } + InteriorProxyList ??= new List(); InteriorProxyList.Add(iprx); } public void InteriorProxyListToArray() { - if (InteriorProxyList != null) + if (InteriorProxyList is not null) { InteriorProxies = InteriorProxyList.ToArray(); InteriorProxyList = null; //plz get this GC @@ -945,13 +926,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Name.ToString() + ", " + - ParentName.ToString() + ", " + - ContentFlags.ToString() + ", " + - streamingExtentsMin.ToString() + ", " + - streamingExtentsMax.ToString() + ", " + - entitiesExtentsMin.ToString() + ", " + - entitiesExtentsMax.ToString();// + ", " + + return $"{Name}, {ParentName}, {ContentFlags}, {streamingExtentsMin}, {streamingExtentsMax}, {entitiesExtentsMin}, {entitiesExtentsMax}";// + ", " + } } @@ -972,16 +947,24 @@ namespace CodeWalker.GameFiles { get { - StringBuilder sb = new StringBuilder(); - if (Unk02 != null) + if (Unk02 is null) + return string.Empty; + + StringBuilder sb = MetaXmlBase.StringBuilderPool.Get(); + try { - for (int i = 0; i < Unk02.Length; i++) + foreach (var b in Unk02) { - if (Unk02[i] == 0) break; - sb.Append((char)Unk02[i]); + if (b == 0) + break; + sb.Append((char)b); } + return sb.ToString(); + } + finally + { + MetaXmlBase.StringBuilderPool.Return(sb); } - return sb.ToString(); } } @@ -1027,7 +1010,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Unk01.ToString() + ", " + Unk02str; + return $"{Unk01}, {Unk02str}"; } } @@ -1038,21 +1021,28 @@ namespace CodeWalker.GameFiles public static string GetXml(CacheDatFile cdf) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (cdf != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - var name = "CacheFile"; + sb.AppendLine(XmlHeader); - OpenTag(sb, 0, name); + if (cdf != null) + { + var name = "CacheFile"; - cdf.WriteXml(sb, 1); + OpenTag(sb, 0, name); - CloseTag(sb, 0, name); + cdf.WriteXml(sb, 1); + + CloseTag(sb, 0, name); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } diff --git a/CodeWalker.Core/GameFiles/FileTypes/CarColsFile.cs b/CodeWalker.Core/GameFiles/FileTypes/CarColsFile.cs index 689ce78..654dee3 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/CarColsFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/CarColsFile.cs @@ -35,8 +35,7 @@ namespace CodeWalker.GameFiles //can be PSO .ymt or XML .meta - MemoryStream ms = new MemoryStream(data); - if (PsoFile.IsPSO(ms)) + if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); Pso.Load(data); @@ -59,8 +58,6 @@ namespace CodeWalker.GameFiles var msg = ex.Message; } } - else - { } if (xdoc.DocumentElement != null) diff --git a/CodeWalker.Core/GameFiles/FileTypes/CarVariationsFile.cs b/CodeWalker.Core/GameFiles/FileTypes/CarVariationsFile.cs index b092b39..6325e7b 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/CarVariationsFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/CarVariationsFile.cs @@ -10,6 +10,7 @@ using System.Xml; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; +using CodeWalker.Core.Utils; namespace CodeWalker.GameFiles { @@ -78,12 +79,11 @@ namespace CodeWalker.GameFiles public CVehicleModelInfoVariation(XmlNode node) { - XmlNode cnode; - cnode = node.SelectSingleNode("variationData"); - if (cnode != null) + var variationNode = node.SelectSingleNode("variationData"); + if (variationNode is not null) { - var items = cnode.SelectNodes("Item"); - if (items.Count > 0) + var items = variationNode.SelectNodes("Item"); + if (items is not null && items.Count > 0) { variationData = new CVehicleModelInfoVariation_418053801[items.Count]; for (int i = 0; i < items.Count; i++) @@ -107,12 +107,11 @@ namespace CodeWalker.GameFiles public CVehicleModelInfoVariation_418053801(XmlNode node) { modelName = Xml.GetChildInnerText(node, "modelName"); - XmlNode cnode; - cnode = node.SelectSingleNode("colors"); - if (cnode != null) + var colorsNode = node.SelectSingleNode("colors"); + if (colorsNode is not null) { - var items = cnode.SelectNodes("Item"); - if (items.Count > 0) + var items = colorsNode.SelectNodes("Item"); + if (items is not null && items.Count > 0) { colors = new CVehicleModelInfoVariation_2575850962[items.Count]; for (int i = 0; i < items.Count; i++) @@ -121,11 +120,11 @@ namespace CodeWalker.GameFiles } } } - cnode = node.SelectSingleNode("kits"); - if (cnode != null) + var kitsNode = node.SelectSingleNode("kits"); + if (kitsNode is not null) { - var items = cnode.SelectNodes("Item"); - if (items.Count > 0) + var items = kitsNode.SelectNodes("Item"); + if (items is not null && items.Count > 0) { kits = new MetaHash[items.Count]; for (int i = 0; i < items.Count; i++) @@ -134,11 +133,11 @@ namespace CodeWalker.GameFiles } } } - cnode = node.SelectSingleNode("windowsWithExposedEdges"); - if (cnode != null) + var windowsNodes = node.SelectSingleNode("windowsWithExposedEdges"); + if (windowsNodes is not null) { - var items = cnode.SelectNodes("Item"); - if (items.Count > 0) + var items = windowsNodes.SelectNodes("Item"); + if (items is not null && items.Count > 0) { windowsWithExposedEdges = new MetaHash[items.Count]; for (int i = 0; i < items.Count; i++) @@ -147,10 +146,10 @@ namespace CodeWalker.GameFiles } } } - cnode = node.SelectSingleNode("plateProbabilities"); - if (cnode != null) + var plateProbabilitiesNode = node.SelectSingleNode("plateProbabilities"); + if (plateProbabilitiesNode is not null) { - plateProbabilities = new PlateProbabilities(cnode); + plateProbabilities = new PlateProbabilities(plateProbabilitiesNode); } lightSettings = (byte)Xml.GetChildIntAttribute(node, "lightSettings", "value"); sirenSettings = (byte)Xml.GetChildIntAttribute(node, "sirenSettings", "value"); @@ -168,28 +167,25 @@ namespace CodeWalker.GameFiles public CVehicleModelInfoVariation_2575850962(XmlNode node) { - XmlNode cnode; - cnode = node.SelectSingleNode("indices"); - if (cnode != null) + var indicesNode = node.SelectSingleNode("indices"); + if (indicesNode is not null) { - var astr = cnode.InnerText; - var arrr = astr.Split(new[] { '\n', ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); + var astr = indicesNode.InnerText; var alist = new List(); - foreach (var item in arrr) + foreach (var item in astr.EnumerateSplitAny(['\n', ' ', '\t'])) { var titem = item.Trim(); - byte v; - if (byte.TryParse(titem, out v)) + if (byte.TryParse(titem, out var v)) { alist.Add(v); } } indices = alist.ToArray(); } - cnode = node.SelectSingleNode("liveries"); - if (cnode != null) + var liveriesNode = node.SelectSingleNode("liveries"); + if (liveriesNode is not null) { - var items = cnode.SelectNodes("Item"); + var items = liveriesNode.SelectNodes("Item"); if (items.Count > 0) { liveries = new bool[items.Count]; @@ -200,14 +196,12 @@ namespace CodeWalker.GameFiles } else { - var astr = cnode.InnerText; - var arrr = astr.Split(new[] { '\n', ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); + var astr = liveriesNode.InnerText; var alist = new List(); - foreach (var item in arrr) + foreach (var item in astr.EnumerateSplitAny(['\n', ' ', '\t'])) { var titem = item.Trim(); - byte v; - if (byte.TryParse(titem, out v)) + if (byte.TryParse(titem, out var v)) { alist.Add(v > 0); } @@ -254,7 +248,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Name.ToString() + ": " + Value.ToString(); + return $"{Name}: {Value}"; } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/CutFile.cs b/CodeWalker.Core/GameFiles/FileTypes/CutFile.cs index 627c871..fbbc1ee 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/CutFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/CutFile.cs @@ -9,6 +9,7 @@ using System.Xml; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; +using Collections.Pooled; namespace CodeWalker.GameFiles { @@ -33,12 +34,10 @@ namespace CodeWalker.GameFiles { FileEntry = entry; - MemoryStream ms = new MemoryStream(data); - - if (PsoFile.IsPSO(ms)) + if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); - Pso.Load(ms); + Pso.Load(data); var xml = PsoXml.GetXml(Pso); XmlDocument doc = new XmlDocument(); @@ -48,10 +47,6 @@ namespace CodeWalker.GameFiles CutsceneFile2 = new CutsceneFile2(); CutsceneFile2.ReadXml(node); - } - else - { - } } @@ -228,7 +223,7 @@ namespace CodeWalker.GameFiles - public static CutBase ConstructObject(string type) + public static CutBase? ConstructObject(string type) { switch (type) { @@ -279,7 +274,7 @@ namespace CodeWalker.GameFiles default: return null; } } - public static T ReadObject(XmlNode node, string name) where T : IMetaXmlItem, new() + public static T? ReadObject(XmlNode node, string name) where T : IMetaXmlItem, new() { var onode = node.SelectSingleNode(name); if (onode != null) @@ -288,7 +283,7 @@ namespace CodeWalker.GameFiles o.ReadXml(onode); return o; } - return default(T); + return default; } public static object[] ReadObjectArray(XmlNode node, string name) { @@ -298,7 +293,7 @@ namespace CodeWalker.GameFiles var inodes = aNode.SelectNodes("Item"); if (inodes?.Count > 0) { - var oList = new List(); + using var oList = new PooledList(); foreach (XmlNode inode in inodes) { var type = Xml.GetStringAttribute(inode, "type"); diff --git a/CodeWalker.Core/GameFiles/FileTypes/DlcContentFile.cs b/CodeWalker.Core/GameFiles/FileTypes/DlcContentFile.cs index 078c89b..124df79 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/DlcContentFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/DlcContentFile.cs @@ -1,24 +1,76 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using System.Reflection.PortableExecutable; using System.Text; using System.Threading.Tasks; using System.Xml; +using System.Xml.Linq; namespace CodeWalker.GameFiles { public class DlcContentFile { - public List dataFiles { get; set; } = new List(); public List contentChangeSets { get; set; } = new List(); public RpfFile DlcFile { get; set; } //used by GameFileCache - public Dictionary ExtraMounts { get; set; } = new Dictionary(); - public Dictionary RpfDataFiles { get; set; } = new Dictionary(); + public Dictionary ExtraMounts { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); + public Dictionary RpfDataFiles { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); public DlcExtraTitleUpdateFile ExtraTitleUpdates { get; set; } + public void Load(XmlReader reader) + { + reader.MoveToStartElement("CDataFileMgr__ContentsOfDataFileXml"); + while (reader.Read()) + { + switch (reader.MoveToContent()) + { + case XmlNodeType.Element: + ReadElement(reader); + break; + case XmlNodeType.EndElement: + if (reader.Name == "CDataFileMgr__ContentsOfDataFileXml") + { + //Reached end of file + return; + } + break; + default: + break; + } + } + } + + public void ReadElement(XmlReader reader) + { + switch(reader.Name) + { + case "disabledFiles": + case "includedXmlFiles": + case "includedDataFiles": + case "patchFiles": + reader.Skip(); + return; + + case "dataFiles": + foreach(var item in reader.IterateItems("dataFiles")) + { + dataFiles.Add(new DlcContentDataFile(item)); + } + return; + + case "contentChangeSets": + foreach(var item in reader.IterateItems("contentChangeSets")) + { + contentChangeSets.Add(new DlcContentChangeSet(item)); + } + return; + } + } + public void Load(XmlDocument doc) { @@ -32,16 +84,16 @@ namespace CodeWalker.GameFiles switch (node.Name) { case "disabledFiles": - foreach (XmlNode disabledFile in node.ChildNodes) - { } //nothing to see here.. + //foreach (XmlNode disabledFile in node.ChildNodes) + //{ } //nothing to see here.. break; case "includedXmlFiles": - foreach (XmlNode includedXmlFile in node.ChildNodes) - { } //nothing to see here.. + //foreach (XmlNode includedXmlFile in node.ChildNodes) + //{ } //nothing to see here.. break; case "includedDataFiles": - foreach (XmlNode includedDataFile in node.ChildNodes) - { } //nothing to see here.. + //foreach (XmlNode includedDataFile in node.ChildNodes) + //{ } //nothing to see here.. break; case "dataFiles": foreach (XmlNode dataFile in node.ChildNodes) @@ -62,8 +114,8 @@ namespace CodeWalker.GameFiles } break; case "patchFiles": - foreach (XmlNode patchFile in node.ChildNodes) - { } //nothing to see here.. + //foreach (XmlNode patchFile in node.ChildNodes) + //{ } //nothing to see here.. break; default: break; @@ -82,21 +134,21 @@ namespace CodeWalker.GameFiles foreach (var datafile in dataFiles) { - string dfn = GameFileCache.GetDlcPlatformPath(datafile.filename).ToLowerInvariant(); + string dlcPlatformPath = GameFileCache.GetDlcPlatformPath(datafile.filename); if (datafile.fileType == "EXTRA_FOLDER_MOUNT_DATA") { - string efmdxmlpath = datafile.filename.Replace(setupfile.deviceName + ":", DlcFile.Path).Replace('/', '\\'); + string efmdxmlpath = datafile.filename.Replace($"{setupfile.deviceName}:", DlcFile.Path).Replace('/', '\\'); efmdxmlpath = gfc.GetDlcPatchedPath(efmdxmlpath); XmlDocument efmdxml = rpfman.GetFileXml(efmdxmlpath); DlcExtraFolderMountFile efmf = new DlcExtraFolderMountFile(); efmf.Load(efmdxml); - ExtraMounts[dfn] = efmf; + ExtraMounts[dlcPlatformPath] = efmf; } if (datafile.fileType == "EXTRA_TITLE_UPDATE_DATA") { - string etudxmlpath = datafile.filename.Replace(setupfile.deviceName + ":", DlcFile.Path).Replace('/', '\\'); + string etudxmlpath = datafile.filename.Replace($"{setupfile.deviceName}:", DlcFile.Path).Replace('/', '\\'); etudxmlpath = gfc.GetDlcPatchedPath(etudxmlpath); XmlDocument etudxml = rpfman.GetFileXml(etudxmlpath); @@ -107,7 +159,7 @@ namespace CodeWalker.GameFiles } if (datafile.fileType == "RPF_FILE") { - RpfDataFiles[dfn] = datafile; + RpfDataFiles[dlcPlatformPath] = datafile; } } @@ -115,7 +167,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return dataFiles.Count.ToString() + " dataFiles, " + contentChangeSets.Count.ToString() + " contentChangeSets"; + return $"{dataFiles.Count} dataFiles, {contentChangeSets.Count} contentChangeSets"; } } @@ -135,6 +187,52 @@ namespace CodeWalker.GameFiles { Load(node); } + + public DlcContentDataFile(XElement xElement) + { + Load(xElement); + } + + public void Load(XElement xElement) + { + foreach(var child in xElement.Elements()) + { + switch(child.Name.LocalName) + { + case "filename": + filename = child.Value; + break; + case "fileType": + fileType = child.Value; + break; + case "contents": + contents = child.Value; + break; + case "installPartition": + installPartition = child.Value; + break; + case "overlay": + overlay = child.GetBoolAttribute("value"); + break; + case "disabled": + disabled = child.GetBoolAttribute("value"); + break; + case "persistent": + persistent = child.GetBoolAttribute("value"); + break; + case "loadCompletely": + loadCompletely = child.GetBoolAttribute("value"); + break; + case "locked": + locked = child.GetBoolAttribute("value"); + break; + default: + break; + + } + } + } + public void Load(XmlNode node) { foreach (XmlNode child in node.ChildNodes) @@ -176,36 +274,98 @@ namespace CodeWalker.GameFiles public override string ToString() { - return filename + ": " + fileType + ": " + contents + ": " + installPartition + - (overlay ? ", overlay" : "") + - (disabled ? ", disabled" : "") + - (persistent ? ", persistent" : "") + - (loadCompletely ? ", loadCompletely" : "") + - (locked ? ", locked" : ""); + return $"{filename}: {fileType}: {contents}: {installPartition}{(overlay ? ", overlay" : "")}{(disabled ? ", disabled" : "")}{(persistent ? ", persistent" : "")}{(loadCompletely ? ", loadCompletely" : "")}{(locked ? ", locked" : "")}"; } } public class DlcContentChangeSet { public string changeSetName { get; set; } - public List filesToInvalidate { get; set; } - public List filesToDisable { get; set; } - public List filesToEnable { get; set; } - public List txdToLoad { get; set; } - public List txdToUnload { get; set; } - public List residentResources { get; set; } - public List unregisterResources { get; set; } - public List mapChangeSetData { get; set; } + public List? filesToInvalidate { get; set; } + public List? filesToDisable { get; set; } + public List? filesToEnable { get; set; } + public List? txdToLoad { get; set; } + public List? txdToUnload { get; set; } + public List? residentResources { get; set; } + public List? unregisterResources { get; set; } + public List? mapChangeSetData { get; set; } public string associatedMap { get; set; } public bool requiresLoadingScreen { get; set; } public string loadingScreenContext { get; set; } public bool useCacheLoader { get; set; } public DlcContentChangeSetExecutionConditions executionConditions { get; set; } + public DlcContentChangeSet(XElement element) + { + Load(element); + } + public DlcContentChangeSet(XmlNode node) { Load(node); } + + public void Load(XElement element) + { + foreach(var child in element.Elements()) + { + switch (child.Name.LocalName) + { + case "changeSetName": + changeSetName = child.Value; + break; + case "filesToInvalidate": + filesToInvalidate = GetChildStringArray(child); + break; + case "filesToDisable": + filesToDisable = GetChildStringArray(child); + break; + case "filesToEnable": + filesToEnable = GetChildStringArray(child); + break; + case "txdToLoad": + txdToLoad = GetChildStringArray(child); + break; + case "txdToUnload": + txdToUnload = GetChildStringArray(child); + break; + case "residentResources": + residentResources = GetChildStringArray(child); + break; + case "unregisterResources": + unregisterResources = GetChildStringArray(child); + break; + case "mapChangeSetData": + if (child.HasElements) + { + mapChangeSetData = new List(); + foreach (XElement childElement in child.Elements()) + { + mapChangeSetData.Add(new DlcContentChangeSet(childElement)); + } + } + break; + case "associatedMap": + associatedMap = child.Value; + break; + case "requiresLoadingScreen": + requiresLoadingScreen = Xml.GetBoolAttribute(child, "value"); + break; + case "loadingScreenContext": + loadingScreenContext = child.Value; + break; + case "useCacheLoader": + useCacheLoader = Xml.GetBoolAttribute(child, "value"); + break; + case "executionConditions": + executionConditions = new DlcContentChangeSetExecutionConditions(child); + break; + default: + break; + } + } + } + public void Load(XmlNode node) { foreach (XmlNode child in node.ChildNodes) @@ -217,44 +377,33 @@ namespace CodeWalker.GameFiles break; case "filesToInvalidate": filesToInvalidate = GetChildStringArray(child); - if (filesToInvalidate != null) - { } break; case "filesToDisable": filesToDisable = GetChildStringArray(child); - if (filesToDisable != null) - { } break; case "filesToEnable": filesToEnable = GetChildStringArray(child); - if (filesToEnable != null) - { } break; case "txdToLoad": txdToLoad = GetChildStringArray(child); - if (txdToLoad != null) - { } break; case "txdToUnload": txdToUnload = GetChildStringArray(child); - if (txdToUnload != null) - { } break; case "residentResources": residentResources = GetChildStringArray(child); - if (residentResources != null) - { } break; case "unregisterResources": unregisterResources = GetChildStringArray(child); - if (unregisterResources != null) - { } break; case "mapChangeSetData": - mapChangeSetData = new List(); - foreach (XmlNode mapChangeSetDataItem in child.ChildNodes) + if (child.HasChildNodes) { - mapChangeSetData.Add(new DlcContentChangeSet(mapChangeSetDataItem)); + mapChangeSetData = new List(); + foreach (XmlNode mapChangeSetDataItem in child.ChildNodes) + { + mapChangeSetData.Add(new DlcContentChangeSet(mapChangeSetDataItem)); + } } break; case "associatedMap": @@ -292,6 +441,20 @@ namespace CodeWalker.GameFiles return result; } + private List? GetChildStringArray(XElement node) + { + if (!node.HasElements) return null; + + var result = new List(); + foreach(XElement childNode in node.Elements()) + { + result.Add(childNode.Value); + } + + return result; + } + + public override string ToString() { return (changeSetName != null) ? changeSetName : (associatedMap != null) ? associatedMap : null; @@ -308,6 +471,30 @@ namespace CodeWalker.GameFiles { Load(node); } + + public DlcContentChangeSetExecutionConditions(XElement element) + { + Load(element); + } + + public void Load(XElement element) + { + foreach (XElement child in element.Elements()) + { + switch (child.Name.LocalName) + { + case "activeChangesetConditions": + activeChangesetConditions = child.Value; + break; + case "genericConditions": + genericConditions = child.Value; + break; + default: + break; + } + } + } + public void Load(XmlNode node) { foreach (XmlNode child in node.ChildNodes) diff --git a/CodeWalker.Core/GameFiles/FileTypes/DlcSetupFile.cs b/CodeWalker.Core/GameFiles/FileTypes/DlcSetupFile.cs index 760453a..705ff9e 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/DlcSetupFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/DlcSetupFile.cs @@ -53,7 +53,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return deviceName + ", " + datFile + ", " + nameHash + ", " + type + ", " + order.ToString() + ", " + ((contentChangeSetGroups != null) ? contentChangeSetGroups.Count.ToString() : "0") + " groups, " + timeStamp; + return $"{deviceName}, {datFile}, {nameHash}, {type}, {order}, {contentChangeSetGroups?.Count ?? 0} groups, {timeStamp}"; } } @@ -77,7 +77,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return NameHash + " (" + ((ContentChangeSets != null) ? ContentChangeSets.Count.ToString() : "0") + " changesets)"; + return $"{NameHash} ({ContentChangeSets?.Count ?? 0} changesets)"; } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/FxcFile.cs b/CodeWalker.Core/GameFiles/FileTypes/FxcFile.cs index 49c0517..3668327 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/FxcFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/FxcFile.cs @@ -683,7 +683,8 @@ namespace CodeWalker.GameFiles public static string ReadString(BinaryReader br) { byte sl = br.ReadByte(); - if (sl == 0) return string.Empty; + if (sl == 0) + return string.Empty; byte[] ba = br.ReadBytes(sl); return (sl > 1) ? Encoding.ASCII.GetString(ba, 0, sl - 1) : string.Empty; } @@ -1073,8 +1074,10 @@ namespace CodeWalker.GameFiles var filepath = Path.Combine(csofolder, fname); File.WriteAllBytes(filepath, ByteCode); } - catch - { } + catch(Exception ex) + { + Console.WriteLine(ex); + } } } } @@ -1840,7 +1843,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Type.ToString() + ", " + Value.ToString(); + return $"{Type}, {Value}"; } } @@ -1856,18 +1859,25 @@ namespace CodeWalker.GameFiles public static string GetXml(FxcFile fxc, string outputFolder = "") { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if ((fxc != null) && (fxc.Shaders != null)) + StringBuilder sb = StringBuilderPool.Get(); + try { - var name = "Effects"; - OpenTag(sb, 0, name); - fxc.WriteXml(sb, 1, outputFolder); - CloseTag(sb, 0, name); - } + sb.AppendLine(XmlHeader); - return sb.ToString(); + if ((fxc != null) && (fxc.Shaders != null)) + { + var name = "Effects"; + OpenTag(sb, 0, name); + fxc.WriteXml(sb, 1, outputFolder); + CloseTag(sb, 0, name); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); + } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs b/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs index 3c5c319..8ecb54d 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/GtxdFile.cs @@ -1,4 +1,7 @@ -using System; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; +using System; +using System.Buffers; using System.Collections.Generic; using System.ComponentModel; using System.IO; @@ -9,16 +12,12 @@ using System.Xml; namespace CodeWalker.GameFiles { - [TypeConverter(typeof(ExpandableObjectConverter))] public class GtxdFile : GameFile, PackedFile + [TypeConverter(typeof(ExpandableObjectConverter))] + public class GtxdFile : GameFile, PackedFile { - public RbfFile Rbf { get; set; } - - public Dictionary TxdRelationships { get; set; } - - - + public PooledDictionary TxdRelationships { get; set; } public GtxdFile() : base(null, GameFileType.Gtxd) { @@ -36,13 +35,15 @@ namespace CodeWalker.GameFiles FilePath = Name; - if (entry.Name.EndsWith(".ymt", StringComparison.OrdinalIgnoreCase)) + if (entry.IsExtension(".ymt")) { - MemoryStream ms = new MemoryStream(data); - if (RbfFile.IsRBF(ms)) + if (RbfFile.IsRBF(data.AsSpan(0, 4))) { + //using MemoryStream ms = new MemoryStream(data); + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); Rbf = new RbfFile(); - var rbfstruct = Rbf.Load(ms); + var rbfstruct = Rbf.Load(ref reader); if (rbfstruct.Name == "CMapParentTxds") { @@ -52,12 +53,8 @@ namespace CodeWalker.GameFiles Loaded = true; return; } - else - { - //not an RBF file... - } } - else if (entry.Name.EndsWith(".meta", StringComparison.OrdinalIgnoreCase)) + else if (entry.IsExtension(".meta")) { //required for update\x64\dlcpacks\mpheist\dlc.rpf\common\data\gtxd.meta and update\x64\dlcpacks\mpluxe\dlc.rpf\common\data\gtxd.meta string xml = TextUtil.GetUTF8Text(data); @@ -73,30 +70,31 @@ namespace CodeWalker.GameFiles private void LoadTxdRelationships(RbfStructure rbfstruct) { - TxdRelationships = new Dictionary(); + TxdRelationships?.Clear(); + if (rbfstruct.Children is null) + return; + + TxdRelationships ??= new PooledDictionary(); //StringBuilder sblist = new StringBuilder(); - foreach (var child in rbfstruct.Children) + foreach (var child in rbfstruct.Children.Span) { - var childstruct = child as RbfStructure; - if ((childstruct != null) && (childstruct.Name == "txdRelationships")) + if (child is RbfStructure childstruct && childstruct.Name == "txdRelationships" && childstruct.Children is not null) { + TxdRelationships.EnsureCapacity(TxdRelationships.Count + childstruct.Children.Count); foreach (var txdrel in childstruct.Children) { - var txdrelstruct = txdrel as RbfStructure; - if ((txdrelstruct != null) && (txdrelstruct.Name == "item")) + if (txdrel is RbfStructure txdrelstruct && txdrelstruct.Name == "item" && txdrelstruct.Children is not null) { string parentstr = string.Empty; string childstr = string.Empty; foreach (var item in txdrelstruct.Children) { - var itemstruct = item as RbfStructure; - if ((itemstruct != null)) + if (item is RbfStructure itemstruct) { - var strbytes = itemstruct.Children[0] as RbfBytes; string thisstr = string.Empty; - if (strbytes != null) + if (itemstruct.Children is not null && itemstruct.Children.Count > 0 && itemstruct.Children[0] is RbfBytes strbytes) { - thisstr = Encoding.ASCII.GetString(strbytes.Value).Replace("\0", ""); + thisstr = strbytes.GetNullTerminatedString(); } switch (item.Name) { @@ -108,17 +106,10 @@ namespace CodeWalker.GameFiles break; } } - } - if ((!string.IsNullOrEmpty(parentstr)) && (!string.IsNullOrEmpty(childstr))) + if (!string.IsNullOrEmpty(parentstr) && !string.IsNullOrEmpty(childstr)) { - if (!TxdRelationships.ContainsKey(childstr)) - { - TxdRelationships.Add(childstr, parentstr); - } - else - { - } + _ = TxdRelationships.TryAdd(childstr, parentstr); //sblist.AppendLine(childstr + ": " + parentstr); } } @@ -140,21 +131,26 @@ namespace CodeWalker.GameFiles xmldoc.LoadXml(xml); //maybe better load xml.ToLower() and use "cmapparenttxds/txdrelationships/item" as xpath? XmlNodeList items = xmldoc.SelectNodes("CMapParentTxds/txdRelationships/Item | CMapParentTxds/txdRelationships/item"); - TxdRelationships = new Dictionary(); + TxdRelationships = new PooledDictionary(items.Count); for (int i = 0; i < items.Count; i++) { string parentstr = Xml.GetChildInnerText(items[i], "parent"); string childstr = Xml.GetChildInnerText(items[i], "child"); - if ((!string.IsNullOrEmpty(parentstr)) && (!string.IsNullOrEmpty(childstr))) + if (!string.IsNullOrEmpty(parentstr) && !string.IsNullOrEmpty(childstr)) { - if (!TxdRelationships.ContainsKey(childstr)) - { - TxdRelationships.Add(childstr, parentstr); - } + _ = TxdRelationships.TryAdd(childstr, parentstr); } } } + public override void Dispose() + { + TxdRelationships?.Dispose(); + Rbf?.Dispose(); + GC.SuppressFinalize(this); + base.Dispose(); + } + } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/Gxt2File.cs b/CodeWalker.Core/GameFiles/FileTypes/Gxt2File.cs index 58f656c..d82f03a 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/Gxt2File.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/Gxt2File.cs @@ -1,8 +1,11 @@ using System; +using System.Buffers; +using System.Buffers.Binary; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; +using CodeWalker.Core.Utils; using System.IO; using System.Linq; using System.Text; @@ -26,52 +29,45 @@ namespace CodeWalker.GameFiles FileEntry = entry; //Dict = new Dictionary(); - using (BinaryReader br = new BinaryReader(new MemoryStream(data))) + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); + reader.TryReadLittleEndian(out uint gxt2); + if (gxt2 != 1196971058) { - uint gxt2 = br.ReadUInt32(); //"GXT2" - 1196971058 - if (gxt2 != 1196971058) - { return; } + return; + } - EntryCount = br.ReadUInt32(); - TextEntries = new Gxt2Entry[EntryCount]; - for (uint i = 0; i < EntryCount; i++) - { - var e = new Gxt2Entry(); - e.Hash = br.ReadUInt32(); - e.Offset = br.ReadUInt32(); - TextEntries[i] = e; - } + reader.TryReadLittleEndian(out uint entryCount); + EntryCount = entryCount; + TextEntries = new Gxt2Entry[EntryCount]; + for (uint i = 0; i < EntryCount; i++) + { + + reader.TryReadLittleEndian(out uint hash); + reader.TryReadLittleEndian(out uint offset); + TextEntries[i] = new Gxt2Entry(hash, string.Empty, offset); + } - gxt2 = br.ReadUInt32(); //another "GXT2" - if (gxt2 != 1196971058) - { return; } + reader.TryReadLittleEndian(out gxt2); //another "GXT2" + if (gxt2 != 1196971058) + { + return; + } - uint endpos = br.ReadUInt32(); - - List buf = new List(); - - for (uint i = 0; i < EntryCount; i++) - { - var e = TextEntries[i]; - br.BaseStream.Position = e.Offset; - - buf.Clear(); - byte b = br.ReadByte(); - while ((b != 0) && (br.BaseStream.Position(new ReadOnlySequence(data, (int)e.Offset, data.Length - (int)e.Offset)); + strReader.TryReadTo(out ReadOnlySpan str, 0); + e = new Gxt2Entry(e.Hash, Encoding.UTF8.GetString(str), e.Offset); } } public byte[] Save() { - if (TextEntries == null) TextEntries = new Gxt2Entry[0]; + if (TextEntries == null) + TextEntries = []; EntryCount = (uint)TextEntries.Length; uint offset = 16 + (EntryCount * 8); List datas = new List(); @@ -81,10 +77,10 @@ namespace CodeWalker.GameFiles bw.Write(1196971058); //"GXT2" bw.Write(EntryCount); - foreach (var e in TextEntries) + foreach (ref var e in TextEntries.AsSpan()) { - e.Offset = offset; - var d = Encoding.UTF8.GetBytes(e.Text + "\0"); + e = new Gxt2Entry(e.Hash, e.Text, offset); + var d = Encoding.UTF8.GetBytes($"{e.Text}\0"); datas.Add(d); offset += (uint)d.Length; bw.Write(e.Hash); @@ -113,11 +109,7 @@ namespace CodeWalker.GameFiles { foreach (var entry in TextEntries) { - sb.Append("0x"); - sb.Append(entry.Hash.ToString("X").PadLeft(8, '0')); - sb.Append(" = "); - sb.Append(entry.Text); - sb.AppendLine(); + sb.AppendLine($"0x{entry.Hash:X8} = {entry.Text}"); } } return sb.ToString(); @@ -125,17 +117,15 @@ namespace CodeWalker.GameFiles public static Gxt2File FromText(string text) { var gxt = new Gxt2File(); - var lines = text?.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries) ?? new string[0]; var entries = new List(); - foreach (var line in lines) + foreach (var line in text.EnumerateSplit('\n')) { var tline = line.Trim(); - if (tline.Length < 13) continue; - if (uint.TryParse(tline.Substring(2, 8), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out uint hash)) + if (tline.Length < 13) + continue; + if (uint.TryParse(tline.Slice(2, 8), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out uint hash)) { - var entry = new Gxt2Entry(); - entry.Hash = hash; - entry.Text = (tline.Length > 13) ? tline.Substring(13) : ""; + var entry = new Gxt2Entry(hash, (tline.Length > 13) ? tline.Slice(13).ToString() : ""); entries.Add(entry); } else @@ -152,15 +142,34 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class Gxt2Entry + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct Gxt2Entry { - public uint Hash { get; set; } - public uint Offset { get; set; } - public string Text { get; set; } + public uint Hash { get; init; } + public uint Offset { get; init; } + public string Text { get; init; } - public override string ToString() + public Gxt2Entry() { - return Convert.ToString(Hash, 16).ToUpper().PadLeft(8, '0') + ": " + Text; + + } + + public Gxt2Entry(uint hash, string text) + { + Hash = hash; + Text = text; + } + + public Gxt2Entry(uint hash, string text, uint offset) + { + Hash = hash; + Text = text; + Offset = offset; + } + + public override readonly string ToString() + { + return $"{Hash:X8}: {Text}"; } } @@ -190,10 +199,11 @@ namespace CodeWalker.GameFiles return !Index.TryAdd(hash, str); } - public static bool Ensure(string str, uint hash) + public static void Ensure(string str, uint hash) { - if (hash == 0) return true; - return !Index.TryAdd(hash, str); + if (hash == 0) + return; + _ = Index.TryAdd(hash, str); } public static string GetString(uint hash) @@ -215,6 +225,8 @@ namespace CodeWalker.GameFiles return res; } + public static bool TryGetString(uint hash, out string res) => Index.TryGetValue(hash, out res); + public static uint TryFindHash(string text) { lock (syncRoot) diff --git a/CodeWalker.Core/GameFiles/FileTypes/HeightmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/HeightmapFile.cs index d29525c..38cf4ba 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/HeightmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/HeightmapFile.cs @@ -99,7 +99,7 @@ namespace CodeWalker.GameFiles CompHeaders = new CompHeader[Height]; for (int i = 0; i < Height; i++) { - CompHeaders[i].Read(r); + CompHeaders[i] = new CompHeader(r); } dlen -= (Height * 8); } @@ -173,8 +173,7 @@ namespace CodeWalker.GameFiles d1.Add(MaxHeights[n]); d2.Add(MinHeights[n]); } - var h = new CompHeader() { Start = (ushort)start, Count = (ushort)count, DataOffset = offset }; - ch[y] = h; + ch[y] = new CompHeader((ushort)start, (ushort)count, offset); } d1.AddRange(d2);//the 2 sets of compressed data are just smushed together d = d1.ToArray(); @@ -243,7 +242,7 @@ namespace CodeWalker.GameFiles - private byte[] InvertImage(byte[] i, int w, int h) + private static byte[] InvertImage(byte[] i, int w, int h) { //inverts the image vertically byte[] o = new byte[i.Length]; @@ -262,7 +261,8 @@ namespace CodeWalker.GameFiles public string GetPGM() { - if (MaxHeights == null) return string.Empty; + if (MaxHeights == null) + return string.Empty; var sb = new StringBuilder(); sb.AppendFormat("P2\n{0} {1}\n255\n", Width, Height); @@ -272,10 +272,10 @@ namespace CodeWalker.GameFiles for (int x = 0; x < Width; x++) { var h = MaxHeights[y * Width + x]; - sb.Append(h.ToString()); - sb.Append(" "); + sb.Append(h); + sb.Append(' '); } - sb.Append("\n"); + sb.Append('\n'); } return sb.ToString(); @@ -283,18 +283,20 @@ namespace CodeWalker.GameFiles - public struct CompHeader + public readonly struct CompHeader(ushort start, ushort count, int dataOffset) { - public ushort Start; - public ushort Count; - public int DataOffset; + public readonly ushort Start = start; + public readonly ushort Count = count; + public readonly int DataOffset = dataOffset; - public void Read(DataReader r) + public CompHeader(DataReader r) : this(r.ReadUInt16(), r.ReadUInt16(), r.ReadInt32()) + { } + + public static CompHeader Read(DataReader r) { - Start = r.ReadUInt16(); - Count = r.ReadUInt16(); - DataOffset = r.ReadInt32(); + return new CompHeader(r); } + public void Write(DataWriter w) { w.Write(Start); @@ -304,7 +306,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Start.ToString() + ", " + Count.ToString() + ", " + DataOffset.ToString(); + return $"{Start}, {Count}, {DataOffset}"; } } @@ -316,24 +318,29 @@ namespace CodeWalker.GameFiles public static string GetXml(HeightmapFile hmf) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if ((hmf != null) && (hmf.MaxHeights != null)) + StringBuilder sb = StringBuilderPool.Get(); + try { - var name = "Heightmap"; + sb.AppendLine(XmlHeader); - OpenTag(sb, 0, name); + if ((hmf != null) && (hmf.MaxHeights != null)) + { + var name = "Heightmap"; - hmf.WriteXml(sb, 1); + OpenTag(sb, 0, name); - CloseTag(sb, 0, name); + hmf.WriteXml(sb, 1); + + CloseTag(sb, 0, name); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } - - } diff --git a/CodeWalker.Core/GameFiles/FileTypes/JPsoFile.cs b/CodeWalker.Core/GameFiles/FileTypes/JPsoFile.cs index 8062e5f..24caa9d 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/JPsoFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/JPsoFile.cs @@ -29,9 +29,6 @@ namespace CodeWalker.GameFiles //PsoTypes.EnsurePsoTypes(Pso); var root = PsoTypes.GetRootEntry(Pso); - if (root != null) - { - } return; } else diff --git a/CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs b/CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs index 12827ca..6a0a6c7 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/MrfFile.cs @@ -5384,7 +5384,7 @@ namespace CodeWalker.GameFiles public static void WriteNodeRef(StringBuilder sb, int indent, string name, MrfNode node) { Indent(sb, indent); - sb.Append("<"); + sb.Append('<'); sb.Append(name); sb.Append(" ref=\""); sb.Append(HashString(node.Name)); diff --git a/CodeWalker.Core/GameFiles/FileTypes/PedFile.cs b/CodeWalker.Core/GameFiles/FileTypes/PedFile.cs index 82f0788..670e2d5 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/PedFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/PedFile.cs @@ -8,6 +8,8 @@ using System.Xml; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; +using System.Buffers.Binary; +using System.Buffers; namespace CodeWalker.GameFiles { @@ -18,6 +20,8 @@ namespace CodeWalker.GameFiles public RbfFile Rbf { get; set; } public string Xml { get; set; } + public MetaHash DlcName => VariationInfo.Data.dlcName; + public string GameDlcName { get; set; } public MCPedVariationInfo VariationInfo { get; set; } @@ -39,8 +43,7 @@ namespace CodeWalker.GameFiles FilePath = Name; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { NonMetaLoad(data); Loaded = true; @@ -66,10 +69,10 @@ namespace CodeWalker.GameFiles { var vVariationInfo = MetaTypes.GetTypedData(Meta, MetaName.CPedVariationInfo); VariationInfo = new MCPedVariationInfo(); - VariationInfo.Load(Meta, vVariationInfo); + VariationInfo.Load(Meta, in vVariationInfo); Strings = MetaTypes.GetStrings(Meta); - if (Strings != null) + if (Strings is not null) { foreach (string str in Strings) { @@ -82,7 +85,7 @@ namespace CodeWalker.GameFiles var vVariationInfo = PsoTypes.GetRootItem(Pso); VariationInfo = new MCPedVariationInfo(); - VariationInfo.Load(Pso, vVariationInfo); + VariationInfo.Load(Pso, in vVariationInfo); } @@ -90,18 +93,24 @@ namespace CodeWalker.GameFiles private void NonMetaLoad(byte[] data) { //non meta not supported yet! but see what's in there... - MemoryStream ms = new MemoryStream(data); - if (RbfFile.IsRBF(ms)) + if (RbfFile.IsRBF(data.AsSpan(0, 4))) { Rbf = new RbfFile(); - Rbf.Load(ms); + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); + Rbf.Load(ref reader); } - else if (PsoFile.IsPSO(ms)) + else if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); - Pso.Load(ms); + Pso.Load(data); LoadPso(); } } + + public override string ToString() + { + return Path.GetFileName(RpfFileEntry.Parent.Path); + } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/PedShopMetaFile.cs b/CodeWalker.Core/GameFiles/FileTypes/PedShopMetaFile.cs new file mode 100644 index 0000000..b5fdb32 --- /dev/null +++ b/CodeWalker.Core/GameFiles/FileTypes/PedShopMetaFile.cs @@ -0,0 +1,112 @@ +using CodeWalker.GameFiles; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TC = System.ComponentModel.TypeConverterAttribute; +using EXP = System.ComponentModel.ExpandableObjectConverter; +using System.Xml; +using System.IO; + +namespace CodeWalker.Core.GameFiles.FileTypes +{ + [TC(typeof(EXP))] + public class PedShopMetaFile : GameFile, PackedFile + { + public static XmlNameTableThreadSafe nameTable = new XmlNameTableThreadSafe(); + public string PedName { get; set; } + public string DlcName { get; set; } + public string FullDlcName { get; set; } + public string Character { get; set; } + public string CreateMetaData { get; set; } + + public PedShopMetaFile() : base(null, GameFileType.PedShopMeta) + { } + public PedShopMetaFile(RpfFileEntry entry) : base(entry, GameFileType.PedShopMeta) + { } + + public void Load(byte[] data, RpfFileEntry entry) + { + var xml = TextUtil.GetUTF8Text(data); + + using var xmlReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { NameTable = nameTable }); + + Load(xmlReader); + } + + public void Load(XmlReader reader) + { + reader.MoveToStartElement("ShopPedApparel"); + var startDepth = reader.Depth; + reader.ReadStartElement("ShopPedApparel"); + while (reader.Read() && startDepth < reader.Depth) + { + switch(reader.MoveToContent()) + { + case XmlNodeType.Element: + LoadElement(reader); + break; + case XmlNodeType.EndElement: + if (reader.Name == "ShopPedApparel") + { + return; + } + break; + } + } + } + + public void LoadElement(XmlReader reader) + { + switch(reader.Name) + { + case "pedName": + PedName = reader.ReadElementContentAsString(); + if (!string.IsNullOrEmpty(PedName)) + { + JenkIndex.EnsureBoth(PedName); + } + break; + case "dlcName": + DlcName = reader.ReadElementContentAsString(); + if (!string.IsNullOrEmpty(DlcName)) + { + JenkIndex.EnsureBoth(DlcName); + } + break; + case "fullDlcName": + FullDlcName = reader.ReadElementContentAsString(); + if (!string.IsNullOrEmpty(FullDlcName)) + { + JenkIndex.EnsureBoth(FullDlcName); + } + break; + case "eCharacter": + Character = reader.ReadElementContentAsString(); + if (!string.IsNullOrEmpty(Character)) + { + JenkIndex.EnsureBoth(Character); + } + break; + case "createMetaData": + CreateMetaData = reader.ReadElementContentAsString(); + if (!string.IsNullOrEmpty(CreateMetaData)) + { + JenkIndex.EnsureBoth(CreateMetaData); + } + break; + case "pedOutfits": + reader.Skip(); + break; + case "pedComponents": + reader.Skip(); + break; + case "pedProps": + reader.Skip(); + break; + + } + } + } +} diff --git a/CodeWalker.Core/GameFiles/FileTypes/PedsFile.cs b/CodeWalker.Core/GameFiles/FileTypes/PedsFile.cs index 1f0e295..e4eb9a2 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/PedsFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/PedsFile.cs @@ -10,13 +10,14 @@ using System.Xml; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; using System.Xml.Linq; +using Collections.Pooled; namespace CodeWalker.GameFiles { [TC(typeof(EXP))] public class PedsFile : GameFile, PackedFile { - private static XmlNameTable cachedNameTable = new System.Xml.NameTable(); + private static XmlNameTable cachedNameTable = new XmlNameTableThreadSafe(); public PsoFile Pso { get; set; } public string Xml { get; set; } @@ -36,8 +37,8 @@ namespace CodeWalker.GameFiles //can be PSO .ymt or XML .meta - using MemoryStream ms = new MemoryStream(data); - if (PsoFile.IsPSO(ms)) + //using MemoryStream ms = new MemoryStream(data); + if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); Pso.Load(data); @@ -63,7 +64,7 @@ namespace CodeWalker.GameFiles // } //} - using var xmlReader = XmlReader.Create(textReader, new XmlReaderSettings { NameTable = cachedNameTable, }); + using var xmlReader = XmlReader.Create(textReader, new XmlReaderSettings { NameTable = cachedNameTable }); //if (xdoc.DocumentElement != null) @@ -114,16 +115,18 @@ namespace CodeWalker.GameFiles break; } reader.ReadStartElement(); - var initDatasList = new List(); + using (var initDatasList = new PooledList()) + { + while (reader.IsItemElement()) + { + initDatasList.Add(new CPedModelInfo__InitData(reader)); + } + if (initDatasList.Count > 0) + { + InitDatas = initDatasList.ToArray(); + } + } - while (reader.IsItemElement()) - { - initDatasList.Add(new CPedModelInfo__InitData(reader)); - } - if (initDatasList.Count > 0) - { - InitDatas = initDatasList.ToArray(); - } reader.ReadEndElement(); break; case string Name when Name.Equals("txdRelationships", StringComparison.OrdinalIgnoreCase): @@ -133,17 +136,19 @@ namespace CodeWalker.GameFiles break; } reader.ReadStartElement(); - var txdRelationshipsList = new List(); + using (var txdRelationshipsList = new PooledList()) + { + while (reader.IsItemElement()) + { + txdRelationshipsList.Add(new CTxdRelationship(reader)); + } + reader.ReadEndElement(); + if (txdRelationshipsList.Count > 0) + { + txdRelationships = txdRelationshipsList.ToArray(); + } + } - while (reader.IsItemElement()) - { - txdRelationshipsList.Add(new CTxdRelationship(reader)); - } - reader.ReadEndElement(); - if (txdRelationshipsList.Count > 0) - { - txdRelationships = txdRelationshipsList.ToArray(); - } break; case string Name when Name.Equals("multiTxdRelationships", StringComparison.OrdinalIgnoreCase): if (reader.IsEmptyElement) @@ -152,16 +157,19 @@ namespace CodeWalker.GameFiles break; } reader.ReadStartElement(); - var multiTxdList = new List(); - while (reader.IsItemElement()) + using (var multiTxdList = new PooledList()) { - multiTxdList.Add(new CMultiTxdRelationship(reader)); - } - reader.ReadEndElement(); - if (multiTxdList.Count > 0) - { - multiTxdRelationships = multiTxdList.ToArray(); + while (reader.IsItemElement()) + { + multiTxdList.Add(new CMultiTxdRelationship(reader)); + } + reader.ReadEndElement(); + if (multiTxdList.Count > 0) + { + multiTxdRelationships = multiTxdList.ToArray(); + } } + break; default: break; @@ -334,13 +342,16 @@ namespace CodeWalker.GameFiles MovementClipSet = Xml.GetChildInnerText(reader, "MovementClipSet"); break; case "MovementClipSets": - var clipSetsList = new List(); - foreach(var item in Xml.IterateItems(reader, "MovementClipSets")) + using (var clipSetsList = new PooledList()) { - clipSetsList.Add(item.Value); + foreach (var item in Xml.IterateItems(reader, "MovementClipSets")) + { + clipSetsList.Add(item.Value); + } + + MovementClipSets = clipSetsList.ToArray(); } - MovementClipSets = clipSetsList.ToArray(); break; case "StrafeClipSet": StrafeClipSet = Xml.GetChildInnerText(reader, "StrafeClipSet"); @@ -707,7 +718,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return parent + ": " + (children?.Length ?? 0).ToString() + " children"; + return $"{parent}: {(children?.Length ?? 0)} children"; } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs index 947c542..8ab0eb4 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs @@ -10,6 +10,13 @@ using EXP = System.ComponentModel.ExpandableObjectConverter; using SharpDX; using System.Xml; using System.Text.RegularExpressions; +using System.Buffers; +using CodeWalker.Core.Utils; +using System.Threading; +using System.Diagnostics.CodeAnalysis; +using Collections.Pooled; +using System.Globalization; +using System.Runtime.CompilerServices; @@ -63,7 +70,8 @@ namespace CodeWalker.GameFiles Dat151 = 151 } - [TC(typeof(EXP))] public class RelFile : GameFile, PackedFile + [TC(typeof(EXP))] + public class RelFile : GameFile, PackedFile { public byte[] RawFileData { get; set; } public RelDatFileType RelType { get; set; } @@ -86,7 +94,9 @@ namespace CodeWalker.GameFiles public MetaHash[] PackTable { get; set; } public RelData[] RelDatas { get; set; } - public IEnumerable RelDatasSorted { get => RelDatas.OrderBy(p => p.DataOffset); } + + [NotNullIfNotNull(nameof(RelDatas))] + public IEnumerable? RelDatasSorted => RelDatas?.OrderBy(p => p.DataOffset); public Dictionary RelDataDict { get; set; } = new Dictionary(); public bool IsAudioConfig { get; set; } @@ -105,6 +115,7 @@ namespace CodeWalker.GameFiles RpfFileEntry = entry; } + [SkipLocalsInit] public unsafe string ReadString(BinaryReader br, int length, bool ignoreNullTerminator = false) { var bytes = stackalloc char[length]; @@ -133,23 +144,23 @@ namespace CodeWalker.GameFiles Name = entry.Name; } - using MemoryStream ms = new MemoryStream(data); - using BinaryReader br = new BinaryReader(ms); - StringBuilder sb = new StringBuilder(); - RelType = (RelDatFileType)br.ReadUInt32(); //type + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); - DataLength = br.ReadUInt32(); //length of data block - DataBlock = br.ReadBytes((int)DataLength); //main data block... + RelType = (RelDatFileType)reader.ReadUInt32(); //type - NameTableLength = br.ReadUInt32(); //length of this nametable block - NameTableCount = br.ReadUInt32(); + DataLength = reader.ReadUInt32(); //length of data block + DataBlock = reader.ReadBytes((int)DataLength).ToArray(); //main data block... + + NameTableLength = reader.ReadUInt32(); //length of this nametable block + NameTableCount = reader.ReadUInt32(); if (NameTableCount > 0) { uint[] ntoffsets = new uint[NameTableCount]; //string offsets for (uint i = 0; i < NameTableCount; i++) { - ntoffsets[i] = br.ReadUInt32(); + ntoffsets[i] = reader.ReadUInt32(); } NameTableOffsets = ntoffsets; string[] names = new string[NameTableCount]; @@ -167,7 +178,7 @@ namespace CodeWalker.GameFiles length = remainingLength; } - names[i] = ReadString(br, length); + names[i] = reader.ReadString(length); //JenkIndex.Ensure(names[i]); //really need both here..? JenkIndex.EnsureLower(names[i]); @@ -176,26 +187,25 @@ namespace CodeWalker.GameFiles NameTable = names; } - IndexCount = br.ReadUInt32(); //count of index items + IndexCount = reader.ReadUInt32(); //count of index items if (IndexCount > 0) { if ((RelType == RelDatFileType.Dat4) && (NameTableLength == 4))//audioconfig.dat4.rel //checking NameTableLength here doesn't make sense! { IsAudioConfig = true; - IndexStringFlags = br.ReadUInt32(); //what is this? 2524 - if (IndexStringFlags != 2524) - { } + IndexStringFlags = reader.ReadUInt32(); //what is this? 2524 RelIndexString[] indexstrs = new RelIndexString[IndexCount]; for (uint i = 0; i < IndexCount; i++) { - byte sl = br.ReadByte(); - var str = ReadString(br, (int)sl, true); - RelIndexString ristr = new RelIndexString(); - ristr.Name = str; - ristr.Offset = br.ReadUInt32(); - ristr.Length = br.ReadUInt32(); - indexstrs[i] = ristr; - JenkIndex.EnsureLower(ristr.Name); + byte sl = reader.ReadByte(); + var str = reader.ReadStringLength((int)sl); + indexstrs[i] = new RelIndexString + { + Name = str, + Offset = reader.ReadUInt32(), + Length = reader.ReadUInt32() + }; + JenkIndex.EnsureLower(indexstrs[i].Name); } IndexStrings = indexstrs; } @@ -204,55 +214,53 @@ namespace CodeWalker.GameFiles RelIndexHash[] indexhashes = new RelIndexHash[IndexCount]; for (uint i = 0; i < IndexCount; i++) { - RelIndexHash rihash = new RelIndexHash(); - rihash.Name = new MetaHash(br.ReadUInt32()); - rihash.Offset = br.ReadUInt32(); - rihash.Length = br.ReadUInt32(); - indexhashes[i] = rihash; + indexhashes[i] = new RelIndexHash + { + Name = new MetaHash(reader.ReadUInt32()), + Offset = reader.ReadUInt32(), + Length = reader.ReadUInt32() + }; } IndexHashes = indexhashes; } } - HashTableCount = br.ReadUInt32(); + HashTableCount = reader.ReadUInt32(); if (HashTableCount != 0) { uint[] htoffsets = new uint[HashTableCount]; MetaHash[] hthashes = new MetaHash[HashTableCount]; for (uint i = 0; i < HashTableCount; i++) { - htoffsets[i] = br.ReadUInt32(); + htoffsets[i] = reader.ReadUInt32(); - var pos = ms.Position; - ms.Position = htoffsets[i]; - hthashes[i] = new MetaHash(br.ReadUInt32()); - ms.Position = pos; + var pos = reader.Consumed; + reader.SetPosition(htoffsets[i]); + hthashes[i] = new MetaHash(reader.ReadUInt32()); + reader.SetPosition(pos); } HashTableOffsets = htoffsets; HashTable = hthashes; } - PackTableCount = br.ReadUInt32(); + PackTableCount = reader.ReadUInt32(); if (PackTableCount != 0) { uint[] ptoffsets = new uint[PackTableCount]; MetaHash[] pthashes = new MetaHash[PackTableCount]; for (uint i = 0; i < PackTableCount; i++) { - ptoffsets[i] = br.ReadUInt32(); + ptoffsets[i] = reader.ReadUInt32(); - var pos = ms.Position; - ms.Position = ptoffsets[i]; - pthashes[i] = new MetaHash(br.ReadUInt32()); - ms.Position = pos; + var pos = reader.Consumed; + reader.SetPosition(ptoffsets[i]); + pthashes[i] = new MetaHash(reader.ReadUInt32()); + reader.SetPosition(pos); } PackTableOffsets = ptoffsets; PackTable = pthashes; } - - if (ms.Position != ms.Length) - { } //EOF! @@ -267,9 +275,6 @@ namespace CodeWalker.GameFiles private void ParseDataBlock() { - - - using MemoryStream ms = new MemoryStream(DataBlock); using BinaryReader br = new BinaryReader(ms); @@ -313,24 +318,23 @@ namespace CodeWalker.GameFiles if (IndexHashes != null) { - var reldatas = new List(IndexHashes.Length); - foreach (var indexhash in IndexHashes) + RelDatas = new RelData[IndexHashes.Length]; + for (int i = 0; i < IndexHashes.Length; i++) { - reldatas.Add(ReadRelData(br, indexhash)); + RelDatas[i] = ReadRelData(br, IndexHashes[i]); } - RelDatas = reldatas.ToArray(); } else if (IndexStrings != null) { - var reldatas = new List(IndexStrings.Length); - foreach (var indexstr in IndexStrings) + RelDatas = new RelData[IndexStrings.Length]; + for (int i = 0; i < IndexStrings.Length; i++) { - reldatas.Add(ReadRelData(br, indexstr)); + RelDatas[i] = ReadRelData(br, IndexStrings[i]); } - RelDatas = reldatas.ToArray(); - } else + } + else { - RelDatas = Array.Empty(); + RelDatas = []; } @@ -340,36 +344,29 @@ namespace CodeWalker.GameFiles RelDataDict.Clear(); - foreach (var reldata in RelDatas) + RelDataDict.EnsureCapacity(RelDatas.Length); + + foreach(var reldata in RelDatas.AsSpan()) { if ((reldata.NameHash == 0) && !string.IsNullOrEmpty(reldata.Name)) { reldata.NameHash = JenkHash.GenHash(reldata.Name); //should this be lower case? - JenkIndex.Ensure(reldata.Name); + JenkIndex.Ensure(reldata.Name, reldata.NameHash); JenkIndex.EnsureLower(reldata.Name); //which one to use? } - //if (reldata.NameHash == 0) - //{ }//no hits here - //if (RelDataDict.ContainsKey(reldata.NameHash)) - //{ }//no hits here - RelDataDict[reldata.NameHash] = reldata; - } - foreach (var reldata in RelDatas) - { - RelSound snd = reldata as RelSound; - if (snd != null) + if (reldata is RelSound snd) { if (snd.ChildSoundsCount > 0) { snd.ChildSounds = new RelData[snd.ChildSoundsCount]; - for (int i = 0; i < snd.ChildSoundsCount; i++) + for (int j = 0; j < snd.ChildSoundsCount; j++) { - var audhash = snd.ChildSoundsHashes[i]; + var audhash = snd.ChildSoundsHashes[j]; if (RelDataDict.TryGetValue(audhash, out var auddata)) { - snd.ChildSounds[i] = auddata; + snd.ChildSounds[j] = auddata; } } } @@ -382,24 +379,21 @@ namespace CodeWalker.GameFiles //speech.dat4.rel var speechDict = new Dictionary(); - foreach (var reldata in RelDatasSorted) + foreach(var data in RelDatas.AsSpan()) { - var speechData = reldata as Dat4SpeechData; - if (speechData != null) + if (data is Dat4SpeechData speechData) { speechDict[speechData.DataOffset] = speechData; + speechData.Type = Dat4SpeechType.ByteArray; + speechData.TypeID = 0; //will be set again after this } - - speechData.Type = Dat4SpeechType.ByteArray; - speechData.TypeID = 0; //will be set again after this - } for (uint i = 0; i < HashTableCount; i++) { var hashOffset = HashTableOffsets[i]; var hash = HashTable[i]; var itemOffset = hashOffset - 8; - if (speechDict.TryGetValue(itemOffset, out var speechData) && speechData != null) + if (speechDict.TryGetValue(itemOffset, out var speechData) && speechData is not null) { speechData.Type = Dat4SpeechType.Hash; speechData.TypeID = 4; @@ -411,7 +405,7 @@ namespace CodeWalker.GameFiles var packOffset = PackTableOffsets[i]; var pack = PackTable[i]; var itemOffset = packOffset - 12; - if (speechDict.TryGetValue(itemOffset, out var speechData) && speechData != null) + if (speechDict.TryGetValue(itemOffset, out var speechData) && speechData is not null) { speechData.Type = Dat4SpeechType.Container; speechData.TypeID = 8; @@ -425,9 +419,6 @@ namespace CodeWalker.GameFiles } - - - private RelData ReadRelData(BinaryReader br, RelIndexHash h) { return ReadRelData(br, null, h.Name, h.Offset, h.Length); @@ -444,304 +435,331 @@ namespace CodeWalker.GameFiles br.BaseStream.Position = oldPosition; - RelData d = new RelData(this); //use this base object to construct the derived one... - d.Name = name; - d.NameHash = hash; - d.DataOffset = offset; - d.DataLength = length; - d.Data = data; + TempRelData d = new TempRelData(this) + { + Name = name, + NameHash = hash, + DataOffset = offset, + DataLength = length, + Data = data + }; //use this base object to construct the derived one... //using BinaryReader dbr = new BinaryReader(new MemoryStream(data)); d.ReadType(br); - switch (RelType) + return RelType switch { - case RelDatFileType.Dat4: //speech.dat4.rel, audioconfig.dat4.rel - return ReadData4(d, br); - case RelDatFileType.Dat10ModularSynth: //amp.dat10.rel - return ReadData10(d, br); - case RelDatFileType.Dat15DynamicMixer: //mix.dat15.rel - return ReadData15(d, br); - case RelDatFileType.Dat16Curves: //curves.dat16.rel - return ReadData16(d, br); - case RelDatFileType.Dat22Categories: //categories.dat22.rel - return ReadData22(d, br); - case RelDatFileType.Dat54DataEntries: //sounds.dat54.rel - return ReadData54(d, br); - case RelDatFileType.Dat149: //game.dat149.rel - return ReadData149(d, br); - case RelDatFileType.Dat150: //game.dat150.rel - return ReadData150(d, br); - case RelDatFileType.Dat151: //game.dat151.rel - return ReadData151(d, br); - default: - return d; //shouldn't get here... - } + //speech.dat4.rel, audioconfig.dat4.rel + RelDatFileType.Dat4 => ReadData4(in d, br), + //amp.dat10.rel + RelDatFileType.Dat10ModularSynth => ReadData10(in d, br), + //mix.dat15.rel + RelDatFileType.Dat15DynamicMixer => ReadData15(in d, br), + //curves.dat16.rel + RelDatFileType.Dat16Curves => ReadData16(in d, br), + //categories.dat22.rel + RelDatFileType.Dat22Categories => ReadData22(in d, br), + //sounds.dat54.rel + RelDatFileType.Dat54DataEntries => ReadData54(in d, br), + //game.dat149.rel + RelDatFileType.Dat149 => ReadData149(in d, br), + //game.dat150.rel + RelDatFileType.Dat150 => ReadData150(in d, br), + //game.dat151.rel + RelDatFileType.Dat151 => ReadData151(in d, br), + _ => new RelData(in d),//shouldn't get here... + }; } - private RelData ReadData4(RelData d, BinaryReader br) + private RelData ReadData4(in TempRelData d, BinaryReader br) { if (IsAudioConfig) //(for audioconfig.dat4.rel) { - switch ((Dat4ConfigType)d.TypeID) + return (Dat4ConfigType)d.TypeID switch { - case Dat4ConfigType.Int: return new Dat4ConfigInt(d, br); - case Dat4ConfigType.UnsignedInt: return new Dat4ConfigUnsignedInt(d, br); - case Dat4ConfigType.Float: return new Dat4ConfigFloat(d, br); - case Dat4ConfigType.String: return new Dat4ConfigString(d, br); - case Dat4ConfigType.Vector3: return new Dat4ConfigVector3(d, br); - case Dat4ConfigType.VariableList: return new Dat4ConfigVariableList(d, br); - case Dat4ConfigType.WaveSlot: return new Dat4ConfigWaveSlot(d, br); - case Dat4ConfigType.WaveSlotsList: return new Dat4ConfigWaveSlotsList(d, br); - case Dat4ConfigType.ERSettings: return new Dat4ConfigERSettings(d, br); - default: - break; - } + Dat4ConfigType.Int => new Dat4ConfigInt(in d, br), + Dat4ConfigType.UnsignedInt => new Dat4ConfigUnsignedInt(in d, br), + Dat4ConfigType.Float => new Dat4ConfigFloat(in d, br), + Dat4ConfigType.String => new Dat4ConfigString(in d, br), + Dat4ConfigType.Vector3 => new Dat4ConfigVector3(in d, br), + Dat4ConfigType.VariableList => new Dat4ConfigVariableList(in d, br), + Dat4ConfigType.WaveSlot => new Dat4ConfigWaveSlot(in d, br), + Dat4ConfigType.WaveSlotsList => new Dat4ConfigWaveSlotsList(in d, br), + Dat4ConfigType.ERSettings => new Dat4ConfigERSettings(in d, br), + _ => new RelData(in d), + }; } else //(for eg speech.dat4.rel) { - return new Dat4SpeechData(d, br); + return new Dat4SpeechData(in d, br); } - return d; } - private RelData ReadData10(RelData d, BinaryReader br) + private static RelData ReadData10(in TempRelData d, BinaryReader br) { - switch ((Dat10RelType)d.TypeID) + return (Dat10RelType)d.TypeID switch { - case Dat10RelType.SynthPreset: return new Dat10SynthPreset(d, br); - case Dat10RelType.Synth: return new Dat10Synth(d, br); - default: - break; - } + Dat10RelType.SynthPreset => new Dat10SynthPreset(in d, br), + Dat10RelType.Synth => new Dat10Synth(in d, br), + _ => new RelData(in d), + }; + } - return d; - } - private RelData ReadData15(RelData d, BinaryReader br) + private static RelData ReadData10(in TempRelData d, ref SequenceReader br) { - switch ((Dat15RelType)d.TypeID) + return (Dat10RelType)d.TypeID switch { - case Dat15RelType.Patch: return new Dat15Patch(d, br); - case Dat15RelType.SceneState: return new Dat15SceneState(d, br); - case Dat15RelType.Scene: return new Dat15Scene(d, br); - case Dat15RelType.Group: return new Dat15Group(d, br); - case Dat15RelType.GroupList: return new Dat15GroupList(d, br); - case Dat15RelType.DynamicMixModuleSettings: return new Dat15DynamicMixModuleSettings(d, br); - case Dat15RelType.SceneVariableModuleSettings: return new Dat15SceneVariableModuleSettings(d, br); - case Dat15RelType.SceneTransitionModuleSettings: return new Dat15SceneTransitionModuleSettings(d, br); - case Dat15RelType.VehicleCollisionModuleSettings: return new Dat15VehicleCollisionModuleSettings(d, br); - case Dat15RelType.GroupMap: return new Dat15GroupMap(d, br); - default: - break; - } + Dat10RelType.SynthPreset => new Dat10SynthPreset(in d, ref br), + Dat10RelType.Synth => new Dat10Synth(in d, ref br), + _ => new RelData(in d), + }; + } - return d; - } - private RelData ReadData16(RelData d, BinaryReader br) + private static RelData ReadData15(in TempRelData d, BinaryReader br) { - switch ((Dat16RelType)d.TypeID) + return (Dat15RelType)d.TypeID switch { - case Dat16RelType.ConstantCurve: return new Dat16ConstantCurve(d, br); - case Dat16RelType.LinearCurve: return new Dat16LinearCurve(d, br); - case Dat16RelType.LinearDbCurve: return new Dat16LinearDbCurve(d, br); - case Dat16RelType.PiecewiseLinearCurve: return new Dat16PiecewiseLinearCurve(d, br); - case Dat16RelType.EqualPowerCurve: return new Dat16EqualPowerCurve(d, br); - case Dat16RelType.ValueTableCurve: return new Dat16ValueTableCurve(d, br); - case Dat16RelType.ExponentialCurve: return new Dat16ExponentialCurve(d, br); - case Dat16RelType.DecayingExponentialCurve: return new Dat16DecayingExponentialCurve(d, br); - case Dat16RelType.DecayingSquaredExponentialCurve: return new Dat16DecayingSquaredExponentialCurve(d, br); - case Dat16RelType.SineCurve: return new Dat16SineCurve(d, br); - case Dat16RelType.OneOverXSquaredCurve: return new Dat16OneOverXSquaredCurve(d, br); - case Dat16RelType.DefaultDistanceAttenuationCurve: return new Dat16DefaultDistanceAttenuationCurve(d, br); - case Dat16RelType.DistanceAttenuationValueTableCurve: return new Dat16DistanceAttenuationValueTableCurve(d, br); - default: - break; - } + Dat15RelType.Patch => new Dat15Patch(in d, br), + Dat15RelType.SceneState => new Dat15SceneState(in d, br), + Dat15RelType.Scene => new Dat15Scene(in d, br), + Dat15RelType.Group => new Dat15Group(in d, br), + Dat15RelType.GroupList => new Dat15GroupList(in d, br), + Dat15RelType.DynamicMixModuleSettings => new Dat15DynamicMixModuleSettings(in d, br), + Dat15RelType.SceneVariableModuleSettings => new Dat15SceneVariableModuleSettings(in d, br), + Dat15RelType.SceneTransitionModuleSettings => new Dat15SceneTransitionModuleSettings(in d, br), + Dat15RelType.VehicleCollisionModuleSettings => new Dat15VehicleCollisionModuleSettings(in d, br), + Dat15RelType.GroupMap => new Dat15GroupMap(in d, br), + _ => new RelData(in d), + }; + } - return d; - } - private RelData ReadData22(RelData d, BinaryReader br) + private static RelData ReadData15(in TempRelData d, ref SequenceReader br) { - switch ((Dat22RelType)d.TypeID) + return (Dat16RelType)d.TypeID switch { - case Dat22RelType.Category: return new Dat22Category(d, br); - default: - break; - } + Dat16RelType.ConstantCurve => new Dat16ConstantCurve(in d, ref br), + Dat16RelType.LinearCurve => new Dat16LinearCurve(in d, ref br), + Dat16RelType.LinearDbCurve => new Dat16LinearDbCurve(in d, ref br), + Dat16RelType.PiecewiseLinearCurve => new Dat16PiecewiseLinearCurve(in d, ref br), + Dat16RelType.EqualPowerCurve => new Dat16EqualPowerCurve(in d, ref br), + Dat16RelType.ValueTableCurve => new Dat16ValueTableCurve(in d, ref br), + Dat16RelType.ExponentialCurve => new Dat16ExponentialCurve(in d, ref br), + Dat16RelType.DecayingExponentialCurve => new Dat16DecayingExponentialCurve(in d, ref br), + Dat16RelType.DecayingSquaredExponentialCurve => new Dat16DecayingSquaredExponentialCurve(in d, ref br), + Dat16RelType.SineCurve => new Dat16SineCurve(in d, ref br), + Dat16RelType.OneOverXSquaredCurve => new Dat16OneOverXSquaredCurve(in d, ref br), + Dat16RelType.DefaultDistanceAttenuationCurve => new Dat16DefaultDistanceAttenuationCurve(in d, ref br), + Dat16RelType.DistanceAttenuationValueTableCurve => new Dat16DistanceAttenuationValueTableCurve(in d, ref br), + _ => new RelData(in d), + }; + } + private static RelData ReadData16(in TempRelData d, BinaryReader br) + { + return (Dat16RelType)d.TypeID switch + { + Dat16RelType.ConstantCurve => new Dat16ConstantCurve(in d, br), + Dat16RelType.LinearCurve => new Dat16LinearCurve(in d, br), + Dat16RelType.LinearDbCurve => new Dat16LinearDbCurve(in d, br), + Dat16RelType.PiecewiseLinearCurve => new Dat16PiecewiseLinearCurve(in d, br), + Dat16RelType.EqualPowerCurve => new Dat16EqualPowerCurve(in d, br), + Dat16RelType.ValueTableCurve => new Dat16ValueTableCurve(in d, br), + Dat16RelType.ExponentialCurve => new Dat16ExponentialCurve(in d, br), + Dat16RelType.DecayingExponentialCurve => new Dat16DecayingExponentialCurve(in d, br), + Dat16RelType.DecayingSquaredExponentialCurve => new Dat16DecayingSquaredExponentialCurve(in d, br), + Dat16RelType.SineCurve => new Dat16SineCurve(in d, br), + Dat16RelType.OneOverXSquaredCurve => new Dat16OneOverXSquaredCurve(in d, br), + Dat16RelType.DefaultDistanceAttenuationCurve => new Dat16DefaultDistanceAttenuationCurve(in d, br), + Dat16RelType.DistanceAttenuationValueTableCurve => new Dat16DistanceAttenuationValueTableCurve(in d, br), + _ => new RelData(in d), + }; + } + private static RelData ReadData22(in TempRelData d, BinaryReader br) + { + return (Dat22RelType)d.TypeID switch + { + Dat22RelType.Category => new Dat22Category(in d, br), + _ => new RelData(in d) + }; + } - return d; - } - private RelData ReadData54(RelData d, BinaryReader br) + private static RelData ReadData22(in TempRelData d, ref SequenceReader br) { - switch ((Dat54SoundType)d.TypeID) + return (Dat22RelType)d.TypeID switch { - case Dat54SoundType.LoopingSound: return new Dat54LoopingSound(d, br); - case Dat54SoundType.EnvelopeSound: return new Dat54EnvelopeSound(d, br); - case Dat54SoundType.TwinLoopSound: return new Dat54TwinLoopSound(d, br); - case Dat54SoundType.SpeechSound: return new Dat54SpeechSound(d, br); - case Dat54SoundType.OnStopSound: return new Dat54OnStopSound(d, br); - case Dat54SoundType.WrapperSound: return new Dat54WrapperSound(d, br); - case Dat54SoundType.SequentialSound: return new Dat54SequentialSound(d, br); - case Dat54SoundType.StreamingSound: return new Dat54StreamingSound(d, br); - case Dat54SoundType.RetriggeredOverlappedSound: return new Dat54RetriggeredOverlappedSound(d, br); - case Dat54SoundType.CrossfadeSound: return new Dat54CrossfadeSound(d, br); - case Dat54SoundType.CollapsingStereoSound: return new Dat54CollapsingStereoSound(d, br); - case Dat54SoundType.SimpleSound: return new Dat54SimpleSound(d, br); - case Dat54SoundType.MultitrackSound: return new Dat54MultitrackSound(d, br); - case Dat54SoundType.RandomizedSound: return new Dat54RandomizedSound(d, br); - case Dat54SoundType.EnvironmentSound: return new Dat54EnvironmentSound(d, br); - case Dat54SoundType.DynamicEntitySound: return new Dat54DynamicEntitySound(d, br); - case Dat54SoundType.SequentialOverlapSound: return new Dat54SequentialOverlapSound(d, br); - case Dat54SoundType.ModularSynthSound: return new Dat54ModularSynthSound(d, br); - case Dat54SoundType.GranularSound: return new Dat54GranularSound(d, br); - case Dat54SoundType.DirectionalSound: return new Dat54DirectionalSound(d, br); - case Dat54SoundType.KineticSound: return new Dat54KineticSound(d, br); - case Dat54SoundType.SwitchSound: return new Dat54SwitchSound(d, br); - case Dat54SoundType.VariableCurveSound: return new Dat54VariableCurveSound(d, br); - case Dat54SoundType.VariablePrintValueSound: return new Dat54VariablePrintValueSound(d, br); - case Dat54SoundType.VariableBlockSound: return new Dat54VariableBlockSound(d, br); - case Dat54SoundType.IfSound: return new Dat54IfSound(d, br); - case Dat54SoundType.MathOperationSound: return new Dat54MathOperationSound(d, br); - case Dat54SoundType.ParameterTransformSound: return new Dat54ParameterTransformSound(d, br); - case Dat54SoundType.FluctuatorSound: return new Dat54FluctuatorSound(d, br); - case Dat54SoundType.AutomationSound: return new Dat54AutomationSound(d, br); - case Dat54SoundType.ExternalStreamSound: return new Dat54ExternalStreamSound(d, br); - case Dat54SoundType.SoundSet: return new Dat54SoundSet(d, br); - case Dat54SoundType.AutomationNoteMapSound: return new Dat54AutomationNoteMapSound(d, br); - case Dat54SoundType.SoundSetList: return new Dat54SoundSetList(d, br); - case Dat54SoundType.SoundHashList: return new Dat54SoundHashList(d, br); - default: - return new Dat54Sound(d, br); //shouldn't get here - } + Dat22RelType.Category => new Dat22Category(in d, ref br), + _ => new RelData(in d) + }; } - private RelData ReadData149(RelData d, BinaryReader br) + + private static RelData ReadData54(in TempRelData d, BinaryReader br) { - return ReadData151(d, br);//same as 151? - } - private RelData ReadData150(RelData d, BinaryReader br) - { - return ReadData151(d, br);//same as 151? - } - private RelData ReadData151(RelData d, BinaryReader br) - { - switch ((Dat151RelType)d.TypeID) + return (Dat54SoundType)d.TypeID switch { - case Dat151RelType.StaticEmitterList: return new Dat151StaticEmitterList(d, br); - case Dat151RelType.AmbientZone: return new Dat151AmbientZone(d, br); - case Dat151RelType.AmbientRule: return new Dat151AmbientRule(d, br); - case Dat151RelType.AmbientZoneList: return new Dat151AmbientZoneList(d, br); - case Dat151RelType.VehicleCollision: return new Dat151VehicleCollision(d, br); - case Dat151RelType.WeaponAudioItem: return new Dat151WeaponAudioItem(d, br); - case Dat151RelType.StartTrackAction: return new Dat151StartTrackAction(d, br); - case Dat151RelType.StopTrackAction: return new Dat151StopTrackAction(d, br); - case Dat151RelType.Mood: return new Dat151Mood(d, br); - case Dat151RelType.SetMoodAction: return new Dat151SetMoodAction(d, br); - case Dat151RelType.PlayerAction: return new Dat151PlayerAction(d, br); - case Dat151RelType.StartOneShotAction: return new Dat151StartOneShotAction(d, br); - case Dat151RelType.StopOneShotAction: return new Dat151StopOneShotAction(d, br); - case Dat151RelType.FadeOutRadioAction: return new Dat151FadeOutRadioAction(d, br); - case Dat151RelType.FadeInRadioAction: return new Dat151FadeInRadioAction(d, br); - case Dat151RelType.ModelAudioCollisionSettings: return new Dat151ModelAudioCollisionSettings (d, br); - case Dat151RelType.Interior: return new Dat151Interior(d, br); - case Dat151RelType.InteriorRoom: return new Dat151InteriorRoom(d, br); - case Dat151RelType.DoorModel: return new Dat151DoorModel(d, br); - case Dat151RelType.AudioMaterial: return new Dat151AudioMaterial(d, br); - case Dat151RelType.Door: return new Dat151Door(d, br); - case Dat151RelType.AnimalFootstepsList: return new Dat151AnimalFootstepsList(d, br); - case Dat151RelType.RadioDJSpeechAction: return new Dat151RadioDjSpeechAction(d, br); - case Dat151RelType.ForceRadioTrackAction: return new Dat151ForceRadioTrackAction(d, br); - case Dat151RelType.MicrophoneList: return new Dat151MicrophoneList(d, br); - case Dat151RelType.RadioStationList: return new Dat151RadioStationList(d, br); - case Dat151RelType.RadioStation: return new Dat151RadioStation(d, br); - case Dat151RelType.RadioTrack: return new Dat151RadioTrack(d, br); - case Dat151RelType.TrackList: return new Dat151TrackList(d, br); - case Dat151RelType.DoorList: return new Dat151DoorList(d, br); - case Dat151RelType.ShoeList: return new Dat151ShoeList(d, br); - case Dat151RelType.ClothList: return new Dat151ClothList(d, br); - case Dat151RelType.VehicleRecordingList: return new Dat151VehicleRecordingList(d, br); - case Dat151RelType.WeatherTypeList: return new Dat151WeatherTypeList(d, br); - case Dat151RelType.ShoreLinePool: return new Dat151ShoreLinePool(d, br); - case Dat151RelType.ShoreLineLake: return new Dat151ShoreLineLake(d, br); - case Dat151RelType.ShoreLineRiver: return new Dat151ShoreLineRiver(d, br); - case Dat151RelType.ShoreLineOcean: return new Dat151ShoreLineOcean(d, br); - case Dat151RelType.ShoreLineList: return new Dat151ShoreLineList(d, br); - case Dat151RelType.RadioTrackEvents: return new Dat151RadioTrackEvents(d, br); - case Dat151RelType.VehicleEngineGranular: return new Dat151VehicleEngineGranular(d, br); - case Dat151RelType.Vehicle: return new Dat151Vehicle(d, br); - case Dat151RelType.VehicleEngine: return new Dat151VehicleEngine(d, br); - case Dat151RelType.VehicleScannerParams: return new Dat151VehicleScannerParams(d, br); - case Dat151RelType.StaticEmitter: return new Dat151StaticEmitter(d, br); - case Dat151RelType.Weapon: return new Dat151Weapon(d, br); - case Dat151RelType.Explosion: return new Dat151Explosion(d, br); - case Dat151RelType.PedVoiceGroup: return new Dat151PedVoiceGroup(d, br); - case Dat151RelType.EntityEmitter: return new Dat151EntityEmitter(d, br); - case Dat151RelType.Boat: return new Dat151Boat(d, br); - case Dat151RelType.Bicycle: return new Dat151Bicycle(d, br); - case Dat151RelType.Aeroplane: return new Dat151Aeroplane(d, br); - case Dat151RelType.Helicopter: return new Dat151Helicopter(d, br); - case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(d, br); - case Dat151RelType.Train: return new Dat151Train(d, br); - case Dat151RelType.AnimalParams: return new Dat151AnimalParams(d, br); - case Dat151RelType.SpeechParams: return new Dat151SpeechParams(d, br); - case Dat151RelType.MeleeCombat: return new Dat151MeleeCombat(d, br); - case Dat151RelType.SpeechContext: return new Dat151SpeechContext(d, br); - case Dat151RelType.SpeechChoice: return new Dat151SpeechChoice(d, br); - case Dat151RelType.VirtualSpeechChoice: return new Dat151VirtualSpeechChoice(d, br); - case Dat151RelType.SpeechContextList: return new Dat151SpeechContextList(d, br); - case Dat151RelType.Shoe: return new Dat151Shoe(d, br); - case Dat151RelType.Unk22: return new Dat151Unk22(d, br); - case Dat151RelType.Skis: return new Dat151Skis(d, br); - case Dat151RelType.RadioTrackCategory: return new Dat151RadioTrackCategory(d, br); - case Dat151RelType.PoliceScannerCrime: return new Dat151PoliceScannerCrime(d, br); - case Dat151RelType.RaceToPedVoiceGroup: return new Dat151RaceToPedVoiceGroup(d, br); - case Dat151RelType.PedType: return new Dat151PedType(d, br); - case Dat151RelType.PoliceScannerReport: return new Dat151PoliceScannerReport(d, br); - case Dat151RelType.PoliceScannerLocation: return new Dat151PoliceScannerLocation(d, br); - case Dat151RelType.PoliceScannerLocationList: return new Dat151PoliceScannerLocationList(d, br); - case Dat151RelType.AmbienceSlotMap: return new Dat151AmbienceSlotMap(d, br); - case Dat151RelType.AmbienceBankMap: return new Dat151AmbienceBankMap(d, br); - case Dat151RelType.AmbientZoneParams: return new Dat151AmbientZoneParams(d, br); - case Dat151RelType.InteriorRoomParams: return new Dat151InteriorRoomParams(d, br); - case Dat151RelType.DoorParams: return new Dat151DoorParams(d, br); - case Dat151RelType.Climbing: return new Dat151Climbing(d, br); - case Dat151RelType.WeatherType: return new Dat151WeatherType(d, br); - case Dat151RelType.StemMix: return new Dat151StemMix(d, br); - case Dat151RelType.MusicBeat: return new Dat151MusicBeat(d, br); - case Dat151RelType.MusicBar: return new Dat151MusicBar(d, br); - case Dat151RelType.DependentAmbience: return new Dat151DependentAmbience(d, br); - case Dat151RelType.ConductorState: return new Dat151ConductorState(d, br); - case Dat151RelType.AnimalSounds: return new Dat151AnimalSounds(d, br); - case Dat151RelType.VehicleScannerColourList: return new Dat151VehicleScannerColourList(d, br); - case Dat151RelType.Unk77: return new Dat151Unk77(d, br); - case Dat151RelType.Microphone: return new Dat151Microphone(d, br); - case Dat151RelType.VehicleRecording: return new Dat151VehicleRecording(d, br); - case Dat151RelType.AnimalFootsteps: return new Dat151AnimalFootsteps(d, br); - case Dat151RelType.Cloth: return new Dat151Cloth(d, br); - case Dat151RelType.RadioTrackSettings: return new Dat151RadioTrackSettings(d, br); - case Dat151RelType.StealthSettings: return new Dat151StealthSettings(d, br); - case Dat151RelType.Unk99: return new Dat151Unk99(d, br); - case Dat151RelType.Tunnel: return new Dat151Tunnel(d, br); - case Dat151RelType.Alarm: return new Dat151Alarm(d, br); - case Dat151RelType.SlowMoSettings: return new Dat151SlowMoSettings(d, br); - case Dat151RelType.Scenario: return new Dat151Scenario(d, br); - case Dat151RelType.PortalSettings: return new Dat151PortalSettings(d, br); - case Dat151RelType.ElectricEngine: return new Dat151ElectricEngine(d, br); - case Dat151RelType.BreathSettings: return new Dat151BreathSettings(d, br); - case Dat151RelType.WallaSpeech: return new Dat151WallaSpeech(d, br); - case Dat151RelType.AircraftWarningSettings: return new Dat151AircraftWarningSettings(d, br); - case Dat151RelType.WallaSpeechList: return new Dat151WallaSpeechList(d, br); - case Dat151RelType.CopDispatchInteractionSettings: return new Dat151CopDispatchInteractionSettings(d, br); - case Dat151RelType.Unk115: return new Dat151Unk115(d, br); - case Dat151RelType.TennisVFXSettings: return new Dat151TennisVFXSettings(d, br); - case Dat151RelType.Unk118: return new Dat151Unk118(d, br); - case Dat151RelType.Foliage: return new Dat151Foliage(d, br); - case Dat151RelType.ModelAudioCollisionSettingsOverride: return new Dat151ModelAudioCollisionSettingsOverride(d, br); - case Dat151RelType.RadioStationList2: return new Dat151RadioStationList2(d, br); - default: - return new Dat151RelData(d, br); //shouldn't get here - } + Dat54SoundType.LoopingSound => new Dat54LoopingSound(in d, br), + Dat54SoundType.EnvelopeSound => new Dat54EnvelopeSound(in d, br), + Dat54SoundType.TwinLoopSound => new Dat54TwinLoopSound(in d, br), + Dat54SoundType.SpeechSound => new Dat54SpeechSound(in d, br), + Dat54SoundType.OnStopSound => new Dat54OnStopSound(in d, br), + Dat54SoundType.WrapperSound => new Dat54WrapperSound(in d, br), + Dat54SoundType.SequentialSound => new Dat54SequentialSound(in d, br), + Dat54SoundType.StreamingSound => new Dat54StreamingSound(in d, br), + Dat54SoundType.RetriggeredOverlappedSound => new Dat54RetriggeredOverlappedSound(in d, br), + Dat54SoundType.CrossfadeSound => new Dat54CrossfadeSound(in d, br), + Dat54SoundType.CollapsingStereoSound => new Dat54CollapsingStereoSound(in d, br), + Dat54SoundType.SimpleSound => new Dat54SimpleSound(in d, br), + Dat54SoundType.MultitrackSound => new Dat54MultitrackSound(in d, br), + Dat54SoundType.RandomizedSound => new Dat54RandomizedSound(in d, br), + Dat54SoundType.EnvironmentSound => new Dat54EnvironmentSound(in d, br), + Dat54SoundType.DynamicEntitySound => new Dat54DynamicEntitySound(in d, br), + Dat54SoundType.SequentialOverlapSound => new Dat54SequentialOverlapSound(in d, br), + Dat54SoundType.ModularSynthSound => new Dat54ModularSynthSound(in d, br), + Dat54SoundType.GranularSound => new Dat54GranularSound(in d, br), + Dat54SoundType.DirectionalSound => new Dat54DirectionalSound(in d, br), + Dat54SoundType.KineticSound => new Dat54KineticSound(in d, br), + Dat54SoundType.SwitchSound => new Dat54SwitchSound(in d, br), + Dat54SoundType.VariableCurveSound => new Dat54VariableCurveSound(in d, br), + Dat54SoundType.VariablePrintValueSound => new Dat54VariablePrintValueSound(in d, br), + Dat54SoundType.VariableBlockSound => new Dat54VariableBlockSound(in d, br), + Dat54SoundType.IfSound => new Dat54IfSound(in d, br), + Dat54SoundType.MathOperationSound => new Dat54MathOperationSound(in d, br), + Dat54SoundType.ParameterTransformSound => new Dat54ParameterTransformSound(in d, br), + Dat54SoundType.FluctuatorSound => new Dat54FluctuatorSound(in d, br), + Dat54SoundType.AutomationSound => new Dat54AutomationSound(in d, br), + Dat54SoundType.ExternalStreamSound => new Dat54ExternalStreamSound(in d, br), + Dat54SoundType.SoundSet => new Dat54SoundSet(in d, br), + Dat54SoundType.AutomationNoteMapSound => new Dat54AutomationNoteMapSound(in d, br), + Dat54SoundType.SoundSetList => new Dat54SoundSetList(in d, br), + Dat54SoundType.SoundHashList => new Dat54SoundHashList(in d, br), + _ => new Dat54Sound(in d, br), + }; + } + private static RelData ReadData149(in TempRelData d, BinaryReader br) + { + return ReadData151(in d, br);//same as 151? + } + private static RelData ReadData150(in TempRelData d, BinaryReader br) + { + return ReadData151(in d, br);//same as 151? + } + private static RelData ReadData151(in TempRelData d, BinaryReader br) + { + return (Dat151RelType)d.TypeID switch + { + Dat151RelType.StaticEmitterList => new Dat151StaticEmitterList(in d, br), + Dat151RelType.AmbientZone => new Dat151AmbientZone(in d, br), + Dat151RelType.AmbientRule => new Dat151AmbientRule(in d, br), + Dat151RelType.AmbientZoneList => new Dat151AmbientZoneList(in d, br), + Dat151RelType.VehicleCollision => new Dat151VehicleCollision(in d, br), + Dat151RelType.WeaponAudioItem => new Dat151WeaponAudioItem(in d, br), + Dat151RelType.StartTrackAction => new Dat151StartTrackAction(in d, br), + Dat151RelType.StopTrackAction => new Dat151StopTrackAction(in d, br), + Dat151RelType.Mood => new Dat151Mood(in d, br), + Dat151RelType.SetMoodAction => new Dat151SetMoodAction(in d, br), + Dat151RelType.PlayerAction => new Dat151PlayerAction(in d, br), + Dat151RelType.StartOneShotAction => new Dat151StartOneShotAction(in d, br), + Dat151RelType.StopOneShotAction => new Dat151StopOneShotAction(in d, br), + Dat151RelType.FadeOutRadioAction => new Dat151FadeOutRadioAction(in d, br), + Dat151RelType.FadeInRadioAction => new Dat151FadeInRadioAction(in d, br), + Dat151RelType.ModelAudioCollisionSettings => new Dat151ModelAudioCollisionSettings(in d, br), + Dat151RelType.Interior => new Dat151Interior(in d, br), + Dat151RelType.InteriorRoom => new Dat151InteriorRoom(in d, br), + Dat151RelType.DoorModel => new Dat151DoorModel(in d, br), + Dat151RelType.AudioMaterial => new Dat151AudioMaterial(in d, br), + Dat151RelType.Door => new Dat151Door(in d, br), + Dat151RelType.AnimalFootstepsList => new Dat151AnimalFootstepsList(in d, br), + Dat151RelType.RadioDJSpeechAction => new Dat151RadioDjSpeechAction(in d, br), + Dat151RelType.ForceRadioTrackAction => new Dat151ForceRadioTrackAction(in d, br), + Dat151RelType.MicrophoneList => new Dat151MicrophoneList(in d, br), + Dat151RelType.RadioStationList => new Dat151RadioStationList(in d, br), + Dat151RelType.RadioStation => new Dat151RadioStation(in d, br), + Dat151RelType.RadioTrack => new Dat151RadioTrack(in d, br), + Dat151RelType.TrackList => new Dat151TrackList(in d, br), + Dat151RelType.DoorList => new Dat151DoorList(in d, br), + Dat151RelType.ShoeList => new Dat151ShoeList(in d, br), + Dat151RelType.ClothList => new Dat151ClothList(d, br), + Dat151RelType.VehicleRecordingList => new Dat151VehicleRecordingList(in d, br), + Dat151RelType.WeatherTypeList => new Dat151WeatherTypeList(in d, br), + Dat151RelType.ShoreLinePool => new Dat151ShoreLinePool(in d, br), + Dat151RelType.ShoreLineLake => new Dat151ShoreLineLake(in d, br), + Dat151RelType.ShoreLineRiver => new Dat151ShoreLineRiver(in d, br), + Dat151RelType.ShoreLineOcean => new Dat151ShoreLineOcean(in d, br), + Dat151RelType.ShoreLineList => new Dat151ShoreLineList(in d, br), + Dat151RelType.RadioTrackEvents => new Dat151RadioTrackEvents(in d, br), + Dat151RelType.VehicleEngineGranular => new Dat151VehicleEngineGranular(in d, br), + Dat151RelType.Vehicle => new Dat151Vehicle(in d, br), + Dat151RelType.VehicleEngine => new Dat151VehicleEngine(in d, br), + Dat151RelType.VehicleScannerParams => new Dat151VehicleScannerParams(in d, br), + Dat151RelType.StaticEmitter => new Dat151StaticEmitter(in d, br), + Dat151RelType.Weapon => new Dat151Weapon(in d, br), + Dat151RelType.Explosion => new Dat151Explosion(in d, br), + Dat151RelType.PedVoiceGroup => new Dat151PedVoiceGroup(in d, br), + Dat151RelType.EntityEmitter => new Dat151EntityEmitter(in d, br), + Dat151RelType.Boat => new Dat151Boat(in d, br), + Dat151RelType.Bicycle => new Dat151Bicycle(in d, br), + Dat151RelType.Aeroplane => new Dat151Aeroplane(in d, br), + Dat151RelType.Helicopter => new Dat151Helicopter(in d, br), + Dat151RelType.VehicleTrailer => new Dat151VehicleTrailer(in d, br), + Dat151RelType.Train => new Dat151Train(in d, br), + Dat151RelType.AnimalParams => new Dat151AnimalParams(in d, br), + Dat151RelType.SpeechParams => new Dat151SpeechParams(in d, br), + Dat151RelType.MeleeCombat => new Dat151MeleeCombat(in d, br), + Dat151RelType.SpeechContext => new Dat151SpeechContext(in d, br), + Dat151RelType.SpeechChoice => new Dat151SpeechChoice(in d, br), + Dat151RelType.VirtualSpeechChoice => new Dat151VirtualSpeechChoice(in d, br), + Dat151RelType.SpeechContextList => new Dat151SpeechContextList(in d, br), + Dat151RelType.Shoe => new Dat151Shoe(in d, br), + Dat151RelType.Unk22 => new Dat151Unk22(in d, br), + Dat151RelType.Skis => new Dat151Skis(in d, br), + Dat151RelType.RadioTrackCategory => new Dat151RadioTrackCategory(in d, br), + Dat151RelType.PoliceScannerCrime => new Dat151PoliceScannerCrime(in d, br), + Dat151RelType.RaceToPedVoiceGroup => new Dat151RaceToPedVoiceGroup(in d, br), + Dat151RelType.PedType => new Dat151PedType(in d, br), + Dat151RelType.PoliceScannerReport => new Dat151PoliceScannerReport(in d, br), + Dat151RelType.PoliceScannerLocation => new Dat151PoliceScannerLocation(in d, br), + Dat151RelType.PoliceScannerLocationList => new Dat151PoliceScannerLocationList(in d, br), + Dat151RelType.AmbienceSlotMap => new Dat151AmbienceSlotMap(in d, br), + Dat151RelType.AmbienceBankMap => new Dat151AmbienceBankMap(in d, br), + Dat151RelType.AmbientZoneParams => new Dat151AmbientZoneParams(in d, br), + Dat151RelType.InteriorRoomParams => new Dat151InteriorRoomParams(in d, br), + Dat151RelType.DoorParams => new Dat151DoorParams(in d, br), + Dat151RelType.Climbing => new Dat151Climbing(in d, br), + Dat151RelType.WeatherType => new Dat151WeatherType(in d, br), + Dat151RelType.StemMix => new Dat151StemMix(in d, br), + Dat151RelType.MusicBeat => new Dat151MusicBeat(in d, br), + Dat151RelType.MusicBar => new Dat151MusicBar(in d, br), + Dat151RelType.DependentAmbience => new Dat151DependentAmbience(in d, br), + Dat151RelType.ConductorState => new Dat151ConductorState(in d, br), + Dat151RelType.AnimalSounds => new Dat151AnimalSounds(in d, br), + Dat151RelType.VehicleScannerColourList => new Dat151VehicleScannerColourList(in d, br), + Dat151RelType.Unk77 => new Dat151Unk77(in d, br), + Dat151RelType.Microphone => new Dat151Microphone(in d, br), + Dat151RelType.VehicleRecording => new Dat151VehicleRecording(in d, br), + Dat151RelType.AnimalFootsteps => new Dat151AnimalFootsteps(in d, br), + Dat151RelType.Cloth => new Dat151Cloth(in d, br), + Dat151RelType.RadioTrackSettings => new Dat151RadioTrackSettings(in d, br), + Dat151RelType.StealthSettings => new Dat151StealthSettings(in d, br), + Dat151RelType.Unk99 => new Dat151Unk99(in d, br), + Dat151RelType.Tunnel => new Dat151Tunnel(in d, br), + Dat151RelType.Alarm => new Dat151Alarm(in d, br), + Dat151RelType.SlowMoSettings => new Dat151SlowMoSettings(in d, br), + Dat151RelType.Scenario => new Dat151Scenario(in d, br), + Dat151RelType.PortalSettings => new Dat151PortalSettings(in d, br), + Dat151RelType.ElectricEngine => new Dat151ElectricEngine(in d, br), + Dat151RelType.BreathSettings => new Dat151BreathSettings(in d, br), + Dat151RelType.WallaSpeech => new Dat151WallaSpeech(in d, br), + Dat151RelType.AircraftWarningSettings => new Dat151AircraftWarningSettings(in d, br), + Dat151RelType.WallaSpeechList => new Dat151WallaSpeechList(in d, br), + Dat151RelType.CopDispatchInteractionSettings => new Dat151CopDispatchInteractionSettings(in d, br), + Dat151RelType.Unk115 => new Dat151Unk115(in d, br), + Dat151RelType.TennisVFXSettings => new Dat151TennisVFXSettings(in d, br), + Dat151RelType.Unk118 => new Dat151Unk118(in d, br), + Dat151RelType.Foliage => new Dat151Foliage(in d, br), + Dat151RelType.ModelAudioCollisionSettingsOverride => new Dat151ModelAudioCollisionSettingsOverride(in d, br), + Dat151RelType.RadioStationList2 => new Dat151RadioStationList2(in d, br), + _ => new Dat151RelData(in d, br),//shouldn't get here + }; } @@ -751,165 +769,163 @@ namespace CodeWalker.GameFiles switch (relType) { case RelDatFileType.Dat54DataEntries: - switch ((Dat54SoundType)dataType) + return (Dat54SoundType)dataType switch { - case Dat54SoundType.LoopingSound: return new Dat54LoopingSound(this); - case Dat54SoundType.EnvelopeSound: return new Dat54EnvelopeSound(this); - case Dat54SoundType.TwinLoopSound: return new Dat54TwinLoopSound(this); - case Dat54SoundType.SpeechSound: return new Dat54SpeechSound(this); - case Dat54SoundType.OnStopSound: return new Dat54OnStopSound(this); - case Dat54SoundType.WrapperSound: return new Dat54WrapperSound(this); - case Dat54SoundType.SequentialSound: return new Dat54SequentialSound(this); - case Dat54SoundType.StreamingSound: return new Dat54StreamingSound(this); - case Dat54SoundType.RetriggeredOverlappedSound: return new Dat54RetriggeredOverlappedSound(this); - case Dat54SoundType.CrossfadeSound: return new Dat54CrossfadeSound(this); - case Dat54SoundType.CollapsingStereoSound: return new Dat54CollapsingStereoSound(this); - case Dat54SoundType.SimpleSound: return new Dat54SimpleSound(this); - case Dat54SoundType.MultitrackSound: return new Dat54MultitrackSound(this); - case Dat54SoundType.RandomizedSound: return new Dat54RandomizedSound(this); - case Dat54SoundType.EnvironmentSound: return new Dat54EnvironmentSound(this); - case Dat54SoundType.DynamicEntitySound: return new Dat54DynamicEntitySound(this); - case Dat54SoundType.SequentialOverlapSound: return new Dat54SequentialOverlapSound(this); - case Dat54SoundType.ModularSynthSound: return new Dat54ModularSynthSound(this); - case Dat54SoundType.GranularSound: return new Dat54GranularSound(this); - case Dat54SoundType.DirectionalSound: return new Dat54DirectionalSound(this); - case Dat54SoundType.KineticSound: return new Dat54KineticSound(this); - case Dat54SoundType.SwitchSound: return new Dat54SwitchSound(this); - case Dat54SoundType.VariableCurveSound: return new Dat54VariableCurveSound(this); - case Dat54SoundType.VariablePrintValueSound: return new Dat54VariablePrintValueSound(this); - case Dat54SoundType.VariableBlockSound: return new Dat54VariableBlockSound(this); - case Dat54SoundType.IfSound: return new Dat54IfSound(this); - case Dat54SoundType.MathOperationSound: return new Dat54MathOperationSound(this); - case Dat54SoundType.ParameterTransformSound: return new Dat54ParameterTransformSound(this); - case Dat54SoundType.FluctuatorSound: return new Dat54FluctuatorSound(this); - case Dat54SoundType.AutomationSound: return new Dat54AutomationSound(this); - case Dat54SoundType.ExternalStreamSound: return new Dat54ExternalStreamSound(this); - case Dat54SoundType.SoundSet: return new Dat54SoundSet(this); - case Dat54SoundType.AutomationNoteMapSound: return new Dat54AutomationNoteMapSound(this); - case Dat54SoundType.SoundSetList: return new Dat54SoundSetList(this); - case Dat54SoundType.SoundHashList: return new Dat54SoundHashList(this); - default: - return new Dat54Sound(this, (Dat54SoundType)d.TypeID); //shouldn't get here - } + Dat54SoundType.LoopingSound => new Dat54LoopingSound(this), + Dat54SoundType.EnvelopeSound => new Dat54EnvelopeSound(this), + Dat54SoundType.TwinLoopSound => new Dat54TwinLoopSound(this), + Dat54SoundType.SpeechSound => new Dat54SpeechSound(this), + Dat54SoundType.OnStopSound => new Dat54OnStopSound(this), + Dat54SoundType.WrapperSound => new Dat54WrapperSound(this), + Dat54SoundType.SequentialSound => new Dat54SequentialSound(this), + Dat54SoundType.StreamingSound => new Dat54StreamingSound(this), + Dat54SoundType.RetriggeredOverlappedSound => new Dat54RetriggeredOverlappedSound(this), + Dat54SoundType.CrossfadeSound => new Dat54CrossfadeSound(this), + Dat54SoundType.CollapsingStereoSound => new Dat54CollapsingStereoSound(this), + Dat54SoundType.SimpleSound => new Dat54SimpleSound(this), + Dat54SoundType.MultitrackSound => new Dat54MultitrackSound(this), + Dat54SoundType.RandomizedSound => new Dat54RandomizedSound(this), + Dat54SoundType.EnvironmentSound => new Dat54EnvironmentSound(this), + Dat54SoundType.DynamicEntitySound => new Dat54DynamicEntitySound(this), + Dat54SoundType.SequentialOverlapSound => new Dat54SequentialOverlapSound(this), + Dat54SoundType.ModularSynthSound => new Dat54ModularSynthSound(this), + Dat54SoundType.GranularSound => new Dat54GranularSound(this), + Dat54SoundType.DirectionalSound => new Dat54DirectionalSound(this), + Dat54SoundType.KineticSound => new Dat54KineticSound(this), + Dat54SoundType.SwitchSound => new Dat54SwitchSound(this), + Dat54SoundType.VariableCurveSound => new Dat54VariableCurveSound(this), + Dat54SoundType.VariablePrintValueSound => new Dat54VariablePrintValueSound(this), + Dat54SoundType.VariableBlockSound => new Dat54VariableBlockSound(this), + Dat54SoundType.IfSound => new Dat54IfSound(this), + Dat54SoundType.MathOperationSound => new Dat54MathOperationSound(this), + Dat54SoundType.ParameterTransformSound => new Dat54ParameterTransformSound(this), + Dat54SoundType.FluctuatorSound => new Dat54FluctuatorSound(this), + Dat54SoundType.AutomationSound => new Dat54AutomationSound(this), + Dat54SoundType.ExternalStreamSound => new Dat54ExternalStreamSound(this), + Dat54SoundType.SoundSet => new Dat54SoundSet(this), + Dat54SoundType.AutomationNoteMapSound => new Dat54AutomationNoteMapSound(this), + Dat54SoundType.SoundSetList => new Dat54SoundSetList(this), + Dat54SoundType.SoundHashList => new Dat54SoundHashList(this), + _ => new Dat54Sound(this, (Dat54SoundType)d.TypeID),//shouldn't get here + }; case RelDatFileType.Dat149: case RelDatFileType.Dat150: case RelDatFileType.Dat151: - switch ((Dat151RelType)dataType) + return (Dat151RelType)dataType switch { - case Dat151RelType.StaticEmitterList: return new Dat151StaticEmitterList(this); - case Dat151RelType.AmbientZone: return new Dat151AmbientZone(this); - case Dat151RelType.AmbientRule: return new Dat151AmbientRule(this); - case Dat151RelType.AmbientZoneList: return new Dat151AmbientZoneList(this); - case Dat151RelType.VehicleCollision: return new Dat151VehicleCollision(this); - case Dat151RelType.WeaponAudioItem: return new Dat151WeaponAudioItem(this); - case Dat151RelType.StartTrackAction: return new Dat151StartTrackAction(this); - case Dat151RelType.StopTrackAction: return new Dat151StopTrackAction(this); - case Dat151RelType.Mood: return new Dat151Mood(this); - case Dat151RelType.SetMoodAction: return new Dat151SetMoodAction(this); - case Dat151RelType.PlayerAction: return new Dat151PlayerAction(this); - case Dat151RelType.StartOneShotAction: return new Dat151StartOneShotAction(this); - case Dat151RelType.StopOneShotAction: return new Dat151StopOneShotAction(this); - case Dat151RelType.FadeOutRadioAction: return new Dat151FadeOutRadioAction(this); - case Dat151RelType.FadeInRadioAction: return new Dat151FadeInRadioAction(this); - case Dat151RelType.ModelAudioCollisionSettings: return new Dat151ModelAudioCollisionSettings(this); - case Dat151RelType.Interior: return new Dat151Interior(this); - case Dat151RelType.InteriorRoom: return new Dat151InteriorRoom(this); - case Dat151RelType.DoorModel: return new Dat151DoorModel(this); - case Dat151RelType.AudioMaterial: return new Dat151AudioMaterial(this); - case Dat151RelType.Door: return new Dat151Door(this); - case Dat151RelType.AnimalFootstepsList: return new Dat151AnimalFootstepsList(this); - case Dat151RelType.RadioDJSpeechAction: return new Dat151RadioDjSpeechAction(this); - case Dat151RelType.ForceRadioTrackAction: return new Dat151ForceRadioTrackAction(this); - case Dat151RelType.MicrophoneList: return new Dat151MicrophoneList(this); - case Dat151RelType.RadioStationList: return new Dat151RadioStationList(this); - case Dat151RelType.RadioStation: return new Dat151RadioStation(this); - case Dat151RelType.RadioTrack: return new Dat151RadioTrack(this); - case Dat151RelType.TrackList: return new Dat151TrackList(this); - case Dat151RelType.DoorList: return new Dat151DoorList(this); - case Dat151RelType.ShoeList: return new Dat151ShoeList(this); - case Dat151RelType.ClothList: return new Dat151ClothList(this); - case Dat151RelType.VehicleRecordingList: return new Dat151VehicleRecordingList(this); - case Dat151RelType.WeatherTypeList: return new Dat151WeatherTypeList(this); - case Dat151RelType.ShoreLinePool: return new Dat151ShoreLinePool(this); - case Dat151RelType.ShoreLineLake: return new Dat151ShoreLineLake(this); - case Dat151RelType.ShoreLineRiver: return new Dat151ShoreLineRiver(this); - case Dat151RelType.ShoreLineOcean: return new Dat151ShoreLineOcean(this); - case Dat151RelType.ShoreLineList: return new Dat151ShoreLineList(this); - case Dat151RelType.RadioTrackEvents: return new Dat151RadioTrackEvents(this); - case Dat151RelType.VehicleEngineGranular: return new Dat151VehicleEngineGranular(this); - case Dat151RelType.Vehicle: return new Dat151Vehicle(this); - case Dat151RelType.VehicleEngine: return new Dat151VehicleEngine(this); - case Dat151RelType.VehicleScannerParams: return new Dat151VehicleScannerParams(this); - case Dat151RelType.StaticEmitter: return new Dat151StaticEmitter(this); - case Dat151RelType.Weapon: return new Dat151Weapon(this); - case Dat151RelType.Explosion: return new Dat151Explosion(this); - case Dat151RelType.PedVoiceGroup: return new Dat151PedVoiceGroup(this); - case Dat151RelType.EntityEmitter: return new Dat151EntityEmitter(this); - case Dat151RelType.Boat: return new Dat151Boat(this); - case Dat151RelType.Bicycle: return new Dat151Bicycle(this); - case Dat151RelType.Aeroplane: return new Dat151Aeroplane(this); - case Dat151RelType.Helicopter: return new Dat151Helicopter(this); - case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(this); - case Dat151RelType.Train: return new Dat151Train(this); - case Dat151RelType.AnimalParams: return new Dat151AnimalParams(this); - case Dat151RelType.SpeechParams: return new Dat151SpeechParams(this); - case Dat151RelType.MeleeCombat: return new Dat151MeleeCombat(this); - case Dat151RelType.SpeechContext: return new Dat151SpeechContext(this); - case Dat151RelType.SpeechChoice: return new Dat151SpeechChoice(this); - case Dat151RelType.VirtualSpeechChoice: return new Dat151VirtualSpeechChoice(this); - case Dat151RelType.SpeechContextList: return new Dat151SpeechContextList(this); - case Dat151RelType.Shoe: return new Dat151Shoe(this); - case Dat151RelType.Unk22: return new Dat151Unk22(this); - case Dat151RelType.Skis: return new Dat151Skis(this); - case Dat151RelType.RadioTrackCategory: return new Dat151RadioTrackCategory(this); - case Dat151RelType.PoliceScannerCrime: return new Dat151PoliceScannerCrime(this); - case Dat151RelType.RaceToPedVoiceGroup: return new Dat151RaceToPedVoiceGroup(this); - case Dat151RelType.PedType: return new Dat151PedType(this); - case Dat151RelType.PoliceScannerReport: return new Dat151PoliceScannerReport(this); - case Dat151RelType.PoliceScannerLocation: return new Dat151PoliceScannerLocation(this); - case Dat151RelType.PoliceScannerLocationList: return new Dat151PoliceScannerLocationList(this); - case Dat151RelType.AmbienceSlotMap: return new Dat151AmbienceSlotMap(this); - case Dat151RelType.AmbienceBankMap: return new Dat151AmbienceBankMap(this); - case Dat151RelType.AmbientZoneParams: return new Dat151AmbientZoneParams(this); - case Dat151RelType.InteriorRoomParams: return new Dat151InteriorRoomParams(this); - case Dat151RelType.DoorParams: return new Dat151DoorParams(this); - case Dat151RelType.Climbing: return new Dat151Climbing(this); - case Dat151RelType.WeatherType: return new Dat151WeatherType(this); - case Dat151RelType.StemMix: return new Dat151StemMix(this); - case Dat151RelType.MusicBeat: return new Dat151MusicBeat(this); - case Dat151RelType.MusicBar: return new Dat151MusicBar(this); - case Dat151RelType.DependentAmbience: return new Dat151DependentAmbience(this); - case Dat151RelType.ConductorState: return new Dat151ConductorState(this); - case Dat151RelType.AnimalSounds: return new Dat151AnimalSounds(this); - case Dat151RelType.VehicleScannerColourList: return new Dat151VehicleScannerColourList(this); - case Dat151RelType.Unk77: return new Dat151Unk77(this); - case Dat151RelType.Microphone: return new Dat151Microphone(this); - case Dat151RelType.VehicleRecording: return new Dat151VehicleRecording(this); - case Dat151RelType.AnimalFootsteps: return new Dat151AnimalFootsteps(this); - case Dat151RelType.Cloth: return new Dat151Cloth(this); - case Dat151RelType.RadioTrackSettings: return new Dat151RadioTrackSettings(this); - case Dat151RelType.StealthSettings: return new Dat151StealthSettings(this); - case Dat151RelType.Unk99: return new Dat151Unk99(this); - case Dat151RelType.Tunnel: return new Dat151Tunnel(this); - case Dat151RelType.Alarm: return new Dat151Alarm(this); - case Dat151RelType.SlowMoSettings: return new Dat151SlowMoSettings(this); - case Dat151RelType.Scenario: return new Dat151Scenario(this); - case Dat151RelType.PortalSettings: return new Dat151PortalSettings(this); - case Dat151RelType.ElectricEngine: return new Dat151ElectricEngine(this); - case Dat151RelType.BreathSettings: return new Dat151BreathSettings(this); - case Dat151RelType.WallaSpeech: return new Dat151WallaSpeech(this); - case Dat151RelType.AircraftWarningSettings: return new Dat151AircraftWarningSettings(this); - case Dat151RelType.WallaSpeechList: return new Dat151WallaSpeechList(this); - case Dat151RelType.CopDispatchInteractionSettings: return new Dat151CopDispatchInteractionSettings(this); - case Dat151RelType.Unk115: return new Dat151Unk115(this); - case Dat151RelType.TennisVFXSettings: return new Dat151TennisVFXSettings(this); - case Dat151RelType.Unk118: return new Dat151Unk118(this); - case Dat151RelType.Foliage: return new Dat151Foliage(this); - case Dat151RelType.ModelAudioCollisionSettingsOverride: return new Dat151ModelAudioCollisionSettingsOverride(this); - case Dat151RelType.RadioStationList2: return new Dat151RadioStationList2(this); - default: - return new Dat151RelData(this, (Dat151RelType)dataType); //shouldn't get here - } + Dat151RelType.StaticEmitterList => new Dat151StaticEmitterList(this), + Dat151RelType.AmbientZone => new Dat151AmbientZone(this), + Dat151RelType.AmbientRule => new Dat151AmbientRule(this), + Dat151RelType.AmbientZoneList => new Dat151AmbientZoneList(this), + Dat151RelType.VehicleCollision => new Dat151VehicleCollision(this), + Dat151RelType.WeaponAudioItem => new Dat151WeaponAudioItem(this), + Dat151RelType.StartTrackAction => new Dat151StartTrackAction(this), + Dat151RelType.StopTrackAction => new Dat151StopTrackAction(this), + Dat151RelType.Mood => new Dat151Mood(this), + Dat151RelType.SetMoodAction => new Dat151SetMoodAction(this), + Dat151RelType.PlayerAction => new Dat151PlayerAction(this), + Dat151RelType.StartOneShotAction => new Dat151StartOneShotAction(this), + Dat151RelType.StopOneShotAction => new Dat151StopOneShotAction(this), + Dat151RelType.FadeOutRadioAction => new Dat151FadeOutRadioAction(this), + Dat151RelType.FadeInRadioAction => new Dat151FadeInRadioAction(this), + Dat151RelType.ModelAudioCollisionSettings => new Dat151ModelAudioCollisionSettings(this), + Dat151RelType.Interior => new Dat151Interior(this), + Dat151RelType.InteriorRoom => new Dat151InteriorRoom(this), + Dat151RelType.DoorModel => new Dat151DoorModel(this), + Dat151RelType.AudioMaterial => new Dat151AudioMaterial(this), + Dat151RelType.Door => new Dat151Door(this), + Dat151RelType.AnimalFootstepsList => new Dat151AnimalFootstepsList(this), + Dat151RelType.RadioDJSpeechAction => new Dat151RadioDjSpeechAction(this), + Dat151RelType.ForceRadioTrackAction => new Dat151ForceRadioTrackAction(this), + Dat151RelType.MicrophoneList => new Dat151MicrophoneList(this), + Dat151RelType.RadioStationList => new Dat151RadioStationList(this), + Dat151RelType.RadioStation => new Dat151RadioStation(this), + Dat151RelType.RadioTrack => new Dat151RadioTrack(this), + Dat151RelType.TrackList => new Dat151TrackList(this), + Dat151RelType.DoorList => new Dat151DoorList(this), + Dat151RelType.ShoeList => new Dat151ShoeList(this), + Dat151RelType.ClothList => new Dat151ClothList(this), + Dat151RelType.VehicleRecordingList => new Dat151VehicleRecordingList(this), + Dat151RelType.WeatherTypeList => new Dat151WeatherTypeList(this), + Dat151RelType.ShoreLinePool => new Dat151ShoreLinePool(this), + Dat151RelType.ShoreLineLake => new Dat151ShoreLineLake(this), + Dat151RelType.ShoreLineRiver => new Dat151ShoreLineRiver(this), + Dat151RelType.ShoreLineOcean => new Dat151ShoreLineOcean(this), + Dat151RelType.ShoreLineList => new Dat151ShoreLineList(this), + Dat151RelType.RadioTrackEvents => new Dat151RadioTrackEvents(this), + Dat151RelType.VehicleEngineGranular => new Dat151VehicleEngineGranular(this), + Dat151RelType.Vehicle => new Dat151Vehicle(this), + Dat151RelType.VehicleEngine => new Dat151VehicleEngine(this), + Dat151RelType.VehicleScannerParams => new Dat151VehicleScannerParams(this), + Dat151RelType.StaticEmitter => new Dat151StaticEmitter(this), + Dat151RelType.Weapon => new Dat151Weapon(this), + Dat151RelType.Explosion => new Dat151Explosion(this), + Dat151RelType.PedVoiceGroup => new Dat151PedVoiceGroup(this), + Dat151RelType.EntityEmitter => new Dat151EntityEmitter(this), + Dat151RelType.Boat => new Dat151Boat(this), + Dat151RelType.Bicycle => new Dat151Bicycle(this), + Dat151RelType.Aeroplane => new Dat151Aeroplane(this), + Dat151RelType.Helicopter => new Dat151Helicopter(this), + Dat151RelType.VehicleTrailer => new Dat151VehicleTrailer(this), + Dat151RelType.Train => new Dat151Train(this), + Dat151RelType.AnimalParams => new Dat151AnimalParams(this), + Dat151RelType.SpeechParams => new Dat151SpeechParams(this), + Dat151RelType.MeleeCombat => new Dat151MeleeCombat(this), + Dat151RelType.SpeechContext => new Dat151SpeechContext(this), + Dat151RelType.SpeechChoice => new Dat151SpeechChoice(this), + Dat151RelType.VirtualSpeechChoice => new Dat151VirtualSpeechChoice(this), + Dat151RelType.SpeechContextList => new Dat151SpeechContextList(this), + Dat151RelType.Shoe => new Dat151Shoe(this), + Dat151RelType.Unk22 => new Dat151Unk22(this), + Dat151RelType.Skis => new Dat151Skis(this), + Dat151RelType.RadioTrackCategory => new Dat151RadioTrackCategory(this), + Dat151RelType.PoliceScannerCrime => new Dat151PoliceScannerCrime(this), + Dat151RelType.RaceToPedVoiceGroup => new Dat151RaceToPedVoiceGroup(this), + Dat151RelType.PedType => new Dat151PedType(this), + Dat151RelType.PoliceScannerReport => new Dat151PoliceScannerReport(this), + Dat151RelType.PoliceScannerLocation => new Dat151PoliceScannerLocation(this), + Dat151RelType.PoliceScannerLocationList => new Dat151PoliceScannerLocationList(this), + Dat151RelType.AmbienceSlotMap => new Dat151AmbienceSlotMap(this), + Dat151RelType.AmbienceBankMap => new Dat151AmbienceBankMap(this), + Dat151RelType.AmbientZoneParams => new Dat151AmbientZoneParams(this), + Dat151RelType.InteriorRoomParams => new Dat151InteriorRoomParams(this), + Dat151RelType.DoorParams => new Dat151DoorParams(this), + Dat151RelType.Climbing => new Dat151Climbing(this), + Dat151RelType.WeatherType => new Dat151WeatherType(this), + Dat151RelType.StemMix => new Dat151StemMix(this), + Dat151RelType.MusicBeat => new Dat151MusicBeat(this), + Dat151RelType.MusicBar => new Dat151MusicBar(this), + Dat151RelType.DependentAmbience => new Dat151DependentAmbience(this), + Dat151RelType.ConductorState => new Dat151ConductorState(this), + Dat151RelType.AnimalSounds => new Dat151AnimalSounds(this), + Dat151RelType.VehicleScannerColourList => new Dat151VehicleScannerColourList(this), + Dat151RelType.Unk77 => new Dat151Unk77(this), + Dat151RelType.Microphone => new Dat151Microphone(this), + Dat151RelType.VehicleRecording => new Dat151VehicleRecording(this), + Dat151RelType.AnimalFootsteps => new Dat151AnimalFootsteps(this), + Dat151RelType.Cloth => new Dat151Cloth(this), + Dat151RelType.RadioTrackSettings => new Dat151RadioTrackSettings(this), + Dat151RelType.StealthSettings => new Dat151StealthSettings(this), + Dat151RelType.Unk99 => new Dat151Unk99(this), + Dat151RelType.Tunnel => new Dat151Tunnel(this), + Dat151RelType.Alarm => new Dat151Alarm(this), + Dat151RelType.SlowMoSettings => new Dat151SlowMoSettings(this), + Dat151RelType.Scenario => new Dat151Scenario(this), + Dat151RelType.PortalSettings => new Dat151PortalSettings(this), + Dat151RelType.ElectricEngine => new Dat151ElectricEngine(this), + Dat151RelType.BreathSettings => new Dat151BreathSettings(this), + Dat151RelType.WallaSpeech => new Dat151WallaSpeech(this), + Dat151RelType.AircraftWarningSettings => new Dat151AircraftWarningSettings(this), + Dat151RelType.WallaSpeechList => new Dat151WallaSpeechList(this), + Dat151RelType.CopDispatchInteractionSettings => new Dat151CopDispatchInteractionSettings(this), + Dat151RelType.Unk115 => new Dat151Unk115(this), + Dat151RelType.TennisVFXSettings => new Dat151TennisVFXSettings(this), + Dat151RelType.Unk118 => new Dat151Unk118(this), + Dat151RelType.Foliage => new Dat151Foliage(this), + Dat151RelType.ModelAudioCollisionSettingsOverride => new Dat151ModelAudioCollisionSettingsOverride(this), + Dat151RelType.RadioStationList2 => new Dat151RadioStationList2(this), + _ => new Dat151RelData(this, (Dat151RelType)dataType),//shouldn't get here + }; case RelDatFileType.Dat4: if (IsAudioConfig) { @@ -946,47 +962,44 @@ namespace CodeWalker.GameFiles return new Dat10RelData(this);//shouldn't get here } case RelDatFileType.Dat15DynamicMixer: - switch ((Dat15RelType)dataType) + return (Dat15RelType)dataType switch { - case Dat15RelType.Patch: return new Dat15Patch(this); - case Dat15RelType.SceneState: return new Dat15SceneState(this); - case Dat15RelType.Scene: return new Dat15Scene(this); - case Dat15RelType.Group: return new Dat15Group(this); - case Dat15RelType.GroupList: return new Dat15GroupList(this); - case Dat15RelType.DynamicMixModuleSettings: return new Dat15DynamicMixModuleSettings(this); - case Dat15RelType.SceneVariableModuleSettings: return new Dat15SceneVariableModuleSettings(this); - case Dat15RelType.SceneTransitionModuleSettings: return new Dat15SceneTransitionModuleSettings(this); - case Dat15RelType.VehicleCollisionModuleSettings: return new Dat15VehicleCollisionModuleSettings(this); - case Dat15RelType.GroupMap: return new Dat15GroupMap(this); - default: - return new Dat15RelData(this);//shouldn't get here - } + Dat15RelType.Patch => new Dat15Patch(this), + Dat15RelType.SceneState => new Dat15SceneState(this), + Dat15RelType.Scene => new Dat15Scene(this), + Dat15RelType.Group => new Dat15Group(this), + Dat15RelType.GroupList => new Dat15GroupList(this), + Dat15RelType.DynamicMixModuleSettings => new Dat15DynamicMixModuleSettings(this), + Dat15RelType.SceneVariableModuleSettings => new Dat15SceneVariableModuleSettings(this), + Dat15RelType.SceneTransitionModuleSettings => new Dat15SceneTransitionModuleSettings(this), + Dat15RelType.VehicleCollisionModuleSettings => new Dat15VehicleCollisionModuleSettings(this), + Dat15RelType.GroupMap => new Dat15GroupMap(this), + _ => new Dat15RelData(this),//shouldn't get here + }; case RelDatFileType.Dat16Curves: - switch ((Dat16RelType)dataType) + return (Dat16RelType)dataType switch { - case Dat16RelType.ConstantCurve: return new Dat16ConstantCurve(this); - case Dat16RelType.LinearCurve: return new Dat16LinearCurve(this); - case Dat16RelType.LinearDbCurve: return new Dat16LinearDbCurve(this); - case Dat16RelType.PiecewiseLinearCurve: return new Dat16PiecewiseLinearCurve(this); - case Dat16RelType.EqualPowerCurve: return new Dat16EqualPowerCurve(this); - case Dat16RelType.ValueTableCurve: return new Dat16ValueTableCurve(this); - case Dat16RelType.ExponentialCurve: return new Dat16ExponentialCurve(this); - case Dat16RelType.DecayingExponentialCurve: return new Dat16DecayingExponentialCurve(this); - case Dat16RelType.DecayingSquaredExponentialCurve: return new Dat16DecayingSquaredExponentialCurve(this); - case Dat16RelType.SineCurve: return new Dat16SineCurve(this); - case Dat16RelType.OneOverXSquaredCurve: return new Dat16OneOverXSquaredCurve(this); - case Dat16RelType.DefaultDistanceAttenuationCurve: return new Dat16DefaultDistanceAttenuationCurve(this); - case Dat16RelType.DistanceAttenuationValueTableCurve: return new Dat16DistanceAttenuationValueTableCurve(this); - default: - return new Dat16RelData(this);//shouldn't get here - } + Dat16RelType.ConstantCurve => new Dat16ConstantCurve(this), + Dat16RelType.LinearCurve => new Dat16LinearCurve(this), + Dat16RelType.LinearDbCurve => new Dat16LinearDbCurve(this), + Dat16RelType.PiecewiseLinearCurve => new Dat16PiecewiseLinearCurve(this), + Dat16RelType.EqualPowerCurve => new Dat16EqualPowerCurve(this), + Dat16RelType.ValueTableCurve => new Dat16ValueTableCurve(this), + Dat16RelType.ExponentialCurve => new Dat16ExponentialCurve(this), + Dat16RelType.DecayingExponentialCurve => new Dat16DecayingExponentialCurve(this), + Dat16RelType.DecayingSquaredExponentialCurve => new Dat16DecayingSquaredExponentialCurve(this), + Dat16RelType.SineCurve => new Dat16SineCurve(this), + Dat16RelType.OneOverXSquaredCurve => new Dat16OneOverXSquaredCurve(this), + Dat16RelType.DefaultDistanceAttenuationCurve => new Dat16DefaultDistanceAttenuationCurve(this), + Dat16RelType.DistanceAttenuationValueTableCurve => new Dat16DistanceAttenuationValueTableCurve(this), + _ => new Dat16RelData(this),//shouldn't get here + }; case RelDatFileType.Dat22Categories: - switch ((Dat22RelType)dataType) + return (Dat22RelType)dataType switch { - case Dat22RelType.Category: return new Dat22Category(this); - default: - return new Dat22RelData(this);//shouldn't get here - } + Dat22RelType.Category => new Dat22Category(this), + _ => new Dat22RelData(this),//shouldn't get here + }; default: d = new RelData(this); d.TypeID = (byte)dataType; @@ -1014,14 +1027,10 @@ namespace CodeWalker.GameFiles { ntlength += (uint)name.Length + 1; } - if ((NameTableLength != ntlength)&&(NameTableLength!=0)) - { } NameTableLength = ntlength; } else { - if ((NameTableLength != 4)&& (NameTableLength != 0)) - { } NameTableCount = 0; NameTableLength = 4; } @@ -1030,8 +1039,8 @@ namespace CodeWalker.GameFiles } private void BuildDataBlock() { - if (RelDatas == null) return; - if (RelDatasSorted == null) return; + if (RelDatas == null) + return; @@ -1125,22 +1134,19 @@ namespace CodeWalker.GameFiles ms.Position = 0; ms.Read(buf, 0, buf.Length); - if ((DataBlock!=null)&&(DataBlock.Length != buf.Length)) - { } - DataBlock = buf; DataLength = (uint)(DataBlock?.Length ?? 0); } private void BuildIndex() { - if (RelDatas == null) return; - if (RelDatasSorted == null) return; + if (RelDatas == null) + return; //for the correct index ordering, needs to be in order of hashes, but with bits rotated right by 8 (why!?) - var sorted = RelDatasSorted.ToList(); + var sorted = RelDatasSorted.ToArray(); switch (RelType) { case RelDatFileType.Dat15DynamicMixer: @@ -1151,7 +1157,7 @@ namespace CodeWalker.GameFiles case RelDatFileType.Dat22Categories: case RelDatFileType.Dat16Curves: case RelDatFileType.Dat54DataEntries: - sorted.Sort((a, b) => + Array.Sort(sorted, (a, b) => { var ah = (uint)a.NameHash; var bh = (uint)b.NameHash; @@ -1163,11 +1169,11 @@ namespace CodeWalker.GameFiles default: if (!IsAudioConfig)//don't sort audioconfig (only sort speech dat4's) { - sorted.Sort((a, b) => { return ((uint)a.NameHash).CompareTo((uint)b.NameHash); }); + Array.Sort(sorted, (a, b) => ((uint)a.NameHash).CompareTo((uint)b.NameHash)); } break; } - RelDatas = sorted.ToArray(); + RelDatas = sorted; if (IsAudioConfig) @@ -1190,60 +1196,40 @@ namespace CodeWalker.GameFiles var rd = RelDatas[i]; hashes[i] = new RelIndexHash() { Name = rd.NameHash, Offset = rd.DataOffset, Length = rd.DataLength }; } - //if (hashes.Length != IndexHashes.Length) - //{ } IndexHashes = hashes; IndexCount = (uint)(IndexHashes?.Length ?? 0); } } + private void BuildHashTable() { - if (RelDatasSorted == null) return; + if (RelDatas == null) + return; var htoffsets = new List(); foreach (var rd in RelDatasSorted) { var offsets = rd.GetHashTableOffsets(); - if (offsets == null) continue; + if (offsets == null || offsets.Length == 0) + continue; var rdoffset = rd.DataOffset + 8; var rs = rd as RelSound; - var ss = rd as Dat4SpeechData; - if (rs?.Header != null) + if (rs?.Header is not null) { rdoffset += 1 + rs.Header.CalcHeaderLength(); } - else if (ss == null)//don't add 4 for speech! + else if (rd is not Dat4SpeechData ss)//don't add 4 for speech! { rdoffset += 4; //typeid + nt offset } for (int i = 0; i < offsets.Length; i++) { htoffsets.Add(rdoffset + offsets[i]); - - int idx = htoffsets.Count - 1; - if ((HashTableOffsets != null) && (idx < HashTableOffsets.Length)) - { - if (htoffsets[idx] != HashTableOffsets[idx]) - { } - } } } if (htoffsets.Count > 0) { - if (HashTableOffsets != null) - { - if (HashTableOffsets.Length != htoffsets.Count) - { } - else - { - for (int i = 0; i < htoffsets.Count; i++) - { - if (htoffsets[i] != HashTableOffsets[i]) - { } - } - } - } HashTableOffsets = htoffsets.ToArray(); } else @@ -1253,6 +1239,7 @@ namespace CodeWalker.GameFiles HashTableCount = (uint)(HashTableOffsets?.Length ?? 0); } + private void BuildPackTable() { @@ -1260,15 +1247,15 @@ namespace CodeWalker.GameFiles foreach (var rd in RelDatasSorted) { var offsets = rd.GetPackTableOffsets(); - if (offsets == null) continue; + if (offsets.Length == 0) + continue; var rdoffset = rd.DataOffset + 8; var rs = rd as RelSound; - var ss = rd as Dat4SpeechData; - if (rs?.Header != null) + if (rs?.Header is not null) { rdoffset += 1 + rs.Header.CalcHeaderLength(); } - else if (ss == null)//don't add 4 for speech! + else if (rd is not Dat4SpeechData ss)//don't add 4 for speech! { rdoffset += 4; //typeid + nt offset } @@ -1279,19 +1266,6 @@ namespace CodeWalker.GameFiles } if (ptoffsets.Count > 0) { - if (PackTableOffsets != null) - { - if (PackTableOffsets.Length != ptoffsets.Count) - { } - else - { - for (int i = 0; i < ptoffsets.Count; i++) - { - if (ptoffsets[i] != PackTableOffsets[i]) - { } - } - } - } PackTableOffsets = ptoffsets.ToArray(); } else @@ -1321,10 +1295,12 @@ namespace CodeWalker.GameFiles } if (relType != RelDatFileType.Dat4) - { return; } + { + return; + } - if (HashTableOffsets != null) + if (HashTableOffsets != null && HashTableOffsets.Length > 0) { foreach (var htoffset in HashTableOffsets) { @@ -1334,8 +1310,7 @@ namespace CodeWalker.GameFiles if ((dboffset >= rd.DataOffset) && (dboffset < rd.DataOffset + rd.DataLength)) { var rdoffset = rd.DataOffset; - var rs = rd as RelSound; - if (rs != null) + if (rd is RelSound rs) { rdoffset += 1 + rs.Header.HeaderLength; } @@ -1358,7 +1333,7 @@ namespace CodeWalker.GameFiles } } } - if (PackTableOffsets != null) + if (PackTableOffsets != null && PackTableOffsets.Length > 0) { foreach (var wcoffset in PackTableOffsets) { @@ -1368,8 +1343,7 @@ namespace CodeWalker.GameFiles if ((dboffset >= rd.DataOffset) && (dboffset < rd.DataOffset + rd.DataLength)) { var rdoffset = rd.DataOffset; - var rs = rd as RelSound; - if (rs != null) + if (rd is RelSound rs) { rdoffset += 1 + rs.Header.HeaderLength; } @@ -1395,7 +1369,7 @@ namespace CodeWalker.GameFiles } - public struct HashesMapKey + public struct HashesMapKey : IEquatable { public RelDatFileType FileType { get; set; } public uint ItemType { get; set; } @@ -1417,6 +1391,33 @@ namespace CodeWalker.GameFiles return fcstr + ItemType.ToString(); } + + public static bool operator ==(HashesMapKey left, HashesMapKey right) + { + return left.Equals(right); + } + + public static bool operator !=(HashesMapKey left, HashesMapKey right) + { + return !(left == right); + } + + public override bool Equals(object? obj) + { + return obj is HashesMapKey key && Equals(key); + } + + public bool Equals(HashesMapKey other) + { + return FileType == other.FileType && + ItemType == other.ItemType && + IsContainer == other.IsContainer; + } + + public override int GetHashCode() + { + return HashCode.Combine(FileType, ItemType, IsContainer); + } } public class HashesMapValue { @@ -1427,32 +1428,27 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Offset.ToString() + ": " + Count.ToString(); + return $"{Offset}: {Count}"; } } public static Dictionary> HashesMap { get; set; } = new Dictionary>(); private static void AddHashesMapItem(ref HashesMapKey key, HashesMapValue val) { - List values = null; - if (!HashesMap.TryGetValue(key, out values)) + if (!HashesMap.TryGetValue(key, out var values)) { values = new List(); HashesMap[key] = values; } - if (values != null) + + foreach (var xval in values) { - foreach (var xval in values) + if (xval.Offset == val.Offset) { - if (xval.Offset == val.Offset) - { - xval.Count++; - return;//same key, same offset, it's a match... - } + xval.Count++; + return;//same key, same offset, it's a match... } - values.Add(val); } - else - { } + values.Add(val); } @@ -1468,7 +1464,8 @@ namespace CodeWalker.GameFiles BuildPackTable(); - if (DataBlock == null) return null; + if (DataBlock == null) + return Array.Empty(); @@ -1557,15 +1554,9 @@ namespace CodeWalker.GameFiles ms.Position = 0; ms.Read(buf, 0, buf.Length); return buf; - } - - - - - public void AddRelData(RelData d) { var newRelDatas = new List(); @@ -1581,7 +1572,7 @@ namespace CodeWalker.GameFiles { var newRelDatas = new List(); - if (RelDatas != null) + if (RelDatas is not null && RelDatas.Length > 0) { foreach (var relData in RelDatas) { @@ -1590,13 +1581,13 @@ namespace CodeWalker.GameFiles newRelDatas.Add(relData); } } - } - if (newRelDatas.Count < RelDatas.Length) - { - RelDatas = newRelDatas.ToArray(); - RelDataDict.Remove(d.NameHash); - return true; + if (newRelDatas.Count < RelDatas.Length) + { + RelDatas = newRelDatas.ToArray(); + RelDataDict.Remove(d.NameHash); + return true; + } } return false; @@ -1604,39 +1595,86 @@ namespace CodeWalker.GameFiles - public override string ToString() - { - return Name; - } + public override string ToString() => Name; } - [TC(typeof(EXP))] public struct RelIndexHash + [TC(typeof(EXP))] + public readonly struct RelIndexHash { - public MetaHash Name { get; set; } - public uint Offset { get; set; } - public uint Length { get; set; } + public MetaHash Name { get; init; } + public uint Offset { get; init; } + public uint Length { get; init; } - public override string ToString() + public override readonly string ToString() { - return Name.ToString() + ", " + Offset.ToString() + ", " + Length.ToString(); + return $"{Name}, {Offset}, {Length}"; } } - [TC(typeof(EXP))] public struct RelIndexString + [TC(typeof(EXP))] + public readonly struct RelIndexString { - public string Name { get; set; } - public uint Offset { get; set; } - public uint Length { get; set; } + public string Name { get; init; } + public uint Offset { get; init; } + public uint Length { get; init; } - public override string ToString() + public override readonly string ToString() { - return Name + ", " + Offset.ToString() + ", " + Length.ToString(); + return $"{Name}, {Offset}, {Length}"; + } + } + + public ref struct TempRelData + { + public MetaHash NameHash; + public string Name; + public uint DataOffset; + public uint DataLength; + public byte[] Data; + public byte TypeID; + public RelFile Rel; + + public TempRelData(RelFile rel) + { + Rel = rel; + } + public TempRelData(RelData relData) + { + NameHash = relData.NameHash; + Name = relData.Name; + DataOffset = relData.DataOffset; + DataLength = relData.DataLength; + Data = relData.Data; + TypeID = relData.TypeID; + Rel = relData.Rel; + } + + public TempRelData(in TempRelData relData) + { + NameHash = relData.NameHash; + Name = relData.Name; + DataOffset = relData.DataOffset; + DataLength = relData.DataLength; + Data = relData.Data; + TypeID = relData.TypeID; + Rel = relData.Rel; + } + + public void ReadType(BinaryReader br) + { + TypeID = br.ReadByte(); + } + + public void ReadType(ref SequenceReader br) + { + TypeID = br.ReadByte(); } } - [TC(typeof(EXP))] public class RelData + [TC(typeof(EXP))] + public class RelData { public MetaHash NameHash { get; set; } public string Name { get; set; } @@ -1647,7 +1685,10 @@ namespace CodeWalker.GameFiles public RelFile Rel { get; set; } - public RelData(RelFile rel) { Rel = rel; } + public RelData(RelFile rel) + { + Rel = rel; + } public RelData(RelData d) { NameHash = d.NameHash; @@ -1659,48 +1700,37 @@ namespace CodeWalker.GameFiles Rel = d.Rel; } + public RelData(in TempRelData d) + { + NameHash = d.NameHash; + Name = d.Name; + DataOffset = d.DataOffset; + DataLength = d.DataLength; + Data = d.Data; + TypeID = d.TypeID; + Rel = d.Rel; + } + public void ReadType(BinaryReader br) { TypeID = br.ReadByte(); } - public virtual uint[] GetHashTableOffsets() + public void ReadType(ref SequenceReader br) { - return null; - } - public virtual uint[] GetPackTableOffsets() - { - return null; + TypeID = br.ReadByte(); } - public virtual MetaHash[] GetSpeechHashes() - { - return null; - } - public virtual MetaHash[] GetSynthHashes() - { - return null; - } - public virtual MetaHash[] GetMixerHashes() - { - return null; - } - public virtual MetaHash[] GetCurveHashes() - { - return null; - } - public virtual MetaHash[] GetCategoryHashes() - { - return null; - } - public virtual MetaHash[] GetSoundHashes() - { - return null; - } - public virtual MetaHash[] GetGameHashes() - { - return null; - } + public virtual uint[] GetHashTableOffsets() => []; + public virtual uint[] GetPackTableOffsets() => []; + + public virtual MetaHash[] GetSpeechHashes() => []; + public virtual MetaHash[] GetSynthHashes() => []; + public virtual MetaHash[] GetMixerHashes() => []; + public virtual MetaHash[] GetCurveHashes() => []; + public virtual MetaHash[] GetCategoryHashes() => []; + public virtual MetaHash[] GetSoundHashes() => []; + public virtual MetaHash[] GetGameHashes() => []; public virtual void Write(BinaryWriter bw) @@ -1729,15 +1759,15 @@ namespace CodeWalker.GameFiles public string GetNameString() { - return (string.IsNullOrEmpty(Name)) ? NameHash.ToString() : Name; + return string.IsNullOrEmpty(Name) ? NameHash.ToString() : Name; } public string GetBaseString() { - return DataOffset.ToString() + ", " + DataLength.ToString() + ": " + GetNameString(); + return $"{DataOffset}, {DataLength}: {GetNameString()}"; } public override string ToString() { - return GetBaseString() + ": " + TypeID.ToString(); + return $"{GetBaseString()}: {TypeID}"; } public static bool Bit(uint f, int b) @@ -1748,6 +1778,17 @@ namespace CodeWalker.GameFiles { return ((f < -15000) || (f > 15000)); } + + + public static explicit operator RelData(TempRelData h) + { + return new RelData(in h); //implicit conversion + } + + public static explicit operator TempRelData(RelData d) + { + return new TempRelData(d); + } } @@ -1757,50 +1798,98 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public class RelSoundHeader + [TC(typeof(EXP))] + public class RelSoundHeader : IEquatable { - public FlagsUint Flags { get; set; } + public FlagsUint Flags { get; init; } - public FlagsUint Flags2 { get; set; } - public ushort Unk01 { get; set; } - public short Volume { get; set; } - public ushort VolumeVariance { get; set; } //0xD-0xF - public short Pitch { get; set; } //0xF-0x11 - public ushort PitchVariance { get; set; } //0x11-0x13 - public ushort Pan { get; set; } //0x13-0x15 - public ushort PanVariance { get; set; } //0x15-0x17 - public short PreDelay { get; set; } //0x17-0x19 - public ushort PreDelayVariance { get; set; } //0x19-0x1B - public int StartOffset { get; set; } //0x1B-0x1F - public int StartOffsetVariance { get; set; } //0x1F-0x23 - public ushort AttackTime { get; set; } //0x23-0x25 - public ushort ReleaseTime { get; set; } //0x25-0x27 - public ushort DopplerFactor { get; set; } //0x27-0x29 - public MetaHash Category { get; set; } //0x29-0x2D - public ushort LPFCutoff { get; set; } //0x2D-0x2F - public ushort LPFCutoffVariance { get; set; } //0x2F-0x31 - public ushort HPFCutoff { get; set; } //0x31-0x33 - public ushort HPFCutoffVariance { get; set; } //0x33-0x35 - public MetaHash VolumeCurve { get; set; } //0x35-0x39 - public short VolumeCurveScale { get; set; } //0x39-0x3B - public byte VolumeCurvePlateau { get; set; } //0x3B-0x3C - public byte Unk20 { get; set; } //0x3C-0x3D - public byte Unk21 { get; set; } //0x3D-0x3E - public MetaHash PreDelayVariable { get; set; } //0x3E-0x42 - public MetaHash StartOffsetVariable { get; set; } //0x42-0x46 - public ushort Unk22 { get; set; } //0x46-0x48 - public ushort Unk23 { get; set; } //0x48-0x4A - public ushort Unk24 { get; set; } //0x4A-0x4C - public ushort Unk25 { get; set; } //0x4A-0x4C - public ushort Unk26 { get; set; } //0x4A-0x4C + public FlagsUint Flags2 { get; init; } + public ushort Unk01 { get; init; } + public short Volume { get; init; } + public ushort VolumeVariance { get; init; } //0xD-0xF + public short Pitch { get; init; } //0xF-0x11 + public ushort PitchVariance { get; init; } //0x11-0x13 + public ushort Pan { get; init; } //0x13-0x15 + public ushort PanVariance { get; init; } //0x15-0x17 + public short PreDelay { get; init; } //0x17-0x19 + public ushort PreDelayVariance { get; init; } //0x19-0x1B + public int StartOffset { get; init; } //0x1B-0x1F + public int StartOffsetVariance { get; init; } //0x1F-0x23 + public ushort AttackTime { get; init; } //0x23-0x25 + public ushort ReleaseTime { get; init; } //0x25-0x27 + public ushort DopplerFactor { get; init; } //0x27-0x29 + public MetaHash Category { get; init; } //0x29-0x2D + public ushort LPFCutoff { get; init; } //0x2D-0x2F + public ushort LPFCutoffVariance { get; init; } //0x2F-0x31 + public ushort HPFCutoff { get; init; } //0x31-0x33 + public ushort HPFCutoffVariance { get; init; } //0x33-0x35 + public MetaHash VolumeCurve { get; init; } //0x35-0x39 + public short VolumeCurveScale { get; init; } //0x39-0x3B + public byte VolumeCurvePlateau { get; init; } //0x3B-0x3C + public byte Unk20 { get; init; } //0x3C-0x3D + public byte Unk21 { get; init; } //0x3D-0x3E + public MetaHash PreDelayVariable { get; init; } //0x3E-0x42 + public MetaHash StartOffsetVariable { get; init; } //0x42-0x46 + public ushort Unk22 { get; init; } //0x46-0x48 + public ushort Unk23 { get; init; } //0x48-0x4A + public ushort Unk24 { get; init; } //0x4A-0x4C + public ushort Unk25 { get; init; } //0x4A-0x4C + public ushort Unk26 { get; init; } //0x4A-0x4C - public uint HeaderLength { get; set; } = 0; + public uint HeaderLength { get; init; } = 0; public RelSoundHeader(XmlNode node) { ReadXml(node); HeaderLength = CalcHeaderLength(); + + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + + if ((Flags & 0xFF) != 0xAA) + { + if (Bit(0)) Flags2 = Xml.GetChildUIntAttribute(node, "Flags2", "value"); + if (Bit(1)) Unk01 = (ushort)Xml.GetChildUIntAttribute(node, "Unk01", "value"); + if (Bit(2)) Volume = (short)Xml.GetChildIntAttribute(node, "Volume", "value"); + if (Bit(3)) VolumeVariance = (ushort)Xml.GetChildUIntAttribute(node, "VolumeVariance", "value"); + if (Bit(4)) Pitch = (short)Xml.GetChildIntAttribute(node, "Pitch", "value"); + if (Bit(5)) PitchVariance = (ushort)Xml.GetChildUIntAttribute(node, "PitchVariance", "value"); + if (Bit(6)) Pan = (ushort)Xml.GetChildUIntAttribute(node, "Pan", "value"); + if (Bit(7)) PanVariance = (ushort)Xml.GetChildUIntAttribute(node, "PanVariance", "value"); + } + if ((Flags & 0xFF00) != 0xAA00) + { + if (Bit(8)) PreDelay = (short)Xml.GetChildIntAttribute(node, "PreDelay", "value"); + if (Bit(9)) PreDelayVariance = (ushort)Xml.GetChildUIntAttribute(node, "PreDelayVariance", "value"); + if (Bit(10)) StartOffset = Xml.GetChildIntAttribute(node, "StartOffset", "value"); + if (Bit(11)) StartOffsetVariance = Xml.GetChildIntAttribute(node, "StartOffsetVariance", "value"); + if (Bit(12)) AttackTime = (ushort)Xml.GetChildUIntAttribute(node, "AttackTime", "value"); + if (Bit(13)) ReleaseTime = (ushort)Xml.GetChildUIntAttribute(node, "ReleaseTime", "value"); + if (Bit(14)) DopplerFactor = (ushort)Xml.GetChildUIntAttribute(node, "DopplerFactor", "value"); + if (Bit(15)) Category = XmlRel.GetHash(Xml.GetChildInnerText(node, "Category")); + } + if ((Flags & 0xFF0000) != 0xAA0000) + { + if (Bit(16)) LPFCutoff = (ushort)Xml.GetChildUIntAttribute(node, "LPFCutoff", "value"); + if (Bit(17)) LPFCutoffVariance = (ushort)Xml.GetChildUIntAttribute(node, "LPFCutoffVariance", "value"); + if (Bit(18)) HPFCutoff = (ushort)Xml.GetChildUIntAttribute(node, "HPFCutoff", "value"); + if (Bit(19)) HPFCutoffVariance = (ushort)Xml.GetChildUIntAttribute(node, "HPFCutoffVariance", "value"); + if (Bit(20)) VolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VolumeCurve")); + if (Bit(21)) VolumeCurveScale = (short)Xml.GetChildIntAttribute(node, "VolumeCurveScale", "value"); + if (Bit(22)) VolumeCurvePlateau = (byte)Xml.GetChildUIntAttribute(node, "VolumeCurvePlateau", "value"); + if (Bit(23)) Unk20 = (byte)Xml.GetChildUIntAttribute(node, "Unk20", "value"); + } + if ((Flags & 0xFF000000) != 0xAA000000) + { + if (Bit(24)) Unk21 = (byte)Xml.GetChildUIntAttribute(node, "Unk21", "value"); + if (Bit(25)) PreDelayVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "PreDelayVariable")); + if (Bit(26)) StartOffsetVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartOffsetVariable")); + if (Bit(27)) Unk22 = (ushort)Xml.GetChildUIntAttribute(node, "Unk22", "value"); + if (Bit(28)) Unk23 = (ushort)Xml.GetChildUIntAttribute(node, "Unk23", "value"); + if (Bit(29)) Unk24 = (ushort)Xml.GetChildUIntAttribute(node, "Unk24", "value"); + if (Bit(30)) Unk25 = (ushort)Xml.GetChildUIntAttribute(node, "Unk25", "value"); + if (Bit(31)) Unk26 = (ushort)Xml.GetChildUIntAttribute(node, "Unk26", "value"); + } } public RelSoundHeader(BinaryReader br) { @@ -1858,6 +1947,61 @@ namespace CodeWalker.GameFiles } + public RelSoundHeader(ref SequenceReader br) + { + var pos = br.Consumed; + + Flags = br.ReadUInt32(); + + //if (Flags.Value != 0xAAAAAAAA) + if ((Flags & 0xFF) != 0xAA) + { + if (Bit(0)) Flags2 = br.ReadUInt32(); + if (Bit(1)) Unk01 = br.ReadUInt16(); + if (Bit(2)) Volume = br.ReadInt16(); + if (Bit(3)) VolumeVariance = br.ReadUInt16(); + if (Bit(4)) Pitch = br.ReadInt16(); + if (Bit(5)) PitchVariance = br.ReadUInt16(); + if (Bit(6)) Pan = br.ReadUInt16(); + if (Bit(7)) PanVariance = br.ReadUInt16(); + } + if ((Flags & 0xFF00) != 0xAA00) + { + if (Bit(8)) PreDelay = br.ReadInt16(); + if (Bit(9)) PreDelayVariance = br.ReadUInt16(); + if (Bit(10)) StartOffset = br.ReadInt32(); + if (Bit(11)) StartOffsetVariance = br.ReadInt32(); + if (Bit(12)) AttackTime = br.ReadUInt16(); + if (Bit(13)) ReleaseTime = br.ReadUInt16(); + if (Bit(14)) DopplerFactor = br.ReadUInt16(); + if (Bit(15)) Category = br.ReadUInt32(); + } + if ((Flags & 0xFF0000) != 0xAA0000) + { + if (Bit(16)) LPFCutoff = br.ReadUInt16(); + if (Bit(17)) LPFCutoffVariance = br.ReadUInt16(); + if (Bit(18)) HPFCutoff = br.ReadUInt16(); + if (Bit(19)) HPFCutoffVariance = br.ReadUInt16(); + if (Bit(20)) VolumeCurve = br.ReadUInt32(); + if (Bit(21)) VolumeCurveScale = br.ReadInt16(); + if (Bit(22)) VolumeCurvePlateau = br.ReadByte(); + if (Bit(23)) Unk20 = br.ReadByte(); + } + if ((Flags & 0xFF000000) != 0xAA000000) + { + if (Bit(24)) Unk21 = br.ReadByte(); + if (Bit(25)) PreDelayVariable = br.ReadUInt32(); + if (Bit(26)) StartOffsetVariable = br.ReadUInt32(); + if (Bit(27)) Unk22 = br.ReadUInt16(); + if (Bit(28)) Unk23 = br.ReadUInt16(); + if (Bit(29)) Unk24 = br.ReadUInt16(); + if (Bit(30)) Unk25 = br.ReadUInt16(); //maybe not + if (Bit(31)) Unk26 = br.ReadUInt16(); //maybe not + } + + HeaderLength = (uint)(br.Consumed - pos); + } + public void Write(BinaryWriter bw) { bw.Write(Flags); @@ -1962,52 +2106,7 @@ namespace CodeWalker.GameFiles } public void ReadXml(XmlNode node) { - Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - if ((Flags & 0xFF) != 0xAA) - { - if (Bit(0)) Flags2 = Xml.GetChildUIntAttribute(node, "Flags2", "value"); - if (Bit(1)) Unk01 = (ushort)Xml.GetChildUIntAttribute(node, "Unk01", "value"); - if (Bit(2)) Volume = (short)Xml.GetChildIntAttribute(node, "Volume", "value"); - if (Bit(3)) VolumeVariance = (ushort)Xml.GetChildUIntAttribute(node, "VolumeVariance", "value"); - if (Bit(4)) Pitch = (short)Xml.GetChildIntAttribute(node, "Pitch", "value"); - if (Bit(5)) PitchVariance = (ushort)Xml.GetChildUIntAttribute(node, "PitchVariance", "value"); - if (Bit(6)) Pan = (ushort)Xml.GetChildUIntAttribute(node, "Pan", "value"); - if (Bit(7)) PanVariance = (ushort)Xml.GetChildUIntAttribute(node, "PanVariance", "value"); - } - if ((Flags & 0xFF00) != 0xAA00) - { - if (Bit(8)) PreDelay = (short)Xml.GetChildIntAttribute(node, "PreDelay", "value"); - if (Bit(9)) PreDelayVariance = (ushort)Xml.GetChildUIntAttribute(node, "PreDelayVariance", "value"); - if (Bit(10)) StartOffset = Xml.GetChildIntAttribute(node, "StartOffset", "value"); - if (Bit(11)) StartOffsetVariance = Xml.GetChildIntAttribute(node, "StartOffsetVariance", "value"); - if (Bit(12)) AttackTime = (ushort)Xml.GetChildUIntAttribute(node, "AttackTime", "value"); - if (Bit(13)) ReleaseTime = (ushort)Xml.GetChildUIntAttribute(node, "ReleaseTime", "value"); - if (Bit(14)) DopplerFactor = (ushort)Xml.GetChildUIntAttribute(node, "DopplerFactor", "value"); - if (Bit(15)) Category = XmlRel.GetHash(Xml.GetChildInnerText(node, "Category")); - } - if ((Flags & 0xFF0000) != 0xAA0000) - { - if (Bit(16)) LPFCutoff = (ushort)Xml.GetChildUIntAttribute(node, "LPFCutoff", "value"); - if (Bit(17)) LPFCutoffVariance = (ushort)Xml.GetChildUIntAttribute(node, "LPFCutoffVariance", "value"); - if (Bit(18)) HPFCutoff = (ushort)Xml.GetChildUIntAttribute(node, "HPFCutoff", "value"); - if (Bit(19)) HPFCutoffVariance = (ushort)Xml.GetChildUIntAttribute(node, "HPFCutoffVariance", "value"); - if (Bit(20)) VolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VolumeCurve")); - if (Bit(21)) VolumeCurveScale = (short)Xml.GetChildIntAttribute(node, "VolumeCurveScale", "value"); - if (Bit(22)) VolumeCurvePlateau = (byte)Xml.GetChildUIntAttribute(node, "VolumeCurvePlateau", "value"); - if (Bit(23)) Unk20 = (byte)Xml.GetChildUIntAttribute(node, "Unk20", "value"); - } - if ((Flags & 0xFF000000) != 0xAA000000) - { - if (Bit(24)) Unk21 = (byte)Xml.GetChildUIntAttribute(node, "Unk21", "value"); - if (Bit(25)) PreDelayVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "PreDelayVariable")); - if (Bit(26)) StartOffsetVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartOffsetVariable")); - if (Bit(27)) Unk22 = (ushort)Xml.GetChildUIntAttribute(node, "Unk22", "value"); - if (Bit(28)) Unk23 = (ushort)Xml.GetChildUIntAttribute(node, "Unk23", "value"); - if (Bit(29)) Unk24 = (ushort)Xml.GetChildUIntAttribute(node, "Unk24", "value"); - if (Bit(30)) Unk25 = (ushort)Xml.GetChildUIntAttribute(node, "Unk25", "value"); - if (Bit(31)) Unk26 = (ushort)Xml.GetChildUIntAttribute(node, "Unk26", "value"); - } } @@ -2070,7 +2169,100 @@ namespace CodeWalker.GameFiles public override string ToString() { - return string.Format("{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7}", Flags.Hex, Flags2.Hex, Category, StartOffset, StartOffsetVariance, VolumeCurve, PreDelayVariable, StartOffsetVariable); + return $"{Flags.Hex}: {Flags2.Hex}, {Category}, {StartOffset}, {StartOffsetVariance}, {VolumeCurve}, {PreDelayVariable}, {StartOffsetVariable}"; + } + + public override bool Equals(object? obj) + { + return obj is RelSoundHeader header && Equals(header); + } + + public bool Equals(RelSoundHeader other) + { + return Flags.Equals(other.Flags) && + Flags2.Equals(other.Flags2) && + Unk01 == other.Unk01 && + Volume == other.Volume && + VolumeVariance == other.VolumeVariance && + Pitch == other.Pitch && + PitchVariance == other.PitchVariance && + Pan == other.Pan && + PanVariance == other.PanVariance && + PreDelay == other.PreDelay && + PreDelayVariance == other.PreDelayVariance && + StartOffset == other.StartOffset && + StartOffsetVariance == other.StartOffsetVariance && + AttackTime == other.AttackTime && + ReleaseTime == other.ReleaseTime && + DopplerFactor == other.DopplerFactor && + Category.Equals(other.Category) && + LPFCutoff == other.LPFCutoff && + LPFCutoffVariance == other.LPFCutoffVariance && + HPFCutoff == other.HPFCutoff && + HPFCutoffVariance == other.HPFCutoffVariance && + VolumeCurve.Equals(other.VolumeCurve) && + VolumeCurveScale == other.VolumeCurveScale && + VolumeCurvePlateau == other.VolumeCurvePlateau && + Unk20 == other.Unk20 && + Unk21 == other.Unk21 && + PreDelayVariable.Equals(other.PreDelayVariable) && + StartOffsetVariable.Equals(other.StartOffsetVariable) && + Unk22 == other.Unk22 && + Unk23 == other.Unk23 && + Unk24 == other.Unk24 && + Unk25 == other.Unk25 && + Unk26 == other.Unk26 && + HeaderLength == other.HeaderLength; + } + + public override int GetHashCode() + { + HashCode hash = new HashCode(); + hash.Add(Flags); + hash.Add(Flags2); + hash.Add(Unk01); + hash.Add(Volume); + hash.Add(VolumeVariance); + hash.Add(Pitch); + hash.Add(PitchVariance); + hash.Add(Pan); + hash.Add(PanVariance); + hash.Add(PreDelay); + hash.Add(PreDelayVariance); + hash.Add(StartOffset); + hash.Add(StartOffsetVariance); + hash.Add(AttackTime); + hash.Add(ReleaseTime); + hash.Add(DopplerFactor); + hash.Add(Category); + hash.Add(LPFCutoff); + hash.Add(LPFCutoffVariance); + hash.Add(HPFCutoff); + hash.Add(HPFCutoffVariance); + hash.Add(VolumeCurve); + hash.Add(VolumeCurveScale); + hash.Add(VolumeCurvePlateau); + hash.Add(Unk20); + hash.Add(Unk21); + hash.Add(PreDelayVariable); + hash.Add(StartOffsetVariable); + hash.Add(Unk22); + hash.Add(Unk23); + hash.Add(Unk24); + hash.Add(Unk25); + hash.Add(Unk26); + hash.Add(HeaderLength); + return hash.ToHashCode(); + } + + public static bool operator ==(RelSoundHeader left, RelSoundHeader right) + { + return left.Equals(right); + } + + public static bool operator !=(RelSoundHeader left, RelSoundHeader right) + { + return !(left == right); } } @@ -2080,25 +2272,51 @@ namespace CodeWalker.GameFiles public byte ChildSoundsCount { get; set; } public RelData[] ChildSounds { get; set; } public MetaHash[] ChildSoundsHashes { get; set; } - public MetaHash[] AudioContainers { get; set; } //Relative path to parent wave container (i.e. "RESIDENT/animals") + public virtual MetaHash[] AudioContainers => []; //Relative path to parent wave container (i.e. "RESIDENT/animals") public RelSound(RelFile rel) : base(rel) { } - public RelSound(RelData d, BinaryReader br) : base(d) + public RelSound(in TempRelData d, BinaryReader br) : base(in d) { Header = new RelSoundHeader(br); } + public RelSound(in TempRelData d, ref SequenceReader reader) : base(in d) + { + Header = new RelSoundHeader(ref reader); + } + public void ReadChildSoundsHashes(BinaryReader br) { ChildSoundsCount = br.ReadByte(); + if (ChildSoundsCount == 0) + { + ChildSoundsHashes = []; + return; + } ChildSoundsHashes = new MetaHash[ChildSoundsCount]; for (int i = 0; i < ChildSoundsCount; i++) { ChildSoundsHashes[i] = br.ReadUInt32(); } } + + public void ReadChildSoundsHashes(ref SequenceReader reader) + { + ChildSoundsCount = reader.ReadByte(); + if (ChildSoundsCount == 0) + { + ChildSoundsHashes = []; + return; + } + ChildSoundsHashes = new MetaHash[ChildSoundsCount]; + for (int i = 0; i < ChildSoundsCount; i++) + { + ChildSoundsHashes[i] = reader.ReadUInt32(); + } + } + public void WriteChildSoundsHashes(BinaryWriter bw) { bw.Write(ChildSoundsCount); @@ -2111,7 +2329,10 @@ namespace CodeWalker.GameFiles public override void Write(BinaryWriter bw) { bw.Write(TypeID); - Header?.Write(bw); + if (Header is not null) + { + Header.Write(bw); + } } public override void WriteXml(StringBuilder sb, int indent) @@ -2122,7 +2343,7 @@ namespace CodeWalker.GameFiles public void WriteHeaderXml(StringBuilder sb, int indent) { - if (Header == null) return; + if (Header is null) return; RelXml.OpenTag(sb, indent, "Header");// flags=\"0x" + Header.Flags.Hex + "\""); Header.WriteXml(sb, indent + 1); RelXml.CloseTag(sb, indent, "Header"); @@ -2130,7 +2351,8 @@ namespace CodeWalker.GameFiles public void WriteChildSoundsXml(StringBuilder sb, int indent, string nodeName = "ChildSounds") { - if (ChildSoundsHashes == null) return; + if (ChildSoundsHashes is null) + return; if (ChildSoundsHashes.Length > 0) { RelXml.OpenTag(sb, indent, nodeName); @@ -2151,7 +2373,8 @@ namespace CodeWalker.GameFiles public void ReadHeaderXml(XmlNode node) { var hnode = node.SelectSingleNode("Header"); - if (hnode == null) return; + if (hnode is null) + return; Header = new RelSoundHeader(hnode); } @@ -2159,10 +2382,11 @@ namespace CodeWalker.GameFiles public void ReadChildSoundsXml(XmlNode node, string nodeName = "ChildSounds") { var atnode = node.SelectSingleNode(nodeName); - if (atnode == null) return; + if (atnode is null) + return; var childnodes = atnode.SelectNodes("Item"); - var childlist = new List(); + using var childlist = new PooledList(); foreach (XmlNode childnode in childnodes) { childlist.Add(XmlRel.GetHash(childnode.InnerText)); @@ -2173,12 +2397,16 @@ namespace CodeWalker.GameFiles public uint[] GetChildSoundsHashTableOffsets(uint offset = 0) { - var offsets = new List(); + if (ChildSoundsCount == 0) + return []; + + var offsets = new uint[ChildSoundsCount]; for (uint i = 0; i < ChildSoundsCount; i++) { - offsets.Add(offset + 1 + i * 4); + offsets[i] = offset + 1 + i * 4; } - return offsets.ToArray(); + + return offsets; } public override MetaHash[] GetSoundHashes() @@ -2187,12 +2415,14 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetCurveHashes() { - if ((Header != null) && (Header.VolumeCurve != 0)) return new[] { Header.VolumeCurve }; + if (Header is not null && Header.VolumeCurve != 0) + return new[] { Header.VolumeCurve }; return null; } public override MetaHash[] GetCategoryHashes() { - if ((Header != null) && (Header.Category != 0)) return new[] { Header.Category }; + if (Header is not null && Header.Category != 0) + return new[] { Header.Category }; return null; } } @@ -2247,7 +2477,12 @@ namespace CodeWalker.GameFiles Type = t; TypeID = (byte)t; } - public Dat54Sound(RelData d, BinaryReader br) : base(d, br) + public Dat54Sound(in TempRelData d, BinaryReader br) : base(in d, br) + { + Type = (Dat54SoundType)TypeID; + } + + public Dat54Sound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) { Type = (Dat54SoundType)TypeID; } @@ -2281,7 +2516,7 @@ namespace CodeWalker.GameFiles public Dat54LoopingSound(RelFile rel) : base(rel, Dat54SoundType.LoopingSound) { } - public Dat54LoopingSound(RelData d, BinaryReader br) : base(d, br) + public Dat54LoopingSound(in TempRelData d, BinaryReader br) : base(in d, br) { LoopCount = br.ReadInt16(); LoopCountVariance = br.ReadInt16(); @@ -2290,6 +2525,17 @@ namespace CodeWalker.GameFiles ChildSoundsHashes = new[] { ChildSound }; LoopCountVariable = br.ReadUInt32(); } + + public Dat54LoopingSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + LoopCount = reader.ReadInt16(); + LoopCountVariance = reader.ReadInt16(); + LoopPoint = reader.ReadInt16(); + ChildSound = reader.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + LoopCountVariable = reader.ReadUInt32(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2350,7 +2596,7 @@ namespace CodeWalker.GameFiles public Dat54EnvelopeSound(RelFile rel) : base(rel, Dat54SoundType.EnvelopeSound) { } - public Dat54EnvelopeSound(RelData d, BinaryReader br) : base(d, br) + public Dat54EnvelopeSound(in TempRelData d, BinaryReader br) : base(in d, br) { Attack = br.ReadUInt16(); //0x0-0x2 AttackVariance = br.ReadUInt16(); //0x2-0x4 @@ -2377,6 +2623,35 @@ namespace CodeWalker.GameFiles OutputRangeMax = br.ReadSingle(); //0x48-0x4C ChildSoundsHashes = new[] { ChildSound }; } + + public Dat54EnvelopeSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + Attack = reader.ReadUInt16(); //0x0-0x2 + AttackVariance = reader.ReadUInt16(); //0x2-0x4 + Decay = reader.ReadUInt16(); //0x4-0x6 + DecayVariance = reader.ReadUInt16(); //0x6-0x8 + Sustain = reader.ReadByte(); //0x8-0x9 + SustainVariance = reader.ReadByte(); //0x9-0xA + Hold = reader.ReadInt32(); //0xA-0xE + HoldVariance = reader.ReadUInt16(); //0xE-0x10 + Release = reader.ReadInt32(); //0x10-0x14 + ReleaseVariance = reader.ReadInt32(); //0x14-0x18 + AttackCurve = reader.ReadUInt32(); //0x18-0x1C + DecayCurve = reader.ReadUInt32(); //0x1C-0x20 + ReleaseCurve = reader.ReadUInt32(); //0x20-0x24 + AttackVariable = reader.ReadUInt32(); //0x24-0x28 + DecayVariable = reader.ReadUInt32(); //0x28-0x2C + SustainVariable = reader.ReadUInt32(); //0x2C-0x30 + HoldVariable = reader.ReadUInt32(); //0x30-0x34 + ReleaseVariable = reader.ReadUInt32(); //0x34-0x38 + ChildSound = reader.ReadUInt32(); //0x38-0x3C + Mode = reader.ReadInt32(); //0x3C-0x40 + OutputVariable = reader.ReadUInt32(); //0x40-0x44 + OutputRangeMin = reader.ReadSingle(); //0x44-0x48 + OutputRangeMax = reader.ReadSingle(); //0x48-0x4C + ChildSoundsHashes = new[] { ChildSound }; + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2481,7 +2756,7 @@ namespace CodeWalker.GameFiles public Dat54TwinLoopSound(RelFile rel) : base(rel, Dat54SoundType.TwinLoopSound) { } - public Dat54TwinLoopSound(RelData d, BinaryReader br) : base(d, br) + public Dat54TwinLoopSound(in TempRelData d, BinaryReader br) : base(in d, br) { MinSwapTime = br.ReadUInt16(); MaxSwapTime = br.ReadUInt16(); @@ -2495,6 +2770,22 @@ namespace CodeWalker.GameFiles ReadChildSoundsHashes(br); } + + public Dat54TwinLoopSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + MinSwapTime = reader.ReadUInt16(); + MaxSwapTime = reader.ReadUInt16(); + MinCrossfadeTime = reader.ReadUInt16(); + MaxCrossfadeTime = reader.ReadUInt16(); + CrossfadeCurve = reader.ReadUInt32(); + MinSwapTimeVariable = reader.ReadUInt32(); + MaxSwapTimeVariable = reader.ReadUInt32(); + MinCrossfadeTimeVariable = reader.ReadUInt32(); + MaxCrossfadeTimeVariable = reader.ReadUInt32(); + + ReadChildSoundsHashes(ref reader); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2556,13 +2847,22 @@ namespace CodeWalker.GameFiles public Dat54SpeechSound(RelFile rel) : base(rel, Dat54SoundType.SpeechSound) { } - public Dat54SpeechSound(RelData d, BinaryReader br) : base(d, br) + public Dat54SpeechSound(in TempRelData d, BinaryReader br) : base(in d, br) { LastVariation = br.ReadInt32(); SpeechUnkInt1 = br.ReadInt32(); VoiceName = br.ReadUInt32(); ContextName = br.ReadString(); } + + public Dat54SpeechSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + LastVariation = br.ReadInt32(); + SpeechUnkInt1 = br.ReadInt32(); + VoiceName = br.ReadUInt32(); + ContextName = br.ReadString(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2596,13 +2896,22 @@ namespace CodeWalker.GameFiles public Dat54OnStopSound(RelFile rel) : base(rel, Dat54SoundType.OnStopSound) { } - public Dat54OnStopSound(RelData d, BinaryReader br) : base(d, br) + public Dat54OnStopSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); StopSound = br.ReadUInt32(); FinishedSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound, StopSound, FinishedSound }; } + + public Dat54OnStopSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + StopSound = br.ReadUInt32(); + FinishedSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound, StopSound, FinishedSound }; + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2641,13 +2950,22 @@ namespace CodeWalker.GameFiles public Dat54WrapperSound(RelFile rel) : base(rel, Dat54SoundType.WrapperSound) { } - public Dat54WrapperSound(RelData d, BinaryReader br) : base(d, br) + public Dat54WrapperSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); LastPlayTime = br.ReadInt32(); FallBackSound = br.ReadUInt32(); MinRepeatTime = br.ReadInt16(); VariableCount = br.ReadByte(); + ChildSoundsHashes = [ChildSound, FallBackSound]; + + if (VariableCount == 0) + { + VariableNames = []; + VariableValues = []; + return; + } + VariableNames = new MetaHash[VariableCount]; VariableValues = new byte[VariableCount]; for (int i = 0; i < VariableCount; i++) @@ -2655,9 +2973,33 @@ namespace CodeWalker.GameFiles VariableNames[i] = br.ReadUInt32(); VariableValues[i] = br.ReadByte(); } - - ChildSoundsHashes = new[] { ChildSound, FallBackSound }; } + + public Dat54WrapperSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + ChildSound = reader.ReadUInt32(); + LastPlayTime = reader.ReadInt32(); + FallBackSound = reader.ReadUInt32(); + MinRepeatTime = reader.ReadInt16(); + VariableCount = reader.ReadByte(); + ChildSoundsHashes = [ChildSound, FallBackSound]; + + if (VariableCount == 0) + { + VariableNames = []; + VariableValues = []; + return; + } + + VariableNames = new MetaHash[VariableCount]; + VariableValues = new byte[VariableCount]; + for (int i = 0; i < VariableCount; i++) + { + VariableNames[i] = reader.ReadUInt32(); + VariableValues[i] = reader.ReadByte(); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2666,13 +3008,13 @@ namespace CodeWalker.GameFiles FallBackSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "FallBackSound")); MinRepeatTime = (short)Xml.GetChildIntAttribute(node, "MinRepeatTime", "value"); var vnode = node.SelectSingleNode("Variables"); - if (vnode != null) + if (vnode is not null) { var inodes = vnode.SelectNodes("Item"); if (inodes?.Count > 0) { - var nlist = new List(); - var vlist = new List(); + using var nlist = new PooledList(); + using var vlist = new PooledList(); foreach (XmlNode inode in inodes) { nlist.Add(XmlRel.GetHash(Xml.GetStringAttribute(inode, "name"))); @@ -2725,17 +3067,23 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 0, 8 }; + return [ 0, 8 ]; } } [TC(typeof(EXP))] public class Dat54SequentialSound : Dat54Sound { public Dat54SequentialSound(RelFile rel) : base(rel, Dat54SoundType.SequentialSound) { } - public Dat54SequentialSound(RelData d, BinaryReader br) : base(d, br) + public Dat54SequentialSound(in TempRelData d, BinaryReader br) : base(in d, br) { ReadChildSoundsHashes(br); } + + public Dat54SequentialSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ReadChildSoundsHashes(ref br); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2762,12 +3110,20 @@ namespace CodeWalker.GameFiles public Dat54StreamingSound(RelFile rel) : base(rel, Dat54SoundType.StreamingSound) { } - public Dat54StreamingSound(RelData d, BinaryReader br) : base(d, br) + public Dat54StreamingSound(in TempRelData d, BinaryReader br) : base(in d, br) { Duration = br.ReadInt32(); ReadChildSoundsHashes(br); } + + public Dat54StreamingSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + Duration = reader.ReadInt32(); + + ReadChildSoundsHashes(ref reader); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2805,7 +3161,7 @@ namespace CodeWalker.GameFiles public Dat54RetriggeredOverlappedSound(RelFile rel) : base(rel, Dat54SoundType.RetriggeredOverlappedSound) { } - public Dat54RetriggeredOverlappedSound(RelData d, BinaryReader br) : base(d, br) + public Dat54RetriggeredOverlappedSound(in TempRelData d, BinaryReader br) : base(in d, br) { LoopCount = br.ReadInt16(); LoopCountVariance = br.ReadUInt16(); @@ -2818,6 +3174,21 @@ namespace CodeWalker.GameFiles StopSound = br.ReadUInt32(); ChildSoundsHashes = new[] { StartSound, RetriggerSound, StopSound }; } + + public Dat54RetriggeredOverlappedSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + LoopCount = reader.ReadInt16(); + LoopCountVariance = reader.ReadUInt16(); + DelayTime = reader.ReadUInt16(); + DelayTimeVariance = reader.ReadUInt16(); + LoopCountVariable = reader.ReadUInt32(); + DelayTimeVariable = reader.ReadUInt32(); + StartSound = reader.ReadUInt32(); + RetriggerSound = reader.ReadUInt32(); + StopSound = reader.ReadUInt32(); + ChildSoundsHashes = new[] { StartSound, RetriggerSound, StopSound }; + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2879,7 +3250,7 @@ namespace CodeWalker.GameFiles public Dat54CrossfadeSound(RelFile rel) : base(rel, Dat54SoundType.CrossfadeSound) { } - public Dat54CrossfadeSound(RelData d, BinaryReader br) : base(d, br) + public Dat54CrossfadeSound(in TempRelData d, BinaryReader br) : base(in d, br) { NearSound = br.ReadUInt32(); FarSound = br.ReadUInt32(); @@ -2895,6 +3266,24 @@ namespace CodeWalker.GameFiles HysteresisVariable = br.ReadUInt32(); CrossfadeVariable = br.ReadUInt32(); } + + public Dat54CrossfadeSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + NearSound = br.ReadUInt32(); + FarSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { NearSound, FarSound }; + Mode = br.ReadByte(); + MinDistance = br.ReadSingle(); + MaxDistance = br.ReadSingle(); + Hysteresis = br.ReadInt32(); + CrossfadeCurve = br.ReadUInt32(); + DistanceVariable = br.ReadUInt32(); + MinDistanceVariable = br.ReadUInt32(); + MaxDistanceVariable = br.ReadUInt32(); + HysteresisVariable = br.ReadUInt32(); + CrossfadeVariable = br.ReadUInt32(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -2969,7 +3358,7 @@ namespace CodeWalker.GameFiles public Dat54CollapsingStereoSound(RelFile rel) : base(rel, Dat54SoundType.CollapsingStereoSound) { } - public Dat54CollapsingStereoSound(RelData d, BinaryReader br) : base(d, br) + public Dat54CollapsingStereoSound(in TempRelData d, BinaryReader br) : base(in d, br) { LeftSound = br.ReadUInt32(); RightSound = br.ReadUInt32(); @@ -2985,6 +3374,24 @@ namespace CodeWalker.GameFiles ParameterHash5 = br.ReadUInt32(); //0x28-0x2C Mode = br.ReadByte(); //0x2C-0x2D } + + public Dat54CollapsingStereoSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + LeftSound = reader.ReadUInt32(); + RightSound = reader.ReadUInt32(); + ChildSoundsHashes = new[] { LeftSound, RightSound }; + MinDistance = reader.ReadSingle(); //0x8 + MaxDistance = reader.ReadSingle(); //0xC + MinDistanceVariable = reader.ReadUInt32(); //0x10 + MaxDistanceVariable = reader.ReadUInt32(); //0x14 + CrossfadeOverrideVariable = reader.ReadUInt32(); //0x18 + ParameterHash3 = reader.ReadUInt32(); //0x1C + ParameterHash4 = reader.ReadUInt32(); //0x20 + UnkFloat = reader.ReadSingle(); //0x24-0x28 + ParameterHash5 = reader.ReadUInt32(); //0x28-0x2C + Mode = reader.ReadByte(); //0x2C-0x2D + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3035,7 +3442,7 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 0, 4 }; + return [0, 4]; } } [TC(typeof(EXP))] public class Dat54SimpleSound : Dat54Sound @@ -3044,15 +3451,24 @@ namespace CodeWalker.GameFiles public MetaHash FileName { get; set; } //Name of the .wav file public byte WaveSlotIndex { get; set; } //Internal index of wave (.awc) container + public override MetaHash[] AudioContainers => [ ContainerName ]; + public Dat54SimpleSound(RelFile rel) : base(rel, Dat54SoundType.SimpleSound) { } - public Dat54SimpleSound(RelData d, BinaryReader br) : base(d, br) + public Dat54SimpleSound(in TempRelData d, BinaryReader br) : base(in d, br) { ContainerName = br.ReadUInt32(); - AudioContainers = new[] { ContainerName }; FileName = br.ReadUInt32(); WaveSlotIndex = br.ReadByte(); } + + public Dat54SimpleSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + ContainerName = reader.ReadUInt32(); + FileName = reader.ReadUInt32(); + WaveSlotIndex = reader.ReadByte(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3076,17 +3492,23 @@ namespace CodeWalker.GameFiles } public override uint[] GetPackTableOffsets() { - return new uint[] { 0 }; + return [0]; } } [TC(typeof(EXP))] public class Dat54MultitrackSound : Dat54Sound { public Dat54MultitrackSound(RelFile rel) : base(rel, Dat54SoundType.MultitrackSound) { } - public Dat54MultitrackSound(RelData d, BinaryReader br) : base(d, br) + public Dat54MultitrackSound(in TempRelData d, BinaryReader br) : base(in d, br) { ReadChildSoundsHashes(br); } + + public Dat54MultitrackSound(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + ReadChildSoundsHashes(ref reader); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3117,12 +3539,20 @@ namespace CodeWalker.GameFiles public Dat54RandomizedSound(RelFile rel) : base(rel, Dat54SoundType.RandomizedSound) { } - public Dat54RandomizedSound(RelData d, BinaryReader br) : base(d, br) + public Dat54RandomizedSound(in TempRelData d, BinaryReader br) : base(in d, br) { HistoryIndex = br.ReadByte(); HistorySpaceCount = br.ReadByte(); HistorySpace = br.ReadBytes(HistorySpaceCount); VariationsCount = br.ReadByte(); + + if (VariationsCount == 0) + { + ChildSoundsHashes = []; + VariationsValues = []; + return; + } + ChildSoundsHashes = new MetaHash[VariationsCount]; VariationsValues = new float[VariationsCount]; for (int i = 0; i < VariationsCount; i++) @@ -3131,6 +3561,30 @@ namespace CodeWalker.GameFiles VariationsValues[i] = br.ReadSingle(); } } + + public Dat54RandomizedSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + HistoryIndex = br.ReadByte(); + HistorySpaceCount = br.ReadByte(); + HistorySpace = br.ReadBytes(HistorySpaceCount).ToArray(); + VariationsCount = br.ReadByte(); + + if (VariationsCount == 0) + { + ChildSoundsHashes = []; + VariationsValues = []; + return; + } + + ChildSoundsHashes = new MetaHash[VariationsCount]; + VariationsValues = new float[VariationsCount]; + for (int i = 0; i < VariationsCount; i++) + { + ChildSoundsHashes[i] = br.ReadUInt32(); + VariationsValues[i] = br.ReadSingle(); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3143,8 +3597,8 @@ namespace CodeWalker.GameFiles var inodes = vnode.SelectNodes("Item"); if (inodes?.Count > 0) { - var nlist = new List(); - var vlist = new List(); + using var nlist = new PooledList(); + using var vlist = new PooledList(); foreach (XmlNode inode in inodes) { nlist.Add(XmlRel.GetHash(Xml.GetStringAttribute(inode, "name"))); @@ -3203,16 +3657,24 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54EnvironmentSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54EnvironmentSound : Dat54Sound { public byte ChannelID { get; set; } public Dat54EnvironmentSound(RelFile rel) : base(rel, Dat54SoundType.EnvironmentSound) { } - public Dat54EnvironmentSound(RelData d, BinaryReader br) : base(d, br) + public Dat54EnvironmentSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChannelID = br.ReadByte(); } + + public Dat54EnvironmentSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChannelID = br.ReadByte(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3229,14 +3691,33 @@ namespace CodeWalker.GameFiles bw.Write(ChannelID); } } - [TC(typeof(EXP))] public class Dat54DynamicEntitySound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54DynamicEntitySound : Dat54Sound { public byte EntitiesCount { get; set; } public MetaHash[] Entities { get; set; } public Dat54DynamicEntitySound(RelFile rel) : base(rel, Dat54SoundType.DynamicEntitySound) { } - public Dat54DynamicEntitySound(RelData d, BinaryReader br) : base(d, br) + public Dat54DynamicEntitySound(in TempRelData d, BinaryReader br) : base(in d, br) + { + EntitiesCount = br.ReadByte(); + if (EntitiesCount > 0) + { + Entities = new MetaHash[EntitiesCount]; + for (int i = 0; i < EntitiesCount; i++) + { + Entities[i] = br.ReadUInt32(); + } + } + else + { + Entities = []; + } + } + + public Dat54DynamicEntitySound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) { EntitiesCount = br.ReadByte(); Entities = new MetaHash[EntitiesCount]; @@ -3245,6 +3726,7 @@ namespace CodeWalker.GameFiles Entities[i] = br.ReadUInt32(); } } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3266,7 +3748,8 @@ namespace CodeWalker.GameFiles } } } - [TC(typeof(EXP))] public class Dat54SequentialOverlapSound : Dat54Sound + [TC(typeof(EXP))] + public class Dat54SequentialOverlapSound : Dat54Sound { public ushort DelayTime { get; set; } public MetaHash DelayTimeVariable { get; set; } //0x2-0x6 @@ -3274,7 +3757,7 @@ namespace CodeWalker.GameFiles public Dat54SequentialOverlapSound(RelFile rel) : base(rel, Dat54SoundType.SequentialOverlapSound) { } - public Dat54SequentialOverlapSound(RelData d, BinaryReader br) : base(d, br) + public Dat54SequentialOverlapSound(in TempRelData d, BinaryReader br) : base(in d, br) { DelayTime = br.ReadUInt16(); DelayTimeVariable = br.ReadUInt32(); @@ -3282,6 +3765,16 @@ namespace CodeWalker.GameFiles ReadChildSoundsHashes(br); } + + public Dat54SequentialOverlapSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + DelayTime = br.ReadUInt16(); + DelayTimeVariable = br.ReadUInt32(); + SequenceDirection = br.ReadUInt32(); + + ReadChildSoundsHashes(ref br); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3325,7 +3818,7 @@ namespace CodeWalker.GameFiles public Dat54ModularSynthSound(RelFile rel) : base(rel, Dat54SoundType.ModularSynthSound) { } - public Dat54ModularSynthSound(RelData d, BinaryReader br) : base(d, br) + public Dat54ModularSynthSound(in TempRelData d, BinaryReader br) : base(in d, br) { SynthSound = br.ReadUInt32(); //0x0-0x4 SynthPreset = br.ReadUInt32(); //0x4-0x8 @@ -3338,12 +3831,47 @@ namespace CodeWalker.GameFiles ChildSoundsHashes[i] = br.ReadUInt32(); } ExposedVariablesCount = br.ReadInt32(); + + if (ExposedVariablesCount == 0) + { + ExposedVariables = []; + return; + } + ExposedVariables = new Dat54ModularSynthSoundVariable[ExposedVariablesCount]; for (int i = 0; i < ExposedVariablesCount; i++) { ExposedVariables[i] = new Dat54ModularSynthSoundVariable(br); } } + + public Dat54ModularSynthSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + SynthSound = br.ReadUInt32(); //0x0-0x4 + SynthPreset = br.ReadUInt32(); //0x4-0x8 + PlaybackTimeLimit = br.ReadSingle(); //0x8-0xC + UnkInt = br.ReadInt32(); //0xC-0x10 + TrackCount = br.ReadInt32(); //0x10-0x14 + ChildSoundsHashes = new MetaHash[4]; + for (int i = 0; i < 4; i++) + { + ChildSoundsHashes[i] = br.ReadUInt32(); + } + ExposedVariablesCount = br.ReadInt32(); + + if (ExposedVariablesCount == 0) + { + ExposedVariables = []; + return; + } + + ExposedVariables = new Dat54ModularSynthSoundVariable[ExposedVariablesCount]; + for (int i = 0; i < ExposedVariablesCount; i++) + { + ExposedVariables[i] = new Dat54ModularSynthSoundVariable(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3399,7 +3927,8 @@ namespace CodeWalker.GameFiles return new[] { SynthSound, SynthPreset }; } } - [TC(typeof(EXP))] public class Dat54ModularSynthSoundVariable : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat54ModularSynthSoundVariable : IMetaXmlItem { public MetaHash VariableName { get; set; } public MetaHash ParameterName { get; set; } @@ -3413,30 +3942,39 @@ namespace CodeWalker.GameFiles ParameterName = br.ReadUInt32(); Value = br.ReadSingle(); } + + public Dat54ModularSynthSoundVariable(ref SequenceReader br) + { + VariableName = br.ReadUInt32(); + ParameterName = br.ReadUInt32(); + Value = br.ReadSingle(); + } + public void ReadXml(XmlNode node) { VariableName = XmlRel.GetHash(Xml.GetChildInnerText(node, "VariableName")); ParameterName = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParameterName")); Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "VariableName", RelXml.HashString(VariableName)); RelXml.StringTag(sb, indent, "ParameterName", RelXml.HashString(ParameterName)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(VariableName); bw.Write(ParameterName); bw.Write(Value); } - public override string ToString() + public override readonly string ToString() { - return VariableName.ToString() + ": " + ParameterName.ToString() + ": " + FloatUtil.ToString(Value); + return $"{VariableName}: {ParameterName}: {FloatUtil.ToString(Value)}"; } } - [TC(typeof(EXP))] public class Dat54GranularSound : Dat54Sound + [TC(typeof(EXP))] + public class Dat54GranularSound : Dat54Sound { public int WaveSlotIndex { get; set; } //0x0-0x4 public Dat54GranularSoundFile Channel0 { get; set; } @@ -3463,9 +4001,11 @@ namespace CodeWalker.GameFiles public byte GranularClockCount { get; set; } //0x7C-0x7D public Vector2[] GranularClock { get; set; } //0x7D-... + public override MetaHash[] AudioContainers => [Channel0.ContainerName, Channel1.ContainerName, Channel2.ContainerName, Channel3.ContainerName, Channel4.ContainerName, Channel5.ContainerName]; + public Dat54GranularSound(RelFile rel) : base(rel, Dat54SoundType.GranularSound) { } - public Dat54GranularSound(RelData d, BinaryReader br) : base(d, br) + public Dat54GranularSound(in TempRelData d, BinaryReader br) : base(in d, br) { WaveSlotIndex = br.ReadInt32(); @@ -3476,15 +4016,6 @@ namespace CodeWalker.GameFiles Channel4 = new Dat54GranularSoundFile(br); Channel5 = new Dat54GranularSoundFile(br); - AudioContainers = new[] { - Channel0.ContainerName, - Channel1.ContainerName, - Channel2.ContainerName, - Channel3.ContainerName, - Channel4.ContainerName, - Channel5.ContainerName - }; - ChannelSettings0 = new Dat54GranularSoundData(br); ChannelSettings1 = new Dat54GranularSoundData(br); ChannelSettings2 = new Dat54GranularSoundData(br); @@ -3506,12 +4037,65 @@ namespace CodeWalker.GameFiles ChildSoundsHashes = new[] { ParentSound }; GranularClockCount = br.ReadByte(); + + if (GranularClockCount == 0) + { + GranularClock = []; + return; + } + GranularClock = new Vector2[GranularClockCount]; for (int i = 0; i < GranularClockCount; i++) { GranularClock[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } } + + public Dat54GranularSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + WaveSlotIndex = br.ReadInt32(); + + Channel0 = new Dat54GranularSoundFile(ref br); + Channel1 = new Dat54GranularSoundFile(ref br); + Channel2 = new Dat54GranularSoundFile(ref br); + Channel3 = new Dat54GranularSoundFile(ref br); + Channel4 = new Dat54GranularSoundFile(ref br); + Channel5 = new Dat54GranularSoundFile(ref br); + + ChannelSettings0 = new Dat54GranularSoundData(ref br); + ChannelSettings1 = new Dat54GranularSoundData(ref br); + ChannelSettings2 = new Dat54GranularSoundData(ref br); + ChannelSettings3 = new Dat54GranularSoundData(ref br); + ChannelSettings4 = new Dat54GranularSoundData(ref br); + ChannelSettings5 = new Dat54GranularSoundData(ref br); + + UnkFloat0 = br.ReadSingle(); + UnkFloat1 = br.ReadSingle(); + ChannelVolume0 = br.ReadInt16(); + ChannelVolume1 = br.ReadInt16(); + ChannelVolume2 = br.ReadInt16(); + ChannelVolume3 = br.ReadInt16(); + ChannelVolume4 = br.ReadInt16(); + ChannelVolume5 = br.ReadInt16(); + + ParentSound = br.ReadUInt32(); + + ChildSoundsHashes = new[] { ParentSound }; + + GranularClockCount = br.ReadByte(); + + if (GranularClockCount == 0) + { + GranularClock = []; + return; + } + GranularClock = new Vector2[GranularClockCount]; + for (int i = 0; i < GranularClockCount; i++) + { + GranularClock[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3614,26 +4198,29 @@ namespace CodeWalker.GameFiles return new uint[] { 4, 12, 20, 28, 36, 44 }; } } - [TC(typeof(EXP))] public class Dat54GranularSoundFile + [TC(typeof(EXP))] + public readonly struct Dat54GranularSoundFile { - public MetaHash ContainerName { get; set; } //0x0-0x4 - public MetaHash FileName { get; set; } //0x4-0x8 + public readonly MetaHash ContainerName; //0x0-0x4 + public readonly MetaHash FileName; //0x4-0x8 public Dat54GranularSoundFile(XmlNode node, string varName) { - ReadXml(node, varName); + var cnode = node.SelectSingleNode(varName); + ContainerName = XmlRel.GetHash(Xml.GetChildInnerText(cnode, "ContainerName")); + FileName = XmlRel.GetHash(Xml.GetChildInnerText(cnode, "FileName")); } public Dat54GranularSoundFile(BinaryReader br) { ContainerName = br.ReadUInt32(); FileName = br.ReadUInt32(); } - public void ReadXml(XmlNode node, string varName) + public Dat54GranularSoundFile(ref SequenceReader br) { - var cnode = node.SelectSingleNode(varName); - ContainerName = XmlRel.GetHash(Xml.GetChildInnerText(cnode, "ContainerName")); - FileName = XmlRel.GetHash(Xml.GetChildInnerText(cnode, "FileName")); + ContainerName = br.ReadUInt32(); + FileName = br.ReadUInt32(); } + public void WriteXml(StringBuilder sb, int indent, string varName) { var cind = indent + 1; @@ -3649,20 +4236,26 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return ContainerName.ToString() + ": " + FileName.ToString(); + return $"{ContainerName}: {FileName}"; } } - [TC(typeof(EXP))] public class Dat54GranularSoundData + [TC(typeof(EXP))] + public readonly struct Dat54GranularSoundData { - public byte UnkFlags0 { get; set; } //0x0-0x1 - public byte UnkFlags1 { get; set; } //0x1-0x2 - public byte UnkByte0 { get; set; } //0x2-0x3 - public byte UnkByte1 { get; set; } //0x3-0x4 - public float UnkFloat { get; set; } //0x4-0x8 + public readonly byte UnkFlags0; //0x0-0x1 + public readonly byte UnkFlags1; //0x1-0x2 + public readonly byte UnkByte0; //0x2-0x3 + public readonly byte UnkByte1; //0x3-0x4 + public readonly float UnkFloat; //0x4-0x8 public Dat54GranularSoundData(XmlNode node, string varName) { - ReadXml(node, varName); + var cnode = node.SelectSingleNode(varName); + UnkFlags0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags0", "value"); + UnkFlags1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags1", "value"); + UnkByte0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte0", "value"); + UnkByte1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte1", "value"); + UnkFloat = Xml.GetChildFloatAttribute(cnode, "UnkFloat", "value"); } public Dat54GranularSoundData(BinaryReader br) { @@ -3672,15 +4265,16 @@ namespace CodeWalker.GameFiles UnkByte1 = br.ReadByte(); UnkFloat = br.ReadSingle(); } - public void ReadXml(XmlNode node, string varName) + + public Dat54GranularSoundData(ref SequenceReader br) { - var cnode = node.SelectSingleNode(varName); - UnkFlags0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags0", "value"); - UnkFlags1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags1", "value"); - UnkByte0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte0", "value"); - UnkByte1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte1", "value"); - UnkFloat = Xml.GetChildFloatAttribute(cnode, "UnkFloat", "value"); + UnkFlags0 = br.ReadByte(); + UnkFlags1 = br.ReadByte(); + UnkByte0 = br.ReadByte(); + UnkByte1 = br.ReadByte(); + UnkFloat = br.ReadSingle(); } + public void WriteXml(StringBuilder sb, int indent, string varName) { var cind = indent + 1; @@ -3702,10 +4296,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return UnkFlags0.ToString() + ": " + UnkFlags1.ToString() + ": " + UnkByte0.ToString() + ": " + UnkByte1.ToString() + ": " + FloatUtil.ToString(UnkFloat); + return $"{UnkFlags0}: {UnkFlags1}: {UnkByte0}: {UnkByte1}: {FloatUtil.ToString(UnkFloat)}"; } } - [TC(typeof(EXP))] public class Dat54DirectionalSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54DirectionalSound : Dat54Sound { public MetaHash ChildSound { get; set; } public float InnerAngle { get; set; } //0x4-0x8 @@ -3716,7 +4312,7 @@ namespace CodeWalker.GameFiles public Dat54DirectionalSound(RelFile rel) : base(rel, Dat54SoundType.DirectionalSound) { } - public Dat54DirectionalSound(RelData d, BinaryReader br) : base(d, br) + public Dat54DirectionalSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; @@ -3726,6 +4322,18 @@ namespace CodeWalker.GameFiles YawAngle = br.ReadSingle(); PitchAngle = br.ReadSingle(); } + + public Dat54DirectionalSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + InnerAngle = br.ReadSingle(); + OuterAngle = br.ReadSingle(); + RearAttenuation = br.ReadSingle(); + YawAngle = br.ReadSingle(); + PitchAngle = br.ReadSingle(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3770,7 +4378,7 @@ namespace CodeWalker.GameFiles public Dat54KineticSound(RelFile rel) : base(rel, Dat54SoundType.KineticSound) { } - public Dat54KineticSound(RelData d, BinaryReader br) : base(d, br) + public Dat54KineticSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; @@ -3778,6 +4386,16 @@ namespace CodeWalker.GameFiles YawAngle = br.ReadSingle(); PitchAngle = br.ReadSingle(); } + + public Dat54KineticSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + Mass = br.ReadSingle(); + YawAngle = br.ReadSingle(); + PitchAngle = br.ReadSingle(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3813,12 +4431,20 @@ namespace CodeWalker.GameFiles public Dat54SwitchSound(RelFile rel) : base(rel, Dat54SoundType.SwitchSound) { } - public Dat54SwitchSound(RelData d, BinaryReader br) : base(d, br) + public Dat54SwitchSound(in TempRelData d, BinaryReader br) : base(in d, br) { Variable = br.ReadUInt32(); ReadChildSoundsHashes(br); } + + public Dat54SwitchSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Variable = br.ReadUInt32(); + + ReadChildSoundsHashes(ref br); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3851,7 +4477,7 @@ namespace CodeWalker.GameFiles public Dat54VariableCurveSound(RelFile rel) : base(rel, Dat54SoundType.VariableCurveSound) { } - public Dat54VariableCurveSound(RelData d, BinaryReader br) : base(d, br) + public Dat54VariableCurveSound(in TempRelData d, BinaryReader br) : base(d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; @@ -3859,6 +4485,16 @@ namespace CodeWalker.GameFiles OutputVariable = br.ReadUInt32(); Curve = br.ReadUInt32(); } + + public Dat54VariableCurveSound(in TempRelData d, ref SequenceReader br) : base(d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + InputVariable = br.ReadUInt32(); + OutputVariable = br.ReadUInt32(); + Curve = br.ReadUInt32(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3899,7 +4535,13 @@ namespace CodeWalker.GameFiles public Dat54VariablePrintValueSound(RelFile rel) : base(rel, Dat54SoundType.VariablePrintValueSound) { } - public Dat54VariablePrintValueSound(RelData d, BinaryReader br) : base(d, br) + public Dat54VariablePrintValueSound(in TempRelData d, BinaryReader br) : base(in d, br) + { + Variable = br.ReadUInt32(); + Value = br.ReadString(); + } + + public Dat54VariablePrintValueSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) { Variable = br.ReadUInt32(); Value = br.ReadString(); @@ -3931,7 +4573,7 @@ namespace CodeWalker.GameFiles public Dat54VariableBlockSound(RelFile rel) : base(rel, Dat54SoundType.VariableBlockSound) { } - public Dat54VariableBlockSound(RelData d, BinaryReader br) : base(d, br) + public Dat54VariableBlockSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; @@ -3942,6 +4584,19 @@ namespace CodeWalker.GameFiles Variables[i] = new Dat54VariableData(br); } } + + public Dat54VariableBlockSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + VariableCount = br.ReadByte(); + Variables = new Dat54VariableData[VariableCount]; + for (int i = 0; i < VariableCount; i++) + { + Variables[i] = new Dat54VariableData(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -3970,7 +4625,8 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54VariableData : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat54VariableData : IMetaXmlItem { public MetaHash Name { get; set; } public float Value { get; set; } //the value this variable is set to. @@ -3986,6 +4642,15 @@ namespace CodeWalker.GameFiles ValueVariance = br.ReadSingle(); VariableType = br.ReadByte(); } + + public Dat54VariableData(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value = br.ReadSingle(); + ValueVariance = br.ReadSingle(); + VariableType = br.ReadByte(); + } + public void ReadXml(XmlNode node) { Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); @@ -3993,26 +4658,28 @@ namespace CodeWalker.GameFiles ValueVariance = Xml.GetChildFloatAttribute(node, "ValueVariance", "value"); VariableType = (byte)Xml.GetChildIntAttribute(node, "VariableType", "value"); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); RelXml.ValueTag(sb, indent, "ValueVariance", FloatUtil.ToString(ValueVariance)); RelXml.ValueTag(sb, indent, "VariableType", VariableType.ToString()); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value); bw.Write(ValueVariance); bw.Write(VariableType); } - public override string ToString() + public override readonly string ToString() { - return Name + ": " + FloatUtil.ToString(Value) + ": " + FloatUtil.ToString(ValueVariance) + ": " + VariableType.ToString(); + return $"{Name}: {FloatUtil.ToString(Value)}: {FloatUtil.ToString(ValueVariance)}: {VariableType}"; } } - [TC(typeof(EXP))] public class Dat54IfSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54IfSound : Dat54Sound { public MetaHash TrueSound { get; set; } //sound played if the condition is true public MetaHash FalseSound { get; set; } //sound played if the condition is false/invalid @@ -4023,7 +4690,7 @@ namespace CodeWalker.GameFiles public Dat54IfSound(RelFile rel) : base(rel, Dat54SoundType.IfSound) { } - public Dat54IfSound(RelData d, BinaryReader br) : base(d, br) + public Dat54IfSound(in TempRelData d, BinaryReader br) : base(in d, br) { TrueSound = br.ReadUInt32(); FalseSound = br.ReadUInt32(); @@ -4033,6 +4700,18 @@ namespace CodeWalker.GameFiles ConditionValue = br.ReadSingle(); IfParameterHash1 = br.ReadUInt32(); } + + public Dat54IfSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + TrueSound = br.ReadUInt32(); + FalseSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { TrueSound, FalseSound }; + ConditionVariable = br.ReadUInt32(); + ConditionType = br.ReadByte(); + ConditionValue = br.ReadSingle(); + IfParameterHash1 = br.ReadUInt32(); + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4068,25 +4747,52 @@ namespace CodeWalker.GameFiles return new uint[] { 0, 4 }; } } - [TC(typeof(EXP))] public class Dat54MathOperationSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54MathOperationSound : Dat54Sound { public MetaHash ChildSound { get; set; } public byte OperationsCount { get; set; } public Dat54MathOperationSoundData[] Operations { get; set; } public Dat54MathOperationSound(RelFile rel) : base(rel, Dat54SoundType.MathOperationSound) - { } - public Dat54MathOperationSound(RelData d, BinaryReader br) : base(d, br) + { + Operations = []; + } + public Dat54MathOperationSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; OperationsCount = br.ReadByte(); + if (OperationsCount == 0) + { + Operations = []; + return; + } Operations = new Dat54MathOperationSoundData[OperationsCount]; for (int i = 0; i < OperationsCount; i++) { Operations[i] = new Dat54MathOperationSoundData(br); } } + + public Dat54MathOperationSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + OperationsCount = br.ReadByte(); + if (OperationsCount == 0) + { + Operations = []; + return; + } + Operations = new Dat54MathOperationSoundData[OperationsCount]; + for (int i = 0; i < OperationsCount; i++) + { + Operations[i] = new Dat54MathOperationSoundData(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4115,7 +4821,8 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54MathOperationSoundData : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat54MathOperationSoundData : IMetaXmlItem { public byte OperationType { get; set; } //0x0-0x1 public float InputImmediate1 { get; set; } //0x1-0x5 @@ -4139,6 +4846,19 @@ namespace CodeWalker.GameFiles InputParameter3 = br.ReadUInt32(); OutputParameter = br.ReadUInt32(); } + + public Dat54MathOperationSoundData(ref SequenceReader br) + { + OperationType = br.ReadByte(); + InputImmediate1 = br.ReadSingle(); + InputParameter1 = br.ReadUInt32(); + InputImmediate2 = br.ReadSingle(); + InputParameter2 = br.ReadUInt32(); + InputImmediate3 = br.ReadSingle(); + InputParameter3 = br.ReadUInt32(); + OutputParameter = br.ReadUInt32(); + } + public void ReadXml(XmlNode node) { OperationType = (byte)Xml.GetChildIntAttribute(node, "OperationType", "value"); @@ -4150,7 +4870,7 @@ namespace CodeWalker.GameFiles InputParameter3 = XmlRel.GetHash(Xml.GetChildInnerText(node, "InputParameter3")); OutputParameter = XmlRel.GetHash(Xml.GetChildInnerText(node, "OutputParameter")); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "OperationType", OperationType.ToString()); RelXml.ValueTag(sb, indent, "InputImmediate1", FloatUtil.ToString(InputImmediate1)); @@ -4161,7 +4881,7 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "InputParameter3", RelXml.HashString(InputParameter3)); RelXml.StringTag(sb, indent, "OutputParameter", RelXml.HashString(OutputParameter)); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(OperationType); bw.Write(InputImmediate1); @@ -4172,9 +4892,9 @@ namespace CodeWalker.GameFiles bw.Write(InputParameter3); bw.Write(OutputParameter); } - public override string ToString() + public override readonly string ToString() { - return InputParameter3.ToString() + ", " + OutputParameter.ToString(); + return $"{InputParameter3}, {OutputParameter}"; } } [TC(typeof(EXP))] public class Dat54ParameterTransformSound : Dat54Sound @@ -4185,7 +4905,7 @@ namespace CodeWalker.GameFiles public Dat54ParameterTransformSound(RelFile rel) : base(rel, Dat54SoundType.ParameterTransformSound) { } - public Dat54ParameterTransformSound(RelData d, BinaryReader br) : base(d, br) + public Dat54ParameterTransformSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; @@ -4196,6 +4916,19 @@ namespace CodeWalker.GameFiles ParameterTransforms[i] = new Dat54ParameterTransformSoundData(br); } } + + public Dat54ParameterTransformSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + ParameterTransformsCount = br.ReadInt32(); //0x4-0x8 + ParameterTransforms = new Dat54ParameterTransformSoundData[ParameterTransformsCount]; + for (int i = 0; i < ParameterTransformsCount; i++) + { + ParameterTransforms[i] = new Dat54ParameterTransformSoundData(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4224,7 +4957,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54ParameterTransformSoundData : IMetaXmlItem + + [TC(typeof(EXP))] + public struct Dat54ParameterTransformSoundData : IMetaXmlItem { public MetaHash InputParameter { get; set; } //0x0-0x4 public float InputRangeMin { get; set; } //0x4-0x8 @@ -4240,12 +4975,40 @@ namespace CodeWalker.GameFiles InputRangeMin = br.ReadSingle(); InputRangeMax = br.ReadSingle(); TransformsCount = br.ReadInt32(); + + if (TransformsCount == 0) + { + Transforms = []; + return; + } + Transforms = new Dat54ParameterTransformSoundData2[TransformsCount]; for (int i = 0; i < TransformsCount; i++) { Transforms[i] = new Dat54ParameterTransformSoundData2(br); } } + + public Dat54ParameterTransformSoundData(ref SequenceReader br) + { + InputParameter = br.ReadUInt32(); + InputRangeMin = br.ReadSingle(); + InputRangeMax = br.ReadSingle(); + TransformsCount = br.ReadInt32(); + + if (TransformsCount == 0) + { + Transforms = []; + return; + } + + Transforms = new Dat54ParameterTransformSoundData2[TransformsCount]; + for (int i = 0; i < TransformsCount; i++) + { + Transforms[i] = new Dat54ParameterTransformSoundData2(ref br); + } + } + public void ReadXml(XmlNode node) { InputParameter = XmlRel.GetHash(Xml.GetChildInnerText(node, "InputParameter")); @@ -4254,14 +5017,14 @@ namespace CodeWalker.GameFiles Transforms = XmlRel.ReadItemArray(node, "Transforms"); TransformsCount = Transforms?.Length ?? 0; } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "InputParameter", RelXml.HashString(InputParameter)); RelXml.ValueTag(sb, indent, "InputRangeMin", FloatUtil.ToString(InputRangeMin)); RelXml.ValueTag(sb, indent, "InputRangeMax", FloatUtil.ToString(InputRangeMax)); RelXml.WriteItemArray(sb, Transforms, indent, "Transforms"); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(InputParameter); bw.Write(InputRangeMin); @@ -4272,12 +5035,12 @@ namespace CodeWalker.GameFiles Transforms[i].Write(bw); } } - public override string ToString() + public override readonly string ToString() { - return InputParameter.ToString() + ", " + TransformsCount.ToString(); + return $"{InputParameter}, {TransformsCount}"; } } - [TC(typeof(EXP))] public class Dat54ParameterTransformSoundData2 : IMetaXmlItem + [TC(typeof(EXP))] public struct Dat54ParameterTransformSoundData2 : IMetaXmlItem { public float SmoothRate { get; set; } //0x0-0x4 public int TransformType { get; set; } //0x4 //type of transform; volume, pitch, etc @@ -4297,12 +5060,38 @@ namespace CodeWalker.GameFiles OutputRangeMin = br.ReadSingle(); OutputRangeMax = br.ReadSingle(); VectorCount = br.ReadInt32(); + if (VectorCount == 0) + { + Vectors = []; + return; + } Vectors = new Vector2[VectorCount]; for (int i = 0; i < VectorCount; i++) { Vectors[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } } + + public Dat54ParameterTransformSoundData2(ref SequenceReader br) + { + SmoothRate = br.ReadSingle(); + TransformType = br.ReadInt32(); + TransformTypeParameter = br.ReadUInt32(); + OutputRangeMin = br.ReadSingle(); + OutputRangeMax = br.ReadSingle(); + VectorCount = br.ReadInt32(); + if (VectorCount == 0) + { + Vectors = []; + return; + } + Vectors = new Vector2[VectorCount]; + for (int i = 0; i < VectorCount; i++) + { + Vectors[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + } + public void ReadXml(XmlNode node) { SmoothRate = Xml.GetChildFloatAttribute(node, "SmoothRate", "value"); @@ -4313,7 +5102,7 @@ namespace CodeWalker.GameFiles Vectors = Xml.GetChildRawVector2Array(node, "Vectors"); VectorCount = Vectors?.Length ?? 0; } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "SmoothRate", FloatUtil.ToString(SmoothRate)); RelXml.ValueTag(sb, indent, "TransformType", TransformType.ToString()); @@ -4322,7 +5111,7 @@ namespace CodeWalker.GameFiles RelXml.ValueTag(sb, indent, "OutputRangeMax", FloatUtil.ToString(OutputRangeMax)); RelXml.WriteRawArray(sb, Vectors, indent, "Vectors", "", RelXml.FormatVector2, 1); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(SmoothRate); bw.Write(TransformType); @@ -4336,12 +5125,13 @@ namespace CodeWalker.GameFiles bw.Write(Vectors[i].Y); } } - public override string ToString() + public override readonly string ToString() { - return TransformTypeParameter.ToString() + ", " + VectorCount.ToString(); + return $"{TransformTypeParameter}, {VectorCount}"; } } - [TC(typeof(EXP))] public class Dat54FluctuatorSound : Dat54Sound + [TC(typeof(EXP))] + public class Dat54FluctuatorSound : Dat54Sound { public MetaHash ChildSound { get; set; } public int FluctuatorsCount { get; set; } @@ -4349,17 +5139,40 @@ namespace CodeWalker.GameFiles public Dat54FluctuatorSound(RelFile rel) : base(rel, Dat54SoundType.FluctuatorSound) { } - public Dat54FluctuatorSound(RelData d, BinaryReader br) : base(d, br) + public Dat54FluctuatorSound(in TempRelData d, BinaryReader br) : base(in d, br) { ChildSound = br.ReadUInt32(); ChildSoundsHashes = new[] { ChildSound }; FluctuatorsCount = br.ReadInt32(); //0x4-0x8 + if (FluctuatorsCount == 0) + { + Fluctuators = []; + return; + } Fluctuators = new Dat54FluctuatorSoundData[FluctuatorsCount]; for (int i = 0; i < FluctuatorsCount; i++) { Fluctuators[i] = new Dat54FluctuatorSoundData(br); } } + + public Dat54FluctuatorSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ChildSound = br.ReadUInt32(); + ChildSoundsHashes = new[] { ChildSound }; + FluctuatorsCount = br.ReadInt32(); //0x4-0x8 + if (FluctuatorsCount == 0) + { + Fluctuators = []; + return; + } + Fluctuators = new Dat54FluctuatorSoundData[FluctuatorsCount]; + for (int i = 0; i < FluctuatorsCount; i++) + { + Fluctuators[i] = new Dat54FluctuatorSoundData(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4388,7 +5201,8 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54FluctuatorSoundData : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat54FluctuatorSoundData : IMetaXmlItem { public byte FluctuatorType { get; set; } //0x0-0x1 //type of fluctuator; probability-based, time-based public byte UnkByte1 { get; set; } //0x1-0x2 @@ -4424,6 +5238,25 @@ namespace CodeWalker.GameFiles UnkFloat09 = br.ReadSingle(); UnkFloat10 = br.ReadSingle(); } + + public Dat54FluctuatorSoundData(ref SequenceReader br) + { + FluctuatorType = br.ReadByte(); + UnkByte1 = br.ReadByte(); + ParameterHash = br.ReadUInt32(); + UnkFloat00 = br.ReadSingle(); + UnkFloat01 = br.ReadSingle(); + UnkFloat02 = br.ReadSingle(); + UnkFloat03 = br.ReadSingle(); + UnkFloat04 = br.ReadSingle(); + UnkFloat05 = br.ReadSingle(); + UnkFloat06 = br.ReadSingle(); + UnkFloat07 = br.ReadSingle(); + UnkFloat08 = br.ReadSingle(); + UnkFloat09 = br.ReadSingle(); + UnkFloat10 = br.ReadSingle(); + } + public void ReadXml(XmlNode node) { FluctuatorType = (byte)Xml.GetChildIntAttribute(node, "FluctuatorType", "value"); @@ -4441,7 +5274,7 @@ namespace CodeWalker.GameFiles UnkFloat09 = Xml.GetChildFloatAttribute(node, "UnkFloat09", "value"); UnkFloat10 = Xml.GetChildFloatAttribute(node, "UnkFloat10", "value"); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "FluctuatorType", FluctuatorType.ToString()); RelXml.ValueTag(sb, indent, "UnkByte1", UnkByte1.ToString()); @@ -4458,7 +5291,7 @@ namespace CodeWalker.GameFiles RelXml.ValueTag(sb, indent, "UnkFloat09", FloatUtil.ToString(UnkFloat09)); RelXml.ValueTag(sb, indent, "UnkFloat10", FloatUtil.ToString(UnkFloat10)); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(FluctuatorType); bw.Write(UnkByte1); @@ -4475,7 +5308,7 @@ namespace CodeWalker.GameFiles bw.Write(UnkFloat09); bw.Write(UnkFloat10); } - public override string ToString() + public override readonly string ToString() { return ParameterHash.ToString(); } @@ -4494,7 +5327,7 @@ namespace CodeWalker.GameFiles public Dat54AutomationSound(RelFile rel) : base(rel, Dat54SoundType.AutomationSound) { } - public Dat54AutomationSound(RelData d, BinaryReader br) : base(d, br) + public Dat54AutomationSound(in TempRelData d, BinaryReader br) : base(in d, br) { FallBackSound = br.ReadUInt32(); PlaybackRate = br.ReadSingle(); @@ -4505,12 +5338,41 @@ namespace CodeWalker.GameFiles ContainerName = br.ReadUInt32(); FileName = br.ReadUInt32(); VariableOutputsCount = br.ReadInt32(); + if (VariableOutputsCount == 0) + { + VariableOutputs = []; + return; + } VariableOutputs = new Dat54AutomationSoundVariableOutput[VariableOutputsCount]; for (int i = 0; i < VariableOutputsCount; i++) { VariableOutputs[i] = new Dat54AutomationSoundVariableOutput(br); } } + + public Dat54AutomationSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + FallBackSound = br.ReadUInt32(); + PlaybackRate = br.ReadSingle(); + PlaybackRateVariance = br.ReadSingle(); + PlaybackRateVariable = br.ReadUInt32(); + NoteMap = br.ReadUInt32(); + ChildSoundsHashes = new[] { FallBackSound, NoteMap }; + ContainerName = br.ReadUInt32(); + FileName = br.ReadUInt32(); + VariableOutputsCount = br.ReadInt32(); + if (VariableOutputsCount == 0) + { + VariableOutputs = []; + return; + } + VariableOutputs = new Dat54AutomationSoundVariableOutput[VariableOutputsCount]; + for (int i = 0; i < VariableOutputsCount; i++) + { + VariableOutputs[i] = new Dat54AutomationSoundVariableOutput(ref br); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4561,7 +5423,7 @@ namespace CodeWalker.GameFiles return new uint[] { 20 }; } } - [TC(typeof(EXP))] public class Dat54AutomationSoundVariableOutput : IMetaXmlItem + [TC(typeof(EXP))] public struct Dat54AutomationSoundVariableOutput : IMetaXmlItem { public int Channel { get; set; } //0x0-0x1 public MetaHash Variable { get; set; } //0x2-0x6 @@ -4572,28 +5434,32 @@ namespace CodeWalker.GameFiles { Channel = br.ReadInt32(); Variable = br.ReadUInt32(); - - if (Channel != 0)//should be pack hash? - { } } + + public Dat54AutomationSoundVariableOutput(ref SequenceReader br) + { + Channel = br.ReadInt32(); + Variable = br.ReadUInt32(); + } + public void ReadXml(XmlNode node) { Channel = Xml.GetChildIntAttribute(node, "Channel", "value"); Variable = XmlRel.GetHash(Xml.GetChildInnerText(node, "Variable")); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Channel", Channel.ToString()); RelXml.StringTag(sb, indent, "Variable", RelXml.HashString(Variable)); } - public void Write(BinaryWriter bw) + public readonly void Write(BinaryWriter bw) { bw.Write(Channel); bw.Write(Variable); } - public override string ToString() + public override readonly string ToString() { - return Channel.ToString() + ", " + Variable.ToString(); + return $"{Channel}, {Variable}"; } } [TC(typeof(EXP))] public class Dat54ExternalStreamSound : Dat54Sound @@ -4605,7 +5471,7 @@ namespace CodeWalker.GameFiles public Dat54ExternalStreamSound(RelFile rel) : base(rel, Dat54SoundType.ExternalStreamSound) { } - public Dat54ExternalStreamSound(RelData d, BinaryReader br) : base(d, br) + public Dat54ExternalStreamSound(in TempRelData d, BinaryReader br) : base(in d, br) { ReadChildSoundsHashes(br); @@ -4618,6 +5484,21 @@ namespace CodeWalker.GameFiles Unk3 = br.ReadUInt32(); } } + + public Dat54ExternalStreamSound(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ReadChildSoundsHashes(ref br); + + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadUInt32(); + + if (ChildSoundsCount == 0) + { + Unk2 = br.ReadUInt32(); + Unk3 = br.ReadUInt32(); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4679,9 +5560,14 @@ namespace CodeWalker.GameFiles public Dat54SoundSet(RelFile rel) : base(rel, Dat54SoundType.SoundSet) { } - public Dat54SoundSet(RelData d, BinaryReader br) : base(d, br) + public Dat54SoundSet(in TempRelData d, BinaryReader br) : base(in d, br) { SoundSetsCount = br.ReadInt32(); + if (SoundSetsCount == 0) + { + SoundSets = []; + return; + } SoundSets = new Dat54SoundSetItem[SoundSetsCount]; ChildSoundsHashes = new MetaHash[SoundSetsCount]; for (int i = 0; i < SoundSetsCount; i++) @@ -4690,6 +5576,24 @@ namespace CodeWalker.GameFiles ChildSoundsHashes[i] = SoundSets[i].ChildSound; } } + + public Dat54SoundSet(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + SoundSetsCount = br.ReadInt32(); + if (SoundSetsCount == 0) + { + SoundSets = []; + return; + } + SoundSets = new Dat54SoundSetItem[SoundSetsCount]; + ChildSoundsHashes = new MetaHash[SoundSetsCount]; + for (int i = 0; i < SoundSetsCount; i++) + { + SoundSets[i] = new Dat54SoundSetItem(ref br); + ChildSoundsHashes[i] = SoundSets[i].ChildSound; + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4725,7 +5629,7 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54SoundSetItem : IMetaXmlItem + [TC(typeof(EXP))] public struct Dat54SoundSetItem : IMetaXmlItem { public MetaHash ScriptName { get; set; } public MetaHash ChildSound { get; set; } @@ -4737,6 +5641,13 @@ namespace CodeWalker.GameFiles ScriptName = br.ReadUInt32(); ChildSound = br.ReadUInt32(); } + + public Dat54SoundSetItem(ref SequenceReader br) + { + ScriptName = br.ReadUInt32(); + ChildSound = br.ReadUInt32(); + } + public void ReadXml(XmlNode node) { ScriptName = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScriptName")); @@ -4754,7 +5665,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return ScriptName.ToString() + ": " + ChildSound.ToString(); + return $"{ScriptName}: {ChildSound}"; } } [TC(typeof(EXP))] public class Dat54AutomationNoteMapSound : Dat54Sound @@ -4764,9 +5675,16 @@ namespace CodeWalker.GameFiles public Dat54AutomationNoteMapSound(RelFile rel) : base(rel, Dat54SoundType.AutomationNoteMapSound) { } - public Dat54AutomationNoteMapSound(RelData d, BinaryReader br) : base(d, br) + public Dat54AutomationNoteMapSound(in TempRelData d, BinaryReader br) : base(in d, br) { MapsCount = br.ReadByte(); + if (MapsCount == 0) + { + Maps = []; + ChildSoundsHashes = []; + return; + } + Maps = new Dat54AutomationNoteMapSoundData[MapsCount]; ChildSoundsHashes = new MetaHash[MapsCount]; for (int i = 0; i < MapsCount; i++) @@ -4805,7 +5723,7 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54AutomationNoteMapSoundData : IMetaXmlItem + [TC(typeof(EXP))] public struct Dat54AutomationNoteMapSoundData : IMetaXmlItem { public byte NoteRangeMin { get; set; } public byte NoteRangeMax { get; set; } @@ -4821,6 +5739,15 @@ namespace CodeWalker.GameFiles NoteRangeType = br.ReadByte(); ChildSound = br.ReadUInt32(); } + + public Dat54AutomationNoteMapSoundData(ref SequenceReader br) + { + NoteRangeMin = br.ReadByte(); + NoteRangeMax = br.ReadByte(); + NoteRangeType = br.ReadByte(); + ChildSound = br.ReadUInt32(); + } + public void ReadXml(XmlNode node) { NoteRangeMin = (byte)Xml.GetChildIntAttribute(node, "NoteRangeMin", "value"); @@ -4844,7 +5771,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return NoteRangeMin.ToString() + ": " + NoteRangeMax.ToString() + ": " + NoteRangeType.ToString(); + return $"{NoteRangeMin}: {NoteRangeMax}: {NoteRangeType}"; } } [TC(typeof(EXP))] public class Dat54SoundSetList : Dat54Sound @@ -4854,7 +5781,7 @@ namespace CodeWalker.GameFiles public Dat54SoundSetList(RelFile rel) : base(rel, Dat54SoundType.SoundSetList) { } - public Dat54SoundSetList(RelData d, BinaryReader br) : base(d, br) + public Dat54SoundSetList(in TempRelData d, BinaryReader br) : base(d, br) { SoundSetsCount = br.ReadUInt32(); SoundSets = new MetaHash[SoundSetsCount]; @@ -4863,6 +5790,17 @@ namespace CodeWalker.GameFiles SoundSets[i] = br.ReadUInt32(); } } + + public Dat54SoundSetList(in TempRelData d, ref SequenceReader br) : base(d, ref br) + { + SoundSetsCount = br.ReadUInt32(); + SoundSets = new MetaHash[SoundSetsCount]; + for (int i = 0; i < SoundSetsCount; i++) + { + SoundSets[i] = br.ReadUInt32(); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -4905,7 +5843,7 @@ namespace CodeWalker.GameFiles public Dat54SoundHashList(RelFile rel) : base(rel, Dat54SoundType.SoundHashList) { } - public Dat54SoundHashList(RelData d, BinaryReader br) : base(d, br) + public Dat54SoundHashList(in TempRelData d, BinaryReader br) : base(in d, br) { UnkShort = br.ReadUInt16(); SoundHashesCount = br.ReadUInt32(); @@ -4915,6 +5853,18 @@ namespace CodeWalker.GameFiles SoundHashes[i] = br.ReadUInt32(); } } + + public Dat54SoundHashList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + UnkShort = br.ReadUInt16(); + SoundHashesCount = br.ReadUInt32(); + SoundHashes = new MetaHash[SoundHashesCount]; + for (int i = 0; i < SoundHashesCount; i++) + { + SoundHashes[i] = br.ReadUInt32(); + } + } + public override void ReadXml(XmlNode node) { base.ReadXml(node); @@ -5079,7 +6029,7 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat151RelData(RelData d, BinaryReader br) : base(d) + public Dat151RelData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat151RelType)TypeID; @@ -5087,6 +6037,14 @@ namespace CodeWalker.GameFiles NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); } + public Dat151RelData(in TempRelData d, ref SequenceReader br) : base(in d) + { + Type = (Dat151RelType)TypeID; + + br.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + } public void WriteTypeAndOffset(BinaryWriter bw) @@ -5098,11 +6056,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } - [TC(typeof(EXP))] public struct Dat151HashPair : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151HashPair : IMetaXmlItem { public MetaHash Hash0 { get; set; } public MetaHash Hash1 { get; set; } @@ -5112,12 +6071,19 @@ namespace CodeWalker.GameFiles Hash0 = br.ReadUInt32(); Hash1 = br.ReadUInt32(); } - public void Write(BinaryWriter bw) + + public Dat151HashPair(ref SequenceReader br) + { + Hash0 = br.ReadUInt32(); + Hash1 = br.ReadUInt32(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(Hash0); bw.Write(Hash1); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Hash0", RelXml.HashString(Hash0)); RelXml.StringTag(sb, indent, "Hash1", RelXml.HashString(Hash1)); @@ -5127,9 +6093,9 @@ namespace CodeWalker.GameFiles Hash0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Hash0")); Hash1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Hash1")); } - public override string ToString() + public override readonly string ToString() { - return Hash0.ToString() + ": " + Hash1.ToString(); + return $"{Hash0}: {Hash1}"; } } [TC(typeof(EXP))] public struct Dat151HashFloat : IMetaXmlItem @@ -5159,7 +6125,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Hash.ToString() + ": " + Value.ToString(); + return $"{Hash}: {Value}"; } } @@ -5181,7 +6147,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StaticEmitterList; TypeID = (byte)Type; } - public Dat151StaticEmitterList(RelData d, BinaryReader br) : base(d, br) + public Dat151StaticEmitterList(in TempRelData d, BinaryReader br) : base(in d, br) { EmitterCount = br.ReadUInt32(); EmitterHashes = new MetaHash[EmitterCount]; @@ -5190,6 +6156,17 @@ namespace CodeWalker.GameFiles EmitterHashes[i] = br.ReadUInt32(); } } + + public Dat151StaticEmitterList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + EmitterCount = br.ReadUInt32(); + EmitterHashes = new MetaHash[EmitterCount]; + for (int i = 0; i < EmitterCount; i++) + { + EmitterHashes[i] = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { //base.Write(bw); @@ -5260,6 +6237,13 @@ namespace CodeWalker.GameFiles Name = br.ReadUInt32(); Value = br.ReadSingle(); } + + public DependentAmbience(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value = br.ReadSingle(); + } + public void Write(BinaryWriter bw) { bw.Write(Name); @@ -5288,7 +6272,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbientZone; TypeID = (byte)Type; } - public Dat151AmbientZone(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientZone(in TempRelData d, BinaryReader br) : base(in d, br) { Flags0 = br.ReadUInt32(); Shape = (Dat151ZoneShape)br.ReadUInt32(); @@ -5331,9 +6315,53 @@ namespace CodeWalker.GameFiles { DependentAmbiences[i] = new DependentAmbience(br); } - if (DependentAmbiencesCount != 0) - { } } + + public Dat151AmbientZone(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags0 = br.ReadUInt32(); + Shape = (Dat151ZoneShape)br.ReadUInt32(); + Flags1 = br.ReadUInt32(); + ActivationZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unused01 = br.ReadSingle(); + ActivationZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unused02 = br.ReadSingle(); + ActivationZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + ActivationZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + ActivationZoneAngle = br.ReadUInt32();//### + ActivationZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + PlaybackZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unused06 = br.ReadSingle(); + PlaybackZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unused07 = br.ReadSingle(); + PlaybackZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + PlaybackZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + PlaybackZoneAngle = br.ReadUInt32();//### + PlaybackZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + UnkVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + UnkVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + UnkHash0 = br.ReadUInt32(); + Scene = br.ReadUInt32(); + UnkVec3 = new Vector2(br.ReadSingle(), br.ReadSingle()); + Unk13 = br.ReadUInt32(); + Unk14 = br.ReadByte(); + Unk15 = br.ReadByte(); + RulesCount = br.ReadByte(); + Unk16 = br.ReadByte(); + Rules = new MetaHash[RulesCount]; + for (int i = 0; i < RulesCount; i++) + { + Rules[i] = br.ReadUInt32(); + } + + DependentAmbiencesCount = br.ReadUInt32(); + DependentAmbiences = new DependentAmbience[DependentAmbiencesCount]; + for (int i = 0; i < DependentAmbiencesCount; i++) + { + DependentAmbiences[i] = new DependentAmbience(ref br); + } + } + public override void Write(BinaryWriter bw) { //base.Write(bw); @@ -5530,6 +6558,14 @@ namespace CodeWalker.GameFiles Value = br.ReadSingle(); Flags = br.ReadUInt32(); } + + public Variable(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value = br.ReadSingle(); + Flags = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Name); @@ -5550,7 +6586,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Name.ToString() + ": " + FloatUtil.ToString(Value) + ": " + Flags.ToString(); + return $"{Name}: {FloatUtil.ToString(Value)}: {Flags}"; } } @@ -5560,7 +6596,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbientRule; TypeID = (byte)Type; } - public Dat151AmbientRule(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientRule(in TempRelData d, BinaryReader br) : base(in d, br) { Flags0 = br.ReadUInt32(); Flags1 = br.ReadUInt32(); @@ -5598,7 +6634,8 @@ namespace CodeWalker.GameFiles int brem = (16 - ((VariablesCount * 12) % 16)) % 16; if (brem > 0) { - byte[] brema = br.ReadBytes(brem); + br.BaseStream.Position += brem; // Skip over padding + //byte[] brema = br.ReadBytes(brem); //for (int i = 0; i < brem; i++) //{ // if (brema[i] != 0) @@ -5606,202 +6643,61 @@ namespace CodeWalker.GameFiles //} } } - - - #region testing - - switch (Frequency.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 18: - case 20: - case 22: - case 24: - case 25: - case 26: - case 30: - case 32: - case 35: - case 40: - case 45: - case 48: - case 50: - case 51: - case 54: - case 55: - case 57: - case 60: - case 64: - case 65: - case 70: - case 75: - case 80: - case 90: - case 95: - case 97: - case 100: - case 120: - case 125: - case 130: - case 135: - case 140: - case 145: - case 150: - case 160: - case 170: - case 178: - case 180: - case 190: - case 200: - case 220: - case 225: - case 240: - case 245: - case 250: - case 300: - case 350: - case 500: - case 600: - break; - default: - break; - } - switch (Unk07.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 12: - case 15: - case 17: - case 20: - case 21: - case 22: - case 25: - case 27: - case 30: - case 32: - case 35: - case 40: - case 50: - case 60: - case 100: - case 150: - break; - default: - break; - } - switch (Unk08.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk09.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk10.Value) - { - case 1: - case 2: - case 3: - case 4: - case 8: - case 255: - break; - default: - break; - } - switch (Unk11.Value) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 8: - case 10: - case 255: - break; - default: - break; - } - switch (Unk12.Value) - { - case 0: - case 50: - case 80: - case 100: - break; - default: - break; - } - switch (Unk13.Value) - { - case 1: - case 2: - case 3: - case 5: - break; - default: - break; - } - switch (VariablesCount) - { - case 0: - case 1: - case 2: - case 4: - break; - default: - break; - } - - - - //if ((Position.X != 0) || (Position.Y != 0) || (Position.Z != 0)) - //{ - // FoundCoords.Add(FloatUtil.GetVector3String(Position) + ", " + GetNameString()); - //} - - - #endregion - } + + public Dat151AmbientRule(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags0 = br.ReadUInt32(); + Flags1 = br.ReadUInt32(); + Flags2 = br.ReadUInt32(); + Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Flags3 = br.ReadUInt32(); //0 + ChildSound = br.ReadUInt32(); + Category = br.ReadUInt32(); + Flags4 = br.ReadUInt32(); //0 + Flags5 = br.ReadUInt32(); //0xFFFFFFFF + Flags6 = br.ReadUInt32(); //0 + Unk01 = br.ReadSingle(); //1, 5, 100, ... + InnerRadius = br.ReadSingle(); //inner radius of volume (playback bound) + OuterRadius = br.ReadSingle(); //outer radius of volume (activation bound) + StartTime = br.ReadUInt16(); //time allows to start playing, in mins + EndTime = br.ReadUInt16(); //time to stop playing, in mins (max 1440) + Frequency = br.ReadUInt16(); //0..600 + Unk07 = br.ReadUInt16(); //0..150 + Unk08 = br.ReadByte(); //0,1,2 + Unk09 = br.ReadByte(); //0,1,2 + Unk10 = br.ReadByte(); //1,2,3,4,8,255 + Unk11 = br.ReadByte(); //1,2,3,4,5,6,8,10,255 + Unk12 = br.ReadByte(); //0, 50, 80, 100 + Unk13 = br.ReadByte(); //1,2,3,5 + VariablesCount = br.ReadUInt16(); //0,1,2,4 + + if (VariablesCount > 0) + { + Variables = new Variable[VariablesCount]; + for (int i = 0; i < VariablesCount; i++) + { + Variables[i] = new Variable(ref br); + } + //array seems to be padded to multiples of 16 bytes. (read the rest here) + int brem = (16 - ((VariablesCount * 12) % 16)) % 16; + if (brem > 0) + { + br.Advance(brem); // Skip over padding + //byte[] brema = br.ReadBytes(brem); + //for (int i = 0; i < brem; i++) + //{ + // if (brema[i] != 0) + // { } //check all remaining bytes are 0 - never hit here + //} + } + } + else + { + Variables = Array.Empty(); + } + } + public override void Write(BinaryWriter bw) { //base.Write(bw); @@ -5919,7 +6815,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbientZoneList; TypeID = (byte)Type; } - public Dat151AmbientZoneList(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientZoneList(in TempRelData d, BinaryReader br) : base(in d, br) { ZoneCount = br.ReadUInt32(); ZoneHashes = new MetaHash[ZoneCount]; @@ -5928,6 +6824,17 @@ namespace CodeWalker.GameFiles ZoneHashes[i] = br.ReadUInt32(); } } + + public Dat151AmbientZoneList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ZoneCount = br.ReadUInt32(); + ZoneHashes = new MetaHash[ZoneCount]; + for (int i = 0; i < ZoneCount; i++) + { + ZoneHashes[i] = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { //base.Write(bw); @@ -5984,7 +6891,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StaticEmitter; TypeID = (byte)Type; } - public Dat151StaticEmitter(RelData d, BinaryReader br) : base(d, br) + public Dat151StaticEmitter(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32();//flags ChildSound = br.ReadUInt32(); @@ -6109,7 +7016,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Interior; TypeID = (byte)Type; } - public Dat151Interior(RelData d, BinaryReader br) : base(d, br) + public Dat151Interior(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Walla = br.ReadUInt32(); @@ -6122,6 +7029,26 @@ namespace CodeWalker.GameFiles } Rooms = rooms; } + + public Dat151Interior(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags = br.ReadUInt32(); + Walla = br.ReadUInt32(); + Tunnel = br.ReadUInt32(); + RoomsCount = br.ReadUInt32(); + if (RoomsCount == 0) + { + Rooms = []; + return; + } + var rooms = new MetaHash[RoomsCount]; + for (int i = 0; i < RoomsCount; i++) + { + rooms[i] = br.ReadUInt32(); + } + Rooms = rooms; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6199,7 +7126,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.InteriorRoom; TypeID = (byte)Type; } - public Dat151InteriorRoom(RelData d, BinaryReader br) : base(d, br) + public Dat151InteriorRoom(in TempRelData d, BinaryReader br) : base(in d, br) { Flags0 = br.ReadUInt32(); MloRoom = br.ReadUInt32(); @@ -6218,6 +7145,27 @@ namespace CodeWalker.GameFiles Unk13 = br.ReadUInt32(); SoundSet = br.ReadUInt32(); } + + public Dat151InteriorRoom(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags0 = br.ReadUInt32(); + MloRoom = br.ReadUInt32(); + Zone = br.ReadUInt32(); + Unk02 = br.ReadUInt32(); + Unk03 = br.ReadSingle(); + Reverb = br.ReadSingle(); + Echo = br.ReadSingle(); + Sound = br.ReadUInt32(); + Unk07 = br.ReadSingle(); + Unk08 = br.ReadSingle(); + Unk09 = br.ReadSingle(); + Unk10 = br.ReadSingle(); + Unk11 = br.ReadSingle(); + Unk12 = br.ReadSingle(); + Unk13 = br.ReadUInt32(); + SoundSet = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6300,9 +7248,14 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioStationList; TypeID = (byte)Type; } - public Dat151RadioStationList(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioStationList(in TempRelData d, BinaryReader br) : base(in d, br) { StationsCount = br.ReadUInt32(); + if (StationsCount == 0) + { + Stations = []; + return; + } var tracks = new MetaHash[StationsCount]; for (int i = 0; i < StationsCount; i++) { @@ -6310,6 +7263,23 @@ namespace CodeWalker.GameFiles } Stations = tracks; } + + public Dat151RadioStationList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + StationsCount = br.ReadUInt32(); + if (StationsCount == 0) + { + Stations = []; + return; + } + var tracks = new MetaHash[StationsCount]; + for (int i = 0; i < StationsCount; i++) + { + tracks[i] = br.ReadUInt32(); + } + Stations = tracks; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6360,21 +7330,21 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioStation; TypeID = (byte)Type; } - public Dat151RadioStation(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioStation(in TempRelData d, BinaryReader br) : base(in d, br) { Unk00 = br.ReadUInt32(); WheelPosition = br.ReadUInt32(); Unk02 = br.ReadUInt32(); MusicGenre = br.ReadUInt16(); - var data = br.ReadBytes(32); - RadioName = Encoding.ASCII.GetString(data).Replace("\0", ""); + var arr = ArrayPool.Shared.Rent(32); + _ = br.Read(arr.AsSpan(0, 32)); + //var data = br.ReadBytes(32); + ArrayPool.Shared.Return(arr); + RadioName = Encoding.ASCII.GetString(arr.AsSpan().ReadTill((byte)0)); Unk04 = br.ReadUInt16(); - if (Unk04 != 0) - { } - MusicListCount = br.ReadUInt32(); var tracks = new MetaHash[MusicListCount]; for (int i = 0; i < MusicListCount; i++) @@ -6383,6 +7353,27 @@ namespace CodeWalker.GameFiles } MusicList = tracks; } + + public Dat151RadioStation(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk00 = br.ReadUInt32(); + WheelPosition = br.ReadUInt32(); + Unk02 = br.ReadUInt32(); + MusicGenre = br.ReadUInt16(); + + RadioName = br.ReadStringLength(32, false); + + Unk04 = br.ReadUInt16(); + + MusicListCount = br.ReadUInt32(); + var tracks = new MetaHash[MusicListCount]; + for (int i = 0; i < MusicListCount; i++) + { + tracks[i] = br.ReadUInt32(); + } + MusicList = tracks; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6472,7 +7463,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioTrack; TypeID = (byte)Type; } - public Dat151RadioTrack(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrack(in TempRelData d, BinaryReader br) : base(in d, br) { Unk00 = br.ReadUInt32(); TrackType = br.ReadByte(); @@ -6501,6 +7492,37 @@ namespace CodeWalker.GameFiles } this.Tracks = items; } + + public Dat151RadioTrack(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk00 = br.ReadUInt32(); + TrackType = br.ReadByte(); + Unk01 = br.ReadUInt32(); + Unk02 = br.ReadUInt32(); + Unk03 = br.ReadByte(); + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + Unk07 = br.ReadUInt32(); + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadUInt32(); + Unk10 = br.ReadUInt32(); + Unk11 = br.ReadUInt32(); + Unk12 = br.ReadUInt32(); + Unk13 = br.ReadUInt32(); + Unk14 = br.ReadUInt32(); + Unk15 = br.ReadUInt32(); + Unk16 = br.ReadUInt16(); + TracksCount = br.ReadUInt32(); + + Dat151HashPair[] items = new Dat151HashPair[TracksCount]; + for (int i = 0; i < TracksCount; i++) + { + items[i] = new Dat151HashPair(ref br); + } + this.Tracks = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6599,7 +7621,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.TrackList; TypeID = (byte)Type; } - public Dat151TrackList(RelData d, BinaryReader br) : base(d, br) + public Dat151TrackList(in TempRelData d, BinaryReader br) : base(in d, br) { Unk00 = br.ReadUInt32(); TrackCount = br.ReadUInt32(); @@ -6609,6 +7631,18 @@ namespace CodeWalker.GameFiles Tracks[i] = new Dat151HashPair(br); } } + + public Dat151TrackList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk00 = br.ReadUInt32(); + TrackCount = br.ReadUInt32(); + Tracks = new Dat151HashPair[TrackCount]; + for (int i = 0; i < TrackCount; i++) + { + Tracks[i] = new Dat151HashPair(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6656,7 +7690,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.WeaponAudioItem; TypeID = (byte)Type; } - public Dat151WeaponAudioItem(RelData d, BinaryReader br) : base(d, br) + public Dat151WeaponAudioItem(in TempRelData d, BinaryReader br) : base(in d, br) { FallBackWeapon = br.ReadUInt32(); WeaponsCount = br.ReadUInt32(); @@ -6668,6 +7702,20 @@ namespace CodeWalker.GameFiles } this.Weapons = items; } + + public Dat151WeaponAudioItem(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + FallBackWeapon = br.ReadUInt32(); + WeaponsCount = br.ReadUInt32(); + + Dat151WeaponAudioItemItem[] items = new Dat151WeaponAudioItemItem[WeaponsCount]; + for (int i = 0; i < WeaponsCount; i++) + { + items[i] = new Dat151WeaponAudioItemItem(ref br); + } + this.Weapons = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6701,7 +7749,7 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetCategoryHashes() { - var list = new List(); + using var list = new PooledList(); if (Weapons != null) { foreach (var w in Weapons) @@ -6713,22 +7761,24 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetGameHashes() { - var list = new List(); + using var list = new PooledList(); if (Weapons != null) { - foreach (var w in Weapons) + foreach (ref var w in Weapons.AsSpan()) { list.Add(w.Weapon); } - } - if ((Weapons?.Count(w => (w.Weapon == FallBackWeapon)) ?? 0) == 0) - { - list.Add(FallBackWeapon); + + if (!Weapons.Any(w => (w.Weapon == FallBackWeapon))) + { + list.Add(FallBackWeapon); + } } return list.ToArray(); } } - [TC(typeof(EXP))] public struct Dat151WeaponAudioItemItem : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151WeaponAudioItemItem : IMetaXmlItem { public MetaHash Category { get; set; } public MetaHash Weapon { get; set; } @@ -6738,6 +7788,12 @@ namespace CodeWalker.GameFiles Category = br.ReadUInt32(); Weapon = br.ReadUInt32(); } + + public Dat151WeaponAudioItemItem(ref SequenceReader br) + { + Category = br.ReadUInt32(); + Weapon = br.ReadUInt32(); + } public void Write(BinaryWriter bw) { bw.Write(Category); @@ -6755,7 +7811,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Category.ToString() + ": " + Weapon.ToString(); + return $"{Category}: {Weapon}"; } } [TC(typeof(EXP))] public class Dat151StartTrackAction : Dat151RelData @@ -6782,7 +7838,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StartTrackAction; TypeID = (byte)Type; } - public Dat151StartTrackAction(RelData d, BinaryReader br) : base(d, br) + public Dat151StartTrackAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -6799,6 +7855,11 @@ namespace CodeWalker.GameFiles Unk9 = br.ReadInt32(); TracksCount = br.ReadUInt32(); + if (TracksCount == 0) + { + this.Tracks = []; + return; + } Dat151StartTrackActionItem[] items = new Dat151StartTrackActionItem[TracksCount]; for (int i = 0; i < TracksCount; i++) { @@ -6806,6 +7867,38 @@ namespace CodeWalker.GameFiles } this.Tracks = items; } + + public Dat151StartTrackAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Track = br.ReadUInt32(); + Mood = br.ReadUInt32(); + Unk5 = br.ReadSingle(); + Unk6 = br.ReadInt32(); + Unk7 = br.ReadInt32(); + Unk8 = br.ReadSingle(); + Unk9 = br.ReadInt32(); + TracksCount = br.ReadUInt32(); + + if (TracksCount == 0) + { + this.Tracks = []; + return; + } + + Dat151StartTrackActionItem[] items = new Dat151StartTrackActionItem[TracksCount]; + for (int i = 0; i < TracksCount; i++) + { + items[i] = new Dat151StartTrackActionItem(ref br); + } + this.Tracks = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6868,24 +7961,26 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 12, 16, 28 }; + return [12, 16, 28]; } public override MetaHash[] GetGameHashes() { - return new[] { Bar, Beat, Mood }; + return [Bar, Beat, Mood]; } public override MetaHash[] GetSoundHashes() { - var list = new List(); - list.Add(Track); - if (Tracks != null) + var tracks = Tracks; + if (tracks is null) + return [Track]; + + var arr = new MetaHash[tracks.Length + 1]; + arr[0] = Track; + + for (int i = 0; i < tracks.Length; i++) { - foreach (var t in Tracks) - { - list.Add(t.Track); - } + arr[i + 1] = tracks[i].Track; } - return list.ToArray(); + return arr; } } [TC(typeof(EXP))] public struct Dat151StartTrackActionItem : IMetaXmlItem @@ -6898,6 +7993,12 @@ namespace CodeWalker.GameFiles Track = br.ReadUInt32(); Flags = br.ReadUInt32(); } + + public Dat151StartTrackActionItem(ref SequenceReader br) + { + Track = br.ReadUInt32(); + Flags = br.ReadUInt32(); + } public void Write(BinaryWriter bw) { bw.Write(Track); @@ -6933,7 +8034,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StopTrackAction; TypeID = (byte)Type; } - public Dat151StopTrackAction(RelData d, BinaryReader br) : base(d, br) + public Dat151StopTrackAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -6943,6 +8044,18 @@ namespace CodeWalker.GameFiles Unk3 = br.ReadSingle(); Unk4 = br.ReadInt32(); } + + public Dat151StopTrackAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Unk4 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -6999,13 +8112,18 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Mood; TypeID = (byte)Type; } - public Dat151Mood(RelData d, BinaryReader br) : base(d, br) + public Dat151Mood(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); FadeIn = br.ReadUInt16(); FadeOut = br.ReadUInt16(); Unk3 = br.ReadSingle(); MoodsCount = br.ReadUInt32(); + if (MoodsCount == 0) + { + Moods = []; + return; + } var items = new Dat151MoodItem[MoodsCount]; for (int i = 0; i < MoodsCount; i++) { @@ -7013,6 +8131,27 @@ namespace CodeWalker.GameFiles } Moods = items; } + + public Dat151Mood(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + FadeIn = br.ReadUInt16(); + FadeOut = br.ReadUInt16(); + Unk3 = br.ReadSingle(); + MoodsCount = br.ReadUInt32(); + if (MoodsCount == 0) + { + Moods = []; + return; + } + var items = new Dat151MoodItem[MoodsCount]; + for (int i = 0; i < MoodsCount; i++) + { + items[i] = new Dat151MoodItem(ref br); + } + Moods = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7046,36 +8185,38 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - var offsets = new List(); + var offsets = new uint[MoodsCount * 4]; for (uint i = 0; i < MoodsCount; i++) { + var index = i * 4; var offs = 16 + i * 32; //offsets for each mood item's subitems - offsets.Add(offs); - offsets.Add(offs + 4); - offsets.Add(offs + 24); - offsets.Add(offs + 28); + offsets[index] = offs; + offsets[index + 1] = offs + 4; + offsets[index + 2] = offs + 24; + offsets[index + 3] = offs + 28; } - return offsets.ToArray(); + return offsets; } public override MetaHash[] GetGameHashes() { - var list = new List(); - if (Moods != null) + if (Moods is null || Moods.Length == 0) + return []; + + using var list = new PooledList(); + + foreach (ref var item in Moods.AsSpan()) { - foreach (var item in Moods) - { - list.Add(item.StemMix); - list.Add(item.StopAction); - list.Add(item.Bar); - list.Add(item.Beat); - } + list.Add(item.StemMix); + list.Add(item.StopAction); + list.Add(item.Bar); + list.Add(item.Beat); } return list.ToArray(); } } [TC(typeof(EXP))] - public class Dat151MoodItem : IMetaXmlItem + public struct Dat151MoodItem : IMetaXmlItem { public MetaHash StemMix { get; set; } public MetaHash StopAction { get; set; } @@ -7086,7 +8227,7 @@ namespace CodeWalker.GameFiles public MetaHash Bar { get; set; }//MusicBar public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. - public override string ToString() + public override readonly string ToString() { return StemMix.ToString(); } @@ -7094,6 +8235,7 @@ namespace CodeWalker.GameFiles public Dat151MoodItem() { } + public Dat151MoodItem(BinaryReader br) { StemMix = br.ReadUInt32(); @@ -7105,7 +8247,20 @@ namespace CodeWalker.GameFiles Bar = br.ReadUInt32(); Beat = br.ReadUInt32(); } - public void Write(BinaryWriter bw) + + public Dat151MoodItem(ref SequenceReader br) + { + StemMix = br.ReadUInt32(); + StopAction = br.ReadUInt32(); + Unk1 = br.ReadSingle(); + Unk2 = br.ReadSingle(); + Unk3 = br.ReadSingle(); + Unk4 = br.ReadSingle(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(StemMix); bw.Write(StopAction); @@ -7116,7 +8271,7 @@ namespace CodeWalker.GameFiles bw.Write(Bar); bw.Write(Beat); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "StemMix", RelXml.HashString(StemMix)); RelXml.StringTag(sb, indent, "StopAction", RelXml.HashString(StopAction)); @@ -7158,7 +8313,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SetMoodAction; TypeID = (byte)Type; } - public Dat151SetMoodAction(RelData d, BinaryReader br) : base(d, br) + public Dat151SetMoodAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -7171,6 +8326,21 @@ namespace CodeWalker.GameFiles FadeIn = br.ReadInt32(); FadeOut = br.ReadInt32(); } + + public Dat151SetMoodAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Mood = br.ReadUInt32(); + Unk4 = br.ReadSingle(); + FadeIn = br.ReadInt32(); + FadeOut = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7231,9 +8401,14 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PlayerAction; TypeID = (byte)Type; } - public Dat151PlayerAction(RelData d, BinaryReader br) : base(d, br) + public Dat151PlayerAction(in TempRelData d, BinaryReader br) : base(d, br) { AudioTrackCount = br.ReadUInt32(); + if (AudioTrackCount == 0) + { + AudioTracks = []; + return; + } var tracks = new MetaHash[AudioTrackCount]; for (int i = 0; i < AudioTrackCount; i++) { @@ -7241,6 +8416,23 @@ namespace CodeWalker.GameFiles } AudioTracks = tracks; } + + public Dat151PlayerAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + AudioTrackCount = br.ReadUInt32(); + if (AudioTrackCount == 0) + { + AudioTracks = []; + return; + } + var tracks = new MetaHash[AudioTrackCount]; + for (int i = 0; i < AudioTrackCount; i++) + { + tracks[i] = br.ReadUInt32(); + } + AudioTracks = tracks; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7295,7 +8487,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StartOneShotAction; TypeID = (byte)Type; } - public Dat151StartOneShotAction(RelData d, BinaryReader br) : base(d, br) + public Dat151StartOneShotAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -7309,6 +8501,22 @@ namespace CodeWalker.GameFiles Unk7 = br.ReadInt32(); Unk8 = br.ReadInt32(); } + + public Dat151StartOneShotAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Sound = br.ReadUInt32(); + Unk5 = br.ReadInt32(); + Unk6 = br.ReadInt32(); + Unk7 = br.ReadInt32(); + Unk8 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7380,7 +8588,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StopOneShotAction; TypeID = (byte)Type; } - public Dat151StopOneShotAction(RelData d, BinaryReader br) : base(d, br) + public Dat151StopOneShotAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -7389,6 +8597,17 @@ namespace CodeWalker.GameFiles Beat = br.ReadUInt32(); Unk3 = br.ReadInt32(); } + + public Dat151StopOneShotAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7420,14 +8639,16 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 12, 16 }; + return [12, 16]; } public override MetaHash[] GetGameHashes() { - return new[] { Bar, Beat }; + return [Bar, Beat]; } } - [TC(typeof(EXP))] public class Dat151FadeInRadioAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151FadeInRadioAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } @@ -7442,7 +8663,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.FadeInRadioAction; TypeID = (byte)Type; } - public Dat151FadeInRadioAction(RelData d, BinaryReader br) : base(d, br) + public Dat151FadeInRadioAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -7452,6 +8673,18 @@ namespace CodeWalker.GameFiles Unk3 = br.ReadSingle(); Unk4 = br.ReadSingle(); } + + public Dat151FadeInRadioAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Unk4 = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7486,11 +8719,11 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 12, 16 }; + return [12, 16]; } public override MetaHash[] GetGameHashes() { - return new[] { Bar, Beat }; + return [Bar, Beat]; } } [TC(typeof(EXP))] public class Dat151FadeOutRadioAction : Dat151RelData @@ -7508,7 +8741,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.FadeOutRadioAction; TypeID = (byte)Type; } - public Dat151FadeOutRadioAction(RelData d, BinaryReader br) : base(d, br) + public Dat151FadeOutRadioAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -7518,6 +8751,18 @@ namespace CodeWalker.GameFiles Unk3 = br.ReadSingle(); Unk4 = br.ReadSingle(); } + + public Dat151FadeOutRadioAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + Unk4 = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7552,11 +8797,11 @@ namespace CodeWalker.GameFiles } public override uint[] GetHashTableOffsets() { - return new uint[] { 12, 16 }; + return [12, 16]; } public override MetaHash[] GetGameHashes() { - return new[] { Bar, Beat }; + return [Bar, Beat]; } } [TC(typeof(EXP))] public class Dat151ModelAudioCollisionSettings : Dat151RelData @@ -7591,7 +8836,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ModelAudioCollisionSettings; TypeID = (byte)Type; } - public Dat151ModelAudioCollisionSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151ModelAudioCollisionSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadInt32(); @@ -7618,19 +8863,6 @@ namespace CodeWalker.GameFiles //byte tc3 = (byte)((Unk15 >> 16) & 0xFF); //byte tc4 = (byte)((Unk15 >> 24) & 0xFF); - switch (Unk15)//not sure what this is - { - case 0: - case 1: - case 2: - case 3: - case 4: - break; - default: - break; - } - - if (MaterialsCount == 0) { Material = br.ReadUInt32(); @@ -7647,14 +8879,82 @@ namespace CodeWalker.GameFiles PhysicsCount = br.ReadUInt32(); - var tracks2 = new MetaHash[PhysicsCount]; - for (int i = 0; i < PhysicsCount; i++) + if (PhysicsCount > 0) { - tracks2[i] = br.ReadUInt32(); + var tracks2 = new MetaHash[PhysicsCount]; + for (int i = 0; i < PhysicsCount; i++) + { + tracks2[i] = br.ReadUInt32(); + } + Physics = tracks2; } - Physics = tracks2; + else + { + Physics = []; + } + } } + + public Dat151ModelAudioCollisionSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags = br.ReadUInt32(); + Unk01 = br.ReadInt32(); + Unk02 = br.ReadInt32(); + Unk03 = br.ReadInt32(); + Break = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + Wind = br.ReadUInt32(); + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadSingle(); + Unk10 = br.ReadSingle(); + Rain = br.ReadUInt32(); + Rattle = br.ReadUInt32(); + Unk13 = br.ReadUInt32(); + Resonance = br.ReadUInt32(); + Unk15 = br.ReadByte(); + MaterialsCount = br.ReadByte(); + Unk16 = br.ReadByte(); + Unk17 = br.ReadByte(); + + //byte tc1 = (byte)((Unk15) & 0xFF); + //byte tc2 = (byte)((Unk15 >> 8) & 0xFF); + //byte tc3 = (byte)((Unk15 >> 16) & 0xFF); + //byte tc4 = (byte)((Unk15 >> 24) & 0xFF); + + if (MaterialsCount == 0) + { + Material = br.ReadUInt32(); + //Physics = new MetaHash[] { Material }; + } + else //if (MaterialsCount > 0) + { + var tracks1 = new Dat151ModelAudioCollisionSettingsMaterialItem[MaterialsCount]; + for (int i = 0; i < MaterialsCount; i++) + { + tracks1[i] = new Dat151ModelAudioCollisionSettingsMaterialItem(ref br); + } + Materials = tracks1; + + PhysicsCount = br.ReadUInt32(); + + if (PhysicsCount > 0) + { + var tracks2 = new MetaHash[PhysicsCount]; + for (int i = 0; i < PhysicsCount; i++) + { + tracks2[i] = br.ReadUInt32(); + } + Physics = tracks2; + } + else + { + Physics = []; + } + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7754,9 +9054,10 @@ namespace CodeWalker.GameFiles Physics = XmlRel.ReadHashItemArray(node, "Physics"); PhysicsCount = (uint)(Physics?.Length ?? 0); } + public override uint[] GetHashTableOffsets() { - var offsets = new List(); + using var offsets = new PooledList(); uint offs = 64; if (MaterialsCount == 0) { @@ -7779,13 +9080,15 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } + public override MetaHash[] GetSoundHashes() { - return new[] { Break, Unk05, Unk06, Wind, Unk08, Rain, Rattle, Unk13, Resonance }; + return [Break, Unk05, Unk06, Wind, Unk08, Rain, Rattle, Unk13, Resonance]; } + public override MetaHash[] GetGameHashes() { - var list = new List(); + using var list = new PooledList(); list.Add(Material); if (Materials != null) { @@ -7813,12 +9116,19 @@ namespace CodeWalker.GameFiles InputMaterial = br.ReadUInt32(); OutputMaterial = br.ReadUInt32(); } - public void Write(BinaryWriter bw) + + public Dat151ModelAudioCollisionSettingsMaterialItem(ref SequenceReader br) + { + InputMaterial = br.ReadUInt32(); + OutputMaterial = br.ReadUInt32(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(InputMaterial); bw.Write(OutputMaterial); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "InputMaterial", RelXml.HashString(InputMaterial)); RelXml.StringTag(sb, indent, "OutputMaterial", RelXml.HashString(OutputMaterial)); @@ -7828,9 +9138,9 @@ namespace CodeWalker.GameFiles InputMaterial = XmlRel.GetHash(Xml.GetChildInnerText(node, "InputMaterial")); OutputMaterial = XmlRel.GetHash(Xml.GetChildInnerText(node, "OutputMaterial")); } - public override string ToString() + public override readonly string ToString() { - return InputMaterial.ToString() + ": " + OutputMaterial.ToString(); + return $"{InputMaterial}: {OutputMaterial}"; } } [TC(typeof(EXP))] public class Dat151DoorModel : Dat151RelData @@ -7842,10 +9152,16 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.DoorModel; TypeID = (byte)Type; } - public Dat151DoorModel(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorModel(in TempRelData d, BinaryReader br) : base(in d, br) { Door = br.ReadUInt32(); } + + public Dat151DoorModel(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Door = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -7970,7 +9286,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AudioMaterial; TypeID = (byte)Type; } - public Dat151AudioMaterial(RelData d, BinaryReader br) : base(d, br) + public Dat151AudioMaterial(in TempRelData d, BinaryReader br) : base(in d, br) { Unk00 = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -8066,6 +9382,104 @@ namespace CodeWalker.GameFiles Unk88 = br.ReadUInt32(); Unk89 = br.ReadInt32(); } + + public Dat151AudioMaterial(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk00 = br.ReadUInt32(); + Unk01 = br.ReadUInt32(); + Unk02 = br.ReadUInt32(); + Unk03 = br.ReadUInt32(); + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + Unk07 = br.ReadUInt32(); + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadUInt32(); + Unk10 = br.ReadUInt32(); + Unk11 = br.ReadUInt32(); + Unk12 = br.ReadUInt32(); + Unk13 = br.ReadUInt32(); + Unk14 = br.ReadUInt32(); + Unk15 = br.ReadInt32(); + Unk16 = br.ReadInt32(); + Unk17 = br.ReadInt32(); + Unk18 = br.ReadInt32(); + Unk19 = br.ReadSingle(); + Unk20 = br.ReadInt32(); + Unk21 = br.ReadSingle(); + Unk22 = br.ReadSingle(); + Unk23 = br.ReadSingle(); + Unk24 = br.ReadSingle(); + Unk25 = br.ReadSingle(); + Unk26 = br.ReadSingle(); + Unk27 = br.ReadInt32(); + Unk28 = br.ReadUInt32(); + Unk29 = br.ReadSingle(); + Unk30 = br.ReadSingle(); + Footsteps = br.ReadUInt32(); + Unk31 = br.ReadInt32(); + Unk32 = br.ReadUInt32(); + AnimalFootsteps = br.ReadUInt32(); + AudioTrack2 = br.ReadUInt32(); + Unk33 = br.ReadUInt32(); + Unk34 = br.ReadUInt32(); + Unk35 = br.ReadUInt32(); + Unk36 = br.ReadUInt32(); + Unk37 = br.ReadUInt32(); + Unk38 = br.ReadUInt32(); + Unk39 = br.ReadUInt32(); + Unk40 = br.ReadUInt32(); + Unk41 = br.ReadUInt32(); + Unk42 = br.ReadUInt32(); + Unk43 = br.ReadUInt32(); + Unk44 = br.ReadUInt32(); + Unk45 = br.ReadUInt32(); + Unk46 = br.ReadUInt32(); + Unk47 = br.ReadUInt32(); + Unk48 = br.ReadUInt32(); + Unk49 = br.ReadUInt32(); + Unk50 = br.ReadUInt32(); + Unk51 = br.ReadUInt32(); + Unk52 = br.ReadUInt32(); + Unk53 = br.ReadUInt32(); + Unk54 = br.ReadUInt32(); + Unk55 = br.ReadSingle(); + Unk56 = br.ReadUInt32(); + Unk57 = br.ReadUInt32(); + Unk58 = br.ReadInt32(); + Unk59 = br.ReadInt32(); + Unk60 = br.ReadSingle(); + Unk61 = br.ReadInt32(); + Unk62 = br.ReadInt32(); + Unk63 = br.ReadUInt32(); + Unk64 = br.ReadUInt32(); + Unk65 = br.ReadUInt32(); + Unk66 = br.ReadInt32(); + Unk67 = br.ReadUInt32(); + Unk68 = br.ReadUInt32(); + Unk69 = br.ReadUInt32(); + Unk70 = br.ReadUInt32(); + Unk71 = br.ReadUInt32(); + Unk72 = br.ReadInt32(); + Unk73 = br.ReadUInt32(); + Unk74 = br.ReadUInt32(); + Unk75 = br.ReadUInt32(); + Unk76 = br.ReadUInt32(); + Unk77 = br.ReadSingle(); + Unk78 = br.ReadUInt32(); + Unk79 = br.ReadUInt32(); + Unk80 = br.ReadUInt32(); + Unk81 = br.ReadUInt32(); + Unk82 = br.ReadUInt32(); + Unk83 = br.ReadUInt32(); + Unk84 = br.ReadUInt32(); + Unk85 = br.ReadInt32(); + Unk86 = br.ReadUInt32(); + Unk87 = br.ReadInt32(); + Unk88 = br.ReadUInt32(); + Unk89 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -8438,7 +9852,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleCollision; TypeID = (byte)Type; } - public Dat151VehicleCollision(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleCollision(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -8505,6 +9919,67 @@ namespace CodeWalker.GameFiles break; } } + + public Dat151VehicleCollision(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Flags = br.ReadUInt32(); + Unk01 = br.ReadUInt32(); + Scrape = br.ReadUInt32(); + SlowScrape = br.ReadUInt32(); + ScrapeImpact = br.ReadUInt32(); + SlowScrapeImpact = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + Unk07 = br.ReadUInt32(); + Unk08 = br.ReadSingle(); + ScrapePitch = br.ReadUInt32(); + ScrapeVolume = br.ReadUInt32(); + SlowScrapeVolume = br.ReadUInt32(); + ScrapeImpactVolume = br.ReadUInt32(); + SlowScrapeImpactVolume = br.ReadUInt32(); + Unk14 = br.ReadUInt32(); + Unk15 = br.ReadUInt32(); + Unk16 = br.ReadUInt32(); + Unk17 = br.ReadUInt32(); + Unk18 = br.ReadUInt32(); + Unk19 = br.ReadUInt32(); + Unk20 = br.ReadUInt32(); + Unk21 = br.ReadSingle(); + Unk22 = br.ReadSingle(); + Unk23 = br.ReadSingle(); + Unk24 = br.ReadSingle(); + Unk25 = br.ReadSingle(); + Unk26 = br.ReadSingle(); + Unk27 = br.ReadUInt32(); + Unk28 = br.ReadUInt32(); + Unk29 = br.ReadUInt32(); + Unk30 = br.ReadUInt32(); + Unk31 = br.ReadUInt32(); + Unk32 = br.ReadUInt32(); + Unk33 = br.ReadUInt32(); + Unk34 = br.ReadSingle(); + Unk35 = br.ReadSingle(); + Unk36 = br.ReadSingle(); + Unk37 = br.ReadSingle(); + Unk38 = br.ReadUInt32(); + Unk39 = br.ReadSingle(); + Unk40 = br.ReadSingle(); + Unk41 = br.ReadSingle(); + Unk42 = br.ReadSingle(); + Unk43 = br.ReadSingle(); + Unk44 = br.ReadSingle(); + Unk45 = br.ReadUInt32(); + Unk46 = br.ReadUInt32(); + Unk47 = br.ReadUInt32(); + Unk48 = br.ReadUInt32(); + Unk49 = br.ReadUInt32(); + HasAudioTracks = br.ReadUInt32(); + if (HasAudioTracks > 0) + { + AudioTrack0 = br.ReadUInt32(); + AudioTrack1 = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -8713,12 +10188,20 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Door; TypeID = (byte)Type; } - public Dat151Door(RelData d, BinaryReader br) : base(d, br) + public Dat151Door(in TempRelData d, BinaryReader br) : base(in d, br) { SoundSet = br.ReadUInt32(); Params = br.ReadUInt32(); Unk1 = br.ReadSingle(); } + + public Dat151Door(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + SoundSet = br.ReadUInt32(); + Params = br.ReadUInt32(); + Unk1 = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -8762,9 +10245,14 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AnimalFootstepsList; TypeID = (byte)Type; } - public Dat151AnimalFootstepsList(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalFootstepsList(in TempRelData d, BinaryReader br) : base(in d, br) { AnimalFootstepsCount = br.ReadUInt32(); + if (AnimalFootstepsCount == 0) + { + AnimalFootsteps = []; + return; + } var items = new Dat151AnimalFootstepsListItem[AnimalFootstepsCount]; for (uint i = 0; i < AnimalFootstepsCount; i++) { @@ -8772,6 +10260,23 @@ namespace CodeWalker.GameFiles } AnimalFootsteps = items; } + + public Dat151AnimalFootstepsList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + AnimalFootstepsCount = br.ReadUInt32(); + if (AnimalFootstepsCount == 0) + { + AnimalFootsteps = []; + return; + } + var items = new Dat151AnimalFootstepsListItem[AnimalFootstepsCount]; + for (uint i = 0; i < AnimalFootstepsCount; i++) + { + items[i] = new Dat151AnimalFootstepsListItem(ref br); + } + AnimalFootsteps = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -8822,6 +10327,13 @@ namespace CodeWalker.GameFiles Animal = br.ReadUInt32(); Footsteps = br.ReadUInt32(); } + + public Dat151AnimalFootstepsListItem(ref SequenceReader br) + { + Animal = br.ReadUInt32(); + Footsteps = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Animal); @@ -8839,7 +10351,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Animal.ToString() + ": " + Footsteps.ToString(); + return $"{Animal}: {Footsteps}"; } } @@ -8861,7 +10373,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ForceRadioTrackAction; TypeID = (byte)Type; } - public Dat151ForceRadioTrackAction(RelData d, BinaryReader br) : base(d, br) + public Dat151ForceRadioTrackAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -8872,6 +10384,11 @@ namespace CodeWalker.GameFiles RadioStation = br.ReadUInt32(); Unk5 = br.ReadInt32(); AudioTracksCount = br.ReadUInt32(); + if (AudioTracksCount == 0) + { + AudioTracks = []; + return; + } var tracks = new MetaHash[AudioTracksCount]; for (var i = 0; i < AudioTracksCount; i++) { @@ -8962,7 +10479,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioDJSpeechAction; TypeID = (byte)Type; } - public Dat151RadioDjSpeechAction(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioDjSpeechAction(in TempRelData d, BinaryReader br) : base(in d, br) { Unk0 = br.ReadUInt32(); Unk1 = br.ReadInt32(); @@ -8973,6 +10490,19 @@ namespace CodeWalker.GameFiles RadioStation = br.ReadUInt32(); Unk5 = br.ReadInt32(); } + + public Dat151RadioDjSpeechAction(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk0 = br.ReadUInt32(); + Unk1 = br.ReadInt32(); + Unk2 = br.ReadInt32(); + Bar = br.ReadUInt32(); + Beat = br.ReadUInt32(); + Unk3 = br.ReadSingle(); + RadioStation = br.ReadUInt32(); + Unk5 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9027,19 +10557,22 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.MicrophoneList; TypeID = (byte)Type; } - public Dat151MicrophoneList(RelData d, BinaryReader br) : base(d, br) + public Dat151MicrophoneList(in TempRelData d, BinaryReader br) : base(in d, br) { MicrophonesCount = br.ReadUInt32(); + + if (MicrophonesCount == 0) + { + Microphones = []; + return; + } + var items = new Dat151MicrophoneListItem[MicrophonesCount]; for (var i = 0; i < MicrophonesCount; i++) { items[i] = new Dat151MicrophoneListItem(br); } Microphones = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9125,7 +10658,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.DoorList; TypeID = (byte)Type; } - public Dat151DoorList(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorList(in TempRelData d, BinaryReader br) : base(in d, br) { DoorsCount = br.ReadUInt32(); var items = new Dat151DoorListItem[DoorsCount]; @@ -9134,11 +10667,19 @@ namespace CodeWalker.GameFiles items[i] = new Dat151DoorListItem(br); } Doors = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151DoorList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + DoorsCount = br.ReadUInt32(); + var items = new Dat151DoorListItem[DoorsCount]; + for (var i = 0; i < DoorsCount; i++) + { + items[i] = new Dat151DoorListItem(ref br); + } + Doors = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9192,6 +10733,13 @@ namespace CodeWalker.GameFiles Prop = br.ReadUInt32(); Door = br.ReadUInt32(); } + + public Dat151DoorListItem(ref SequenceReader br) + { + Prop = br.ReadUInt32(); + Door = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Prop); @@ -9209,7 +10757,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Prop.ToString() + ": " + Door.ToString(); + return $"{Prop}: {Door}"; } } @@ -9223,20 +10771,38 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoeList; TypeID = (byte)Type; } - public Dat151ShoeList(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoeList(in TempRelData d, BinaryReader br) : base(in d, br) { ShoesCount = br.ReadUInt32(); + if (ShoesCount == 0) + { + Shoes = []; + return; + } var items = new Dat151ShoeListItem[ShoesCount]; for (var i = 0; i < ShoesCount; i++) { items[i] = new Dat151ShoeListItem(br); } Shoes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151ShoeList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ShoesCount = br.ReadUInt32(); + if (ShoesCount == 0) + { + Shoes = []; + return; + } + var items = new Dat151ShoeListItem[ShoesCount]; + for (var i = 0; i < ShoesCount; i++) + { + items[i] = new Dat151ShoeListItem(ref br); + } + Shoes = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9290,6 +10856,13 @@ namespace CodeWalker.GameFiles ShoeType = br.ReadUInt32(); Shoe = br.ReadUInt32(); } + + public Dat151ShoeListItem(ref SequenceReader br) + { + ShoeType = br.ReadUInt32(); + Shoe = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(ShoeType); @@ -9307,7 +10880,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return ShoeType.ToString() + ": " + Shoe.ToString(); + return $"{ShoeType}: {Shoe}"; } } @@ -9321,20 +10894,33 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ClothList; TypeID = (byte)Type; } - public Dat151ClothList(RelData d, BinaryReader br) : base(d, br) + public Dat151ClothList(in TempRelData d, BinaryReader br) : base(in d, br) { ClothesCount = br.ReadUInt32(); + if (ClothesCount == 0) + { + Clothes = []; + return; + } var items = new Dat151ClothListItem[ClothesCount]; for (var i = 0; i < ClothesCount; i++) { items[i] = new Dat151ClothListItem(br); } Clothes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151ClothList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ClothesCount = br.ReadUInt32(); + var items = new Dat151ClothListItem[ClothesCount]; + for (var i = 0; i < ClothesCount; i++) + { + items[i] = new Dat151ClothListItem(ref br); + } + Clothes = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9388,6 +10974,13 @@ namespace CodeWalker.GameFiles ClothType = br.ReadUInt32(); Cloth = br.ReadUInt32(); } + + public Dat151ClothListItem(ref SequenceReader br) + { + ClothType = br.ReadUInt32(); + Cloth = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(ClothType); @@ -9405,11 +10998,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return ClothType.ToString() + ": " + Cloth.ToString(); + return $"{ClothType}: {Cloth}"; } } - [TC(typeof(EXP))] public class Dat151VehicleRecordingList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151VehicleRecordingList : Dat151RelData { public uint VehicleRecordingsCount { get; set; } public Dat151VehicleRecordingListItem[] VehicleRecordings { get; set; }//types: ???, VehicleRecording @@ -9419,7 +11013,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleRecordingList; TypeID = (byte)Type; } - public Dat151VehicleRecordingList(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleRecordingList(in TempRelData d, BinaryReader br) : base(in d, br) { VehicleRecordingsCount = br.ReadUInt32(); var items = new Dat151VehicleRecordingListItem[VehicleRecordingsCount]; @@ -9428,11 +11022,19 @@ namespace CodeWalker.GameFiles items[i] = new Dat151VehicleRecordingListItem(br); } VehicleRecordings = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151VehicleRecordingList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + VehicleRecordingsCount = br.ReadUInt32(); + var items = new Dat151VehicleRecordingListItem[VehicleRecordingsCount]; + for (var i = 0; i < VehicleRecordingsCount; i++) + { + items[i] = new Dat151VehicleRecordingListItem(ref br); + } + VehicleRecordings = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9484,6 +11086,13 @@ namespace CodeWalker.GameFiles ID = br.ReadUInt32(); Recording = br.ReadUInt32(); } + + public Dat151VehicleRecordingListItem(ref SequenceReader br) + { + ID = br.ReadUInt32(); + Recording = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(ID); @@ -9501,7 +11110,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return ID.ToString() + ": " + Recording.ToString(); + return $"{ID}: {Recording}"; } } @@ -9515,7 +11124,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.WeatherTypeList; TypeID = (byte)Type; } - public Dat151WeatherTypeList(RelData d, BinaryReader br) : base(d, br) + public Dat151WeatherTypeList(in TempRelData d, BinaryReader br) : base(in d, br) { WeatherTypesCount = br.ReadUInt32(); var items = new Dat151WeatherTypeListItem[WeatherTypesCount]; @@ -9524,11 +11133,19 @@ namespace CodeWalker.GameFiles items[i] = new Dat151WeatherTypeListItem(br); } WeatherTypes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151WeatherTypeList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + WeatherTypesCount = br.ReadUInt32(); + var items = new Dat151WeatherTypeListItem[WeatherTypesCount]; + for (var i = 0; i < WeatherTypesCount; i++) + { + items[i] = new Dat151WeatherTypeListItem(ref br); + } + WeatherTypes = items; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9582,6 +11199,13 @@ namespace CodeWalker.GameFiles WeatherType = br.ReadUInt32(); Weather = br.ReadUInt32(); } + + public Dat151WeatherTypeListItem(ref SequenceReader br) + { + WeatherType = br.ReadUInt32(); + Weather = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(WeatherType); @@ -9599,7 +11223,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return WeatherType.ToString() + ": " + Weather.ToString(); + return $"{WeatherType}: {Weather}"; } } @@ -9626,7 +11250,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoreLinePool; TypeID = (byte)Type; } - public Dat151ShoreLinePool(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLinePool(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -9648,20 +11272,32 @@ namespace CodeWalker.GameFiles points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } Points = points; - - //switch (Unk12) - //{ - // case 4.267251f: - // case 2.055879f: - // break; - // default: - // break; - //} - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151ShoreLinePool(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadUInt32(); + Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unk03 = br.ReadInt32(); + Unk04 = br.ReadInt32(); + Unk05 = br.ReadInt32(); + Unk06 = br.ReadInt32(); + Unk07 = br.ReadInt32(); + Unk08 = br.ReadInt32(); + Unk09 = br.ReadInt32(); + Unk10 = br.ReadInt32(); + Unk11 = br.ReadInt32(); + Unk12 = br.ReadSingle(); + + PointsCount = br.ReadInt32(); + var points = new Vector2[PointsCount]; + for (int i = 0; i < PointsCount; i++) + { + points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + Points = points; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9740,7 +11376,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoreLineLake; TypeID = (byte)Type; } - public Dat151ShoreLineLake(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineLake(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -9748,7 +11384,7 @@ namespace CodeWalker.GameFiles Unk04 = br.ReadInt32(); Unk05 = br.ReadUInt32(); - byte b1 = (byte)((Unk05) & 0xFF); + //byte b1 = (byte)((Unk05) & 0xFF); byte b2 = (byte)((Unk05>>8) & 0xFF); PointsCount = b2; @@ -9758,11 +11394,28 @@ namespace CodeWalker.GameFiles points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } Points = points; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } + + public Dat151ShoreLineLake(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadUInt32(); + Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unk03 = br.ReadInt32(); + Unk04 = br.ReadInt32(); + Unk05 = br.ReadUInt32(); + + //byte b1 = (byte)((Unk05) & 0xFF); + byte b2 = (byte)((Unk05 >> 8) & 0xFF); + PointsCount = b2; + + var points = new Vector2[PointsCount]; + for (int i = 0; i < PointsCount; i++) + { + points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + Points = points; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9822,7 +11475,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoreLineRiver; TypeID = (byte)Type; } - public Dat151ShoreLineRiver(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineRiver(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -9839,6 +11492,25 @@ namespace CodeWalker.GameFiles } Points = points; } + + public Dat151ShoreLineRiver(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadUInt32(); + Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unk03 = br.ReadSingle(); + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + PointsCount = br.ReadUInt32(); + + var points = new Vector3[PointsCount]; + for (int i = 0; i < PointsCount; i++) + { + points[i] = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + } + Points = points; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -9905,7 +11577,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoreLineOcean; TypeID = (byte)Type; } - public Dat151ShoreLineOcean(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineOcean(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -9929,6 +11601,32 @@ namespace CodeWalker.GameFiles } Points = points; } + + public Dat151ShoreLineOcean(in TempRelData d, ref SequenceReader br) : base(d, ref br) + { + Unk01 = br.ReadUInt32(); + Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Unk03 = br.ReadSingle(); + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadSingle(); + Unk07 = br.ReadSingle(); + Unk08 = br.ReadSingle(); + Unk09 = br.ReadSingle(); + Unk10 = br.ReadSingle(); + Unk11 = br.ReadSingle(); + Unk12 = br.ReadSingle(); + + PointsCount = br.ReadUInt32(); + + var points = new Vector2[PointsCount]; + for (int i = 0; i < PointsCount; i++) + { + points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + Points = points; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -10001,7 +11699,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ShoreLineList; TypeID = (byte)Type; } - public Dat151ShoreLineList(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineList(in TempRelData d, BinaryReader br) : base(in d, br) { ShoreLineCount = br.ReadUInt32(); var shorelines = new MetaHash[ShoreLineCount]; @@ -10011,6 +11709,18 @@ namespace CodeWalker.GameFiles } ShoreLines = shorelines; } + + public Dat151ShoreLineList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ShoreLineCount = br.ReadUInt32(); + var shorelines = new MetaHash[ShoreLineCount]; + for (int i = 0; i < ShoreLineCount; i++) + { + shorelines[i] = br.ReadUInt32(); + } + ShoreLines = shorelines; + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -10050,6 +11760,13 @@ namespace CodeWalker.GameFiles Time = br.ReadUInt32(); Event = br.ReadUInt32(); } + + public EventData(ref SequenceReader br) + { + Time = br.ReadUInt32(); + Event = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Time); @@ -10077,7 +11794,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioTrackEvents; TypeID = (byte)Type; } - public Dat151RadioTrackEvents(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrackEvents(in TempRelData d, BinaryReader br) : base(in d, br) { EventCount = br.ReadUInt32(); Events = new EventData[EventCount]; @@ -10086,6 +11803,17 @@ namespace CodeWalker.GameFiles Events[i] = new EventData(br); } } + + public Dat151RadioTrackEvents(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + EventCount = br.ReadUInt32(); + Events = new EventData[EventCount]; + for (int i = 0; i < EventCount; i++) + { + Events[i] = new EventData(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -10174,7 +11902,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleEngineGranular; TypeID = (byte)Type; } - public Dat151VehicleEngineGranular(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleEngineGranular(in TempRelData d, BinaryReader br) : base(in d, br) { var basePosition = br.BaseStream.Position; Flags = br.ReadUInt32(); @@ -10236,62 +11964,6 @@ namespace CodeWalker.GameFiles Unk56 = br.ReadInt32(); Unk57 = br.ReadInt32(); - - - switch (this.Flags) - { - case 0xAAAAA905: - case 0xAAAAA955: - case 0xAAAAA954: - case 0xAAAAA914: - case 0xAAAAA904: - case 0xAAAAA805: - case 0xAAAAA915: - case 0xAAAAA945: - case 0xAAAAA815: - case 0xAAAAA944: - case 0xAAAAA854: - break; - default: - break; - } - switch (this.Unk40) - { - case 1225003942: - break; - default: - break; - } - switch (this.Unk41) - { - case 1479769906: - break; - default: - break; - } - switch (this.Unk43) - { - case 5: - case 3: - case 4: - case 2: - case 6: - case 1: - break; - default: - break; - } - switch (this.Unk44) - { - case 2: - case 1: - case 3: - case 4: - break; - default: - break; - } - var bytesleft = d.Data.Length - (br.BaseStream.Position - basePosition); switch (bytesleft) //any other way to tell?? { @@ -10300,22 +11972,88 @@ namespace CodeWalker.GameFiles case 8: Unk58 = br.ReadInt32(); Unk59 = br.ReadSingle(); - switch (Unk58) - { - case 1: - case 2: - case 0: - break; - default: - break;//no hit here - } - if ((Unk58 == 0) && (Unk59 == 0)) - { }//no hit here break; default: break;//no hit here } } + + public Dat151VehicleEngineGranular(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + var basePosition = br.Consumed; + Flags = br.ReadUInt32(); + MasterVolume = br.ReadInt32(); + EngineAccel = br.ReadUInt32(); + ExhaustAccel = br.ReadUInt32(); + Unk04 = br.ReadInt32(); + Unk05 = br.ReadInt32(); + Unk06 = br.ReadInt32(); + Unk07 = br.ReadInt32(); + Unk08 = br.ReadInt32(); + Unk09 = br.ReadInt32(); + Unk10 = br.ReadInt32(); + Unk11 = br.ReadInt32(); + Unk12 = br.ReadInt32(); + EngineVolume = br.ReadInt32(); + ExhaustVolume = br.ReadInt32(); + EngineIdleVolume = br.ReadInt32(); + ExhaustIdleVolume = br.ReadInt32(); + Unk17 = br.ReadInt32(); + Unk18 = br.ReadInt32(); + EngineAccelVolume = br.ReadInt32(); + ExhaustAccelVolume = br.ReadInt32(); + Unk21 = br.ReadInt32(); + Unk22 = br.ReadSingle(); + Unk23 = br.ReadSingle(); + Unk24 = br.ReadSingle(); + Unk25 = br.ReadSingle(); + Unk26 = br.ReadSingle(); + Unk27 = br.ReadSingle(); + Unk28 = br.ReadSingle(); + Unk29 = br.ReadInt32(); + Unk30 = br.ReadInt32(); + EngineSubmix = br.ReadUInt32(); + EngineSubmixPreset = br.ReadUInt32(); + ExhaustSubmix = br.ReadUInt32(); + ExhaustSubmixPreset = br.ReadUInt32(); + EngineAccelNPC = br.ReadUInt32(); + ExhaustAccelNPC = br.ReadUInt32(); + LimiterPops = br.ReadUInt32(); + Unk38 = br.ReadInt32(); + Unk39 = br.ReadInt32(); + Unk40 = br.ReadUInt32(); + Unk41 = br.ReadUInt32(); + Unk42 = br.ReadInt32(); + Unk43 = br.ReadInt32(); + Unk44 = br.ReadInt32(); + IdleSub = br.ReadUInt32(); + Unk46 = br.ReadInt32(); + Unk47 = br.ReadInt32(); + Unk48 = br.ReadInt32(); + Unk49 = br.ReadInt32(); + Unk50 = br.ReadUInt32(); + Unk51 = br.ReadUInt32(); + EngineDamage = br.ReadUInt32(); + LimiterPopsUpgraded = br.ReadUInt32(); + Unk54 = br.ReadInt32(); + Unk55 = br.ReadInt32(); + Unk56 = br.ReadInt32(); + Unk57 = br.ReadInt32(); + + var bytesleft = d.Data.Length - (br.Consumed - basePosition); + switch (bytesleft) //any other way to tell?? + { + case 0: + break; + case 8: + Unk58 = br.ReadInt32(); + Unk59 = br.ReadSingle(); + break; + default: + break;//no hit here + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); @@ -10600,7 +12338,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Vehicle; TypeID = (byte)Type; } - public Dat151Vehicle(RelData d, BinaryReader br) : base(d, br) + public Dat151Vehicle(in TempRelData d, BinaryReader br) : base(in d, br) { var basePosition = br.BaseStream.Position; Flags = br.ReadUInt32(); //2432719400 0x91005A28 @@ -10675,8 +12413,6 @@ namespace CodeWalker.GameFiles break; case 4: Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 - if (Unk63 == 0) - { } break; case 36: Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 @@ -10689,82 +12425,105 @@ namespace CodeWalker.GameFiles Unk70 = br.ReadInt32(); Unk71 = br.ReadUInt32();//flags?? 0xE38FCF16 Unk72 = br.ReadUInt32();//flags?? 0xE38FCF16 - if (Unk70 != 0) - { } - if (Unk68 == 0) - { } - if (Unk71 == 0) - { } - if (Unk72 == 0) - { } - break; default: break; } - if (bytesleft != 0) - { } - - - - if (Unk15 != 0) - { } - if (Unk16 != 0) - { } - if (Unk17 != 0) - { } - if (Unk40 != 0) - { } - if (Unk42 != 0) - { } - if (Unk43 != 0) - { } - if (Unk44 != 0) - { } - - switch (Unk21) - { - case 31: - case 0: - break; - default: - break; - } - switch (Unk22) - { - case 36: - case 100: - case 1: - break; - default: - break; - } - switch (Unk49) - { - case 8: - case 5: - case 3: - case 1: - case 4: - case 0: - case 6: - case 7: - break; - default: - break; - } - switch (EngineHealth) - { - case 2: - case 3: - case 0: - case 1: - break; - default: - break; - } - } + + public Dat151Vehicle(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + var basePosition = br.Consumed; + Flags = br.ReadUInt32(); //2432719400 0x91005A28 + Engine = br.ReadUInt32(); + EngineGranular = br.ReadUInt32(); + Horns = br.ReadUInt32(); + DoorOpen = br.ReadUInt32(); + DoorClose = br.ReadUInt32(); + TrunkOpen = br.ReadUInt32(); + TrunkClose = br.ReadUInt32(); + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadSingle(); + SuspensionUp = br.ReadUInt32(); + SuspensionDown = br.ReadUInt32(); + SuspensionUpFrequency = br.ReadSingle(); + SuspensionDownFrequency = br.ReadSingle(); + Collision = br.ReadUInt32(); + Unk15 = br.ReadInt32(); + Unk16 = br.ReadInt32(); + Unk17 = br.ReadInt32(); + PoliceScannerParams = br.ReadUInt32(); + JumpLandIntact = br.ReadUInt32(); + JumpLandLoose = br.ReadUInt32(); + Unk21 = br.ReadInt32(); + Unk22 = br.ReadInt32(); + RadioFlags = br.ReadUInt32(); + IndicatorOn = br.ReadUInt32(); + IndicatorOff = br.ReadUInt32(); + Handbrake = br.ReadUInt32(); + Unk27 = br.ReadUInt16(); + Unk28 = br.ReadUInt16(); + ParkingTones = br.ReadUInt32(); + Unk29 = br.ReadUInt32(); + Unk30 = br.ReadUInt32(); + Unk31 = br.ReadUInt32(); + Fire = br.ReadUInt32(); + StartupSequence = br.ReadUInt32(); + Unk34 = br.ReadUInt32(); + Unk35 = br.ReadUInt32(); + Unk36 = br.ReadUInt32(); + Unk37 = br.ReadSingle(); + Unk38 = br.ReadSingle(); + Unk39 = br.ReadUInt32(); + Unk40 = br.ReadInt32(); + Sirens = br.ReadUInt32(); + Unk42 = br.ReadInt32(); + Unk43 = br.ReadInt32(); + Unk44 = br.ReadInt32(); + Unk45 = br.ReadUInt32(); + Unk46 = br.ReadUInt32(); + Fork = br.ReadUInt32(); + Turret = br.ReadUInt32(); + Unk49 = br.ReadInt32(); + Scoop = br.ReadUInt32(); + TowArm = br.ReadUInt32(); + Unk52 = br.ReadInt32(); + ElectricEngine = br.ReadUInt32(); + Unk54 = br.ReadSingle(); + ReverseWarning = br.ReadUInt32(); + EngineHealth = br.ReadInt32(); + Cloth = br.ReadUInt32(); + ShutdownBeep = br.ReadUInt32(); + Unk59 = br.ReadSingle(); + Unk60 = br.ReadInt32(); + Unk61 = br.ReadSingle(); + Unk62 = br.ReadInt32(); + + var bytesleft = d.Data.Length - (br.Consumed - basePosition); + switch (bytesleft) //any other way to tell..? + { + case 0: + break; + case 4: + Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 + break; + case 36: + Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 + Unk64 = br.ReadInt32(); + Unk65 = br.ReadUInt16(); + Unk66 = br.ReadUInt16(); + ConvertibleRoof = br.ReadUInt32();//flags? 0x536F6CAC + Unk68 = br.ReadUInt32();//flags?? 0xE38FCF16 + InteriorTones = br.ReadUInt32();//flags? 0x7C9B8D8C + Unk70 = br.ReadInt32(); + Unk71 = br.ReadUInt32();//flags?? 0xE38FCF16 + Unk72 = br.ReadUInt32();//flags?? 0xE38FCF16 + break; + default: + break; + } + } + public override void Write(BinaryWriter bw) { //base.Write(bw); @@ -11087,7 +12846,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleEngine; TypeID = (byte)Type; } - public Dat151VehicleEngine(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleEngine(in TempRelData d, BinaryReader br) : base(in d, br) { MasterVolume = br.ReadInt32(); EngineLowVolume = br.ReadInt32(); @@ -11407,7 +13166,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleScannerParams; TypeID = (byte)Type; } - public Dat151VehicleScannerParams(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleScannerParams(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); ParamCount = br.ReadInt32(); @@ -11539,7 +13298,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Weapon; TypeID = (byte)Type; } - public Dat151Weapon(RelData d, BinaryReader br) : base(d, br) + public Dat151Weapon(in TempRelData d, BinaryReader br) : base(in d, br) { var basePosition = br.BaseStream.Position; Flags = br.ReadUInt32(); @@ -11928,7 +13687,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Explosion; TypeID = (byte)Type; } - public Dat151Explosion(RelData d, BinaryReader br) : base(d, br) + public Dat151Explosion(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32();//flags Main = br.ReadUInt32();//hash @@ -11995,7 +13754,8 @@ namespace CodeWalker.GameFiles return new[] { Main, Debris, SlowMotion, Unk10 }; } } - [TC(typeof(EXP))] public class Dat151PedVoiceGroupItem : IMetaXmlItem + [TC(typeof(EXP))] + public class Dat151PedVoiceGroupItem : IMetaXmlItem { public MetaHash Name { get; set; } public FlagsUint Unk1 { get; set; } @@ -12008,11 +13768,6 @@ namespace CodeWalker.GameFiles Name = br.ReadUInt32(); Unk1 = br.ReadUInt32(); Unk2 = br.ReadUInt32(); - - if (Unk1 != 0) - { }//no hit - if (Unk2 != 0) - { }//no hit } public void Write(BinaryWriter bw) { @@ -12034,7 +13789,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Name.ToString() + ", " + Unk1.Value.ToString() + ", " + Unk2.Value.ToString(); + return $"{Name}, {Unk1.Value}, {Unk2.Value}"; } } [TC(typeof(EXP))] public class Dat151PedVoiceGroup : Dat151RelData @@ -12058,7 +13813,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PedVoiceGroup; TypeID = (byte)Type; } - public Dat151PedVoiceGroup(RelData d, BinaryReader br) : base(d, br) + public Dat151PedVoiceGroup(in TempRelData d, BinaryReader br) : base(in d, br) { Unk00 = br.ReadUInt32();//flags? Unk01 = br.ReadByte();//94 @@ -12066,25 +13821,49 @@ namespace CodeWalker.GameFiles Unk03 = br.ReadByte();//245 FullCount = br.ReadByte(); - Full = new Dat151PedVoiceGroupItem[FullCount]; - for (int i = 0; i < FullCount; i++) + if (FullCount > 0) { - Full[i] = new Dat151PedVoiceGroupItem(br); + Full = new Dat151PedVoiceGroupItem[FullCount]; + for (int i = 0; i < FullCount; i++) + { + Full[i] = new Dat151PedVoiceGroupItem(br); + } } + else + { + Full = []; + } + MiniCount = br.ReadByte(); - Mini = new Dat151PedVoiceGroupItem[MiniCount]; - for (int i = 0; i < MiniCount; i++) + if (MiniCount > 0) { - Mini[i] = new Dat151PedVoiceGroupItem(br); + Mini = new Dat151PedVoiceGroupItem[MiniCount]; + for (int i = 0; i < MiniCount; i++) + { + Mini[i] = new Dat151PedVoiceGroupItem(br); + } + } + else + { + Mini = []; } + UnkItemsCount = br.ReadByte(); - UnkItems = new Dat151PedVoiceGroupItem[UnkItemsCount]; - for (int i = 0; i < UnkItemsCount; i++) + if (UnkItemsCount > 0) { - UnkItems[i] = new Dat151PedVoiceGroupItem(br); + UnkItems = new Dat151PedVoiceGroupItem[UnkItemsCount]; + for (int i = 0; i < UnkItemsCount; i++) + { + UnkItems[i] = new Dat151PedVoiceGroupItem(br); + } } + else + { + UnkItems = []; + } + Unk07 = br.ReadByte(); } @@ -12185,7 +13964,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.EntityEmitter; TypeID = (byte)Type; } - public Dat151EntityEmitter(RelData d, BinaryReader br) : base(d, br) + public Dat151EntityEmitter(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); ChildSound = br.ReadUInt32(); @@ -12325,7 +14104,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Boat; TypeID = (byte)Type; } - public Dat151Boat(RelData d, BinaryReader br) : base(d, br) + public Dat151Boat(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Engine = br.ReadUInt32(); @@ -12644,7 +14423,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Bicycle; TypeID = (byte)Type; } - public Dat151Bicycle(RelData d, BinaryReader br) : base(d, br) + public Dat151Bicycle(in TempRelData d, BinaryReader br) : base(in d, br) { Chain = br.ReadUInt32(); Sprocket = br.ReadUInt32(); @@ -12847,7 +14626,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Aeroplane; TypeID = (byte)Type; } - public Dat151Aeroplane(RelData d, BinaryReader br) : base(d, br) + public Dat151Aeroplane(in TempRelData d, BinaryReader br) : base(in d, br) { var basePosition = br.BaseStream.Position; Flags = br.ReadUInt32(); @@ -13402,7 +15181,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Helicopter; TypeID = (byte)Type; } - public Dat151Helicopter(RelData d, BinaryReader br) : base(d, br) + public Dat151Helicopter(in TempRelData d, BinaryReader br) : base(in d, br) { var basePosition = br.BaseStream.Position; Flags = br.ReadUInt32(); @@ -13848,7 +15627,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleTrailer; TypeID = (byte)Type; } - public Dat151VehicleTrailer(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleTrailer(in TempRelData d, BinaryReader br) : base(in d, br) { Suspension = br.ReadUInt32(); Unk02 = br.ReadInt32(); @@ -13966,7 +15745,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Train; TypeID = (byte)Type; } - public Dat151Train(RelData d, BinaryReader br) : base(d, br) + public Dat151Train(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32(); @@ -14243,7 +16022,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AnimalParams; TypeID = (byte)Type; } - public Dat151AnimalParams(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalParams(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); @@ -14341,7 +16120,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SpeechParams; TypeID = (byte)Type; } - public Dat151SpeechParams(RelData d, BinaryReader br) : base(d, br) + public Dat151SpeechParams(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadInt32(); @@ -14414,7 +16193,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.MeleeCombat; TypeID = (byte)Type; } - public Dat151MeleeCombat(RelData d, BinaryReader br) : base(d, br) + public Dat151MeleeCombat(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32(); @@ -14526,7 +16305,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SpeechContext; TypeID = (byte)Type; } - public Dat151SpeechContext(RelData d, BinaryReader br) : base(d, br) + public Dat151SpeechContext(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadInt32(); @@ -14634,7 +16413,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SpeechChoice; TypeID = (byte)Type; } - public Dat151SpeechChoice(RelData d, BinaryReader br) : base(d, br) + public Dat151SpeechChoice(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -14754,7 +16533,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VirtualSpeechChoice; TypeID = (byte)Type; } - public Dat151VirtualSpeechChoice(RelData d, BinaryReader br) : base(d, br) + public Dat151VirtualSpeechChoice(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -14837,7 +16616,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SpeechContextList; TypeID = (byte)Type; } - public Dat151SpeechContextList(RelData d, BinaryReader br) : base(d, br) + public Dat151SpeechContextList(in TempRelData d, BinaryReader br) : base(in d, br) { SpeechContextsCount = br.ReadInt32(); SpeechContexts = new MetaHash[SpeechContextsCount]; @@ -14899,7 +16678,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Shoe; TypeID = (byte)Type; } - public Dat151Shoe(RelData d, BinaryReader br) : base(d, br) + public Dat151Shoe(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32(); @@ -15082,7 +16861,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Unk22; TypeID = (byte)Type; } - public Dat151Unk22(RelData d, BinaryReader br) : base(d, br) + public Dat151Unk22(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadInt32(); @@ -15158,7 +16937,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Skis; TypeID = (byte)Type; } - public Dat151Skis(RelData d, BinaryReader br) : base(d, br) + public Dat151Skis(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32();//0 @@ -15223,7 +17002,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioTrackCategory; TypeID = (byte)Type; } - public Dat151RadioTrackCategory(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrackCategory(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadInt32(); Items = new Dat151RadioTrackCategoryItem[ItemCount]; @@ -15283,11 +17062,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Track.ToString() + ": " + PreDelay.ToString(); + return $"{Track}: {PreDelay}"; } } - [TC(typeof(EXP))] public class Dat151PoliceScannerCrime : Dat151RelData + [TC(typeof(EXP))] + public class Dat151PoliceScannerCrime : Dat151RelData { public MetaHash ReportedBy { get; set; } public MetaHash ReportedByPed { get; set; } @@ -15303,7 +17083,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PoliceScannerCrime; TypeID = (byte)Type; } - public Dat151PoliceScannerCrime(RelData d, BinaryReader br) : base(d, br) + public Dat151PoliceScannerCrime(in TempRelData d, BinaryReader br) : base(in d, br) { ReportedBy = br.ReadUInt32(); ReportedByPed = br.ReadUInt32(); @@ -15376,7 +17156,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RaceToPedVoiceGroup; TypeID = (byte)Type; } - public Dat151RaceToPedVoiceGroup(RelData d, BinaryReader br) : base(d, br) + public Dat151RaceToPedVoiceGroup(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Universal = br.ReadUInt32();//0 @@ -15469,7 +17249,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PedType; TypeID = (byte)Type; } - public Dat151PedType(RelData d, BinaryReader br) : base(d, br) + public Dat151PedType(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); } @@ -15500,7 +17280,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PoliceScannerReport; TypeID = (byte)Type; } - public Dat151PoliceScannerReport(RelData d, BinaryReader br) : base(d, br) + public Dat151PoliceScannerReport(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); ReportsCount = br.ReadInt32(); @@ -15581,7 +17361,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Unk1.ToString() + ": " + Unk2.ToString() + ", " + Unk3.ToString(); + return $"{Unk1}: {Unk2}, {Unk3}"; } } @@ -15606,7 +17386,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PoliceScannerLocation; TypeID = (byte)Type; } - public Dat151PoliceScannerLocation(RelData d, BinaryReader br) : base(d, br) + public Dat151PoliceScannerLocation(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32();//0 Unk02 = br.ReadUInt32();//0 @@ -15689,7 +17469,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PoliceScannerLocationList; TypeID = (byte)Type; } - public Dat151PoliceScannerLocationList(RelData d, BinaryReader br) : base(d, br) + public Dat151PoliceScannerLocationList(in TempRelData d, BinaryReader br) : base(in d, br) { LocationsCount = br.ReadInt32(); Locations = new MetaHash[LocationsCount]; @@ -15756,10 +17536,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return WaveSlot.ToString() + ", " + BankName.ToString() + ", " + Unk3.ToString(); + return $"{WaveSlot}, {BankName}, {Unk3}"; } } - [TC(typeof(EXP))] public class Dat151AmbienceSlotMap : Dat151RelData //contains eg amb_stream_bird_01 + + [TC(typeof(EXP))] + public class Dat151AmbienceSlotMap : Dat151RelData //contains eg amb_stream_bird_01 { public int AmbienceSlotsCount { get; set; } public Dat151AmbienceSlotMapItem[] AmbienceSlots { get; set; } @@ -15769,7 +17551,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbienceSlotMap; TypeID = (byte)Type; } - public Dat151AmbienceSlotMap(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbienceSlotMap(in TempRelData d, BinaryReader br) : base(in d, br) { AmbienceSlotsCount = br.ReadInt32(); AmbienceSlots = new Dat151AmbienceSlotMapItem[AmbienceSlotsCount]; @@ -15808,7 +17590,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbienceBankMap; TypeID = (byte)Type; } - public Dat151AmbienceBankMap(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbienceBankMap(in TempRelData d, BinaryReader br) : base(in d, br) { AmbienceBanksCount = br.ReadInt32(); AmbienceBanks = new Dat151AmbienceBankMapItem[AmbienceBanksCount]; @@ -15838,7 +17620,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct Dat151AmbienceBankMapItem : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151AmbienceBankMapItem : IMetaXmlItem { public MetaHash AudioBank { get; set; } public MetaHash BankName { get; set; } @@ -15865,11 +17648,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return AudioBank.ToString() + ": " + BankName.ToString(); + return $"{AudioBank}: {BankName}"; } } - [TC(typeof(EXP))] public class Dat151AmbientZoneParams : Dat151RelData + [TC(typeof(EXP))] + public class Dat151AmbientZoneParams : Dat151RelData { public FlagsUint Flags { get; set; } public MetaHash Unk01 { get; set; }//0 @@ -15888,7 +17672,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AmbientZoneParams; TypeID = (byte)Type; } - public Dat151AmbientZoneParams(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientZoneParams(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32();//0 @@ -15960,7 +17744,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.InteriorRoomParams; TypeID = (byte)Type; } - public Dat151InteriorRoomParams(RelData d, BinaryReader br) : base(d, br) + public Dat151InteriorRoomParams(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadSingle(); Unk02 = br.ReadSingle(); @@ -16012,7 +17796,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.DoorParams; TypeID = (byte)Type; } - public Dat151DoorParams(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorParams(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadSingle(); @@ -16076,7 +17860,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Climbing; TypeID = (byte)Type; } - public Dat151Climbing(RelData d, BinaryReader br) : base(d, br) + public Dat151Climbing(in TempRelData d, BinaryReader br) : base(in d, br) { Launch = br.ReadUInt32(); Foot = br.ReadUInt32(); @@ -16133,7 +17917,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.WeatherType; TypeID = (byte)Type; } - public Dat151WeatherType(RelData d, BinaryReader br) : base(d, br) + public Dat151WeatherType(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadSingle(); Unk02 = br.ReadSingle(); @@ -16225,7 +18009,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StemMix; TypeID = (byte)Type; } - public Dat151StemMix(RelData d, BinaryReader br) : base(d, br) + public Dat151StemMix(in TempRelData d, BinaryReader br) : base(in d, br) { Stem1Volume = br.ReadInt16(); Stem2Volume = br.ReadInt16(); @@ -16281,7 +18065,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.MusicBeat; TypeID = (byte)Type; } - public Dat151MusicBeat(RelData d, BinaryReader br) : base(d, br) + public Dat151MusicBeat(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt16(); } @@ -16310,7 +18094,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.MusicBar; TypeID = (byte)Type; } - public Dat151MusicBar(RelData d, BinaryReader br) : base(d, br) + public Dat151MusicBar(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadInt32(); @@ -16360,7 +18144,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.DependentAmbience; TypeID = (byte)Type; } - public Dat151DependentAmbience(RelData d, BinaryReader br) : base(d, br) + public Dat151DependentAmbience(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); ChildSound1 = br.ReadUInt32(); @@ -16482,7 +18266,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ConductorState; TypeID = (byte)Type; } - public Dat151ConductorState(RelData d, BinaryReader br) : base(d, br) + public Dat151ConductorState(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadSingle(); @@ -16620,7 +18404,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Unk1.ToString() + ": " + ItemCount1.ToString() + ", " + ItemCount2.ToString(); + return $"{Unk1}: {ItemCount1}, {ItemCount2}"; } } [TC(typeof(EXP))] public class Dat151AnimalSounds : Dat151RelData @@ -16633,7 +18417,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AnimalSounds; TypeID = (byte)Type; } - public Dat151AnimalSounds(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalSounds(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadByte();//1 Items = new Dat151AnimalSoundsItem[ItemCount]; @@ -16736,7 +18520,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleScannerColourList; TypeID = (byte)Type; } - public Dat151VehicleScannerColourList(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleScannerColourList(in TempRelData d, BinaryReader br) : base(in d, br) { Black = br.ReadUInt32(); Blue = br.ReadUInt32(); @@ -17033,7 +18817,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Unk77; TypeID = (byte)Type; } - public Dat151Unk77(RelData d, BinaryReader br) : base(d, br) + public Dat151Unk77(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32();//0 Unk02 = br.ReadSingle(); @@ -17120,7 +18904,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}", Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk08, Unk09); + return $"{Unk01}, {Unk02}, {Unk03}, {Unk04}, {Unk05}, {Unk06}, {Unk07}, {Unk08}, {Unk09}"; } } [TC(typeof(EXP))] public class Dat151Microphone : Dat151RelData @@ -17137,7 +18921,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Microphone; TypeID = (byte)Type; } - public Dat151Microphone(RelData d, BinaryReader br) : base(d, br) + public Dat151Microphone(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadByte(); @@ -17197,7 +18981,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.VehicleRecording; TypeID = (byte)Type; } - public Dat151VehicleRecording(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleRecording(in TempRelData d, BinaryReader br) : base(in d, br) { Group = br.ReadUInt32(); Duration = br.ReadInt32(); @@ -17299,7 +19083,7 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public class Dat151VehicleRecordingItem : IMetaXmlItem + public struct Dat151VehicleRecordingItem : IMetaXmlItem { public float Time { get; set; } public MetaHash Sound { get; set; } @@ -17333,11 +19117,11 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Time.ToString() + ", " + Sound.ToString() + ", " + Scene.ToString(); + return $"{Time}, {Sound}, {Scene}"; } } [TC(typeof(EXP))] - public class Dat151VehicleRecordingItem2 : IMetaXmlItem + public struct Dat151VehicleRecordingItem2 : IMetaXmlItem { public MetaHash Scene { get; set; } public float FadeIn { get; set; } @@ -17392,7 +19176,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AnimalFootsteps; TypeID = (byte)Type; } - public Dat151AnimalFootsteps(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalFootsteps(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32(); @@ -17474,7 +19258,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Cloth; TypeID = (byte)Type; } - public Dat151Cloth(RelData d, BinaryReader br) : base(d, br) + public Dat151Cloth(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -17569,7 +19353,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioTrackSettings; TypeID = (byte)Type; } - public Dat151RadioTrackSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrackSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadInt32(); @@ -17604,7 +19388,8 @@ namespace CodeWalker.GameFiles return new[] { Unk01, Unk03 }; } } - [TC(typeof(EXP))] public class Dat151StealthSettingsItem : IMetaXmlItem + [TC(typeof(EXP))] + public class Dat151StealthSettingsItem : IMetaXmlItem { public MetaHash Unk01 { get; set; }//name eg. default, good_stealth, bad_stealth, soft_steps, drunk public float Unk02 { get; set; } @@ -17661,15 +19446,6 @@ namespace CodeWalker.GameFiles Unk23 = br.ReadInt32(); Unk24 = br.ReadUInt32();//0 Unk25 = br.ReadSingle(); - - if (Unk08 != 0) - { } - if (Unk12 != 0) - { } - if (Unk16 != 0) - { } - if (Unk24 != 0) - { } } public void Write(BinaryWriter bw) { @@ -17775,7 +19551,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.StealthSettings; TypeID = (byte)Type; } - public Dat151StealthSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151StealthSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadSingle(); Unk02 = br.ReadSingle(); @@ -17833,7 +19609,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Unk99; TypeID = (byte)Type; } - public Dat151Unk99(RelData d, BinaryReader br) : base(d, br) + public Dat151Unk99(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadSingle(); } @@ -17879,7 +19655,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Tunnel; TypeID = (byte)Type; } - public Dat151Tunnel(RelData d, BinaryReader br) : base(d, br) + public Dat151Tunnel(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadSingle(); @@ -17991,7 +19767,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Alarm; TypeID = (byte)Type; } - public Dat151Alarm(RelData d, BinaryReader br) : base(d, br) + public Dat151Alarm(in TempRelData d, BinaryReader br) : base(in d, br) { DistantAlarm = br.ReadUInt32(); Curve = br.ReadUInt32(); @@ -18064,7 +19840,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.SlowMoSettings; TypeID = (byte)Type; } - public Dat151SlowMoSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151SlowMoSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Scene = br.ReadUInt32(); Unk02 = br.ReadInt32(); @@ -18117,13 +19893,19 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Scenario; TypeID = (byte)Type; } - public Dat151Scenario(RelData d, BinaryReader br) : base(d, br) + public Dat151Scenario(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadInt32(); Sound = br.ReadUInt32(); Unk03 = br.ReadSingle(); VariationsCount = br.ReadInt32(); + if (VariationsCount == 0) + { + Variations = []; + return; + } + Variations = new Dat151ScenarioItem[VariationsCount]; for (int i = 0; i < VariationsCount; i++) { @@ -18204,7 +19986,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Prop.ToString() + ": " + Sound.ToString(); + return $"{Prop}: {Sound}"; } } [TC(typeof(EXP))] public class Dat151PortalSettings : Dat151RelData @@ -18219,7 +20001,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.PortalSettings; TypeID = (byte)Type; } - public Dat151PortalSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151PortalSettings(in TempRelData d, BinaryReader br) : base(in d, br) { MaxOcclusion = br.ReadSingle(); } @@ -18262,7 +20044,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ElectricEngine; TypeID = (byte)Type; } - public Dat151ElectricEngine(RelData d, BinaryReader br) : base(d, br) + public Dat151ElectricEngine(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Transmission = br.ReadUInt32(); @@ -18371,7 +20153,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.BreathSettings; TypeID = (byte)Type; } - public Dat151BreathSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151BreathSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadInt32(); @@ -18458,14 +20240,15 @@ namespace CodeWalker.GameFiles Unk18 = Xml.GetChildIntAttribute(node, "Unk18", "value"); } } - [TC(typeof(EXP))] public class Dat151WallaSpeechItem : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151WallaSpeechItem : IMetaXmlItem { public string Name { get; set; } //eg AGREE_ACROSS_STREET public byte Unk1 { get; set; }// 1 or 255(-1?) public override string ToString() { - return Name + ", " + Unk1.ToString(); + return $"{Name}, {Unk1}"; } public Dat151WallaSpeechItem() @@ -18513,7 +20296,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.WallaSpeech; TypeID = (byte)Type; } - public Dat151WallaSpeech(RelData d, BinaryReader br) : base(d, br) + public Dat151WallaSpeech(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadInt16(); @@ -18639,7 +20422,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.AircraftWarningSettings; TypeID = (byte)Type; } - public Dat151AircraftWarningSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151AircraftWarningSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadUInt32();//0 @@ -18886,7 +20669,8 @@ namespace CodeWalker.GameFiles Unk58 = Xml.GetChildIntAttribute(node, "Unk58", "value"); } } - [TC(typeof(EXP))] public class Dat151WallaSpeechListItem : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151WallaSpeechListItem : IMetaXmlItem { public MetaHash Unk01 { get; set; } public float Unk02 { get; set; } @@ -18905,9 +20689,6 @@ namespace CodeWalker.GameFiles Unk04 = br.ReadByte(); Unk05 = br.ReadByte(); Unk06 = br.ReadInt16(); - - if (Unk06 != 0) - { } } public void Write(BinaryWriter bw) { @@ -18938,10 +20719,11 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Unk01.ToString() + ": " + Unk02.ToString() + ", " + Unk03.ToString() + ", " + Unk04.ToString() + ", " + Unk05.ToString(); + return $"{Unk01}: {Unk02}, {Unk03}, {Unk04}, {Unk05}"; } } - [TC(typeof(EXP))] public class Dat151WallaSpeechList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151WallaSpeechList : Dat151RelData { public int ItemCount { get; set; } public Dat151WallaSpeechListItem[] Items { get; set; } @@ -18951,7 +20733,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.WallaSpeechList; TypeID = (byte)Type; } - public Dat151WallaSpeechList(RelData d, BinaryReader br) : base(d, br) + public Dat151WallaSpeechList(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadInt32(); Items = new Dat151WallaSpeechListItem[ItemCount]; @@ -19042,7 +20824,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.CopDispatchInteractionSettings; TypeID = (byte)Type; } - public Dat151CopDispatchInteractionSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151CopDispatchInteractionSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadInt32(); @@ -19255,7 +21037,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Unk115; TypeID = (byte)Type; } - public Dat151Unk115(RelData d, BinaryReader br) : base(d, br) + public Dat151Unk115(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadSingle(); @@ -19382,7 +21164,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.TennisVFXSettings; TypeID = (byte)Type; } - public Dat151TennisVFXSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151TennisVFXSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32();//0 Unk02 = br.ReadSingle(); @@ -19473,7 +21255,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Unk118; TypeID = (byte)Type; } - public Dat151Unk118(RelData d, BinaryReader br) : base(d, br) + public Dat151Unk118(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt32(); Unk02 = br.ReadInt32(); @@ -19579,7 +21361,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.Foliage; TypeID = (byte)Type; } - public Dat151Foliage(RelData d, BinaryReader br) : base(d, br) + public Dat151Foliage(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadUInt32(); @@ -19620,7 +21402,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.ModelAudioCollisionSettingsOverride; TypeID = (byte)Type; } - public Dat151ModelAudioCollisionSettingsOverride(RelData d, BinaryReader br) : base(d, br) + public Dat151ModelAudioCollisionSettingsOverride(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadInt32(); Items = new Dat151ModelAudioCollisionSettingsOverrideItem[ItemCount]; @@ -19689,7 +21471,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return Prop.ToString() + ": " + ModelAudioCollisionSettings.ToString(); + return $"{Prop}: {ModelAudioCollisionSettings}"; } } [TC(typeof(EXP))] public class Dat151RadioStationList2 : Dat151RelData @@ -19703,7 +21485,7 @@ namespace CodeWalker.GameFiles Type = Dat151RelType.RadioStationList2; TypeID = (byte)Type; } - public Dat151RadioStationList2(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioStationList2(in TempRelData d, BinaryReader br) : base(in d, br) { Flags = br.ReadUInt32(); ItemCount = br.ReadUInt32(); @@ -19779,7 +21561,8 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat4ConfigData(RelData d, BinaryReader br) : base(d) + + public Dat4ConfigData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat4ConfigType)TypeID; @@ -19787,9 +21570,16 @@ namespace CodeWalker.GameFiles NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); Flags = br.ReadUInt32(); + } - if (Flags != 0xAAAAAAAA) - { } + public Dat4ConfigData(in TempRelData d, ref SequenceReader reader) : base(in d) + { + Type = (Dat4ConfigType)TypeID; + + reader.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((reader.ReadUInt32() >> 8) & 0xFFFFFF); + Flags = reader.ReadUInt32(); } public override void Write(BinaryWriter bw) @@ -19815,7 +21605,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } @@ -19828,10 +21618,16 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.Int; TypeID = (byte)Type; } - public Dat4ConfigInt(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigInt(in TempRelData d, BinaryReader br) : base(d, br) { Value = br.ReadInt32(); } + + public Dat4ConfigInt(in TempRelData d, ref SequenceReader reader) : base(d, ref reader) + { + Value = reader.ReadInt32(); + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -19857,10 +21653,16 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.UnsignedInt; TypeID = (byte)Type; } - public Dat4ConfigUnsignedInt(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigUnsignedInt(in TempRelData d, BinaryReader br) : base(in d, br) { Value = br.ReadUInt32(); } + + public Dat4ConfigUnsignedInt(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + Value = reader.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -19886,10 +21688,16 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.Float; TypeID = (byte)Type; } - public Dat4ConfigFloat(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigFloat(in TempRelData d, BinaryReader br) : base(in d, br) { Value = br.ReadSingle(); } + + public Dat4ConfigFloat(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + Value = reader.ReadSingle(); + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -19915,11 +21723,22 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.String; TypeID = (byte)Type; } - public Dat4ConfigString(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigString(in TempRelData d, BinaryReader br) : base(in d, br) { var data = br.ReadBytes(64); Value = Encoding.ASCII.GetString(data).Replace("\0", ""); } + + public Dat4ConfigString(in TempRelData d, ref SequenceReader reader) : base(in d, ref reader) + { + reader.TryReadTo(out ReadOnlySpan data, 0, false); + Value = Encoding.ASCII.GetString(data); + if (data.Length < 64) + { + reader.Advance(64 - data.Length); + } + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -19952,12 +21771,20 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.Vector3; TypeID = (byte)Type; } - public Dat4ConfigVector3(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigVector3(in TempRelData d, BinaryReader br) : base(in d, br) { - br.ReadBytes(8); // alignment padding + br.BaseStream.Position += 8; Value = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());//0x10-0x1C - br.ReadBytes(4); // alignment padding + br.BaseStream.Position += 4; } + + public Dat4ConfigVector3(in TempRelData d, ref SequenceReader br) : base(d, ref br) + { + br.Advance(8); // alignment padding + Value = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());//0x10-0x1C + br.Advance(4); // alignment padding + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -19982,7 +21809,7 @@ namespace CodeWalker.GameFiles { public int VariableCount { get; set; } public VariableValue[] Variables { get; set; } - public class VariableValue : IMetaXmlItem + public struct VariableValue : IMetaXmlItem { public MetaHash Name { get; set; } public float Value { get; set; } @@ -19993,12 +21820,19 @@ namespace CodeWalker.GameFiles Name = br.ReadUInt32(); Value = br.ReadSingle(); } - public void Write(BinaryWriter bw) + + public VariableValue(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value = br.ReadSingle(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); @@ -20008,9 +21842,9 @@ namespace CodeWalker.GameFiles Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } - public override string ToString() + public override readonly string ToString() { - return Name + ": " + Value.ToString(); + return $"{Name}: {Value}"; } } @@ -20019,15 +21853,37 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.VariableList; TypeID = (byte)Type; } - public Dat4ConfigVariableList(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigVariableList(in TempRelData d, BinaryReader br) : base(in d, br) { VariableCount = br.ReadInt32(); + if (VariableCount == 0) + { + Variables = []; + return; + } Variables = new VariableValue[VariableCount]; for (int i = 0; i < VariableCount; i++) { Variables[i] = new VariableValue(br); } } + + public Dat4ConfigVariableList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + VariableCount = br.ReadInt32(); + if (VariableCount == 0) + { + Variables = []; + return; + } + + Variables = new VariableValue[VariableCount]; + for (int i = 0; i < VariableCount; i++) + { + Variables[i] = new VariableValue(ref br); + } + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -20063,7 +21919,7 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.WaveSlot; TypeID = (byte)Type; } - public Dat4ConfigWaveSlot(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigWaveSlot(in TempRelData d, BinaryReader br) : base(in d, br) { Unk1 = br.ReadInt32(); MaxHeaderSize = br.ReadInt32(); @@ -20072,6 +21928,17 @@ namespace CodeWalker.GameFiles MaxDataSize = br.ReadInt32(); Unk6 = br.ReadInt32(); } + + public Dat4ConfigWaveSlot(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk1 = br.ReadInt32(); + MaxHeaderSize = br.ReadInt32(); + Size = br.ReadInt32(); + StaticBank = br.ReadUInt32(); + MaxDataSize = br.ReadInt32(); + Unk6 = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -20113,15 +21980,37 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.WaveSlotsList; TypeID = (byte)Type; } - public Dat4ConfigWaveSlotsList(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigWaveSlotsList(in TempRelData d, BinaryReader br) : base(in d, br) { WaveSlotsCount = br.ReadInt32(); + if (WaveSlotsCount == 0) + { + WaveSlots = Array.Empty(); + return; + } WaveSlots = new MetaHash[WaveSlotsCount]; for (int i = 0; i < WaveSlotsCount; i++) { WaveSlots[i] = br.ReadUInt32(); } } + + public Dat4ConfigWaveSlotsList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + WaveSlotsCount = br.ReadInt32(); + if (WaveSlotsCount == 0) + { + WaveSlots = Array.Empty(); + return; + } + + WaveSlots = new MetaHash[WaveSlotsCount]; + for (int i = 0; i < WaveSlotsCount; i++) + { + WaveSlots[i] = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -20172,7 +22061,7 @@ namespace CodeWalker.GameFiles Vector4[] hash_EACC7FE3 { get; set; } - public class Pass : IMetaXmlItem + public struct Pass : IMetaXmlItem { public float UnkFloat { get; set; } public int UnkInt { get; set; } @@ -20183,6 +22072,13 @@ namespace CodeWalker.GameFiles UnkFloat = br.ReadSingle(); UnkInt = br.ReadInt32(); } + + public Pass(ref SequenceReader br) + { + UnkFloat = br.ReadSingle(); + UnkInt = br.ReadInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(UnkFloat); @@ -20200,7 +22096,7 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return FloatUtil.ToString(UnkFloat) + ", " + UnkInt.ToString(); + return $"{FloatUtil.ToString(UnkFloat)}, {UnkInt}"; } } @@ -20210,7 +22106,7 @@ namespace CodeWalker.GameFiles Type = Dat4ConfigType.ERSettings; TypeID = (byte)Type; } - public Dat4ConfigERSettings(RelData d, BinaryReader br) : base(d, br) + public Dat4ConfigERSettings(in TempRelData d, BinaryReader br) : base(in d, br) { RoomSize = br.ReadSingle(); hash_1F616274 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -20248,6 +22144,46 @@ namespace CodeWalker.GameFiles hash_EACC7FE3[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } } + + public Dat4ConfigERSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + RoomSize = br.ReadSingle(); + hash_1F616274 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + ListenerPos = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + AllPassesCount = br.ReadInt32(); + AllPasses = new Pass[AllPassesCount]; + for (int i = 0; i < AllPassesCount; i++) + { + AllPasses[i] = new Pass(ref br); + } + hash_84F123DC = new Vector4[6]; + for (int i = 0; i < hash_84F123DC.Length; i++) + { + hash_84F123DC[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + } + hash_526F5F8A = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + hash_5071232B = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + hash_7D4AA574 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + hash_0776BC75_Count = br.ReadInt32(); + hash_0776BC75 = new Vector4[hash_0776BC75_Count]; + for (int i = 0; i < hash_0776BC75_Count; i++) + { + hash_0776BC75[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + } + hash_7475AA16_Count = br.ReadInt32(); + hash_7475AA16 = new Vector4[hash_0776BC75_Count]; + for (int i = 0; i < hash_7475AA16_Count; i++) + { + hash_7475AA16[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + } + hash_EACC7FE3_Count = br.ReadInt32(); + hash_EACC7FE3 = new Vector4[hash_0776BC75_Count]; + for (int i = 0; i < hash_EACC7FE3_Count; i++) + { + hash_EACC7FE3[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + } + } + public override void Write(BinaryWriter bw) { base.Write(bw); @@ -20388,7 +22324,8 @@ namespace CodeWalker.GameFiles Container = 8, } - [TC(typeof(EXP))] public class Dat4SpeechData : RelData + [TC(typeof(EXP))] + public class Dat4SpeechData : RelData { public Dat4SpeechType Type { get; set; } @@ -20399,10 +22336,21 @@ namespace CodeWalker.GameFiles public Dat4SpeechData(RelFile rel) : base(rel) { } - public Dat4SpeechData(RelData d, BinaryReader br) : base(d) + public Dat4SpeechData(in TempRelData d, BinaryReader br) : base(in d) { br.BaseStream.Position--; //1 byte was read already (TypeID) + if ((TypeID == 4) && (d.Data.Length == 8)) + { + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + ContainerHash = br.ReadUInt32(); + } + } + + public Dat4SpeechData(in TempRelData d, ref SequenceReader br) : base(in d) + { + br.Rewind(1); //1 byte was read already (TypeID) + if ((TypeID == 4) && (d.Data.Length == 8)) { @@ -20464,21 +22412,21 @@ namespace CodeWalker.GameFiles } } - public override uint[] GetHashTableOffsets() + public override uint[]? GetHashTableOffsets() { switch (Type) { case Dat4SpeechType.Hash: - return new uint[] { 0 }; + return [0]; } return null; } - public override uint[] GetPackTableOffsets() + public override uint[]? GetPackTableOffsets() { switch (Type) { case Dat4SpeechType.Container: - return new uint[] { 4 }; + return [4]; } return null; } @@ -20488,9 +22436,9 @@ namespace CodeWalker.GameFiles switch (Type) { case Dat4SpeechType.Hash: - return GetBaseString() + ": " + Type.ToString() + ": " + Hash.ToString(); + return $"{GetBaseString()}: {Type}: {Hash}"; case Dat4SpeechType.Container: - return GetBaseString() + ": " + Type.ToString() + ": " + ContainerHash.ToString(); + return $"{GetBaseString()}: {Type}: {ContainerHash}"; } return GetBaseString(); } @@ -20524,7 +22472,7 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat10RelData(RelData d, BinaryReader br) : base(d) + public Dat10RelData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat10RelType)TypeID; @@ -20534,6 +22482,16 @@ namespace CodeWalker.GameFiles Flags = br.ReadUInt32(); } + public Dat10RelData(in TempRelData d, ref SequenceReader br) : base(in d) + { + Type = (Dat10RelType)TypeID; + + br.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + Flags = br.ReadUInt32(); + } + public void WriteTypeAndOffsetAndFlags(BinaryWriter bw) { var val = ((NameTableOffset & 0xFFFFFF) << 8) + TypeID; @@ -20543,11 +22501,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } - [TC(typeof(EXP))] public class Dat10SynthPresetVariable : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat10SynthPresetVariable : IMetaXmlItem { public MetaHash Name { get; set; } public float Value1 { get; set; } @@ -20561,13 +22520,21 @@ namespace CodeWalker.GameFiles Value1 = br.ReadSingle(); Value2 = br.ReadSingle(); } - public void Write(BinaryWriter bw) + + public Dat10SynthPresetVariable(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value1 = br.ReadSingle(); + Value2 = br.ReadSingle(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value1); bw.Write(Value2); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value1", FloatUtil.ToString(Value1)); @@ -20579,9 +22546,9 @@ namespace CodeWalker.GameFiles Value1 = Xml.GetChildFloatAttribute(node, "Value1", "value"); Value2 = Xml.GetChildFloatAttribute(node, "Value2", "value"); } - public override string ToString() + public override readonly string ToString() { - return Name.ToString() + ": " + Value1.ToString() + ", " + Value2.ToString(); + return $"{Name}: {Value1}, {Value2}"; } } [TC(typeof(EXP))] public class Dat10SynthPreset : Dat10RelData @@ -20594,15 +22561,36 @@ namespace CodeWalker.GameFiles Type = Dat10RelType.SynthPreset; TypeID = (byte)Type; } - public Dat10SynthPreset(RelData d, BinaryReader br) : base(d, br) + public Dat10SynthPreset(in TempRelData d, BinaryReader br) : base(in d, br) { VariableCount = br.ReadByte(); + if (VariableCount == 0) + { + Variables = []; + return; + } Variables = new Dat10SynthPresetVariable[VariableCount]; for (int i = 0; i < VariableCount; i++) { Variables[i] = new Dat10SynthPresetVariable(br); } } + + public Dat10SynthPreset(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + VariableCount = br.ReadByte(); + if (VariableCount == 0) + { + Variables = []; + return; + } + Variables = new Dat10SynthPresetVariable[VariableCount]; + for (int i = 0; i < VariableCount; i++) + { + Variables[i] = new Dat10SynthPresetVariable(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -20625,7 +22613,7 @@ namespace CodeWalker.GameFiles VariableCount = (byte)(Variables?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat10SynthVariable : IMetaXmlItem + [TC(typeof(EXP))] public struct Dat10SynthVariable : IMetaXmlItem { public MetaHash Name { get; set; } public float Value { get; set; } @@ -20637,12 +22625,19 @@ namespace CodeWalker.GameFiles Name = br.ReadUInt32(); Value = br.ReadSingle(); } - public void Write(BinaryWriter bw) + + public Dat10SynthVariable(ref SequenceReader br) + { + Name = br.ReadUInt32(); + Value = br.ReadSingle(); + } + + public readonly void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value); } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); @@ -20652,12 +22647,13 @@ namespace CodeWalker.GameFiles Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } - public override string ToString() + public override readonly string ToString() { - return Name.ToString() + ": " + Value.ToString(); + return $"{Name}: {Value}"; } } - [TC(typeof(EXP))] public class Dat10Synth : Dat10RelData + [TC(typeof(EXP))] + public class Dat10Synth : Dat10RelData { // limits hardcoded in the .exe public const int MaxStateBlocks = 64; @@ -20683,7 +22679,7 @@ namespace CodeWalker.GameFiles Type = Dat10RelType.Synth; TypeID = (byte)Type; } - public Dat10Synth(RelData d, BinaryReader br) : base(d, br) + public Dat10Synth(in TempRelData d, BinaryReader br) : base(in d, br) { BuffersCount = br.ReadInt32();//buffers count (4) (for synth_ambient_aircon_full) RegistersCount = br.ReadInt32();//registers count (21) @@ -20694,6 +22690,46 @@ namespace CodeWalker.GameFiles RuntimeCost = br.ReadInt32();//runtime cost (50) Bytecode = br.ReadBytes(BytecodeLength); ConstantsCount = br.ReadInt32(); //constants count (21) + if (ConstantsCount == 0) + { + Constants = []; + } + else + { + Constants = new float[ConstantsCount];//constants (floats) + for (int i = 0; i < ConstantsCount; i++) + { + Constants[i] = br.ReadSingle(); + } + } + + VariablesCount = br.ReadInt32(); //variables count (8) + if (VariablesCount == 0) + { + Variables = []; + } + else + { + Variables = new Dat10SynthVariable[VariablesCount];//variables + for (int i = 0; i < VariablesCount; i++) + { + Variables[i] = new Dat10SynthVariable(br); + } + } + + } + + public Dat10Synth(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + BuffersCount = br.ReadInt32();//buffers count (4) (for synth_ambient_aircon_full) + RegistersCount = br.ReadInt32();//registers count (21) + OutputsCount = br.ReadInt32();//outputs count (1) + OutputsIndices = br.ReadBytes(MaxOutputs).ToArray();//outputs indices (1, 0, 0, 0) + BytecodeLength = br.ReadInt32();//bytecode length (504) + StateBlocksCount = br.ReadInt32();//state blocks count (18) + RuntimeCost = br.ReadInt32();//runtime cost (50) + Bytecode = br.ReadBytes(BytecodeLength).ToArray(); + ConstantsCount = br.ReadInt32(); //constants count (21) Constants = new float[ConstantsCount];//constants (floats) for (int i = 0; i < ConstantsCount; i++) { @@ -20703,9 +22739,10 @@ namespace CodeWalker.GameFiles Variables = new Dat10SynthVariable[VariablesCount];//variables for (int i = 0; i < VariablesCount; i++) { - Variables[i] = new Dat10SynthVariable(br); + Variables[i] = new Dat10SynthVariable(ref br); } } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -21397,7 +23434,7 @@ namespace CodeWalker.GameFiles } catch (Exception e) // XmlMeta.GetHash throws an exception if the hash is not a valid hex number { - onError($"Invalid variable name '{str}': {e.Message}"); + onError($"Invalid variable name '{str}': {e}"); return 0; } } @@ -22411,7 +24448,7 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat15RelData(RelData d, BinaryReader br) : base(d) + public Dat15RelData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat15RelType)TypeID; @@ -22421,6 +24458,16 @@ namespace CodeWalker.GameFiles Flags = br.ReadUInt32(); } + public Dat15RelData(in TempRelData d, ref SequenceReader br) : base(in d) + { + Type = (Dat15RelType)TypeID; + + br.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + Flags = br.ReadUInt32(); + } + public void WriteTypeAndOffsetAndFlags(BinaryWriter bw) { var val = ((NameTableOffset & 0xFFFFFF) << 8) + TypeID; @@ -22430,7 +24477,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } @@ -22451,7 +24498,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.Patch; TypeID = (byte)Type; } - public Dat15Patch(RelData d, BinaryReader br) : base(d, br) + public Dat15Patch(in TempRelData d, BinaryReader br) : base(in d, br) { FadeIn = br.ReadInt16(); FadeOut = br.ReadInt16(); @@ -22461,12 +24508,44 @@ namespace CodeWalker.GameFiles ApplyVariable = br.ReadUInt32(); ApplySmoothRate = br.ReadSingle(); MixCategoriesCount = br.ReadByte(); - MixCategories = new Dat15PatchItem[MixCategoriesCount]; - for (int i = 0; i < MixCategoriesCount; i++) + if (MixCategoriesCount == 0) { - MixCategories[i] = new Dat15PatchItem(br); + MixCategories = []; + } + else + { + MixCategories = new Dat15PatchItem[MixCategoriesCount]; + for (int i = 0; i < MixCategoriesCount; i++) + { + MixCategories[i] = new Dat15PatchItem(br); + } } } + + public Dat15Patch(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + FadeIn = br.ReadInt16(); + FadeOut = br.ReadInt16(); + PreDelay = br.ReadSingle(); + Duration = br.ReadSingle(); + ApplyFactorCurve = br.ReadUInt32(); + ApplyVariable = br.ReadUInt32(); + ApplySmoothRate = br.ReadSingle(); + MixCategoriesCount = br.ReadByte(); + if (MixCategoriesCount == 0) + { + MixCategories = []; + } + else + { + MixCategories = new Dat15PatchItem[MixCategoriesCount]; + for (int i = 0; i < MixCategoriesCount; i++) + { + MixCategories[i] = new Dat15PatchItem(ref br); + } + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22512,24 +24591,27 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetCategoryHashes() { - var list = new List(); - if (MixCategories != null) + var mixCategories = MixCategories; + if (mixCategories is null) { - foreach (var item in MixCategories) - { - list.Add(item.Category); - } + return []; } - return list.ToArray(); + + var arr = new MetaHash[mixCategories.Length]; + for (int i = 0; i < mixCategories.Length; i++) + { + arr[i] = mixCategories[i].Category; + } + return arr; } public override MetaHash[] GetCurveHashes() { - return new[] { ApplyFactorCurve }; + return [ApplyFactorCurve]; } } [TC(typeof(EXP))] - public class Dat15PatchItem : IMetaXmlItem + public struct Dat15PatchItem : IMetaXmlItem { public MetaHash Category { get; set; } public short Volume { get; set; } @@ -22555,6 +24637,20 @@ namespace CodeWalker.GameFiles Unk10 = br.ReadByte(); DistanceRollOffScale = br.ReadSingle(); } + + public Dat15PatchItem(ref SequenceReader br) + { + Category = br.ReadUInt32(); + Volume = br.ReadInt16(); + Unk03 = br.ReadByte(); + LPFCutoff = br.ReadInt16(); + HPFCutoff = br.ReadInt16(); + Pitch = br.ReadInt16(); + Unk09 = br.ReadSingle(); + Unk10 = br.ReadByte(); + DistanceRollOffScale = br.ReadSingle(); + } + public void Write(BinaryWriter bw) { bw.Write(Category); @@ -22615,7 +24711,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.SceneState; TypeID = (byte)Type; } - public Dat15SceneState(RelData d, BinaryReader br) : base(d, br) + public Dat15SceneState(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadByte(); Items = new Dat151HashPair[ItemCount]; @@ -22624,6 +24720,17 @@ namespace CodeWalker.GameFiles Items[i] = new Dat151HashPair(br); } } + + public Dat15SceneState(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ItemCount = br.ReadByte(); + Items = new Dat151HashPair[ItemCount]; + for (int i = 0; i < ItemCount; i++) + { + Items[i] = new Dat151HashPair(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22669,7 +24776,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.Scene; TypeID = (byte)Type; } - public Dat15Scene(RelData d, BinaryReader br) : base(d, br) + public Dat15Scene(in TempRelData d, BinaryReader br) : base(in d, br) { OnStopScene = br.ReadUInt32(); PatchGroupsCount = br.ReadByte(); @@ -22679,6 +24786,18 @@ namespace CodeWalker.GameFiles PatchGroups[i] = new Dat15SceneItem(br); } } + + public Dat15Scene(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + OnStopScene = br.ReadUInt32(); + PatchGroupsCount = br.ReadByte(); + PatchGroups = new Dat15SceneItem[PatchGroupsCount]; + for (int i = 0; i < PatchGroupsCount; i++) + { + PatchGroups[i] = new Dat15SceneItem(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22719,7 +24838,7 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public class Dat15SceneItem : IMetaXmlItem + public struct Dat15SceneItem : IMetaXmlItem { public MetaHash Patch { get; set; } public MetaHash Group { get; set; } @@ -22731,6 +24850,13 @@ namespace CodeWalker.GameFiles Patch = br.ReadUInt32(); Group = br.ReadUInt32(); } + + public Dat15SceneItem(ref SequenceReader br) + { + Patch = br.ReadUInt32(); + Group = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Patch); @@ -22763,12 +24889,20 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.Group; TypeID = (byte)Type; } - public Dat15Group(RelData d, BinaryReader br) : base(d, br) + public Dat15Group(in TempRelData d, BinaryReader br) : base(in d, br) { ReferenceCount = br.ReadUInt32(); FadeTime = br.ReadSingle(); Map = br.ReadUInt32(); } + + public Dat15Group(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ReferenceCount = br.ReadUInt32(); + FadeTime = br.ReadSingle(); + Map = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22806,7 +24940,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.GroupList; TypeID = (byte)Type; } - public Dat15GroupList(RelData d, BinaryReader br) : base(d, br) + public Dat15GroupList(in TempRelData d, BinaryReader br) : base(in d, br) { GroupCount = br.ReadByte(); Groups = new MetaHash[GroupCount]; @@ -22815,6 +24949,17 @@ namespace CodeWalker.GameFiles Groups[i] = br.ReadUInt32(); } } + + public Dat15GroupList(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + GroupCount = br.ReadByte(); + Groups = new MetaHash[GroupCount]; + for (int i = 0; i < GroupCount; i++) + { + Groups[i] = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22854,7 +24999,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.DynamicMixModuleSettings; TypeID = (byte)Type; } - public Dat15DynamicMixModuleSettings(RelData d, BinaryReader br) : base(d, br) + public Dat15DynamicMixModuleSettings(in TempRelData d, BinaryReader br) : base(in d, br) { FadeIn = br.ReadUInt16();//0 FadeOut = br.ReadUInt16();//0 @@ -22862,6 +25007,16 @@ namespace CodeWalker.GameFiles Duration = br.ReadUInt32();//0 ModuleTypeSettings = br.ReadUInt32(); } + + public Dat15DynamicMixModuleSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + FadeIn = br.ReadUInt16();//0 + FadeOut = br.ReadUInt16();//0 + ApplyVariable = br.ReadUInt32(); + Duration = br.ReadUInt32();//0 + ModuleTypeSettings = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22907,7 +25062,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.SceneVariableModuleSettings; TypeID = (byte)Type; } - public Dat15SceneVariableModuleSettings(RelData d, BinaryReader br) : base(d, br) + public Dat15SceneVariableModuleSettings(in TempRelData d, BinaryReader br) : base(in d, br) { SceneVariable = br.ReadUInt32(); InputOutputCurve = br.ReadUInt32(); @@ -22918,6 +25073,19 @@ namespace CodeWalker.GameFiles Items[i] = br.ReadSingle(); } } + + public Dat15SceneVariableModuleSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + SceneVariable = br.ReadUInt32(); + InputOutputCurve = br.ReadUInt32(); + ItemCount = br.ReadByte(); + Items = new float[ItemCount]; + for (int i = 0; i < ItemCount; i++) + { + Items[i] = br.ReadSingle(); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -22961,21 +25129,20 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.SceneTransitionModuleSettings; TypeID = (byte)Type; } - public Dat15SceneTransitionModuleSettings(RelData d, BinaryReader br) : base(d, br) + public Dat15SceneTransitionModuleSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadByte(); Unk02 = br.ReadSingle(); Unk03 = br.ReadUInt32(); - - //byte ItemCount = br.ReadByte(); - //var Items = new MetaHash[ItemCount]; - //for (int i = 0; i < ItemCount; i++) - //{ - // Items[i] = br.ReadUInt32(); - //} - //if (ItemCount != 2) - //{ } } + + public Dat15SceneTransitionModuleSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadByte(); + Unk02 = br.ReadSingle(); + Unk03 = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23009,11 +25176,18 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.VehicleCollisionModuleSettings; TypeID = (byte)Type; } - public Dat15VehicleCollisionModuleSettings(RelData d, BinaryReader br) : base(d, br) + public Dat15VehicleCollisionModuleSettings(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadByte(); Unk02 = br.ReadUInt32(); } + + public Dat15VehicleCollisionModuleSettings(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadByte(); + Unk02 = br.ReadUInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23048,7 +25222,7 @@ namespace CodeWalker.GameFiles Type = Dat15RelType.GroupMap; TypeID = (byte)Type; } - public Dat15GroupMap(RelData d, BinaryReader br) : base(d, br) + public Dat15GroupMap(in TempRelData d, BinaryReader br) : base(in d, br) { ItemCount = br.ReadUInt16(); Items = new Dat151GroupMapItem[ItemCount]; @@ -23057,6 +25231,17 @@ namespace CodeWalker.GameFiles Items[i] = new Dat151GroupMapItem(br); } } + + public Dat15GroupMap(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + ItemCount = br.ReadUInt16(); + Items = new Dat151GroupMapItem[ItemCount]; + for (int i = 0; i < ItemCount; i++) + { + Items[i] = new Dat151GroupMapItem(ref br); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23104,6 +25289,13 @@ namespace CodeWalker.GameFiles Category = br.ReadUInt32(); MapToCategory = br.ReadUInt32(); } + + public Dat151GroupMapItem(ref SequenceReader br) + { + Category = br.ReadUInt32(); + MapToCategory = br.ReadUInt32(); + } + public void Write(BinaryWriter bw) { bw.Write(Category); @@ -23155,7 +25347,8 @@ namespace CodeWalker.GameFiles //BezierCurve = 17, } - [TC(typeof(EXP))] public class Dat16RelData : RelData + [TC(typeof(EXP))] + public class Dat16RelData : RelData { public Dat16RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -23167,7 +25360,7 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat16RelData(RelData d, BinaryReader br) : base(d) + public Dat16RelData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat16RelType)TypeID; @@ -23177,6 +25370,16 @@ namespace CodeWalker.GameFiles Flags = br.ReadUInt32(); } + public Dat16RelData(in TempRelData d, ref SequenceReader br) : base(in d) + { + Type = (Dat16RelType)TypeID; + + br.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + Flags = br.ReadUInt32(); + } + public void WriteTypeAndOffsetAndFlags(BinaryWriter bw) { var val = ((NameTableOffset & 0xFFFFFF) << 8) + TypeID; @@ -23186,11 +25389,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } - [TC(typeof(EXP))] public class Dat16ConstantCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16ConstantCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23201,12 +25405,20 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.ConstantCurve; TypeID = (byte)Type; } - public Dat16ConstantCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16ConstantCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); Value = br.ReadSingle(); } + + public Dat16ConstantCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + Value = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23230,7 +25442,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } } - [TC(typeof(EXP))] public class Dat16LinearCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16LinearCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23244,7 +25458,7 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.LinearCurve; TypeID = (byte)Type; } - public Dat16LinearCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16LinearCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); @@ -23253,6 +25467,17 @@ namespace CodeWalker.GameFiles Unk05 = br.ReadSingle(); Unk06 = br.ReadSingle(); } + + public Dat16LinearCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + Unk03 = br.ReadSingle(); + Unk04 = br.ReadSingle(); + Unk05 = br.ReadSingle(); + Unk06 = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23285,7 +25510,9 @@ namespace CodeWalker.GameFiles Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); } } - [TC(typeof(EXP))] public class Dat16LinearDbCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16LinearDbCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23299,7 +25526,7 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.LinearDbCurve; TypeID = (byte)Type; } - public Dat16LinearDbCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16LinearDbCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); @@ -23308,6 +25535,17 @@ namespace CodeWalker.GameFiles Unk05 = br.ReadSingle(); Unk06 = br.ReadSingle(); } + + public Dat16LinearDbCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + Unk03 = br.ReadSingle();//0 + Unk04 = br.ReadSingle();//0 + Unk05 = br.ReadSingle(); + Unk06 = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23340,7 +25578,9 @@ namespace CodeWalker.GameFiles Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); } } - [TC(typeof(EXP))] public class Dat16PiecewiseLinearCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16PiecewiseLinearCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23352,17 +25592,40 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.PiecewiseLinearCurve; TypeID = (byte)Type; } - public Dat16PiecewiseLinearCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16PiecewiseLinearCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); PointCount = br.ReadInt32(); + if (PointCount == 0) + { + Points = []; + return; + } Points = new Vector2[PointCount]; for (int i = 0; i < PointCount; i++) { Points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } } + + public Dat16PiecewiseLinearCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + PointCount = br.ReadInt32(); + if (PointCount == 0) + { + Points = []; + return; + } + Points = new Vector2[PointCount]; + for (int i = 0; i < PointCount; i++) + { + Points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23392,7 +25655,9 @@ namespace CodeWalker.GameFiles PointCount = Points?.Length ?? 0; } } - [TC(typeof(EXP))] public class Dat16EqualPowerCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16EqualPowerCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23403,12 +25668,20 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.EqualPowerCurve; TypeID = (byte)Type; } - public Dat16EqualPowerCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16EqualPowerCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); Flip = br.ReadInt32(); } + + public Dat16EqualPowerCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + Flip = br.ReadInt32(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23432,7 +25705,9 @@ namespace CodeWalker.GameFiles Flip = Xml.GetChildIntAttribute(node, "Flip", "value"); } } - [TC(typeof(EXP))] public class Dat16ValueTableCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16ValueTableCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23444,17 +25719,40 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.ValueTableCurve; TypeID = (byte)Type; } - public Dat16ValueTableCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16ValueTableCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); ValueCount = br.ReadInt32(); + if (ValueCount == 0) + { + Values = []; + return; + } Values = new float[ValueCount]; for (int i = 0; i < ValueCount; i++) { Values[i] = br.ReadSingle(); } } + + public Dat16ValueTableCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + ValueCount = br.ReadInt32(); + if (ValueCount == 0) + { + Values = []; + return; + } + Values = new float[ValueCount]; + for (int i = 0; i < ValueCount; i++) + { + Values[i] = br.ReadSingle(); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23483,7 +25781,9 @@ namespace CodeWalker.GameFiles ValueCount = (Values?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat16ExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16ExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23495,13 +25795,22 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.ExponentialCurve; TypeID = (byte)Type; } - public Dat16ExponentialCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16ExponentialCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); Flip = br.ReadInt32(); Exponent = br.ReadSingle(); } + + public Dat16ExponentialCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + Flip = br.ReadInt32(); + Exponent = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23528,7 +25837,9 @@ namespace CodeWalker.GameFiles Exponent = Xml.GetChildFloatAttribute(node, "Exponent", "value"); } } - [TC(typeof(EXP))] public class Dat16DecayingExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DecayingExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23539,12 +25850,20 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.DecayingExponentialCurve; TypeID = (byte)Type; } - public Dat16DecayingExponentialCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16DecayingExponentialCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); } + + public Dat16DecayingExponentialCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + HorizontalScaling = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23568,7 +25887,9 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16DecayingSquaredExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DecayingSquaredExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23579,12 +25900,20 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.DecayingSquaredExponentialCurve; TypeID = (byte)Type; } - public Dat16DecayingSquaredExponentialCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16DecayingSquaredExponentialCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); } + + public Dat16DecayingSquaredExponentialCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + HorizontalScaling = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23608,7 +25937,8 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16SineCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16SineCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23623,7 +25953,7 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.SineCurve; TypeID = (byte)Type; } - public Dat16SineCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16SineCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); @@ -23633,6 +25963,18 @@ namespace CodeWalker.GameFiles VerticalScaling = br.ReadSingle(); VerticalOffset = br.ReadSingle(); } + + public Dat16SineCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + StartPhase = br.ReadSingle(); + EndPhase = br.ReadSingle(); + Frequency = br.ReadSingle(); + VerticalScaling = br.ReadSingle(); + VerticalOffset = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23668,7 +26010,8 @@ namespace CodeWalker.GameFiles VerticalOffset = Xml.GetChildFloatAttribute(node, "VerticalOffset", "value"); } } - [TC(typeof(EXP))] public class Dat16OneOverXSquaredCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16OneOverXSquaredCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23679,12 +26022,20 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.OneOverXSquaredCurve; TypeID = (byte)Type; } - public Dat16OneOverXSquaredCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16OneOverXSquaredCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); } + + public Dat16OneOverXSquaredCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + HorizontalScaling = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23708,7 +26059,8 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16DefaultDistanceAttenuationCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16DefaultDistanceAttenuationCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23718,11 +26070,18 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.DefaultDistanceAttenuationCurve; TypeID = (byte)Type; } - public Dat16DefaultDistanceAttenuationCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16DefaultDistanceAttenuationCurve(in TempRelData d, BinaryReader br) : base(in d, br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); } + + public Dat16DefaultDistanceAttenuationCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23743,7 +26102,8 @@ namespace CodeWalker.GameFiles MaxInput = Xml.GetChildFloatAttribute(node, "MaxInput", "value"); } } - [TC(typeof(EXP))] public class Dat16DistanceAttenuationValueTableCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16DistanceAttenuationValueTableCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -23755,7 +26115,24 @@ namespace CodeWalker.GameFiles Type = Dat16RelType.DistanceAttenuationValueTableCurve; TypeID = (byte)Type; } - public Dat16DistanceAttenuationValueTableCurve(RelData d, BinaryReader br) : base(d, br) + public Dat16DistanceAttenuationValueTableCurve(in TempRelData d, BinaryReader br) : base(in d, br) + { + MinInput = br.ReadSingle(); + MaxInput = br.ReadSingle(); + ValueCount = br.ReadInt32(); + if (ValueCount == 0) + { + Values = []; + return; + } + Values = new float[ValueCount]; + for (int i = 0; i < ValueCount; i++) + { + Values[i] = br.ReadSingle(); + } + } + + public Dat16DistanceAttenuationValueTableCurve(in TempRelData d, ref SequenceReader br) : base(in d, ref br) { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); @@ -23766,6 +26143,7 @@ namespace CodeWalker.GameFiles Values[i] = br.ReadSingle(); } } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -23809,7 +26187,8 @@ namespace CodeWalker.GameFiles Category = 0, } - [TC(typeof(EXP))] public class Dat22RelData : RelData + [TC(typeof(EXP))] + public class Dat22RelData : RelData { public Dat22RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -23821,7 +26200,7 @@ namespace CodeWalker.GameFiles Type = type; TypeID = (byte)type; } - public Dat22RelData(RelData d, BinaryReader br) : base(d) + public Dat22RelData(in TempRelData d, BinaryReader br) : base(in d) { Type = (Dat22RelType)TypeID; @@ -23831,6 +26210,16 @@ namespace CodeWalker.GameFiles Flags = br.ReadUInt32(); } + public Dat22RelData(in TempRelData d, ref SequenceReader br) : base(in d) + { + Type = (Dat22RelType)TypeID; + + br.Rewind(1); //1 byte was read already (TypeID) + + NameTableOffset = ((br.ReadUInt32() >> 8) & 0xFFFFFF); + Flags = br.ReadUInt32(); + } + public void WriteTypeAndOffsetAndFlags(BinaryWriter bw) { var val = ((NameTableOffset & 0xFFFFFF) << 8) + TypeID; @@ -23840,11 +26229,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return GetBaseString() + ": " + Type.ToString(); + return $"{GetBaseString()}: {Type}"; } } - [TC(typeof(EXP))] public class Dat22Category : Dat22RelData + [TC(typeof(EXP))] + public class Dat22Category : Dat22RelData { public short Unk01 { get; set; } public short Volume { get; set; } @@ -23872,7 +26262,7 @@ namespace CodeWalker.GameFiles Type = Dat22RelType.Category; TypeID = (byte)Type; } - public Dat22Category(RelData d, BinaryReader br) : base(d, br) + public Dat22Category(in TempRelData d, BinaryReader br) : base(in d, br) { Unk01 = br.ReadInt16(); Volume = br.ReadInt16(); @@ -23899,6 +26289,35 @@ namespace CodeWalker.GameFiles SubCategories[i] = br.ReadUInt32(); } } + + public Dat22Category(in TempRelData d, ref SequenceReader br) : base(in d, ref br) + { + Unk01 = br.ReadInt16(); + Volume = br.ReadInt16(); + Unk03 = br.ReadInt16(); + LPFCutoff = br.ReadInt16(); + LPFCutoffCurve = br.ReadUInt32();//1757063444 + HPFCutoff = br.ReadInt16(); + HPFCutoffCurve = br.ReadUInt32();//741353067 + Unk08 = br.ReadInt16(); + Unk09 = br.ReadInt16(); + Unk10 = br.ReadInt16(); + Unk11 = br.ReadInt16(); + Unk12 = br.ReadInt16(); + Unk13 = br.ReadInt16(); + Unk14 = br.ReadInt16(); + Unk15 = br.ReadInt16(); + Unk16 = br.ReadInt16(); + Unk17 = br.ReadInt16(); + Unk18 = br.ReadByte(); + SubCategoryCount = br.ReadByte(); + SubCategories = new MetaHash[SubCategoryCount]; + for (int i = 0; i < SubCategoryCount; i++) + { + SubCategories[i] = br.ReadUInt32(); + } + } + public override void Write(BinaryWriter bw) { WriteTypeAndOffsetAndFlags(bw); @@ -24005,52 +26424,59 @@ namespace CodeWalker.GameFiles public static string GetXml(RelFile rel) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if ((rel != null) && (rel.RelDatasSorted != null)) + StringBuilder sb = StringBuilderPool.Get(); + try { - int indent = 0; - int cindent = 1; - var iindent = 2; - var name = "Dat" + ((uint)rel.RelType).ToString(); + sb.AppendLine(XmlHeader); - OpenTag(sb, indent, name); - - ValueTag(sb, cindent, "Version", rel.DataUnkVal.ToString()); - - if (rel.IsAudioConfig) + if ((rel != null) && (rel.RelDatas != null)) { - ValueTag(sb, cindent, "IsAudioConfig", "true"); - ValueTag(sb, cindent, "IndexStringFlags", rel.IndexStringFlags.ToString()); - } + int indent = 0; + int cindent = 1; + var iindent = 2; + var name = $"Dat{(uint)rel.RelType}"; - if (rel.NameTable != null) - { - OpenTag(sb, cindent, "ContainerPaths"); + OpenTag(sb, indent, name); - foreach (var ntval in rel.NameTable) + ValueTag(sb, cindent, "Version", rel.DataUnkVal.ToString()); + + if (rel.IsAudioConfig) { - StringTag(sb, iindent, "Item", ntval); + ValueTag(sb, cindent, "IsAudioConfig", "true"); + ValueTag(sb, cindent, "IndexStringFlags", rel.IndexStringFlags.ToString()); } - CloseTag(sb, cindent, "ContainerPaths"); + if (rel.NameTable != null) + { + OpenTag(sb, cindent, "ContainerPaths"); + + foreach (var ntval in rel.NameTable) + { + StringTag(sb, iindent, "Item", ntval); + } + + CloseTag(sb, cindent, "ContainerPaths"); + } + + OpenTag(sb, cindent, "Items"); + + foreach (var item in rel.RelDatasSorted) + { + GetXml(item, sb, iindent); + } + + CloseTag(sb, cindent, "Items"); + + CloseTag(sb, indent, name); + } - OpenTag(sb, cindent, "Items"); - - foreach (var item in rel.RelDatasSorted) - { - GetXml(item, sb, iindent); - } - - CloseTag(sb, cindent, "Items"); - - CloseTag(sb, indent, name); - + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } public static void GetXml(RelData item, StringBuilder sb, int iindent) @@ -24089,46 +26515,39 @@ namespace CodeWalker.GameFiles } var ntoffset = ""; - var dat151item = item as Dat151RelData; - if (dat151item != null) + if (item is Dat151RelData dat151item) { - ntoffset = " ntOffset=\"" + dat151item.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat151item.NameTableOffset}\""; } - var dat4config = item as Dat4ConfigData; - if (dat4config != null) + if (item is Dat4ConfigData dat4config) { - ntoffset = " ntOffset=\"" + dat4config.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat4config.NameTableOffset}\""; } - var dat4Speech = item as Dat4SpeechData; - if (dat4Speech != null) + if (item is Dat4SpeechData dat4Speech) { if (dat4Speech.Type == Dat4SpeechType.Container) { - ntoffset = " ntOffset=\"" + dat4Speech.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat4Speech.NameTableOffset}\""; } } - var dat10item = item as Dat10RelData; - if (dat10item != null) + if (item is Dat10RelData dat10item) { - ntoffset = " ntOffset=\"" + dat10item.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat10item.NameTableOffset}\""; } - var dat15item = item as Dat15RelData; - if (dat15item != null) + if (item is Dat15RelData dat15item) { - ntoffset = " ntOffset=\"" + dat15item.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat15item.NameTableOffset}\""; } - var dat16item = item as Dat16RelData; - if (dat16item != null) + if (item is Dat16RelData dat16item) { - ntoffset = " ntOffset=\"" + dat16item.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat16item.NameTableOffset}\""; } - var dat22item = item as Dat22RelData; - if (dat22item != null) + if (item is Dat22RelData dat22item) { - ntoffset = " ntOffset=\"" + dat22item.NameTableOffset.ToString() + "\""; + ntoffset = $" ntOffset=\"{dat22item.NameTableOffset}\""; } - OpenTag(sb, iindent, "Item type=\"" + typeid + "\"" + ntoffset); + OpenTag(sb, iindent, $"Item type=\"{typeid}\"{ntoffset}"); StringTag(sb, icindent, "Name", item.Name ?? RelXml.HashString(item.NameHash)); @@ -24283,38 +26702,31 @@ namespace CodeWalker.GameFiles itemslist.Add(rd); - var dat151data = rd as Dat151RelData; - if (dat151data != null) + if (rd is Dat151RelData dat151data) { dat151data.NameTableOffset = ntoffset; } - var dat4config = rd as Dat4ConfigData; - if (dat4config != null) + if (rd is Dat4ConfigData dat4config) { dat4config.NameTableOffset = ntoffset; } - var dat4speech = rd as Dat4SpeechData; - if (dat4speech != null) + if (rd is Dat4SpeechData dat4speech) { dat4speech.NameTableOffset = ntoffset; } - var dat10item = rd as Dat10RelData; - if (dat10item != null) + if (rd is Dat10RelData dat10item) { dat10item.NameTableOffset = ntoffset; } - var dat15item = rd as Dat15RelData; - if (dat15item != null) + if (rd is Dat15RelData dat15item) { dat15item.NameTableOffset = ntoffset; } - var dat16item = rd as Dat16RelData; - if (dat16item != null) + if (rd is Dat16RelData dat16item) { dat16item.NameTableOffset = ntoffset; } - var dat22item = rd as Dat22RelData; - if (dat22item != null) + if (rd is Dat22RelData dat22item) { dat22item.NameTableOffset = ntoffset; } @@ -24328,7 +26740,7 @@ namespace CodeWalker.GameFiles } - public static MetaHash GetHash(string str) + public static MetaHash GetHash(string? str) { if (string.IsNullOrEmpty(str)) { @@ -24336,18 +26748,19 @@ namespace CodeWalker.GameFiles } if (str.StartsWith("hash_", StringComparison.OrdinalIgnoreCase)) { - return Convert.ToUInt32(str.Substring(5), 16); + return uint.Parse(str.AsSpan(5), NumberStyles.HexNumber, CultureInfo.InvariantCulture); } else { - JenkIndex.Ensure(str); - return JenkHash.GenHash(str); + var hash = JenkHash.GenHash(str); + JenkIndex.Ensure(str, hash); + return hash; } } - public static T[] ReadItemArray(XmlNode node, string name) where T : IMetaXmlItem, new() + public static T[]? ReadItemArray(XmlNode node, string name) where T : IMetaXmlItem, new() { var vnode2 = node.SelectSingleNode(name); if (vnode2 != null) @@ -24355,7 +26768,7 @@ namespace CodeWalker.GameFiles var inodes = vnode2.SelectNodes("Item"); if (inodes?.Count > 0) { - var vlist = new List(); + using var vlist = new PooledList(); foreach (XmlNode inode in inodes) { var v = new T(); @@ -24367,7 +26780,7 @@ namespace CodeWalker.GameFiles } return null; } - public static MetaHash[] ReadHashItemArray(XmlNode node, string name) + public static MetaHash[]? ReadHashItemArray(XmlNode node, string name) { var vnode = node.SelectSingleNode(name); if (vnode != null) @@ -24375,7 +26788,7 @@ namespace CodeWalker.GameFiles var inodes = vnode.SelectNodes("Item"); if (inodes?.Count > 0) { - var vlist = new List(); + using var vlist = new PooledList(); foreach (XmlNode inode in inodes) { vlist.Add(GetHash(inode.InnerText)); diff --git a/CodeWalker.Core/GameFiles/FileTypes/VehiclesFile.cs b/CodeWalker.Core/GameFiles/FileTypes/VehiclesFile.cs index 0bf6ea2..9fd2493 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/VehiclesFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/VehiclesFile.cs @@ -1,4 +1,9 @@ -using CodeWalker.World; +using CodeWalker.Core.Utils; +using CodeWalker.World; +using Collections.Pooled; +using CommunityToolkit.Diagnostics; +using CommunityToolkit.HighPerformance; +using Microsoft.Extensions.ObjectPool; using SharpDX; using System; using System.Collections; @@ -16,11 +21,11 @@ namespace CodeWalker.GameFiles { public class VehiclesFile : GameFile, PackedFile { - private static XmlNameTable cachedNameTable = new NameTable(); + private static XmlNameTableThreadSafe cachedNameTable = new XmlNameTableThreadSafe(256); public string ResidentTxd { get; set; } - public List InitDatas { get; set; } - public Dictionary TxdRelationships { get; set; } + public PooledList InitDatas { get; set; } + public PooledDictionary TxdRelationships { get; set; } @@ -114,9 +119,14 @@ namespace CodeWalker.GameFiles private void LoadInitDatas(XmlDocument xmldoc) { - XmlNodeList items = xmldoc.SelectNodes("CVehicleModelInfo__InitDataList/InitDatas/Item | CVehicleModelInfo__InitDataList/InitDatas/item"); + XmlNodeList? items = xmldoc.SelectNodes("CVehicleModelInfo__InitDataList/InitDatas/Item | CVehicleModelInfo__InitDataList/InitDatas/item"); - InitDatas = new List(items.Count); + if (items is null) + { + return; + } + + InitDatas = new PooledList(items.Count); for (int i = 0; i < items.Count; i++) { var node = items[i]; @@ -130,10 +140,11 @@ namespace CodeWalker.GameFiles { if (!reader.IsStartElement() || reader.Name != "InitDatas") { - throw new InvalidOperationException("XmlReader is not at start element of \"InitDatas\""); + ThrowHelper.ThrowInvalidOperationException("XmlReader is not at start element of \"InitDatas\""); + return; } - InitDatas = new List(); + InitDatas = new PooledList(); reader.ReadStartElement("InitDatas"); @@ -152,52 +163,58 @@ namespace CodeWalker.GameFiles { if (reader.IsEmptyElement) { - TxdRelationships = new Dictionary(); reader.ReadStartElement(); return; } - TxdRelationships = new Dictionary(); + TxdRelationships ??= new PooledDictionary(); + TxdRelationships.Clear(); - foreach(var item in Xml.IterateItems(reader, "txdRelationships")) + foreach (var item in Xml.IterateItems(reader, "txdRelationships")) { var childstr = item.Element("child")?.Value; var parentstr = item.Element("parent")?.Value; - if ((!string.IsNullOrEmpty(parentstr)) && (!string.IsNullOrEmpty(childstr))) + if (!string.IsNullOrEmpty(parentstr) && !string.IsNullOrEmpty(childstr)) { - if (!TxdRelationships.ContainsKey(childstr)) - { - TxdRelationships.Add(childstr, parentstr); - } + _ = TxdRelationships.TryAdd(childstr, parentstr); } } } private void LoadTxdRelationships(XmlDocument xmldoc) { - XmlNodeList items = xmldoc.SelectNodes("CVehicleModelInfo__InitDataList/txdRelationships/Item | CVehicleModelInfo__InitDataList/txdRelationships/item"); + XmlNodeList? items = xmldoc.SelectNodes("CVehicleModelInfo__InitDataList/txdRelationships/Item | CVehicleModelInfo__InitDataList/txdRelationships/item"); + if (items is null || items.Count == 0) + { + TxdRelationships.Clear(); + return; + } - TxdRelationships = new Dictionary(); + TxdRelationships ??= new PooledDictionary(); + TxdRelationships.Clear(); for (int i = 0; i < items.Count; i++) { string parentstr = Xml.GetChildInnerText(items[i], "parent"); string childstr = Xml.GetChildInnerText(items[i], "child"); - if ((!string.IsNullOrEmpty(parentstr)) && (!string.IsNullOrEmpty(childstr))) + if (!string.IsNullOrEmpty(parentstr) && !string.IsNullOrEmpty(childstr)) { - if (!TxdRelationships.ContainsKey(childstr)) - { - TxdRelationships.Add(childstr, parentstr); - } - else - { } + _ = TxdRelationships.TryAdd(childstr, parentstr); } } } + + public override void Dispose() + { + InitDatas?.Dispose(); + TxdRelationships?.Dispose(); + base.Dispose(); + GC.SuppressFinalize(this); + } } - public class VehicleInitData + public record VehicleInitData { public string modelName { get; set; } //impaler3 @@ -455,7 +472,20 @@ namespace CodeWalker.GameFiles damageOffsetScale = Xml.GetChildFloatAttribute(reader, "damageOffsetScale"); break; case "diffuseTint": - diffuseTint = new Color4(Convert.ToUInt32(Xml.GetChildStringAttribute(reader, "diffuseTint", "value").Replace("0x", ""), 16)); ; + var str = Xml.GetChildStringAttribute(reader, "diffuseTint", "value").AsSpan(); + if (str.StartsWith("0x")) + { + str = str.Slice(2); + } + + if (str.IsEmpty) + { + diffuseTint = new Color4(); + } else + { + diffuseTint = new Color4(uint.Parse(str, System.Globalization.NumberStyles.HexNumber)); + } + break; case "steerWheelMult": steerWheelMult = Xml.GetChildFloatAttribute(reader, "steerWheelMult"); @@ -530,20 +560,25 @@ namespace CodeWalker.GameFiles break; } - var _drivers = new List(); - - foreach (var item in Xml.IterateItems(reader, "drivers")) + using (var _drivers = new PooledList()) { - var driver = new VehicleDriver(); - driver.driverName = item.Element("driverName")?.Value ?? string.Empty; - driver.npcName = item.Element("npcName")?.Value ?? string.Empty; - - if (!string.IsNullOrEmpty(driver.npcName) || !string.IsNullOrEmpty(driver.driverName)) + foreach (var item in Xml.IterateItems(reader, "drivers")) { - _drivers.Add(driver); + var driver = new VehicleDriver + { + DriverName = item.Element("driverName")?.Value ?? string.Empty, + NpcName = item.Element("npcName")?.Value ?? string.Empty, + }; + + + if (!string.IsNullOrEmpty(driver.NpcName) || !string.IsNullOrEmpty(driver.DriverName)) + { + _drivers.Add(driver); + } } + drivers = _drivers.ToArray(); } - drivers = _drivers.ToArray(); + break; case "doorsWithCollisionWhenClosed": doorsWithCollisionWhenClosed = GetStringItemArray(reader, "doorsWithCollisionWhenClosed"); @@ -602,7 +637,8 @@ namespace CodeWalker.GameFiles else if (reader.Name == "ThresholdMult") { pOverrideRagdollThreshold.ThresholdMult = Xml.GetChildFloatAttribute(reader, "ThresholdMult", "value"); - } else + } + else { break; } @@ -722,10 +758,11 @@ namespace CodeWalker.GameFiles for (int i = 0; i < items.Count; i++) { var item = items[i]; - var driver = new VehicleDriver(); - driver.driverName = Xml.GetChildInnerText(item, "driverName"); - driver.npcName = Xml.GetChildInnerText(item, "npcName"); - drivers[i] = driver; + drivers[i] = new VehicleDriver + { + DriverName = Xml.GetChildInnerText(item, "driverName"), + NpcName = Xml.GetChildInnerText(item, "npcName") + }; } } } @@ -760,26 +797,34 @@ namespace CodeWalker.GameFiles firstPersonDrivebyData = GetStringItemArray(node, "firstPersonDrivebyData"); } - private string[] GetStringItemArray(XmlNode node, string childName) + private string[]? GetStringItemArray(XmlNode node, string childName) { var cnode = node.SelectSingleNode(childName); - if (cnode == null) return null; + if (cnode == null) + return null; var items = cnode.SelectNodes("Item"); - if (items == null) return null; - getStringArrayList.Clear(); - foreach (XmlNode inode in items) + if (items == null) + return null; + + lock(getStringArrayList) { - var istr = inode.InnerText; - if (!string.IsNullOrEmpty(istr)) + getStringArrayList.Clear(); + foreach (XmlNode inode in items) { - getStringArrayList.Add(istr); + var istr = inode.InnerText; + if (!string.IsNullOrEmpty(istr)) + { + getStringArrayList.Add(istr); + } } + + if (getStringArrayList.Count == 0) + return null; + return getStringArrayList.ToArray(); } - if (getStringArrayList.Count == 0) return null; - return getStringArrayList.ToArray(); } - private string[] GetStringItemArray(XmlReader node, string childName) + private string[]? GetStringItemArray(XmlReader node, string childName) { if (node.IsEmptyElement) { @@ -807,70 +852,79 @@ namespace CodeWalker.GameFiles } } - private string[] GetStringArray(string ldastr, char delimiter) + private string[]? GetStringArray(string ldastr, char delimiter) { - var ldarr = ldastr?.Split(delimiter); - if (ldarr == null) return null; + if (string.IsNullOrEmpty(ldastr)) + { + return null; + } lock(getStringArrayList) { getStringArrayList.Clear(); - foreach (var ldstr in ldarr) + foreach (var ldstr in ldastr.EnumerateSplit(delimiter)) { - var ldt = ldstr?.Trim(); - if (!string.IsNullOrEmpty(ldt)) + var ldt = ldstr.Trim(); + if (!ldt.IsEmpty) { - getStringArrayList.Add(ldt); + getStringArrayList.Add(ldt.ToString()); } } - if (getStringArrayList.Count == 0) return null; + if (getStringArrayList.Count == 0) + return null; return getStringArrayList.ToArray(); } } - private string[] GetStringArray(XmlNode node, string childName, char delimiter) + private string[]? GetStringArray(XmlNode node, string childName, char delimiter) { var ldastr = Xml.GetChildInnerText(node, childName); return GetStringArray(ldastr, delimiter); } - private string[] GetStringArray(XmlReader reader, string childName, char delimiter) + private string[]? GetStringArray(XmlReader reader, string childName, char delimiter) { var ldastr = Xml.GetChildInnerText(reader, childName); return GetStringArray(ldastr, delimiter); } - [SkipLocalsInit] - private float[] GetFloatArray(string ldastr, char delimiter) + private float[]? GetFloatArray(string ldastr, char delimiter) { - var ldarr = ldastr?.Split(delimiter); - if (ldarr == null) return null; - Span floats = stackalloc float[ldarr.Length]; - var i = 0; - foreach (var ldstr in ldarr) + if (string.IsNullOrEmpty(ldastr)) { - var ldt = ldstr?.Trim(); - if (!string.IsNullOrEmpty(ldt) && FloatUtil.TryParse(ldt, out var f)) - { - floats[i] = f; - i++; - } + return []; } - if (i == 0) return null; + var ldarr = ldastr.Split(delimiter); + if (ldarr == null) + return []; - var result = new float[i]; + lock (getFloatArrayList) + { + getFloatArrayList.Clear(); + foreach (var ldstr in ldastr.EnumerateSplit(delimiter)) + { + var ldt = ldstr.Trim(); + if (!ldt.IsEmpty && FloatUtil.TryParse(ldt, out var f)) + { + getFloatArrayList.Add(f); + } + } - floats.Slice(0, i).CopyTo(result); + if (getFloatArrayList.Count == 0) + { + return []; + } - return result; + return getFloatArrayList.ToArray(); + } } - private float[] GetFloatArray(XmlNode node, string childName, char delimiter) + private float[]? GetFloatArray(XmlNode node, string childName, char delimiter) { var ldastr = Xml.GetChildInnerText(node, childName); return GetFloatArray(ldastr, delimiter); } - private float[] GetFloatArray(XmlReader reader, string childName, char delimiter) + private float[]? GetFloatArray(XmlReader reader, string childName, char delimiter) { var ldastr = Xml.GetChildInnerText(reader, childName); return GetFloatArray(ldastr, delimiter); @@ -884,282 +938,28 @@ namespace CodeWalker.GameFiles { return modelName; } - - public override bool Equals(object obj) - { - return obj is VehicleInitData data && - modelName == data.modelName && - txdName == data.txdName && - handlingId == data.handlingId && - gameName == data.gameName && - vehicleMakeName == data.vehicleMakeName && - expressionDictName == data.expressionDictName && - expressionName == data.expressionName && - animConvRoofDictName == data.animConvRoofDictName && - animConvRoofName == data.animConvRoofName && - animConvRoofWindowsAffected == data.animConvRoofWindowsAffected && - ptfxAssetName == data.ptfxAssetName && - audioNameHash == data.audioNameHash && - layout == data.layout && - coverBoundOffsets == data.coverBoundOffsets && - explosionInfo == data.explosionInfo && - scenarioLayout == data.scenarioLayout && - cameraName == data.cameraName && - aimCameraName == data.aimCameraName && - bonnetCameraName == data.bonnetCameraName && - povCameraName == data.povCameraName && - FirstPersonDriveByIKOffset.Equals(data.FirstPersonDriveByIKOffset) && - FirstPersonDriveByUnarmedIKOffset.Equals(data.FirstPersonDriveByUnarmedIKOffset) && - FirstPersonProjectileDriveByIKOffset.Equals(data.FirstPersonProjectileDriveByIKOffset) && - FirstPersonProjectileDriveByPassengerIKOffset.Equals(data.FirstPersonProjectileDriveByPassengerIKOffset) && - FirstPersonDriveByRightPassengerIKOffset.Equals(data.FirstPersonDriveByRightPassengerIKOffset) && - FirstPersonDriveByRightPassengerUnarmedIKOffset.Equals(data.FirstPersonDriveByRightPassengerUnarmedIKOffset) && - FirstPersonMobilePhoneOffset.Equals(data.FirstPersonMobilePhoneOffset) && - FirstPersonPassengerMobilePhoneOffset.Equals(data.FirstPersonPassengerMobilePhoneOffset) && - PovCameraOffset.Equals(data.PovCameraOffset) && - PovCameraVerticalAdjustmentForRollCage.Equals(data.PovCameraVerticalAdjustmentForRollCage) && - PovPassengerCameraOffset.Equals(data.PovPassengerCameraOffset) && - PovRearPassengerCameraOffset.Equals(data.PovRearPassengerCameraOffset) && - vfxInfoName == data.vfxInfoName && - shouldUseCinematicViewMode == data.shouldUseCinematicViewMode && - shouldCameraTransitionOnClimbUpDown == data.shouldCameraTransitionOnClimbUpDown && - shouldCameraIgnoreExiting == data.shouldCameraIgnoreExiting && - AllowPretendOccupants == data.AllowPretendOccupants && - AllowJoyriding == data.AllowJoyriding && - AllowSundayDriving == data.AllowSundayDriving && - AllowBodyColorMapping == data.AllowBodyColorMapping && - wheelScale == data.wheelScale && - wheelScaleRear == data.wheelScaleRear && - dirtLevelMin == data.dirtLevelMin && - dirtLevelMax == data.dirtLevelMax && - envEffScaleMin == data.envEffScaleMin && - envEffScaleMax == data.envEffScaleMax && - envEffScaleMin2 == data.envEffScaleMin2 && - envEffScaleMax2 == data.envEffScaleMax2 && - damageMapScale == data.damageMapScale && - damageOffsetScale == data.damageOffsetScale && - diffuseTint.Equals(data.diffuseTint) && - steerWheelMult == data.steerWheelMult && - HDTextureDist == data.HDTextureDist && - StructuralComparisons.StructuralEqualityComparer.Equals(lodDistances, data.lodDistances) && - minSeatHeight == data.minSeatHeight && - identicalModelSpawnDistance == data.identicalModelSpawnDistance && - maxNumOfSameColor == data.maxNumOfSameColor && - defaultBodyHealth == data.defaultBodyHealth && - pretendOccupantsScale == data.pretendOccupantsScale && - visibleSpawnDistScale == data.visibleSpawnDistScale && - trackerPathWidth == data.trackerPathWidth && - weaponForceMult == data.weaponForceMult && - frequency == data.frequency && - swankness == data.swankness && - maxNum == data.maxNum && - StructuralComparisons.StructuralEqualityComparer.Equals(flags, data.flags) && - type == data.type && - plateType == data.plateType && - dashboardType == data.dashboardType && - vehicleClass == data.vehicleClass && - wheelType == data.wheelType && - StructuralComparisons.StructuralEqualityComparer.Equals(trailers, data.trailers) && - StructuralComparisons.StructuralEqualityComparer.Equals(additionalTrailers, data.additionalTrailers) && - StructuralComparisons.StructuralEqualityComparer.Equals(drivers, data.drivers) && - StructuralComparisons.StructuralEqualityComparer.Equals(extraIncludes, data.extraIncludes) && - StructuralComparisons.StructuralEqualityComparer.Equals(doorsWithCollisionWhenClosed, data.doorsWithCollisionWhenClosed) && - StructuralComparisons.StructuralEqualityComparer.Equals(driveableDoors, data.driveableDoors) && - bumpersNeedToCollideWithMap == data.bumpersNeedToCollideWithMap && - needsRopeTexture == data.needsRopeTexture && - StructuralComparisons.StructuralEqualityComparer.Equals(requiredExtras, data.requiredExtras) && - StructuralComparisons.StructuralEqualityComparer.Equals(rewards, data.rewards) && - StructuralComparisons.StructuralEqualityComparer.Equals(cinematicPartCamera, data.cinematicPartCamera) && - NmBraceOverrideSet == data.NmBraceOverrideSet && - buoyancySphereOffset.Equals(data.buoyancySphereOffset) && - buoyancySphereSizeScale == data.buoyancySphereSizeScale && - EqualityComparer.Default.Equals(pOverrideRagdollThreshold, data.pOverrideRagdollThreshold) && - StructuralComparisons.StructuralEqualityComparer.Equals(firstPersonDrivebyData, data.firstPersonDrivebyData); - } - - public override int GetHashCode() - { - int hashCode = 1102137281; - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(modelName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(txdName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(handlingId); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(gameName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(vehicleMakeName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(expressionDictName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(expressionName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(animConvRoofDictName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(animConvRoofName); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(animConvRoofWindowsAffected); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ptfxAssetName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(audioNameHash); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(layout); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(coverBoundOffsets); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(explosionInfo); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(scenarioLayout); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(cameraName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(aimCameraName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(bonnetCameraName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(povCameraName); - hashCode = hashCode * -1521134295 + FirstPersonDriveByIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonDriveByUnarmedIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonProjectileDriveByIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonProjectileDriveByPassengerIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonDriveByRightPassengerIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonDriveByRightPassengerUnarmedIKOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonMobilePhoneOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + FirstPersonPassengerMobilePhoneOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + PovCameraOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + PovCameraVerticalAdjustmentForRollCage.GetHashCode(); - hashCode = hashCode * -1521134295 + PovPassengerCameraOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + PovRearPassengerCameraOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(vfxInfoName); - hashCode = hashCode * -1521134295 + shouldUseCinematicViewMode.GetHashCode(); - hashCode = hashCode * -1521134295 + shouldCameraTransitionOnClimbUpDown.GetHashCode(); - hashCode = hashCode * -1521134295 + shouldCameraIgnoreExiting.GetHashCode(); - hashCode = hashCode * -1521134295 + AllowPretendOccupants.GetHashCode(); - hashCode = hashCode * -1521134295 + AllowJoyriding.GetHashCode(); - hashCode = hashCode * -1521134295 + AllowSundayDriving.GetHashCode(); - hashCode = hashCode * -1521134295 + AllowBodyColorMapping.GetHashCode(); - hashCode = hashCode * -1521134295 + wheelScale.GetHashCode(); - hashCode = hashCode * -1521134295 + wheelScaleRear.GetHashCode(); - hashCode = hashCode * -1521134295 + dirtLevelMin.GetHashCode(); - hashCode = hashCode * -1521134295 + dirtLevelMax.GetHashCode(); - hashCode = hashCode * -1521134295 + envEffScaleMin.GetHashCode(); - hashCode = hashCode * -1521134295 + envEffScaleMax.GetHashCode(); - hashCode = hashCode * -1521134295 + envEffScaleMin2.GetHashCode(); - hashCode = hashCode * -1521134295 + envEffScaleMax2.GetHashCode(); - hashCode = hashCode * -1521134295 + damageMapScale.GetHashCode(); - hashCode = hashCode * -1521134295 + damageOffsetScale.GetHashCode(); - hashCode = hashCode * -1521134295 + diffuseTint.GetHashCode(); - hashCode = hashCode * -1521134295 + steerWheelMult.GetHashCode(); - hashCode = hashCode * -1521134295 + HDTextureDist.GetHashCode(); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(lodDistances); - hashCode = hashCode * -1521134295 + minSeatHeight.GetHashCode(); - hashCode = hashCode * -1521134295 + identicalModelSpawnDistance.GetHashCode(); - hashCode = hashCode * -1521134295 + maxNumOfSameColor.GetHashCode(); - hashCode = hashCode * -1521134295 + defaultBodyHealth.GetHashCode(); - hashCode = hashCode * -1521134295 + pretendOccupantsScale.GetHashCode(); - hashCode = hashCode * -1521134295 + visibleSpawnDistScale.GetHashCode(); - hashCode = hashCode * -1521134295 + trackerPathWidth.GetHashCode(); - hashCode = hashCode * -1521134295 + weaponForceMult.GetHashCode(); - hashCode = hashCode * -1521134295 + frequency.GetHashCode(); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(swankness); - hashCode = hashCode * -1521134295 + maxNum.GetHashCode(); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(flags); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(type); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(plateType); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(dashboardType); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(vehicleClass); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(wheelType); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(trailers); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(additionalTrailers); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(drivers); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(extraIncludes); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(doorsWithCollisionWhenClosed); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(driveableDoors); - hashCode = hashCode * -1521134295 + bumpersNeedToCollideWithMap.GetHashCode(); - hashCode = hashCode * -1521134295 + needsRopeTexture.GetHashCode(); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(requiredExtras); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(rewards); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(cinematicPartCamera); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(NmBraceOverrideSet); - hashCode = hashCode * -1521134295 + buoyancySphereOffset.GetHashCode(); - hashCode = hashCode * -1521134295 + buoyancySphereSizeScale.GetHashCode(); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(pOverrideRagdollThreshold); - hashCode = hashCode * -1521134295 + StructuralComparisons.StructuralEqualityComparer.GetHashCode(firstPersonDrivebyData); - return hashCode; - } - - public static bool operator ==(VehicleInitData left, VehicleInitData right) - { - return EqualityComparer.Default.Equals(left, right); - } - - public static bool operator !=(VehicleInitData left, VehicleInitData right) - { - return !(left == right); - } } - public class VehicleOverrideRagdollThreshold : IEquatable + public record VehicleOverrideRagdollThreshold : IEquatable { public int MinComponent { get; set; } public int MaxComponent { get; set; } public float ThresholdMult { get; set; } - public override bool Equals(object obj) - { - return obj is VehicleOverrideRagdollThreshold threshold && Equals(threshold); - } - - public bool Equals(VehicleOverrideRagdollThreshold other) - { - return MinComponent == other.MinComponent && - MaxComponent == other.MaxComponent && - ThresholdMult == other.ThresholdMult; - } - - public override int GetHashCode() - { - int hashCode = 1172526364; - hashCode = hashCode * -1521134295 + MinComponent.GetHashCode(); - hashCode = hashCode * -1521134295 + MaxComponent.GetHashCode(); - hashCode = hashCode * -1521134295 + ThresholdMult.GetHashCode(); - return hashCode; - } - public override string ToString() { - return MinComponent.ToString() + ", " + MaxComponent.ToString() + ", " + ThresholdMult.ToString(); - } - - public static bool operator ==(VehicleOverrideRagdollThreshold left, VehicleOverrideRagdollThreshold right) - { - return left.Equals(right); - } - - public static bool operator !=(VehicleOverrideRagdollThreshold left, VehicleOverrideRagdollThreshold right) - { - return !(left == right); + return $"{MinComponent}, {MaxComponent}, {ThresholdMult}"; } } - public class VehicleDriver : IEquatable + + public readonly record struct VehicleDriver : IEquatable { - public string driverName { get; set; } - public string npcName { get; set; } - - public override bool Equals(object obj) - { - return obj is VehicleDriver driver && Equals(driver); - } - - public bool Equals(VehicleDriver other) - { - return driverName == other.driverName && - npcName == other.npcName; - } - - public override int GetHashCode() - { - int hashCode = -1906737521; - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(driverName); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(npcName); - return hashCode; - } + public string DriverName { get; init; } + public string NpcName { get; init; } public override string ToString() { - return driverName + ", " + npcName; - } - - public static bool operator ==(VehicleDriver left, VehicleDriver right) - { - return left.Equals(right); - } - - public static bool operator !=(VehicleDriver left, VehicleDriver right) - { - return !(left == right); + return $"{DriverName}, {NpcName}"; } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/WatermapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/WatermapFile.cs index e98e8d4..e2d568c 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/WatermapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/WatermapFile.cs @@ -488,9 +488,9 @@ namespace CodeWalker.GameFiles { var h = GridWatermapInds[y * Width + x]; sb.Append(h.ToString()); - sb.Append(" "); + sb.Append(' '); } - sb.Append("\n"); + sb.Append('\n'); } return sb.ToString(); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YbnFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YbnFile.cs index ec05eba..2c46386 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YbnFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YbnFile.cs @@ -1,4 +1,5 @@ -using System; +using CommunityToolkit.Diagnostics; +using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; @@ -45,10 +46,10 @@ namespace CodeWalker.GameFiles RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -105,26 +106,34 @@ namespace CodeWalker.GameFiles public static string GetXml(YbnFile ybn) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - var name = "BoundsFile"; - OpenTag(sb, 0, name); - - if (ybn?.Bounds != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - Bounds.WriteXmlNode(ybn.Bounds, sb, 1); + sb.AppendLine(XmlHeader); + + var name = "BoundsFile"; + OpenTag(sb, 0, name); + + if (ybn?.Bounds != null) + { + Bounds.WriteXmlNode(ybn.Bounds, sb, 1); + } + + CloseTag(sb, 0, name); + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - CloseTag(sb, 0, name); - - return sb.ToString(); } public static string FormatBoundMaterialColour(BoundMaterialColour c) //for use with WriteItemArray { - return c.R.ToString() + ", " + c.G.ToString() + ", " + c.B.ToString() + ", " + c.A.ToString(); + return $"{c.R}, {c.G}, {c.B}, {c.A}"; } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YcdFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YcdFile.cs index 89a58b4..e52a0a6 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YcdFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YcdFile.cs @@ -38,13 +38,13 @@ namespace CodeWalker.GameFiles //Hash = entry.ShortNameHash; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } - + try { using ResourceDataReader rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YddFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YddFile.cs index 8acbfcf..8609ebd 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YddFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YddFile.cs @@ -31,16 +31,26 @@ namespace CodeWalker.GameFiles Loaded = true; } + + public async Task LoadAsync(byte[] data) + { + //direct load from a raw, compressed ydd file + + await RpfFile.LoadResourceFileAsync(this, data, 165); + + Loaded = true; + } + public void Load(byte[] data, RpfFileEntry entry) { Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -99,12 +109,8 @@ namespace CodeWalker.GameFiles return data; } - new public long MemoryUsage { - get { - return DrawableDict.MemoryUsage; - } - } - + public long PhysicalMemoryUsage => DrawableDict.PhysicalMemoryUsage; + public long VirtualMemoryUsage => DrawableDict.VirtualMemoryUsage; } @@ -112,18 +118,24 @@ namespace CodeWalker.GameFiles public class YddXml : MetaXmlBase { - public static string GetXml(YddFile ydd, string outputFolder = "") { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (ydd?.DrawableDict != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - DrawableDictionary.WriteXmlNode(ydd.DrawableDict, sb, 0, outputFolder); - } + sb.AppendLine(XmlHeader); - return sb.ToString(); + if (ydd?.DrawableDict != null) + { + DrawableDictionary.WriteXmlNode(ydd.DrawableDict, sb, 0, outputFolder); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); + } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YdrFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YdrFile.cs index 213fffd..9903d09 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YdrFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YdrFile.cs @@ -27,16 +27,26 @@ namespace CodeWalker.GameFiles Loaded = true; } + + public async Task LoadAsync(byte[] data) + { + //direct load from a raw, compressed ydr file + + await RpfFile.LoadResourceFileAsync(this, data, 165); + + Loaded = true; + } + public void Load(byte[] data, RpfFileEntry entry) { Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -70,13 +80,8 @@ namespace CodeWalker.GameFiles return data; } - new public long MemoryUsage - { - get - { - return Drawable.MemoryUsage; - } - } + public long PhysicalMemoryUsage => Drawable.PhysicalMemoryUsage; + public long VirtualMemoryUsage => Drawable.VirtualMemoryUsage; } @@ -84,20 +89,25 @@ namespace CodeWalker.GameFiles public class YdrXml : MetaXmlBase { - public static string GetXml(YdrFile ydr, string outputFolder = "") { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (ydr?.Drawable != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - Drawable.WriteXmlNode(ydr.Drawable, sb, 0, outputFolder); + sb.AppendLine(XmlHeader); + + if (ydr?.Drawable != null) + { + Drawable.WriteXmlNode(ydr.Drawable, sb, 0, outputFolder); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } - } public class XmlYdr diff --git a/CodeWalker.Core/GameFiles/FileTypes/YedFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YedFile.cs index d236e70..5a37092 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YedFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YedFile.cs @@ -35,10 +35,10 @@ namespace CodeWalker.GameFiles //Hash = entry.ShortNameHash; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } try diff --git a/CodeWalker.Core/GameFiles/FileTypes/YfdFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YfdFile.cs index 9bfb7ba..49de8a8 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YfdFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YfdFile.cs @@ -30,13 +30,13 @@ namespace CodeWalker.GameFiles //Hash = entry.ShortNameHash; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } - + try { using var rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YftFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YftFile.cs index 4283bef..35d2600 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YftFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YftFile.cs @@ -34,10 +34,10 @@ namespace CodeWalker.GameFiles Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -68,7 +68,8 @@ namespace CodeWalker.GameFiles return data; } - + public long PhysicalMemoryUsage => Fragment.Drawable.PhysicalMemoryUsage; + public long VirtualMemoryUsage => Fragment.Drawable.VirtualMemoryUsage; } @@ -80,17 +81,23 @@ namespace CodeWalker.GameFiles public static string GetXml(YftFile yft, string outputFolder = "") { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (yft?.Fragment != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - FragType.WriteXmlNode(yft.Fragment, sb, 0, outputFolder); + sb.AppendLine(XmlHeader); + + if (yft?.Fragment != null) + { + FragType.WriteXmlNode(yft.Fragment, sb, 0, outputFolder); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } - } public class XmlYft diff --git a/CodeWalker.Core/GameFiles/FileTypes/YldFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YldFile.cs index a849a14..94b429a 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YldFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YldFile.cs @@ -34,13 +34,13 @@ namespace CodeWalker.GameFiles //Hash = entry.ShortNameHash; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } - + try { using var rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 1cb19d9..c7ad1bf 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -9,3601 +9,3559 @@ using System.Text; using System.Threading.Tasks; using CodeWalker.Core.Utils; using CodeWalker.World; +using System.Diagnostics.CodeAnalysis; +using CommunityToolkit.HighPerformance; +using Collections.Pooled; +using System.Threading; -namespace CodeWalker.GameFiles +namespace CodeWalker.GameFiles; + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapFile : GameFile, PackedFile { - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapFile : GameFile, PackedFile + public Meta Meta { get; set; } + public PsoFile Pso { get; set; } + public RbfFile Rbf { get; set; } + + public CMapData _CMapData; + public CMapData CMapData { get => _CMapData; set => _CMapData = value; } + + public CEntityDef[]? CEntityDefs { get; set; } + public CMloInstanceDef[]? CMloInstanceDefs { get; set; } + public CCarGen[]? CCarGens { get; set; } + public CTimeCycleModifier[]? CTimeCycleModifiers { get; set; } + public MetaHash[] physicsDictionaries { get; set; } + + public BoxOccluder[] CBoxOccluders { get; set; } + public OccludeModel[] COccludeModels { get; set; } + + + public string[] Strings { get; set; } + public YmapEntityDef[] AllEntities { get; set; } = []; + public YmapEntityDef[] RootEntities { get; set; } = []; + public YmapEntityDef[] MloEntities { get; set; } = []; + + private WeakReference parent = new WeakReference(null); + + public YmapFile? Parent { - - public Meta Meta { get; set; } - public PsoFile Pso { get; set; } - public RbfFile Rbf { get; set; } - - public CMapData _CMapData; - - public CMapData CMapData { get { return _CMapData; } set { _CMapData = value; } } - public CEntityDef[] CEntityDefs { get; set; } - public CMloInstanceDef[] CMloInstanceDefs { get; set; } - public CCarGen[] CCarGens { get; set; } - public CTimeCycleModifier[] CTimeCycleModifiers { get; set; } - public MetaHash[] physicsDictionaries { get; set; } - - public BoxOccluder[] CBoxOccluders { get; set; } - public OccludeModel[] COccludeModels { get; set; } - - - public string[] Strings { get; set; } - public YmapEntityDef[] AllEntities; - public YmapEntityDef[] RootEntities; - public YmapEntityDef[] MloEntities; - - public YmapFile Parent { get; set; } - public YmapFile[] ChildYmaps = null; - public bool MergedWithParent = false; - - public bool IsScripted { get { return (_CMapData.flags & 1) > 0; } } - - public YmapGrassInstanceBatch[] GrassInstanceBatches { get; set; } - public YmapPropInstanceBatch[] PropInstanceBatches { get; set; } - - public YmapDistantLODLights DistantLODLights { get; set; } - - public YmapLODLights LODLights { get; set; } - - public YmapTimeCycleModifier[] TimeCycleModifiers { get; set; } - - public YmapCarGen[] CarGenerators { get; set; } - - public YmapBoxOccluder[] BoxOccluders { get; set; } - public YmapOccludeModel[] OccludeModels { get; set; } - - - //fields used by the editor: - public bool HasChanged { get; set; } = false; - public List SaveWarnings = null; - public bool LodManagerUpdate = false; //forces the LOD manager to refresh this ymap when rendering - public YmapEntityDef[] LodManagerOldEntities = null; //when entities are removed, need the old ones to remove from lod manager - - - public YmapFile() : base(null, GameFileType.Ymap) + get { + if (!parent.TryGetTarget(out var target)) + { + return null; + } + + return target; } - public YmapFile(RpfFileEntry entry) : base(entry, GameFileType.Ymap) + set { - RpfFileEntry = entry; + parent.SetTarget(value); } + } + public YmapFile[]? ChildYmaps { get; set; } + public bool MergedWithParent = false; - public void Load(byte[] data) + public bool IsScripted => (_CMapData.flags & 1) > 0; + + public YmapGrassInstanceBatch[] GrassInstanceBatches { get; set; } + public YmapPropInstanceBatch[] PropInstanceBatches { get; set; } + + public YmapDistantLODLights DistantLODLights { get; set; } + + public YmapLODLights LODLights { get; set; } + + public YmapTimeCycleModifier[] TimeCycleModifiers { get; set; } + + public YmapCarGen[] CarGenerators { get; set; } + + public YmapBoxOccluder[] BoxOccluders { get; set; } + public YmapOccludeModel[] OccludeModels { get; set; } + + + //fields used by the editor: + public bool HasChanged { get; set; } = false; + public List? SaveWarnings = null; + public bool LodManagerUpdate = false; //forces the LOD manager to refresh this ymap when rendering + public YmapEntityDef[]? LodManagerOldEntities = null; //when entities are removed, need the old ones to remove from lod manager + + + public YmapFile() : base(null, GameFileType.Ymap) + { + } + public YmapFile(RpfFileEntry entry) : base(entry, GameFileType.Ymap) + { + RpfFileEntry = entry; + } + + public void Load(byte[] data) + { + //direct load from a raw, compressed ymap file (openIV-compatible format) + + RpfFile.LoadResourceFile(this, data, 2); + + Loaded = true; + } + + public async ValueTask LoadAsync(byte[] data) + { + await RpfFile.LoadResourceFileAsync(this, data, 2); + + Loaded = true; + } + + public void Load(byte[] data, RpfFileEntry entry) + { + Name = entry.Name; + RpfFileEntry = entry; + + if (entry is not RpfResourceFileEntry resentry) { - //direct load from a raw, compressed ymap file (openIV-compatible format) - - RpfFile.LoadResourceFile(this, data, 2); - + NonMetaLoad(data); Loaded = true; + return; } - public void Load(byte[] data, RpfFileEntry entry) + using var rd = new ResourceDataReader(resentry, data); + + Meta = rd.ReadBlock();//maybe null this after load to reduce memory consumption? + + + + CMapData = MetaTypes.GetTypedData(Meta, MetaName.CMapData); + + + + Strings = MetaTypes.GetStrings(Meta) ?? Array.Empty(); + + foreach(var str in Strings) { - Name = entry.Name; - RpfFileEntry = entry; + JenkIndex.Ensure(str); //just shove them in there + } - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) - { - NonMetaLoad(data); - Loaded = true; - return; - } + physicsDictionaries = MetaTypes.GetHashArray(Meta, in _CMapData.physicsDictionaries) ?? Array.Empty(); - using var rd = new ResourceDataReader(resentry, data); - Meta = rd.ReadBlock();//maybe null this after load to reduce memory consumption? + EnsureEntities(); //load all the entity data and create the YmapEntityDefs + + EnsureInstances(); + + EnsureLODLights(); + + EnsureDistantLODLights(); + + EnsureTimeCycleModifiers(); + + EnsureCarGens(); + + EnsureBoxOccluders(); + + EnsureOccludeModels(); + + EnsureContainerLods(); + + + #region data block test and old code + + //foreach (var block in Meta.DataBlocks) + //{ + // switch (block.StructureNameHash) + // { + // case (MetaName)MetaTypeName.STRING: + // case (MetaName)MetaTypeName.POINTER: + // case (MetaName)MetaTypeName.HASH: + // case (MetaName)MetaTypeName.UINT: + // case (MetaName)MetaTypeName.VECTOR3: //distant lod lights uses this + // case MetaName.CMapData: + // case MetaName.CEntityDef: + // case MetaName.CTimeCycleModifier: //these sections are handled already + // case MetaName.CCarGen: + // case MetaName.CLightAttrDef: + // case MetaName.CMloInstanceDef: + // case MetaName.CExtensionDefDoor: + // case MetaName.CExtensionDefLightEffect: + // case MetaName.CExtensionDefSpawnPointOverride: + // case MetaName.rage__fwGrassInstanceListDef: //grass instance buffer + // case MetaName.rage__fwGrassInstanceListDef__InstanceData: //grass instance buffer data + // break; + // case MetaName.PhVerletClothCustomBounds: //these sections still todo.. + // case MetaName.SectionUNKNOWN1: + // case MetaName.SectionUNKNOWN5://occlusion vertex data container + // case MetaName.SectionUNKNOWN7://occlusion related? + // break; + // case (MetaName)17: //vertex data - occlusion related - SectionUNKNOWN5 + // break; + // case (MetaName)33: //what is this? maybe lodlights related + // break; + // default: + // break; + // } + //} - CMapData = MetaTypes.GetTypedData(Meta, MetaName.CMapData); + //MetaTypes.ParseMetaData(Meta); - - - Strings = MetaTypes.GetStrings(Meta); - if (Strings != null) - { - foreach (string str in Strings) - { - JenkIndex.Ensure(str); //just shove them in there - } - } - - physicsDictionaries = MetaTypes.GetHashArray(Meta, _CMapData.physicsDictionaries); - - - EnsureEntities(Meta); //load all the entity data and create the YmapEntityDefs - - EnsureInstances(Meta); - - EnsureLODLights(Meta); - - EnsureDistantLODLights(Meta); - - EnsureTimeCycleModifiers(Meta); - - EnsureCarGens(Meta); - - EnsureBoxOccluders(Meta); - - EnsureOccludeModels(Meta); - - EnsureContainerLods(Meta); - - - #region data block test and old code - - //foreach (var block in Meta.DataBlocks) - //{ - // switch (block.StructureNameHash) - // { - // case (MetaName)MetaTypeName.STRING: - // case (MetaName)MetaTypeName.POINTER: - // case (MetaName)MetaTypeName.HASH: - // case (MetaName)MetaTypeName.UINT: - // case (MetaName)MetaTypeName.VECTOR3: //distant lod lights uses this - // case MetaName.CMapData: - // case MetaName.CEntityDef: - // case MetaName.CTimeCycleModifier: //these sections are handled already - // case MetaName.CCarGen: - // case MetaName.CLightAttrDef: - // case MetaName.CMloInstanceDef: - // case MetaName.CExtensionDefDoor: - // case MetaName.CExtensionDefLightEffect: - // case MetaName.CExtensionDefSpawnPointOverride: - // case MetaName.rage__fwGrassInstanceListDef: //grass instance buffer - // case MetaName.rage__fwGrassInstanceListDef__InstanceData: //grass instance buffer data - // break; - // case MetaName.PhVerletClothCustomBounds: //these sections still todo.. - // case MetaName.SectionUNKNOWN1: - // case MetaName.SectionUNKNOWN5://occlusion vertex data container - // case MetaName.SectionUNKNOWN7://occlusion related? - // break; - // case (MetaName)17: //vertex data - occlusion related - SectionUNKNOWN5 - // break; - // case (MetaName)33: //what is this? maybe lodlights related - // break; - // default: - // break; - // } - //} - - - - //MetaTypes.ParseMetaData(Meta); - - //string shortname = resentry.Name.Substring(0, resentry.Name.LastIndexOf('.')); - //uint namehash = JenkHash.GenHash(shortname); + //string shortname = resentry.Name.Substring(0, resentry.Name.LastIndexOf('.')); + //uint namehash = JenkHash.GenHash(shortname); - //CLightAttrDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CLightAttrDef); - //if (CLightAttrDefs != null) - //{ } + //CLightAttrDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CLightAttrDef); + //if (CLightAttrDefs != null) + //{ } - //var unk5s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN5); - //if (unk5s != null) //used in occlusion ymaps - //{ - // foreach (var unk5 in unk5s) - // { - // if ((unk5.verts.Ptr > 0) && (unk5.verts.Ptr <= (ulong)Meta.DataBlocks.Length)) - // { - // var indicesoffset = unk5.numVertsInBytes; - // var datablock = Meta.DataBlocks[((int)unk5.verts.Ptr) - 1]; - // if (datablock != null) - // { }//vertex data... occlusion mesh? - // } - // } - //} + //var unk5s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN5); + //if (unk5s != null) //used in occlusion ymaps + //{ + // foreach (var unk5 in unk5s) + // { + // if ((unk5.verts.Ptr > 0) && (unk5.verts.Ptr <= (ulong)Meta.DataBlocks.Length)) + // { + // var indicesoffset = unk5.numVertsInBytes; + // var datablock = Meta.DataBlocks[((int)unk5.verts.Ptr) - 1]; + // if (datablock != null) + // { }//vertex data... occlusion mesh? + // } + // } + //} - //var unk7s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN7); - //if (unk7s != null) - //{ } //used in occlusion ymaps + //var unk7s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN7); + //if (unk7s != null) + //{ } //used in occlusion ymaps - //var unk10s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN10); - //if (unk10s != null) - //{ } //entity pointer array.. + //var unk10s = MetaTypes.GetTypedDataArray(Meta, MetaName.SectionUNKNOWN10); + //if (unk10s != null) + //{ } //entity pointer array.. - //CDoors = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefDoor); - //if (CDoors != null) - //{ } //needs work - doors can be different types? not enough bytes for one + //CDoors = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefDoor); + //if (CDoors != null) + //{ } //needs work - doors can be different types? not enough bytes for one - //CExtLightEffects = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefLightEffect); - //if (CExtLightEffects != null) - //{ } + //CExtLightEffects = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefLightEffect); + //if (CExtLightEffects != null) + //{ } - //CSpawnOverrides = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefSpawnPointOverride); - //if (CSpawnOverrides != null) - //{ } + //CSpawnOverrides = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefSpawnPointOverride); + //if (CSpawnOverrides != null) + //{ } - #endregion + #endregion //#if !DEBUG // Meta = null; //this object is required for XML conversion! can't just let go of it here //#endif + } + + + + private void NonMetaLoad(byte[] data) + { + Console.WriteLine($"Loading NonMeta ymap {RpfFileEntry.Path}"); + //non meta not supported yet! but see what's in there... + if (RbfFile.IsRBF(data.AsSpan(0, 4))) + { + Rbf = new RbfFile(); + Rbf.Load(data); + } + else if (PsoFile.IsPSO(data.AsSpan(0, 4))) + { + Pso = new PsoFile(); + Pso.Load(data); + //PsoTypes.EnsurePsoTypes(Pso); + } + else + { + } + + } + + + + private void EnsureEntities() + { + //CMloInstanceDefs = MetaTypes.ConvertDataArray(Meta, MetaName.CMloInstanceDef, CMapData.entities); + CMloInstanceDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CMloInstanceDef) ?? []; + + //var eptrs = MetaTypes.GetPointerArray(Meta, _CMapData.entities); + //CEntityDefs = MetaTypes.ConvertDataArray(Meta, MetaName.CEntityDef, CMapData.entities); + CEntityDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CEntityDef) ?? []; + + int instcount = CEntityDefs.Length + CMloInstanceDefs.Length; + + if (instcount > 0) + { + + //build the entity hierarchy. + List roots = new List(instcount); + List alldefs = new List(instcount); + List mlodefs = null; + + if (CEntityDefs.Length > 0) + { + for (int i = 0; i < CEntityDefs.Length; i++) + { + YmapEntityDef d = new YmapEntityDef(this, i, CEntityDefs[i]); + alldefs.Add(d); + } + } + if (CMloInstanceDefs.Length > 0) + { + mlodefs = new List(CMloInstanceDefs.Length); + for (int i = 0; i < CMloInstanceDefs.Length; i++) + { + YmapEntityDef d = new YmapEntityDef(this, i, CMloInstanceDefs[i]); + uint[] defentsets = MetaTypes.GetUintArray(Meta, in CMloInstanceDefs[i].defaultEntitySets); + if (d.MloInstance is not null) + { + d.MloInstance.defaultEntitySets = defentsets; + } + alldefs.Add(d); + mlodefs.Add(d); + } + } + + + for (int i = 0; i < alldefs.Count; i++) + { + YmapEntityDef d = alldefs[i]; + int pind = d._CEntityDef.parentIndex; + bool isroot = false; + if ((pind < 0) || (pind >= alldefs.Count) || d.LodInParentYmap) + { + isroot = true; + } + else + { + YmapEntityDef p = alldefs[pind]; + if ((p._CEntityDef.lodLevel <= d._CEntityDef.lodLevel) || + ((p._CEntityDef.lodLevel == rage__eLodType.LODTYPES_DEPTH_ORPHANHD) && + (d._CEntityDef.lodLevel != rage__eLodType.LODTYPES_DEPTH_ORPHANHD))) + { + isroot = true; + p = null; + } + } + + if (isroot) + { + roots.Add(d); + } + else + { + YmapEntityDef p = alldefs[pind]; + p.AddChild(d); + } + } + for (int i = 0; i < alldefs.Count; i++) + { + alldefs[i].ChildListToArray(); + } + + AllEntities = alldefs.ToArray(); + RootEntities = roots.ToArray(); + MloEntities = mlodefs?.ToArray() ?? Array.Empty(); + + foreach(var ent in AllEntities) + { + ent.Extensions = MetaTypes.GetExtensions(Meta, in ent._CEntityDef.extensions) ?? Array.Empty(); + } + } + + } + + private void EnsureInstances() + { + if (_CMapData.instancedData.GrassInstanceList.Count1 != 0) + { + rage__fwGrassInstanceListDef[] batches = MetaTypes.ConvertDataArray(Meta, MetaName.rage__fwGrassInstanceListDef, in _CMapData.instancedData.GrassInstanceList) ?? Array.Empty(); + + + if (batches.Length == 0) + return; + + YmapGrassInstanceBatch[] gbatches = new YmapGrassInstanceBatch[batches.Length]; + for (int i = 0; i < batches.Length; i++) + { + var batch = batches[i]; + rage__fwGrassInstanceListDef__InstanceData[] instdatas = MetaTypes.ConvertDataArray(Meta, MetaName.rage__fwGrassInstanceListDef__InstanceData, in batch.InstanceList); + YmapGrassInstanceBatch gbatch = new YmapGrassInstanceBatch(); + gbatch.Ymap = this; + gbatch.Batch = batch; + gbatch.Instances = instdatas; + gbatch.Position = (batch.BatchAABB.min.XYZ() + batch.BatchAABB.max.XYZ()) * 0.5f; + gbatch.Radius = (batch.BatchAABB.max.XYZ() - gbatch.Position).Length(); + gbatch.AABBMin = (batch.BatchAABB.min.XYZ()); + gbatch.AABBMax = (batch.BatchAABB.max.XYZ()); + gbatches[i] = gbatch; + } + GrassInstanceBatches = gbatches; + } + if (_CMapData.instancedData.PropInstanceList.Count1 != 0) + { + } + } + + private void EnsureLODLights() + { + if (_CMapData.LODLightsSOA.direction.Count1 != 0) + { + var soa = _CMapData.LODLightsSOA; + LODLights = new YmapLODLights(); + LODLights.Ymap = this; + LODLights.CLODLight = soa; + LODLights.direction = MetaTypes.ConvertDataArray(Meta, MetaName.FloatXYZ, in soa.direction); + LODLights.falloff = MetaTypes.GetFloatArray(Meta, in soa.falloff); + LODLights.falloffExponent = MetaTypes.GetFloatArray(Meta, in soa.falloffExponent); + LODLights.timeAndStateFlags = MetaTypes.GetUintArray(Meta, in soa.timeAndStateFlags); + LODLights.hash = MetaTypes.GetUintArray(Meta, in soa.hash); + LODLights.coneInnerAngle = MetaTypes.GetByteArray(Meta, in soa.coneInnerAngle); + LODLights.coneOuterAngleOrCapExt = MetaTypes.GetByteArray(Meta, in soa.coneOuterAngleOrCapExt); + LODLights.coronaIntensity = MetaTypes.GetByteArray(Meta, in soa.coronaIntensity); + LODLights.CalcBB(); + } + } + + private void EnsureDistantLODLights() + { + if (_CMapData.DistantLODLightsSOA.position.Count1 != 0) + { + var soa = _CMapData.DistantLODLightsSOA; + DistantLODLights = new YmapDistantLODLights(); + DistantLODLights.Ymap = this; + DistantLODLights.CDistantLODLight = soa; + DistantLODLights.colours = MetaTypes.GetUintArray(Meta, in soa.RGBI); + DistantLODLights.positions = MetaTypes.ConvertDataArray(Meta, MetaName.FloatXYZ, in soa.position); + DistantLODLights.CalcBB(); + } + } + + private void EnsureTimeCycleModifiers() + { + CTimeCycleModifiers = MetaTypes.ConvertDataArray(Meta, MetaName.CTimeCycleModifier, in _CMapData.timeCycleModifiers); + if (CTimeCycleModifiers is null || CTimeCycleModifiers.Length == 0) + return; + + TimeCycleModifiers = new YmapTimeCycleModifier[CTimeCycleModifiers.Length]; + for (int i = 0; i < CTimeCycleModifiers.Length; i++) + { + YmapTimeCycleModifier tcm = new YmapTimeCycleModifier(); + tcm.Ymap = this; + tcm.CTimeCycleModifier = CTimeCycleModifiers[i]; + tcm.BBMin = tcm.CTimeCycleModifier.minExtents; + tcm.BBMax = tcm.CTimeCycleModifier.maxExtents; + TimeCycleModifiers[i] = tcm; + } + } + + private void EnsureCarGens() + { + CCarGens = MetaTypes.ConvertDataArray(Meta, MetaName.CCarGen, in _CMapData.carGenerators); + if (CCarGens is null || CCarGens.Length == 0) + return; + + //string str = MetaTypes.GetTypesInitString(resentry, Meta); //to generate structinfos and enuminfos + CarGenerators = new YmapCarGen[CCarGens.Length]; + for (int i = 0; i < CCarGens.Length; i++) + { + CarGenerators[i] = new YmapCarGen(this, CCarGens[i]); + } + } + + private void EnsureBoxOccluders() + { + CBoxOccluders = MetaTypes.ConvertDataArray(Meta, MetaName.BoxOccluder, in _CMapData.boxOccluders); + if (CBoxOccluders is null || CBoxOccluders.Length == 0) + return; + + BoxOccluders = new YmapBoxOccluder[CBoxOccluders.Length]; + for (int i = 0; i < CBoxOccluders.Length; i++) + { + BoxOccluders[i] = new YmapBoxOccluder(this, CBoxOccluders[i]); + BoxOccluders[i].Index = i; + } + } + + private void EnsureOccludeModels() + { + COccludeModels = MetaTypes.ConvertDataArray(Meta, MetaName.OccludeModel, in _CMapData.occludeModels); + + if (COccludeModels is null || COccludeModels.Length == 0) + return; + + OccludeModels = new YmapOccludeModel[COccludeModels.Length]; + for (int i = 0; i < COccludeModels.Length; i++) + { + OccludeModels[i] = new YmapOccludeModel(this, COccludeModels[i]); + OccludeModels[i].Index = i; + OccludeModels[i].Load(Meta); + + } + } + + private void EnsureContainerLods() + { + + //TODO: containerLods + if (_CMapData.containerLods.Count1 > 0) + { + //string str = MetaTypes.GetTypesInitString(Meta); //to generate structinfos and enuminfos + + + } + + } + + + public void BuildCEntityDefs() + { + //recreates the CEntityDefs and CMloInstanceDefs arrays from AllEntities. + //TODO: save entity extensions!!? + + CEntityDefs = Array.Empty(); + CMloInstanceDefs = Array.Empty(); + if (AllEntities.Length == 0) + { + return; } + List centdefs = new List(); + List cmlodefs = new List(); - private void NonMetaLoad(byte[] data) + foreach(var ent in AllEntities) { - //non meta not supported yet! but see what's in there... - MemoryStream ms = new MemoryStream(data); - if (RbfFile.IsRBF(ms)) + if (ent.MloInstance != null) { - Rbf = new RbfFile(); - Rbf.Load(ms); - } - else if (PsoFile.IsPSO(ms)) - { - Pso = new PsoFile(); - Pso.Load(ms); - //PsoTypes.EnsurePsoTypes(Pso); + cmlodefs.Add(ent.MloInstance._Instance); } else { - } - - } - - - - private void EnsureEntities(Meta Meta) - { - //CMloInstanceDefs = MetaTypes.ConvertDataArray(Meta, MetaName.CMloInstanceDef, CMapData.entities); - CMloInstanceDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CMloInstanceDef); - if (CMloInstanceDefs != null) - { } - - var eptrs = MetaTypes.GetPointerArray(Meta, _CMapData.entities); - //CEntityDefs = MetaTypes.ConvertDataArray(Meta, MetaName.CEntityDef, CMapData.entities); - CEntityDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CEntityDef); - if (CEntityDefs != null) - { } - - - - - int instcount = 0; - if (CEntityDefs != null) instcount += CEntityDefs.Length; - if (CMloInstanceDefs != null) instcount += CMloInstanceDefs.Length; - - if (instcount > 0) - { - - //build the entity hierarchy. - List roots = new List(instcount); - List alldefs = new List(instcount); - List mlodefs = null; - - if (CEntityDefs != null) - { - for (int i = 0; i < CEntityDefs.Length; i++) - { - YmapEntityDef d = new YmapEntityDef(this, i, ref CEntityDefs[i]); - alldefs.Add(d); - } - } - if (CMloInstanceDefs != null) - { - mlodefs = new List(); - for (int i = 0; i < CMloInstanceDefs.Length; i++) - { - YmapEntityDef d = new YmapEntityDef(this, i, ref CMloInstanceDefs[i]); - uint[] defentsets = MetaTypes.GetUintArray(Meta, CMloInstanceDefs[i].defaultEntitySets); - if (d.MloInstance != null) - { - d.MloInstance.defaultEntitySets = defentsets; - } - alldefs.Add(d); - mlodefs.Add(d); - } - } - - - for (int i = 0; i < alldefs.Count; i++) - { - YmapEntityDef d = alldefs[i]; - int pind = d._CEntityDef.parentIndex; - bool isroot = false; - if ((pind < 0) || (pind >= alldefs.Count) || d.LodInParentYmap) - { - isroot = true; - } - else - { - YmapEntityDef p = alldefs[pind]; - if ((p._CEntityDef.lodLevel <= d._CEntityDef.lodLevel) || - ((p._CEntityDef.lodLevel == rage__eLodType.LODTYPES_DEPTH_ORPHANHD) && - (d._CEntityDef.lodLevel != rage__eLodType.LODTYPES_DEPTH_ORPHANHD))) - { - isroot = true; - p = null; - } - } - - if (isroot) - { - roots.Add(d); - } - else - { - YmapEntityDef p = alldefs[pind]; - p.AddChild(d); - } - } - for (int i = 0; i < alldefs.Count; i++) - { - alldefs[i].ChildListToArray(); - } - - AllEntities = alldefs.ToArray(); - RootEntities = roots.ToArray(); - if (mlodefs != null) - { - MloEntities = mlodefs.ToArray(); - } - - - foreach (var ent in AllEntities) - { - ent.Extensions = MetaTypes.GetExtensions(Meta, ent._CEntityDef.extensions); - } - } - - } - - private void EnsureInstances(Meta Meta) - { - if (_CMapData.instancedData.GrassInstanceList.Count1 != 0) - { - rage__fwGrassInstanceListDef[] batches = MetaTypes.ConvertDataArray(Meta, MetaName.rage__fwGrassInstanceListDef, _CMapData.instancedData.GrassInstanceList); - YmapGrassInstanceBatch[] gbatches = new YmapGrassInstanceBatch[batches.Length]; - for (int i = 0; i < batches.Length; i++) - { - var batch = batches[i]; - rage__fwGrassInstanceListDef__InstanceData[] instdatas = MetaTypes.ConvertDataArray(Meta, MetaName.rage__fwGrassInstanceListDef__InstanceData, batch.InstanceList); - YmapGrassInstanceBatch gbatch = new YmapGrassInstanceBatch(); - gbatch.Ymap = this; - gbatch.Batch = batch; - gbatch.Instances = instdatas; - gbatch.Position = (batch.BatchAABB.min.XYZ() + batch.BatchAABB.max.XYZ()) * 0.5f; - gbatch.Radius = (batch.BatchAABB.max.XYZ() - gbatch.Position).Length(); - gbatch.AABBMin = (batch.BatchAABB.min.XYZ()); - gbatch.AABBMax = (batch.BatchAABB.max.XYZ()); - gbatches[i] = gbatch; - } - GrassInstanceBatches = gbatches; - } - if (_CMapData.instancedData.PropInstanceList.Count1 != 0) - { + centdefs.Add(ent._CEntityDef); } } - private void EnsureLODLights(Meta Meta) + if (centdefs.Count > 0) { - if (_CMapData.LODLightsSOA.direction.Count1 != 0) - { - var soa = _CMapData.LODLightsSOA; - LODLights = new YmapLODLights(); - LODLights.Ymap = this; - LODLights.CLODLight = soa; - LODLights.direction = MetaTypes.ConvertDataArray(Meta, MetaName.FloatXYZ, soa.direction); - LODLights.falloff = MetaTypes.GetFloatArray(Meta, soa.falloff); - LODLights.falloffExponent = MetaTypes.GetFloatArray(Meta, soa.falloffExponent); - LODLights.timeAndStateFlags = MetaTypes.GetUintArray(Meta, soa.timeAndStateFlags); - LODLights.hash = MetaTypes.GetUintArray(Meta, soa.hash); - LODLights.coneInnerAngle = MetaTypes.GetByteArray(Meta, soa.coneInnerAngle); - LODLights.coneOuterAngleOrCapExt = MetaTypes.GetByteArray(Meta, soa.coneOuterAngleOrCapExt); - LODLights.coronaIntensity = MetaTypes.GetByteArray(Meta, soa.coronaIntensity); - LODLights.CalcBB(); - } + CEntityDefs = centdefs.ToArray(); + } + if (cmlodefs.Count > 0) + { + CMloInstanceDefs = cmlodefs.ToArray(); + } + } + public void BuildCCarGens() + { + //recreates the CCarGens array from CarGenerators. + if (CarGenerators == null) + { + CCarGens = null; + return; } - private void EnsureDistantLODLights(Meta Meta) + int count = CarGenerators.Length; + CCarGens = new CCarGen[count]; + for (int i = 0; i < count; i++) { - if (_CMapData.DistantLODLightsSOA.position.Count1 != 0) - { - var soa = _CMapData.DistantLODLightsSOA; - DistantLODLights = new YmapDistantLODLights(); - DistantLODLights.Ymap = this; - DistantLODLights.CDistantLODLight = soa; - DistantLODLights.colours = MetaTypes.GetUintArray(Meta, soa.RGBI); - DistantLODLights.positions = MetaTypes.ConvertDataArray(Meta, MetaName.FloatXYZ, soa.position); - DistantLODLights.CalcBB(); - } + CCarGens[i] = CarGenerators[i].CCarGen; + } + } + public void BuildInstances() + { + if (GrassInstanceBatches == null || GrassInstanceBatches.Length == 0) + { + return; } - private void EnsureTimeCycleModifiers(Meta Meta) + //int count = GrassInstanceBatches.Length; + + foreach(var g in GrassInstanceBatches) { - CTimeCycleModifiers = MetaTypes.ConvertDataArray(Meta, MetaName.CTimeCycleModifier, _CMapData.timeCycleModifiers); - if (CTimeCycleModifiers != null) - { - TimeCycleModifiers = new YmapTimeCycleModifier[CTimeCycleModifiers.Length]; - for (int i = 0; i < CTimeCycleModifiers.Length; i++) - { - YmapTimeCycleModifier tcm = new YmapTimeCycleModifier(); - tcm.Ymap = this; - tcm.CTimeCycleModifier = CTimeCycleModifiers[i]; - tcm.BBMin = tcm.CTimeCycleModifier.minExtents; - tcm.BBMax = tcm.CTimeCycleModifier.maxExtents; - TimeCycleModifiers[i] = tcm; - } - } + ref var b = ref g.Batch; + + b.BatchAABB = new rage__spdAABB(in g.AABBMin, in g.AABBMax); + } + //for (int i = 0; i < count; i++) + //{ + + //} + } + public void BuildLodLights() + { + if (LODLights == null) + return; + LODLights.RebuildFromLodLights(); + } + public void BuildDistantLodLights() + { + //how to rebuild these here? the LODlights array is on the child ymap... + //for now, they are being updated as they are edited in project window + } + public void BuildBoxOccluders() + { + if (BoxOccluders is null || BoxOccluders.Length == 0) + return; + + var boxes = new BoxOccluder[BoxOccluders.Length]; + for (int i = 0; i < BoxOccluders.Length; i++) + { + var box = BoxOccluders[i]; + box.UpdateBoxStruct(); + boxes[i] = box._Box; } - private void EnsureCarGens(Meta Meta) + CBoxOccluders = boxes; + + } + public void BuildOccludeModels() + { + if (OccludeModels is null || OccludeModels.Length == 0) + return; + //nothing to do here, has to be done later due to embedded data + } + + public byte[] Save() + { + //direct save to a raw, compressed ymap file (openIV-compatible format) + + + //since Ymap object contents have been modified, need to recreate the arrays which are what is saved. + BuildCEntityDefs(); //technically this isn't required anymore since the CEntityDefs is no longer used for saving. + BuildCCarGens(); + BuildInstances(); + BuildLodLights(); + BuildDistantLodLights(); + BuildBoxOccluders(); + BuildOccludeModels(); + + //TODO: + //BuildTimecycleModifiers(); //already being saved - update them.. + //BuildContainerLods(); + + + + MetaBuilder mb = new MetaBuilder(); + + + var mdb = mb.EnsureBlock(MetaName.CMapData); + + CMapData mapdata = CMapData; + + + + if (AllEntities.Length > 0) { - - CCarGens = MetaTypes.ConvertDataArray(Meta, MetaName.CCarGen, _CMapData.carGenerators); - if (CCarGens != null) + for (int i = 0; i < AllEntities.Length; i++) { - //string str = MetaTypes.GetTypesInitString(resentry, Meta); //to generate structinfos and enuminfos - CarGenerators = new YmapCarGen[CCarGens.Length]; - for (int i = 0; i < CCarGens.Length; i++) - { - CarGenerators[i] = new YmapCarGen(this, CCarGens[i]); - } - } - } - - private void EnsureBoxOccluders(Meta meta) - { - CBoxOccluders = MetaTypes.ConvertDataArray(Meta, MetaName.BoxOccluder, _CMapData.boxOccluders); - if (CBoxOccluders != null) - { - BoxOccluders = new YmapBoxOccluder[CBoxOccluders.Length]; - for (int i = 0; i < CBoxOccluders.Length; i++) - { - BoxOccluders[i] = new YmapBoxOccluder(this, CBoxOccluders[i]); - BoxOccluders[i].Index = i; - } - } - } - - private void EnsureOccludeModels(Meta meta) - { - COccludeModels = MetaTypes.ConvertDataArray(Meta, MetaName.OccludeModel, _CMapData.occludeModels); - if (COccludeModels != null) - { - OccludeModels = new YmapOccludeModel[COccludeModels.Length]; - for (int i = 0; i < COccludeModels.Length; i++) - { - OccludeModels[i] = new YmapOccludeModel(this, COccludeModels[i]); - OccludeModels[i].Index = i; - OccludeModels[i].Load(Meta); - - } - } - } - - private void EnsureContainerLods(Meta meta) - { - - //TODO: containerLods - if (_CMapData.containerLods.Count1 > 0) - { - //string str = MetaTypes.GetTypesInitString(Meta); //to generate structinfos and enuminfos - - + var ent = AllEntities[i]; //save the extensions first.. + ent._CEntityDef.extensions = mb.AddWrapperArrayPtr(ent.Extensions); } - } - - - public void BuildCEntityDefs() - { - //recreates the CEntityDefs and CMloInstanceDefs arrays from AllEntities. - //TODO: save entity extensions!!? - - CEntityDefs = null; - CMloInstanceDefs = null; - if (AllEntities == null) - { - return; - } - - - List centdefs = new List(); - List cmlodefs = new List(); - + MetaPOINTER[] ptrs = new MetaPOINTER[AllEntities.Length]; for (int i = 0; i < AllEntities.Length; i++) { var ent = AllEntities[i]; if (ent.MloInstance != null) { - cmlodefs.Add(ent.MloInstance.Instance); + ent.MloInstance.UpdateDefaultEntitySets(); + + ent.MloInstance._Instance.CEntityDef = ent.CEntityDef; //overwrite with all the updated values.. + ent.MloInstance._Instance.defaultEntitySets = mb.AddUintArrayPtr(ent.MloInstance.defaultEntitySets); + + ptrs[i] = mb.AddItemPtr(MetaName.CMloInstanceDef, in ent.MloInstance._Instance); } else { - centdefs.Add(ent._CEntityDef); + ptrs[i] = mb.AddItemPtr(MetaName.CEntityDef, in ent._CEntityDef); } } - - if (centdefs.Count > 0) - { - CEntityDefs = centdefs.ToArray(); - } - if (cmlodefs.Count > 0) - { - CMloInstanceDefs = cmlodefs.ToArray(); - } + mapdata.entities = mb.AddPointerArray(ptrs); } - public void BuildCCarGens() + else { - //recreates the CCarGens array from CarGenerators. - if (CarGenerators == null) - { - CCarGens = null; - return; - } - - int count = CarGenerators.Length; - CCarGens = new CCarGen[count]; - for (int i = 0; i < count; i++) - { - CCarGens[i] = CarGenerators[i].CCarGen; - } - } - public void BuildInstances() - { - if (GrassInstanceBatches == null) - { - return; - } - - if (PropInstanceBatches == null) - { } - - int count = GrassInstanceBatches.Length; - for (int i = 0; i < count; i++) - { - var g = GrassInstanceBatches[i]; - var b = g.Batch; - - var aabb = new rage__spdAABB(); - aabb.min = new Vector4(g.AABBMin, 0); - aabb.max = new Vector4(g.AABBMax, 0); - - b.BatchAABB = aabb; - - GrassInstanceBatches[i].Batch = b; - } - } - public void BuildLodLights() - { - if (LODLights == null) return; - LODLights.RebuildFromLodLights(); - } - public void BuildDistantLodLights() - { - //how to rebuild these here? the LODlights array is on the child ymap... - //for now, they are being updated as they are edited in project window - } - public void BuildBoxOccluders() - { - if (BoxOccluders == null) return; - if (BoxOccluders.Length == 0) return; - - var boxes = new BoxOccluder[BoxOccluders.Length]; - for (int i = 0; i < BoxOccluders.Length; i++) - { - var box = BoxOccluders[i]; - box.UpdateBoxStruct(); - boxes[i] = box._Box; - } - - CBoxOccluders = boxes; - - } - public void BuildOccludeModels() - { - if (OccludeModels == null) return; - if (OccludeModels.Length == 0) return; - //nothing to do here, has to be done later due to embedded data + mapdata.entities = new Array_StructurePointer(); } - public byte[] Save() + mapdata.timeCycleModifiers = mb.AddItemArrayPtr(MetaName.CTimeCycleModifier, CTimeCycleModifiers); + + mapdata.physicsDictionaries = mb.AddHashArrayPtr(physicsDictionaries); + + mapdata.carGenerators = mb.AddItemArrayPtr(MetaName.CCarGen, CCarGens); + + + + //clear everything else out for now - TODO: fix + if (mapdata.containerLods.Count1 != 0) LogSaveWarning("containerLods were not saved. (TODO!)"); + if (mapdata.instancedData.PropInstanceList.Count1 != 0) LogSaveWarning("instancedData.PropInstanceList was not saved. (TODO!)"); + mapdata.containerLods = new Array_Structure(); + + if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) { - //direct save to a raw, compressed ymap file (openIV-compatible format) - - - //since Ymap object contents have been modified, need to recreate the arrays which are what is saved. - BuildCEntityDefs(); //technically this isn't required anymore since the CEntityDefs is no longer used for saving. - BuildCCarGens(); - BuildInstances(); - BuildLodLights(); - BuildDistantLodLights(); - BuildBoxOccluders(); - BuildOccludeModels(); - - //TODO: - //BuildTimecycleModifiers(); //already being saved - update them.. - //BuildContainerLods(); - - - - MetaBuilder mb = new MetaBuilder(); - - - var mdb = mb.EnsureBlock(MetaName.CMapData); - - CMapData mapdata = CMapData; - - - - if ((AllEntities != null) && (AllEntities.Length > 0)) + var instancedData = new rage__fwInstancedMapData(); + rage__fwGrassInstanceListDef[] batches = new rage__fwGrassInstanceListDef[GrassInstanceBatches.Length]; + for (int i = 0; i < GrassInstanceBatches.Length; i++) { - for (int i = 0; i < AllEntities.Length; i++) + var batch = GrassInstanceBatches[i]; + + if (batch != null) { - var ent = AllEntities[i]; //save the extensions first.. - ent._CEntityDef.extensions = mb.AddWrapperArrayPtr(ent.Extensions); + var b = batch.Batch; + b.InstanceList = mb.AddItemArrayPtr(MetaName.rage__fwGrassInstanceListDef__InstanceData, batch.Instances); + batches[i] = b; } - - MetaPOINTER[] ptrs = new MetaPOINTER[AllEntities.Length]; - for (int i = 0; i < AllEntities.Length; i++) - { - var ent = AllEntities[i]; - if (ent.MloInstance != null) - { - ent.MloInstance.UpdateDefaultEntitySets(); - - ent.MloInstance._Instance.CEntityDef = ent.CEntityDef; //overwrite with all the updated values.. - ent.MloInstance._Instance.defaultEntitySets = mb.AddUintArrayPtr(ent.MloInstance.defaultEntitySets); - - ptrs[i] = mb.AddItemPtr(MetaName.CMloInstanceDef, ent.MloInstance.Instance); - } - else - { - ptrs[i] = mb.AddItemPtr(MetaName.CEntityDef, ent.CEntityDef); - } - } - mapdata.entities = mb.AddPointerArray(ptrs); - } - else - { - mapdata.entities = new Array_StructurePointer(); } - mapdata.timeCycleModifiers = mb.AddItemArrayPtr(MetaName.CTimeCycleModifier, CTimeCycleModifiers); - - mapdata.physicsDictionaries = mb.AddHashArrayPtr(physicsDictionaries); - - mapdata.carGenerators = mb.AddItemArrayPtr(MetaName.CCarGen, CCarGens); - - - - //clear everything else out for now - TODO: fix - if (mapdata.containerLods.Count1 != 0) LogSaveWarning("containerLods were not saved. (TODO!)"); - if (mapdata.instancedData.PropInstanceList.Count1 != 0) LogSaveWarning("instancedData.PropInstanceList was not saved. (TODO!)"); - mapdata.containerLods = new Array_Structure(); - - if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) - { - var instancedData = new rage__fwInstancedMapData(); - rage__fwGrassInstanceListDef[] batches = new rage__fwGrassInstanceListDef[GrassInstanceBatches.Length]; - for (int i = 0; i < GrassInstanceBatches.Length; i++) - { - var batch = GrassInstanceBatches[i]; - - if (batch != null) - { - var b = batch.Batch; - b.InstanceList = mb.AddItemArrayPtr(MetaName.rage__fwGrassInstanceListDef__InstanceData, batch.Instances); - batches[i] = b; - } - } - - instancedData.GrassInstanceList = mb.AddItemArrayPtr(MetaName.rage__fwGrassInstanceListDef, batches); - mapdata.instancedData = instancedData; - } - else - { - mapdata.instancedData = new rage__fwInstancedMapData(); - } - - if ((LODLights != null) && (LODLights.direction != null)) - { - var soa = new CLODLight(); - soa.direction = mb.AddItemArrayPtr(MetaName.FloatXYZ, LODLights.direction); - soa.falloff = mb.AddFloatArrayPtr(LODLights.falloff); - soa.falloffExponent = mb.AddFloatArrayPtr(LODLights.falloffExponent); - soa.timeAndStateFlags = mb.AddUintArrayPtr(LODLights.timeAndStateFlags); - soa.hash = mb.AddUintArrayPtr(LODLights.hash); - soa.coneInnerAngle = mb.AddByteArrayPtr(LODLights.coneInnerAngle); - soa.coneOuterAngleOrCapExt = mb.AddByteArrayPtr(LODLights.coneOuterAngleOrCapExt); - soa.coronaIntensity = mb.AddByteArrayPtr(LODLights.coronaIntensity); - mapdata.LODLightsSOA = soa; - } - else - { - mapdata.LODLightsSOA = new CLODLight(); - } - if ((DistantLODLights != null) && (DistantLODLights.positions != null)) - { - var soa = DistantLODLights.CDistantLODLight;//to copy base vars - soa.position = mb.AddItemArrayPtr(MetaName.FloatXYZ, DistantLODLights.positions); - soa.RGBI = mb.AddUintArrayPtr(DistantLODLights.colours); - mapdata.DistantLODLightsSOA = soa; - } - else - { - mapdata.DistantLODLightsSOA = new CDistantLODLight(); - } - - if ((CBoxOccluders != null) && (CBoxOccluders.Length > 0)) - { - mapdata.boxOccluders = mb.AddItemArrayPtr(MetaName.BoxOccluder, CBoxOccluders); - } - else - { - mapdata.boxOccluders = new Array_Structure(); - } - if ((OccludeModels != null) && (OccludeModels.Length > 0)) - { - COccludeModels = new OccludeModel[OccludeModels.Length]; - for (int i = 0; i < OccludeModels.Length; i++) - { - var model = OccludeModels[i]; - model.BuildVertices(); - model.BuildData(); - var cocc = model._OccludeModel; - cocc.verts = mb.AddDataBlockPtr(model.Data, (MetaName)MetaStructureEntryDataType.UnsignedByte);//17 - COccludeModels[i] = cocc; - } - mapdata.occludeModels = mb.AddItemArrayPtr(MetaName.OccludeModel, COccludeModels); - } - else - { - mapdata.occludeModels = new Array_Structure(); - } - - - var block = new CBlockDesc(); - block.name = mb.AddStringPtr(Path.GetFileNameWithoutExtension(Name)); - block.exportedBy = mb.AddStringPtr("CodeWalker"); - block.time = mb.AddStringPtr(DateTime.UtcNow.ToString("dd MMMM yyyy HH:mm")); - - mapdata.block = block; - - - string name = Path.GetFileNameWithoutExtension(Name); - uint nameHash = JenkHash.GenHash(name); - mapdata.name = new MetaHash(nameHash);//make sure name is upto date... - - - mb.AddItem(MetaName.CMapData, mapdata); - - - - //make sure all the relevant structure and enum infos are present. - if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) - { - mb.AddStructureInfo(MetaName.rage__spdAABB); - mb.AddStructureInfo(MetaName.rage__fwGrassInstanceListDef__InstanceData); - mb.AddStructureInfo(MetaName.rage__fwGrassInstanceListDef); - } - mb.AddStructureInfo(MetaName.rage__fwInstancedMapData); - mb.AddStructureInfo(MetaName.CLODLight); - mb.AddStructureInfo(MetaName.CDistantLODLight); - mb.AddStructureInfo(MetaName.CBlockDesc); - mb.AddStructureInfo(MetaName.CMapData); - if ((AllEntities != null) && (AllEntities.Length > 0)) - { - mb.AddStructureInfo(MetaName.CEntityDef); - mb.AddStructureInfo(MetaName.CMloInstanceDef); - mb.AddEnumInfo(MetaName.rage__eLodType); //LODTYPES_ - mb.AddEnumInfo(MetaName.rage__ePriorityLevel); //PRI_ - } - if ((CTimeCycleModifiers != null) && (CTimeCycleModifiers.Length > 0)) - { - mb.AddStructureInfo(MetaName.CTimeCycleModifier); - } - if ((CCarGens != null) && (CCarGens.Length > 0)) - { - mb.AddStructureInfo(MetaName.CCarGen); - } - if ((LODLights != null) && (LODLights.direction != null)) - { - mb.AddStructureInfo(MetaName.FloatXYZ); - } - if ((DistantLODLights != null) && (DistantLODLights.positions != null)) - { - mb.AddStructureInfo(MetaName.FloatXYZ); - } - if ((CBoxOccluders != null) && (CBoxOccluders.Length > 0)) - { - mb.AddStructureInfo(MetaName.BoxOccluder); - } - if ((COccludeModels != null) && (COccludeModels.Length > 0)) - { - mb.AddStructureInfo(MetaName.OccludeModel); - } - - - Meta meta = mb.GetMeta(); - - byte[] data = ResourceBuilder.Build(meta, 2); //ymap is version 2... - - - return data; + instancedData.GrassInstanceList = mb.AddItemArrayPtr(MetaName.rage__fwGrassInstanceListDef, batches); + mapdata.instancedData = instancedData; + } + else + { + mapdata.instancedData = new rage__fwInstancedMapData(); } - private void LogSaveWarning(string w) + if ((LODLights != null) && (LODLights.direction != null)) { - if (SaveWarnings == null) SaveWarnings = new List(); - SaveWarnings.Add(w); + var soa = new CLODLight(); + soa.direction = mb.AddItemArrayPtr(MetaName.FloatXYZ, LODLights.direction); + soa.falloff = mb.AddFloatArrayPtr(LODLights.falloff); + soa.falloffExponent = mb.AddFloatArrayPtr(LODLights.falloffExponent); + soa.timeAndStateFlags = mb.AddUintArrayPtr(LODLights.timeAndStateFlags); + soa.hash = mb.AddUintArrayPtr(LODLights.hash); + soa.coneInnerAngle = mb.AddByteArrayPtr(LODLights.coneInnerAngle); + soa.coneOuterAngleOrCapExt = mb.AddByteArrayPtr(LODLights.coneOuterAngleOrCapExt); + soa.coronaIntensity = mb.AddByteArrayPtr(LODLights.coronaIntensity); + mapdata.LODLightsSOA = soa; + } + else + { + mapdata.LODLightsSOA = new CLODLight(); + } + if ((DistantLODLights != null) && (DistantLODLights.positions != null)) + { + var soa = DistantLODLights.CDistantLODLight;//to copy base vars + soa.position = mb.AddItemArrayPtr(MetaName.FloatXYZ, DistantLODLights.positions); + soa.RGBI = mb.AddUintArrayPtr(DistantLODLights.colours); + mapdata.DistantLODLightsSOA = soa; + } + else + { + mapdata.DistantLODLightsSOA = new CDistantLODLight(); + } + + if ((CBoxOccluders != null) && (CBoxOccluders.Length > 0)) + { + mapdata.boxOccluders = mb.AddItemArrayPtr(MetaName.BoxOccluder, CBoxOccluders); + } + else + { + mapdata.boxOccluders = new Array_Structure(); + } + if ((OccludeModels != null) && (OccludeModels.Length > 0)) + { + COccludeModels = new OccludeModel[OccludeModels.Length]; + for (int i = 0; i < OccludeModels.Length; i++) + { + var model = OccludeModels[i]; + model.BuildVertices(); + model.BuildData(); + var cocc = model._OccludeModel; + cocc.verts = mb.AddDataBlockPtr(model.Data, (MetaName)MetaStructureEntryDataType.UnsignedByte);//17 + COccludeModels[i] = cocc; + } + mapdata.occludeModels = mb.AddItemArrayPtr(MetaName.OccludeModel, COccludeModels); + } + else + { + mapdata.occludeModels = new Array_Structure(); } + var block = new CBlockDesc(); + block.name = mb.AddStringPtr(Path.GetFileNameWithoutExtension(Name)); + block.exportedBy = mb.AddStringPtr("CodeWalker"); + block.time = mb.AddStringPtr(DateTime.UtcNow.ToString("dd MMMM yyyy HH:mm")); + + mapdata.block = block; - public void EnsureChildYmaps(GameFileCache gfc) + string name = Path.GetFileNameWithoutExtension(Name); + uint nameHash = JenkHash.GenHash(name); + mapdata.name = new MetaHash(nameHash);//make sure name is upto date... + + + mb.AddItem(MetaName.CMapData, in mapdata); + + + + //make sure all the relevant structure and enum infos are present. + if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) { - if (ChildYmaps == null) - { - //no children here... look for child ymap.... - var node = gfc.GetMapNode(RpfFileEntry.ShortNameHash); - if ((node != null) && (node.Children != null) && (node.Children.Length > 0)) - { - ChildYmaps = new YmapFile[node.Children.Length]; - for (int i = 0; i < ChildYmaps.Length; i++) - { - var chash = node.Children[i].Name; - ChildYmaps[i] = gfc.GetYmap(chash); - if (ChildYmaps[i] == null) - { - Console.WriteLine($"Couldn't find child ymap! {chash} for {Name}"); - //couldn't find child ymap.. - } - } - } - } + mb.AddStructureInfo(MetaName.rage__spdAABB); + mb.AddStructureInfo(MetaName.rage__fwGrassInstanceListDef__InstanceData); + mb.AddStructureInfo(MetaName.rage__fwGrassInstanceListDef); + } + mb.AddStructureInfo(MetaName.rage__fwInstancedMapData); + mb.AddStructureInfo(MetaName.CLODLight); + mb.AddStructureInfo(MetaName.CDistantLODLight); + mb.AddStructureInfo(MetaName.CBlockDesc); + mb.AddStructureInfo(MetaName.CMapData); + if (AllEntities.Length > 0) + { + mb.AddStructureInfo(MetaName.CEntityDef); + mb.AddStructureInfo(MetaName.CMloInstanceDef); + mb.AddEnumInfo(MetaName.rage__eLodType); //LODTYPES_ + mb.AddEnumInfo(MetaName.rage__ePriorityLevel); //PRI_ + } + if ((CTimeCycleModifiers != null) && (CTimeCycleModifiers.Length > 0)) + { + mb.AddStructureInfo(MetaName.CTimeCycleModifier); + } + if ((CCarGens != null) && (CCarGens.Length > 0)) + { + mb.AddStructureInfo(MetaName.CCarGen); + } + if ((LODLights != null) && (LODLights.direction != null)) + { + mb.AddStructureInfo(MetaName.FloatXYZ); + } + if (DistantLODLights != null && DistantLODLights.positions.Length > 0) + { + mb.AddStructureInfo(MetaName.FloatXYZ); + } + if ((CBoxOccluders != null) && (CBoxOccluders.Length > 0)) + { + mb.AddStructureInfo(MetaName.BoxOccluder); + } + if ((COccludeModels != null) && (COccludeModels.Length > 0)) + { + mb.AddStructureInfo(MetaName.OccludeModel); + } - bool needupd = false; - if (ChildYmaps != null) + Meta meta = mb.GetMeta(); + + byte[] data = ResourceBuilder.Build(meta, 2); //ymap is version 2... + + + return data; + } + + private void LogSaveWarning(string w) + { + SaveWarnings ??= new List(); + SaveWarnings.Add(w); + } + + + + + public void EnsureChildYmaps(GameFileCache gfc) + { + if (ChildYmaps is null) + { + //no children here... look for child ymap.... + var node = gfc.GetMapNode(RpfFileEntry.ShortNameHash); + if (node?.Children is not null && node.Children.Length > 0) { + ChildYmaps = new YmapFile[node.Children.Length]; for (int i = 0; i < ChildYmaps.Length; i++) { - var cmap = ChildYmaps[i]; - if (cmap == null) continue; //nothing here.. - if (!cmap.Loaded) + var chash = node.Children[i].Name; + ChildYmaps[i] = gfc.GetYmap(chash); + if (ChildYmaps[i] is null) { - //ChildYmaps[i] = gfc.GetYmap(cmap.Hash); //incase no load was requested. - cmap = gfc.GetYmap(cmap.Key.Hash); - ChildYmaps[i] = cmap; - } - if ((cmap.Loaded) && (!cmap.MergedWithParent)) - { - needupd = true; + Console.WriteLine($"Couldn't find child ymap! {chash} for {Name}"); + //couldn't find child ymap.. } } } - - if ((ChildYmaps != null) && needupd) - { - List newroots = new List(RootEntities); - for (int i = 0; i < ChildYmaps.Length; i++) - { - var cmap = ChildYmaps[i]; - if (cmap == null) - { - continue; //nothing here.. - } - //cmap.EnsureChildYmaps(); - if ((cmap.Loaded) && (!cmap.MergedWithParent)) - { - cmap.MergedWithParent = true; - if (cmap.RootEntities != null) - { - foreach (var rcent in cmap.RootEntities) - { - int pind = rcent._CEntityDef.parentIndex; - if (pind < 0) - { - if (rcent._CEntityDef.lodLevel != rage__eLodType.LODTYPES_DEPTH_ORPHANHD) - { - } - //pind = 0; - } - if ((pind >= 0) && (pind < AllEntities.Length) && !rcent.LodInParentYmap) - { - var pentity = AllEntities[pind]; - pentity.AddChild(rcent); - } - else - { - //TODO: fix this!! - //newroots.Add(rcent); //not sure this is the right approach. - //////rcent.Owner = this; - } - } - } - } - } - if (AllEntities != null) - { - for (int i = 0; i < AllEntities.Length; i++) - { - AllEntities[i].ChildListToMergedArray(); - } - } - - RootEntities = newroots.ToArray(); - } - - } - public void ConnectToParent(YmapFile pymap) + bool needupd = false; + if (ChildYmaps is not null) { - Parent = pymap; - if (RootEntities != null) //parent changed or first set, make sure to link entities hierarchy + for (int i = 0; i < ChildYmaps.Length; i++) { - for (int i = 0; i < RootEntities.Length; i++) + var cmap = ChildYmaps[i]; + if (cmap is null) + continue; //nothing here.. + if (!cmap.Loaded) { - var ent = RootEntities[i]; - int pind = ent._CEntityDef.parentIndex; - if (pind >= 0) //connect root entities to parents if they have them.. + //ChildYmaps[i] = gfc.GetYmap(cmap.Hash); //incase no load was requested. + cmap = gfc.GetYmap(cmap.Key.Hash); + if (cmap is null) + continue; + ChildYmaps[i] = cmap; + } + if (cmap.Loaded && !cmap.MergedWithParent) + { + needupd = true; + } + } + } + + if (ChildYmaps is not null && needupd) + { + using PooledList newroots = new PooledList(RootEntities); + for (int i = 0; i < ChildYmaps.Length; i++) + { + var cmap = ChildYmaps[i]; + if (cmap is null) + { + continue; //nothing here.. + } + //cmap.EnsureChildYmaps(); + if (cmap.Loaded && !cmap.MergedWithParent) + { + cmap.MergedWithParent = true; + foreach (var rcent in cmap.RootEntities) { - YmapEntityDef p = null; - if ((pymap != null) && (pymap.AllEntities != null)) + int pind = rcent._CEntityDef.parentIndex; + //if (pind < 0) + //{ + // if (rcent._CEntityDef.lodLevel != rage__eLodType.LODTYPES_DEPTH_ORPHANHD) + // { + // } + // //pind = 0; + //} + if (pind >= 0 && pind < AllEntities.Length && !rcent.LodInParentYmap) { - if (pind < pymap.AllEntities.Length) - { - p = pymap.AllEntities[pind]; - ent.Parent = p; - ent.ParentName = p._CEntityDef.archetypeName; - } + var pentity = AllEntities[pind]; + pentity.AddChild(rcent); } else { - Console.WriteLine($"Parent not loaded yet for {pymap.Name}"); + //TODO: fix this!! + //newroots.Add(rcent); //not sure this is the right approach. + //////rcent.Owner = this; } } } } - if (LODLights != null) + foreach(var ent in AllEntities) { - if (Parent?.DistantLODLights != null) - { - LODLights.Init(Parent.DistantLODLights); - } + ent.ChildListToMergedArray(); } + + RootEntities = newroots.ToArray(); } - - - - public void AddEntity(YmapEntityDef ent) - { - //used by the editor to add to the ymap. - - List allents; - if (AllEntities != null) - allents = new List(AllEntities); - else - allents = new List(); - ent.Index = allents.Count; - ent.Ymap = this; - allents.Add(ent); - AllEntities = allents.ToArray(); - - - if ((ent.Parent == null) || (ent.Parent.Ymap != this)) - { - //root entity, add to roots. - - List rootents; - if (RootEntities != null) - rootents = new List(RootEntities); - else - rootents = new List(); - rootents.Add(ent); - RootEntities = rootents.ToArray(); - } - - HasChanged = true; - LodManagerUpdate = true; - } - - public bool RemoveEntity(YmapEntityDef ent) - { - //used by the editor to remove from the ymap. - if (ent == null) - return false; - - var res = true; - - int idx = ent.Index; - List newAllEntities = new List(); - List newRootEntities = new List(); - - if (AllEntities != null) - { - for (int i = 0; i < AllEntities.Length; i++) - { - var oent = AllEntities[i]; - oent.Index = newAllEntities.Count; - if (oent != ent) - { - newAllEntities.Add(oent); - } - else if (i != idx) - { - res = false; //indexes didn't match.. this shouldn't happen! - } - } - } - if (RootEntities != null) - { - for (int i = 0; i < RootEntities.Length; i++) - { - var oent = RootEntities[i]; - if (oent != ent) newRootEntities.Add(oent); - } - } - - if (AllEntities == null || AllEntities.Length == newAllEntities.Count || RootEntities == null || RootEntities.Length == newRootEntities.Count) - { - res = false; - } - - LodManagerOldEntities = AllEntities; - AllEntities = newAllEntities.ToArray(); - RootEntities = newRootEntities.ToArray(); - - HasChanged = true; - LodManagerUpdate = true; - - return res; - } - - - public void AddCarGen(YmapCarGen cargen) - { - List cargens = new List(); - if (CarGenerators != null) - cargens.AddRange(CarGenerators); - cargen.Ymap = this; - cargens.Add(cargen); - CarGenerators = cargens.ToArray(); - - HasChanged = true; - } - - public bool RemoveCarGen(YmapCarGen cargen) - { - if (cargen == null) return false; - - List newcargens = new List(); - - if (CarGenerators != null) - { - for (int i = 0; i < CarGenerators.Length; i++) - { - var cg = CarGenerators[i]; - if (cg != cargen) - { - newcargens.Add(cg); - } - } - if (newcargens.Count == CarGenerators.Length) - { - return false; //nothing removed... wasn't present? - } - } - - - CarGenerators = newcargens.ToArray(); - - HasChanged = true; - - return true; - } - - - public void AddLodLight(YmapLODLight lodlight) - { - if (LODLights == null) - { - LODLights = new YmapLODLights(); - LODLights.Ymap = this; - } - List lodlights = new List(); - if (LODLights?.LodLights != null) lodlights.AddRange(LODLights.LodLights); - lodlight.LodLights = this.LODLights; - lodlight.Index = lodlights.Count; - lodlights.Add(lodlight); - LODLights.LodLights = lodlights.ToArray(); - - HasChanged = true; - - if (Parent?.DistantLODLights != null) - { - Parent.DistantLODLights.RebuildFromLodLights(LODLights.LodLights); - Parent.HasChanged = true; - } - } - - public bool RemoveLodLight(YmapLODLight lodlight) - { - if (lodlight == null) return false; - - List newlodlights = new List(); - - var lodlights = LODLights?.LodLights; - if (lodlights != null) - { - for (int i = 0; i < lodlights.Length; i++) - { - var ll = lodlights[i]; - if (ll != lodlight) - { - newlodlights.Add(ll); - } - } - if (newlodlights.Count == lodlights.Length) - { - return false; //nothing removed... wasn't present? - } - } - - for (int i = 0; i < newlodlights.Count; i++) - { - newlodlights[i].Index = i; - } - - LODLights.LodLights = newlodlights.ToArray(); - - HasChanged = true; - - if (Parent?.DistantLODLights != null) - { - Parent.DistantLODLights.RebuildFromLodLights(LODLights.LodLights); - Parent.HasChanged = true; - } - - return true; - } - - - public void AddBoxOccluder(YmapBoxOccluder box) - { - if (box == null) return; - var boxes = new List(); - if (BoxOccluders != null) boxes.AddRange(BoxOccluders); - box.Ymap = this; - box.Index = boxes.Count; - boxes.Add(box); - BoxOccluders = boxes.ToArray(); - - HasChanged = true; - } - - public bool RemoveBoxOccluder(YmapBoxOccluder box) - { - if (box == null) return false; - var newboxes = new List(); - if (BoxOccluders != null) - { - foreach (var oldbox in BoxOccluders) - { - if (oldbox != box) - { - oldbox.Index = newboxes.Count; - newboxes.Add(oldbox); - } - } - if (newboxes.Count == BoxOccluders.Length) - { - return false;//nothing removed... wasn't present? - } - } - - BoxOccluders = newboxes.ToArray(); - - HasChanged = true; - - return true; - } - - - public void AddOccludeModel(YmapOccludeModel model) - { - if (model == null) return; - var models = new List(); - if (OccludeModels != null) models.AddRange(OccludeModels); - model.Ymap = this; - models.Add(model); - OccludeModels = models.ToArray(); - - HasChanged = true; - } - - public bool RemoveOccludeModel(YmapOccludeModel model) - { - if (model == null) return false; - var newmodels = new List(); - if (OccludeModels != null) - { - foreach (var oldmodel in OccludeModels) - { - if (oldmodel != model) - { - oldmodel.Index = newmodels.Count; - newmodels.Add(oldmodel); - } - } - if (newmodels.Count == OccludeModels.Length) - { - return false;//nothing removed... wasn't present? - } - } - - OccludeModels = newmodels.ToArray(); - - HasChanged = true; - - return true; - } - - - public void AddOccludeModelTriangle(YmapOccludeModelTriangle tri) - { - if (tri == null) return; - if (tri.Model == null) return; - - var tris = tri.Model.Triangles.ToList(); - tri.Index = tris.Count; - tris.Add(tri); - tri.Model.Triangles = tris.ToArray(); - - //tri.Model.BuildBVH(); - //... - - HasChanged = true; - } - - public bool RemoveOccludeModelTriangle(YmapOccludeModelTriangle tri) - { - if (tri == null) return false; - if (tri.Model == null) return false; - - var newtris = new List(); - if (tri.Model.Triangles != null) - { - foreach (var oldtri in tri.Model.Triangles) - { - if (oldtri != tri) - { - oldtri.Index = newtris.Count; - newtris.Add(oldtri); - } - } - } - tri.Model.Triangles = newtris.ToArray(); - //tri.Model.BuildBVH(); - //... - - HasChanged = true; - - return true; - } - - - public void AddGrassBatch(YmapGrassInstanceBatch newbatch) - { - List batches = new List(); - if (GrassInstanceBatches != null) batches.AddRange(GrassInstanceBatches); - newbatch.Ymap = this; - batches.Add(newbatch); - GrassInstanceBatches = batches.ToArray(); - - HasChanged = true; - UpdateGrassPhysDict(true); - } - - public bool RemoveGrassBatch(YmapGrassInstanceBatch batch) - { - if (batch == null) return false; - - List batches = new List(); - - if (GrassInstanceBatches != null) - { - for (int i = 0; i < GrassInstanceBatches.Length; i++) - { - var gb = GrassInstanceBatches[i]; - if (gb != batch) - { - batches.Add(gb); - } - } - if (batches.Count == GrassInstanceBatches.Length) - { - return false; //nothing removed... wasn't present? - } - } - - if (batches.Count <= 0) - { - UpdateGrassPhysDict(false); - } - - GrassInstanceBatches = batches.ToArray(); - - HasChanged = true; - - return true; - } - - - - - public void SetName(string newname) - { - var newnamex = newname + ".ymap"; - var newhash = JenkHash.GenHashLower(newname); - JenkIndex.EnsureLower(newname); - if (RpfFileEntry != null) - { - RpfFileEntry.Name = newnamex; - } - Name = newnamex; - _CMapData.name = newhash; - } - public void SetFilePath(string filepath) - { - FilePath = filepath.ToLowerInvariant(); - var newname = Path.GetFileNameWithoutExtension(filepath); - SetName(newname); - } - - - public bool CalcFlags() - { - uint flags = 0; - uint contentFlags = 0; - - if (AllEntities != null) - { - foreach (var yent in AllEntities) - { - switch (yent._CEntityDef.lodLevel) - { - case rage__eLodType.LODTYPES_DEPTH_ORPHANHD: - case rage__eLodType.LODTYPES_DEPTH_HD: - contentFlags = SetBit(contentFlags, 0); //1 - break; - case rage__eLodType.LODTYPES_DEPTH_LOD: - contentFlags = SetBit(contentFlags, 1); //2 - flags = SetBit(flags, 1); //2 - break; - case rage__eLodType.LODTYPES_DEPTH_SLOD1: - contentFlags = SetBit(contentFlags, 4); //16 - flags = SetBit(flags, 1); //2 - break; - case rage__eLodType.LODTYPES_DEPTH_SLOD2: - case rage__eLodType.LODTYPES_DEPTH_SLOD3: - case rage__eLodType.LODTYPES_DEPTH_SLOD4: - contentFlags = SetBit(contentFlags, 2); //4 - contentFlags = SetBit(contentFlags, 4); //16 - flags = SetBit(flags, 1); //2 - break; - } - if (yent.MloInstance != null) - { - contentFlags = SetBit(contentFlags, 3); //8 //(interior instance) - } - } - } - - if ((CMloInstanceDefs != null) && (CMloInstanceDefs.Length > 0)) - { - contentFlags = SetBit(contentFlags, 3); //8 //(interior instance) //is this still necessary? - } - if ((physicsDictionaries != null) && (physicsDictionaries.Length > 0)) - { - contentFlags = SetBit(contentFlags, 6); //64 - } - if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) - { - contentFlags = SetBit(contentFlags, 10); //64 - } - if ((LODLights != null) && ((LODLights.direction?.Length ?? 0) > 0)) - { - contentFlags = SetBit(contentFlags, 7); //128 - } - if ((DistantLODLights != null) && ((DistantLODLights.positions?.Length ?? 0) > 0)) - { - flags = SetBit(flags, 1); //2 - contentFlags = SetBit(contentFlags, 8); //256 - } - if ((BoxOccluders != null) || (OccludeModels != null)) - { - contentFlags = SetBit(contentFlags, 5); //32 - } - - - bool change = false; - if (_CMapData.flags != flags) - { - _CMapData.flags = flags; - change = true; - } - if (_CMapData.contentFlags != contentFlags) - { - _CMapData.contentFlags = contentFlags; - change = true; - } - return change; - } - - public bool CalcExtents() - { - Vector3 emin = new Vector3(float.MaxValue); - Vector3 emax = new Vector3(float.MinValue); - Vector3 smin = new Vector3(float.MaxValue); - Vector3 smax = new Vector3(float.MinValue); - Vector3[] c = new Vector3[8]; - Vector3[] s = new Vector3[8]; - - if (AllEntities != null) - { - for (int i = 0; i < AllEntities.Length; i++) - { - var ent = AllEntities[i]; - var arch = ent.Archetype; - var ori = ent.Orientation; - float loddist = ent._CEntityDef.lodDist; - - Vector3 bbmin = ent.Position - ent.BSRadius; //sphere - Vector3 bbmax = ent.Position + ent.BSRadius; - Vector3 sbmin = bbmin - loddist; - Vector3 sbmax = bbmax + loddist; - if (arch != null) - { - if (loddist <= 0.0f) - { - loddist = arch.LodDist; - } - - Vector3 abmin = arch.BBMin * ent.Scale; //entity box - Vector3 abmax = arch.BBMax * ent.Scale; - c[0] = abmin; - c[1] = new Vector3(abmin.X, abmin.Y, abmax.Z); - c[2] = new Vector3(abmin.X, abmax.Y, abmin.Z); - c[3] = new Vector3(abmin.X, abmax.Y, abmax.Z); - c[4] = new Vector3(abmax.X, abmin.Y, abmin.Z); - c[5] = new Vector3(abmax.X, abmin.Y, abmax.Z); - c[6] = new Vector3(abmax.X, abmax.Y, abmin.Z); - c[7] = abmax; - - abmin = arch.BBMin * ent.Scale - loddist; //streaming box - abmax = arch.BBMax * ent.Scale + loddist; - s[0] = abmin; - s[1] = new Vector3(abmin.X, abmin.Y, abmax.Z); - s[2] = new Vector3(abmin.X, abmax.Y, abmin.Z); - s[3] = new Vector3(abmin.X, abmax.Y, abmax.Z); - s[4] = new Vector3(abmax.X, abmin.Y, abmin.Z); - s[5] = new Vector3(abmax.X, abmin.Y, abmax.Z); - s[6] = new Vector3(abmax.X, abmax.Y, abmin.Z); - s[7] = abmax; - - bbmin = new Vector3(float.MaxValue); - bbmax = new Vector3(float.MinValue); - sbmin = new Vector3(float.MaxValue); - sbmax = new Vector3(float.MinValue); - for (int j = 0; j < 8; j++) - { - Vector3 corn = ori.Multiply(c[j]) + ent.Position; - bbmin = Vector3.Min(bbmin, corn); - bbmax = Vector3.Max(bbmax, corn); - - corn = ori.Multiply(s[j]) + ent.Position; - sbmin = Vector3.Min(sbmin, corn); - sbmax = Vector3.Max(sbmax, corn); - } - } - - emin = Vector3.Min(emin, bbmin); - emax = Vector3.Max(emax, bbmax); - smin = Vector3.Min(smin, sbmin); - smax = Vector3.Max(smax, sbmax); - } - } - - if (GrassInstanceBatches != null) - { - //var lodoffset = Vector3.Zero;// new Vector3(0, 0, 100); //IDK WHY -neos7 //dexy: i guess it's not completely necessary... //blame neos - foreach (var batch in GrassInstanceBatches) //thanks to Neos7 - { - emin = Vector3.Min(emin, batch.AABBMin); - emax = Vector3.Max(emax, batch.AABBMax); - smin = Vector3.Min(smin, (batch.AABBMin - batch.Batch.lodDist)); // + lodoffset - smax = Vector3.Max(smax, (batch.AABBMax + batch.Batch.lodDist)); // - lodoffset - } - } - - if (CarGenerators != null) - { - foreach (var cargen in CarGenerators) - { - var len = cargen._CCarGen.perpendicularLength; - emin = Vector3.Min(emin, cargen.Position - len); - emax = Vector3.Max(emax, cargen.Position + len); - smin = Vector3.Min(smin, cargen.Position - len*2.0f); //just a random guess, maybe should be more? - smax = Vector3.Max(smax, cargen.Position + len*2.0f); - } - } - - if (LODLights != null) - { - LODLights.CalcBB(); - emin = Vector3.Min(emin, LODLights.BBMin - 20.0f); //about right - emax = Vector3.Max(emax, LODLights.BBMax + 20.0f); - smin = Vector3.Min(smin, (LODLights.BBMin - 950.0f)); //seems correct - smax = Vector3.Max(smax, (LODLights.BBMax + 950.0f)); - } - - if (DistantLODLights != null) - { - DistantLODLights.CalcBB(); - emin = Vector3.Min(emin, DistantLODLights.BBMin - 20.0f); //not exact, but probably close enough - emax = Vector3.Max(emax, DistantLODLights.BBMax + 20.0f); - smin = Vector3.Min(smin, (DistantLODLights.BBMin - 3000.0f)); //seems correct - smax = Vector3.Max(smax, (DistantLODLights.BBMax + 3000.0f)); - } - - if (BoxOccluders != null) - { - foreach (var box in BoxOccluders) - { - var siz = box.Size.Length() * 0.5f;//should really use box rotation instead.... - emin = Vector3.Min(emin, box.Position - siz); - emax = Vector3.Max(emax, box.Position + siz); - smin = Vector3.Min(smin, box.Position - siz);//check this! for some vanilla ymaps it seems right, others not - smax = Vector3.Max(smax, box.Position + siz);//occluders don't seem to have a loddist - } - } - - if (OccludeModels != null) - { - foreach (var model in OccludeModels) - { - emin = Vector3.Min(emin, (model.BVH?.Box.Minimum ?? model._OccludeModel.bmin));//this needs to be updated! - emax = Vector3.Max(emax, (model.BVH?.Box.Maximum ?? model._OccludeModel.bmax)); - smin = Vector3.Min(smin, (model.BVH?.Box.Minimum ?? model._OccludeModel.bmin));//check this! for some vanilla ymaps it seems right, others not - smax = Vector3.Max(smax, (model.BVH?.Box.Maximum ?? model._OccludeModel.bmax));//occluders don't seem to have a loddist - } - } - - bool change = false; - if (_CMapData.entitiesExtentsMin != emin) - { - _CMapData.entitiesExtentsMin = emin; - change = true; - } - if (_CMapData.entitiesExtentsMax != emax) - { - _CMapData.entitiesExtentsMax = emax; - change = true; - } - if (_CMapData.streamingExtentsMin != smin) - { - _CMapData.streamingExtentsMin = smin; - change = true; - } - if (_CMapData.streamingExtentsMax != smax) - { - _CMapData.streamingExtentsMax = smax; - change = true; - } - return change; - } - - - private void UpdateGrassPhysDict(bool add) - { - var physDict = physicsDictionaries?.ToList() ?? new List(); - var vproc1 = JenkHash.GenHash("v_proc1"); - var vproc2 = JenkHash.GenHash("v_proc2"); // I think you need vproc2 as well. - var change = false; - if (!physDict.Contains(vproc1)) - { - change = true; - if (add) physDict.Add(vproc1); - else physDict.Remove(vproc1); - } - if (!physDict.Contains(vproc2)) - { - change = true; - if (add) physDict.Add(vproc2); - else physDict.Remove(vproc2); - } - if (change) physicsDictionaries = physDict.ToArray(); - } - - public void InitYmapEntityArchetypes(GameFileCache gfc) - { - if (AllEntities != null) - { - for (int i = 0; i < AllEntities.Length; i++) - { - var ent = AllEntities[i]; - var arch = gfc.GetArchetype(ent._CEntityDef.archetypeName); - ent.SetArchetype(arch); - if (ent.IsMlo) ent.MloInstance.InitYmapEntityArchetypes(gfc); - } - } - if (GrassInstanceBatches != null) - { - for (int i = 0; i < GrassInstanceBatches.Length; i++) - { - var batch = GrassInstanceBatches[i]; - batch.Archetype = gfc.GetArchetype(batch.Batch.archetypeName); - } - } - - if (TimeCycleModifiers != null) - { - for (int i = 0; i < TimeCycleModifiers.Length; i++) - { - var tcm = TimeCycleModifiers[i]; - World.TimecycleMod wtcm; - if (gfc.TimeCycleModsDict.TryGetValue(tcm.CTimeCycleModifier.name.Hash, out wtcm)) - { - tcm.TimeCycleModData = wtcm; - } - } - } - - } - - private static uint SetBit(uint value, int bit) - { - return (value | (1u << bit)); - } - } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapEntityDef + public void ConnectToParent(YmapFile pymap) { - public Archetype Archetype { get; set; } //cached by GameFileCache on loading... - public Vector3 BBMin;//oriented archetype AABBmin - public Vector3 BBMax;//oriented archetype AABBmax - public Vector3 BBCenter; //oriented archetype AABB center - public Vector3 BBExtent; //oriented archetype AABB extent - public Vector3 BSCenter; //oriented archetype BS center - public float BSRadius;//cached from archetype - public float LodDist; - public float ChildLodDist; - - public CEntityDef _CEntityDef; - public CEntityDef CEntityDef { get { return _CEntityDef; } set { _CEntityDef = value; } } - private List ChildList { get; set; } - public YmapEntityDef[] Children { get; set; } - public YmapEntityDef[] ChildrenMerged;// { get; set; } - public Vector3 Position { get; set; } - public Quaternion Orientation { get; set; } - public Vector3 Scale { get; set; } - public bool IsMlo { get; set; } - public MloInstanceData MloInstance { get; set; } - public YmapEntityDef MloParent { get; set; } - public MloInstanceEntitySet MloEntitySet { get; set; } - public Vector3 MloRefPosition { get; set; } - public Quaternion MloRefOrientation { get; set; } - public MetaWrapper[] Extensions { get; set; } - - public int Index { get; set; } - public float Distance { get; set; } //used for rendering - public bool IsWithinLodDist; //used for rendering - public bool ChildrenVisible; //used for rendering - public bool ChildrenRendered; //used when rendering ymap mode to reduce LOD flashing... - public YmapEntityDef Parent { get; set; } //for browsing convenience, also used/updated for rendering - public MetaHash ParentName { get; set; } //just for browsing convenience - - public YmapFile Ymap { get; set; } - - public Vector3 PivotPosition = Vector3.Zero; - public Quaternion PivotOrientation = Quaternion.Identity; - public Vector3 WidgetPosition = Vector3.Zero; - public Quaternion WidgetOrientation = Quaternion.Identity; - - public uint EntityHash { get; set; } = 0; //used by CW as a unique position+name identifier - - public LinkedList LodManagerChildren = null; - public object LodManagerRenderable = null; - - - public LightInstance[] Lights { get; set; } - //public uint[] LightHashTest { get; set; } - - public bool LodInParentYmap { get { return ((_CEntityDef.flags >> 3) & 1) > 0; } } - - - public string Name + Parent = pymap; + foreach(var ent in RootEntities) { - get + int pind = ent._CEntityDef.parentIndex; + if (pind >= 0) //connect root entities to parents if they have them.. { - return _CEntityDef.archetypeName.ToString(); - } - } - - - public YmapEntityDef() - { - Scale = Vector3.One; - Position = Vector3.One; - Orientation = Quaternion.Identity; - } - public YmapEntityDef(YmapFile ymap, int index, ref CEntityDef def) - { - Ymap = ymap; - Index = index; - CEntityDef = def; - Scale = new Vector3(new Vector2(_CEntityDef.scaleXY), _CEntityDef.scaleZ); - Position = _CEntityDef.position; - Orientation = new Quaternion(_CEntityDef.rotation); - if (Orientation != Quaternion.Identity) - { - Orientation = Quaternion.Invert(Orientation); - } - IsMlo = false; - - UpdateWidgetPosition(); - UpdateWidgetOrientation(); - UpdateEntityHash(); - } - - public YmapEntityDef(YmapFile ymap, int index, ref CMloInstanceDef mlo) - { - Ymap = ymap; - Index = index; - CEntityDef = mlo.CEntityDef; - Scale = new Vector3(new Vector2(_CEntityDef.scaleXY), _CEntityDef.scaleZ); - Position = _CEntityDef.position; - Orientation = new Quaternion(_CEntityDef.rotation); - //if (Orientation != Quaternion.Identity) - //{ - // Orientation = Quaternion.Invert(Orientation); - //} - IsMlo = true; - - MloInstance = new MloInstanceData(this, null);//is this necessary..? will get created in SetArchetype.. - MloInstance.Instance = mlo; - - UpdateWidgetPosition(); - UpdateWidgetOrientation(); - UpdateEntityHash(); - } - - - public void SetArchetype(Archetype arch) - { - Archetype = arch; - if (Archetype != null) - { - UpdateBB(); - - if (Archetype.Type == MetaName.CMloArchetypeDef) + + if (pymap.AllEntities != null && pymap.AllEntities.Length > 0) { - //transform interior entities into world space... - var mloa = Archetype as MloArchetype; - MloInstance = new MloInstanceData(this, mloa); - MloInstance._Instance = new CMloInstanceDef { CEntityDef = _CEntityDef }; - if (mloa != null) + if (pind < pymap.AllEntities.Length) { - if (!IsMlo) - { - IsMlo = true; - List mloEntities = Ymap.MloEntities?.ToList() ?? new List(); - mloEntities.Add(this); - Ymap.MloEntities = mloEntities.ToArray(); - } - - MloInstance.CreateYmapEntities(); + var p = pymap.AllEntities[pind]; + ent.Parent = p; + ent.ParentName = p._CEntityDef.archetypeName; } - - if (BSRadius == 0.0f) - { - BSRadius = LodDist;//need something so it doesn't get culled... - } - if (BBMin == BBMax) - { - BBMin = Position - BSRadius; - BBMax = Position + BSRadius;//it's not ideal - BBCenter = (BBMax + BBMin) * 0.5f; - BBExtent = (BBMax - BBMin) * 0.5f; - } - } - else if (IsMlo) // archetype is no longer an mlo - { - IsMlo = false; - MloInstance = null; - - if (Ymap.MloEntities != null) - { - List mloEntities = Ymap.MloEntities.ToList(); - if (mloEntities.Remove(this)) - { - Ymap.MloEntities = mloEntities.ToArray(); - } - } - } - } - } - - public void SetPosition(Vector3 pos) - { - Position = pos; - if (MloParent != null) - { - _CEntityDef.position = Quaternion.Normalize(Quaternion.Invert(MloParent.Orientation)).Multiply(pos - MloParent.Position); - MloRefPosition = _CEntityDef.position; - UpdateBB(); - UpdateMloArchetype(); - } - else - { - _CEntityDef.position = pos; - UpdateBB(); - } - - - if (MloInstance != null) - { - MloInstance.SetPosition(Position); - MloInstance.UpdateEntities(); - } - - UpdateEntityHash(); - UpdateWidgetPosition(); - } - - private void UpdateBB() - { - if (Archetype != null) - { - BSCenter = Orientation.Multiply(Archetype.BSCenter) * Scale; - BSRadius = Archetype.BSRadius * Math.Max(Scale.X, Scale.Z); - if (Orientation == Quaternion.Identity) - { - BBMin = (Vector3.Min(Archetype.BBMin, Archetype.BBMax) * Scale) + Position; - BBMax = (Vector3.Max(Archetype.BBMin, Archetype.BBMax) * Scale) + Position; - BBCenter = (BBMax + BBMin) * 0.5f; - BBExtent = (BBMax - BBMin) * 0.5f; } else { - var mat = Matrix.Transformation(Vector3.Zero, Quaternion.Identity, Scale, Vector3.Zero, Orientation, Position); - var matabs = mat; - matabs.Column1 = mat.Column1.Abs(); - matabs.Column2 = mat.Column2.Abs(); - matabs.Column3 = mat.Column3.Abs(); - matabs.Column4 = mat.Column4.Abs(); - var bbcenter = (Archetype.BBMax + Archetype.BBMin) * 0.5f; - var bbextent = (Archetype.BBMax - Archetype.BBMin) * 0.5f; - var ncenter = Vector3.TransformCoordinate(bbcenter, mat); - var nextent = Vector3.TransformNormal(bbextent, matabs).Abs(); - BBCenter = ncenter; - BBExtent = nextent; - BBMin = ncenter - nextent; - BBMax = ncenter + nextent; - } - LodDist = _CEntityDef.lodDist; - if (LodDist <= 0) - { - LodDist = Archetype.LodDist; - } - ChildLodDist = _CEntityDef.childLodDist; - if (ChildLodDist < 0) - { - ChildLodDist = LodDist * 0.5f; + Console.WriteLine($"Parent not loaded yet for {pymap.Name}"); } } } - - public void UpdateEntityHash() + if (LODLights is not null) { - uint xhash = (uint)(Position.X * 100); - uint yhash = (uint)(Position.Y * 100); - uint zhash = (uint)(Position.Z * 100); - EntityHash = _CEntityDef.archetypeName.Hash ^ xhash ^ yhash ^ zhash & 0xffffffff; - } - - public void SetOrientation(Quaternion ori, bool inverse = false) - { - if (MloParent != null) + var parent = Parent; + if (parent?.DistantLODLights is not null) { - var mloInv = Quaternion.Normalize(Quaternion.Invert(MloParent.Orientation)); - Quaternion rel = Quaternion.Normalize(Quaternion.Multiply(mloInv, ori)); - Quaternion inv = Quaternion.Normalize(Quaternion.Invert(rel)); - Orientation = ori; - _CEntityDef.rotation = inv.ToVector4(); - } - else - { - Orientation = inverse ? Quaternion.Normalize(Quaternion.Invert(ori)) : ori; - if (MloInstance != null) - { - _CEntityDef.rotation = Orientation.ToVector4(); - } - else - { - Quaternion inv = inverse ? ori : Quaternion.Normalize(Quaternion.Invert(ori)); - _CEntityDef.rotation = inv.ToVector4(); - } - } - - if (MloInstance != null) - { - MloInstance.SetOrientation(ori); - MloInstance.UpdateEntities(); - } - - UpdateBB(); - UpdateWidgetPosition(); - UpdateWidgetOrientation(); - } - - public void SetScale(Vector3 s) - { - Scale = new Vector3(s.X, s.X, s.Z); - _CEntityDef.scaleXY = s.X; - _CEntityDef.scaleZ = s.Z; - - MloInstanceData mloInstance = MloParent?.MloInstance; - if (mloInstance != null) - { - var mcEntity = mloInstance.TryGetArchetypeEntity(this); - if (mcEntity != null) - { - mcEntity._Data.scaleXY = s.X; - mcEntity._Data.scaleZ = s.Z; - } - } - if (Archetype != null) - { - float smax = Math.Max(Scale.X, Scale.Z); - BSRadius = Archetype.BSRadius * smax; - } - - SetPosition(Position);//update the BB - } - - private void UpdateMloArchetype() - { - if (!(MloParent.Archetype is MloArchetype mloArchetype)) return; - - MCEntityDef entity = null; - if ((MloEntitySet?.Entities != null) && (MloEntitySet?.EntitySet?.Entities != null)) - { - var idx = MloEntitySet.Entities.IndexOf(this); - if ((idx < 0) || (idx >= MloEntitySet.EntitySet.Entities.Length)) return; - entity = MloEntitySet.EntitySet.Entities[idx]; - } - else - { - if (Index >= mloArchetype.entities.Length) return; - entity = mloArchetype.entities[Index]; - } - - entity._Data.position = _CEntityDef.position; - entity._Data.rotation = _CEntityDef.rotation; - } - - - public void SetPivotPosition(Vector3 pos) - { - PivotPosition = pos; - - UpdateWidgetPosition(); - } - - public void SetPivotOrientation(Quaternion ori) - { - PivotOrientation = ori; - - UpdateWidgetOrientation(); - } - - - public void SetPositionFromWidget(Vector3 pos) - { - SetPosition(pos - Orientation.Multiply(PivotPosition)); - } - public void SetOrientationFromWidget(Quaternion ori) - { - var newori = Quaternion.Normalize(Quaternion.Multiply(ori, Quaternion.Invert(PivotOrientation))); - var newpos = WidgetPosition - newori.Multiply(PivotPosition); - SetOrientation(newori); - SetPosition(newpos); - } - public void SetPivotPositionFromWidget(Vector3 pos) - { - var orinv = Quaternion.Invert(Orientation); - SetPivotPosition(orinv.Multiply(pos - Position)); - } - public void SetPivotOrientationFromWidget(Quaternion ori) - { - var orinv = Quaternion.Invert(Orientation); - SetPivotOrientation(Quaternion.Multiply(orinv, ori)); - } - - - public void UpdateWidgetPosition() - { - WidgetPosition = Position + Orientation.Multiply(PivotPosition); - } - public void UpdateWidgetOrientation() - { - WidgetOrientation = Quaternion.Multiply(Orientation, PivotOrientation); - } - - - public void AddChild(YmapEntityDef c) - { - if (ChildList == null) - { - ChildList = new List(); - } - c.Parent = this; - c.ParentName = _CEntityDef.archetypeName; - - ChildList.Add(c); - } - - public void ChildListToArray() - { - if (ChildList == null) return; - //if (Children == null) - //{ - Children = ChildList.ToArray(); - ChildrenMerged = Children;//include these by default in merged array - //} - //else - //{ - // List newc = new List(Children.Length + ChildList.Count); - // newc.AddRange(Children); - // newc.AddRange(ChildList); - // Children = newc.ToArray(); - //} - ChildList.Clear(); - ChildList = null; - } - public void ChildListToMergedArray() - { - if (ChildList == null) return; - if (ChildrenMerged == null) - { - ChildrenMerged = ChildList.ToArray(); - } - else - { - List newc = new List(ChildrenMerged.Length + ChildList.Count); - newc.AddRange(ChildrenMerged); - newc.AddRange(ChildList); - ChildrenMerged = newc.ToArray(); - } - ChildList.Clear(); - ChildList = null; - } - - - public void LodManagerAddChild(YmapEntityDef child) - { - if (LodManagerChildren == null) - { - LodManagerChildren = new LinkedList(); - } - LodManagerChildren.AddLast(child); - } - public void LodManagerRemoveChild(YmapEntityDef child) - { - LodManagerChildren?.Remove(child);//could improve this by caching the list node.... - } - - - public override string ToString() - { - return _CEntityDef.ToString() + ((ChildList != null) ? (" (" + ChildList.Count.ToString() + " children) ") : " ") + _CEntityDef.lodLevel.ToString(); - } - - - - public void EnsureLights(DrawableBase db) - { - if (Lights != null) return; - if (Archetype == null) return; - if (db == null) return; - - var dd = db as Drawable; - var fd = db as FragDrawable; - var skel = db.Skeleton; - LightAttributes[] lightAttrs = null; - Bounds b = null; - if (dd != null) - { - lightAttrs = dd.LightAttributes?.data_items; - b = dd.Bound; - } - else if (fd != null) - { - var frag = fd?.OwnerFragment; - skel = skel ?? frag?.Drawable?.Skeleton; - lightAttrs = frag?.LightAttributes?.data_items; - b = frag?.PhysicsLODGroup?.PhysicsLOD1?.Bound; - } - if (lightAttrs == null) return; - - var abmin = Vector3.Min(Archetype.BBMin, db.BoundingBoxMin); - var abmax = Vector3.Max(Archetype.BBMax, db.BoundingBoxMax); - if (b != null) - { - abmin = Vector3.Min(abmin, b.BoxMin); - abmax = Vector3.Max(abmax, b.BoxMax); - } - var bb = new BoundingBox(abmin, abmax).Transform(Position, Orientation, Scale); - var ints = new uint[7]; - ints[0] = (uint)(bb.Minimum.X * 10.0f); - ints[1] = (uint)(bb.Minimum.Y * 10.0f); - ints[2] = (uint)(bb.Minimum.Z * 10.0f); - ints[3] = (uint)(bb.Maximum.X * 10.0f); - ints[4] = (uint)(bb.Maximum.Y * 10.0f); - ints[5] = (uint)(bb.Maximum.Z * 10.0f); - - var bones = skel?.BonesMap; - var exts = (Archetype.Extensions?.Length ?? 0);// + (Extensions?.Length ?? 0);//seems entity extensions aren't included in this - //todo: create extension light instances - - var lightInsts = new LightInstance[lightAttrs.Length]; - for (int i = 0; i < lightAttrs.Length; i++) - { - ints[6] = (uint)(exts + i); - var la = lightAttrs[i]; - - var xform = Matrix.Identity; - if ((bones != null) && (bones.TryGetValue(la.BoneId, out Bone bone))) - { - xform = bone.AbsTransform; - } - - var li = new LightInstance(); - li.Attributes = la; - li.Hash = ComputeLightHash(ints); - li.Position = Orientation.Multiply(xform.Multiply(la.Position)) + Position; - li.Direction = Orientation.Multiply(xform.MultiplyRot(la.Direction)); - lightInsts[i] = li; - } - Lights = lightInsts; - - //LightHashTest = new uint[25]; - //for (int i = 0; i < 25; i++) - //{ - // ints[6] = (uint)(i); - // LightHashTest[i] = ComputeLightHash(ints); - //} - - } - - - public static uint ComputeLightHash(uint[] ints, uint seed = 0) - { - var a2 = ints.Length; - var v3 = a2; - var v5 = (uint)(seed + 0xDEADBEEF + 4 * ints.Length); - var v6 = v5; - var v7 = v5; - - var c = 0; - for (var i = 0; i < (ints.Length - 4) / 3 + 1; i++, v3 -= 3, c += 3) - { - var v9 = ints[c + 2] + v5; - var v10 = ints[c + 1] + v6; - var v11 = ints[c] - v9; - var v13 = v10 + v9; - var v14 = (v7 + v11) ^ BitUtil.RotateLeft(v9, 4); - var v15 = v10 - v14; - var v17 = v13 + v14; - var v18 = v15 ^ BitUtil.RotateLeft(v14, 6); - var v19 = v13 - v18; - var v21 = v17 + v18; - var v22 = v19 ^ BitUtil.RotateLeft(v18, 8); - var v23 = v17 - v22; - var v25 = v21 + v22; - var v26 = v23 ^ BitUtil.RotateLeft(v22, 16); - var v27 = v21 - v26; - var v29 = v27 ^ BitUtil.RotateRight(v26, 13); - var v30 = v25 - v29; - v7 = v25 + v26; - v6 = v7 + v29; - v5 = v30 ^ BitUtil.RotateLeft(v29, 4); - } - - if (v3 == 3) - { - v5 += ints[c + 2]; - } - - if (v3 >= 2) - { - v6 += ints[c + 1]; - } - - if (v3 >= 1) - { - var v34 = (v6 ^ v5) - BitUtil.RotateLeft(v6, 14); - var v35 = (v34 ^ (v7 + ints[c])) - BitUtil.RotateLeft(v34, 11); - var v36 = (v35 ^ v6) - BitUtil.RotateRight(v35, 7); - var v37 = (v36 ^ v34) - BitUtil.RotateLeft(v36, 16); - var v38 = BitUtil.RotateLeft(v37, 4); - var v39 = (((v35 ^ v37) - v38) ^ v36) - BitUtil.RotateLeft((v35 ^ v37) - v38, 14); - return (v39 ^ v37) - BitUtil.RotateRight(v39, 8); - } - - return v5; - } - - - [TypeConverter(typeof(ExpandableObjectConverter))] - public class LightInstance - { - public LightAttributes Attributes { get; set; } //just for display purposes! - public uint Hash { get; set; } - public Vector3 Position { get; set; } - public Vector3 Direction { get; set; } - - public override string ToString() - { - return Hash.ToString() + ": " + Attributes.Type.ToString(); + LODLights.Init(parent.DistantLODLights); } } } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapGrassInstanceBatch + + + + public void AddEntity(YmapEntityDef ent) { - private const float BatchVertMultiplier = 0.00001525878f; + //used by the editor to add to the ymap. - public Archetype Archetype { get; set; } //cached by GameFileCache on loading... - public rage__fwGrassInstanceListDef Batch { get; set; } - public rage__fwGrassInstanceListDef__InstanceData[] Instances { get; set; } - public Vector3 Position { get; set; } //calculated from AABB - public float Radius { get; set; } //calculated from AABB - public Vector3 AABBMin { get; set; } - public Vector3 AABBMax { get; set; } - public Vector3 CamRel; //used for rendering... - public float Distance; //used for rendering - public YmapFile Ymap { get; set; } + var allents = new List(AllEntities); - private List grassBounds; // for brush - public bool BrushEnabled; // for brush - public float BrushRadius = 5f; // for brush - public bool HasChanged; // for brush and renderer + ent.Index = allents.Count; + ent.Ymap = this; + allents.Add(ent); + AllEntities = allents.ToArray(); - // TODO: Make configurable. - const float BoundingSize = 0.3F; - static readonly Vector3 GrassMinMax = Vector3.One * BoundingSize; - public override string ToString() + if (ent.Parent is null || ent.Parent.Ymap != this) { - return Batch.ToString(); + //root entity, add to roots. + + List rootents = new List(RootEntities); + rootents.Add(ent); + RootEntities = rootents.ToArray(); } - public void UpdateInstanceCount() + HasChanged = true; + LodManagerUpdate = true; + } + + public bool RemoveEntity(YmapEntityDef ent) + { + //used by the editor to remove from the ymap. + if (ent is null) + return false; + + var res = true; + + int idx = ent.Index; + List newAllEntities = new List(); + List newRootEntities = new List(); + + if (AllEntities.Length > 0) { - var b = Batch; - var ins = b.InstanceList; - ins.Count1 = (ushort)Instances.Length; - b.InstanceList = ins; - Batch = b; - } - - public bool IsPointBlockedByInstance(Vector3 point) - { - return grassBounds.Any(bb => bb.Contains(point) == ContainmentType.Contains); - } - - private void ReInitializeBoundingCache() - { - // cache is already initialized correctly. - if (grassBounds != null && (grassBounds.Count == Instances.Length)) - return; - - // Clear the current bounding cache. - if (grassBounds == null) - grassBounds = new List(); - else grassBounds?.Clear(); - - foreach (var inst in Instances) + for (int i = 0; i < AllEntities.Length; i++) { - // create bounding box for this instance. - var worldPos = GetGrassWorldPos(inst.Position, new BoundingBox(AABBMin, AABBMax)); - var bb = new BoundingBox(worldPos - GrassMinMax, worldPos + GrassMinMax); - grassBounds.Add(bb); - } - } - - public bool EraseInstancesAtMouse( - YmapGrassInstanceBatch batch, - SpaceRayIntersectResult mouseRay, - float radius) - { - rage__spdAABB batchAABB = batch.Batch.BatchAABB; - var oldInstanceBounds = new BoundingBox - ( - batchAABB.min.XYZ(), - batchAABB.max.XYZ() - ); - var deleteSphere = new BoundingSphere(mouseRay.Position, radius); - - // check each instance to see if it's in the delete sphere - // thankfully we've just avoided an O(n^2) op using this bounds stuff (doesn't mean it's super fast though, - // but it's not super slow either, even at like 50,000 instances) - var insList = new List(); - foreach (var instance in batch.Instances) - { - // get the world pos - var worldPos = GetGrassWorldPos(instance.Position, oldInstanceBounds); - - // create a boundary around the instance. - var instanceBounds = new BoundingBox(worldPos - GrassMinMax, worldPos + GrassMinMax); - - // check if the sphere contains the boundary. - var bb = new BoundingBox(instanceBounds.Minimum, instanceBounds.Maximum); - var ct = deleteSphere.Contains(ref bb); - if (ct == ContainmentType.Contains || ct == ContainmentType.Intersects) + var oent = AllEntities[i]; + oent.Index = newAllEntities.Count; + if (oent != ent) { - //delInstances.Add(instance); // Add a copy of this instance - continue; + newAllEntities.Add(oent); } - insList.Add(instance); - } - if (insList.Count == Instances.Length) - return false; - - var newBounds = GetNewGrassBounds(insList, oldInstanceBounds); - // recalc instances - var b = RecalcBatch(newBounds, batch); - batch.Batch = b; - insList = RecalculateInstances(insList, oldInstanceBounds, newBounds); - batch.Instances = insList.ToArray(); - return true; - } - - public void CreateInstancesAtMouse( - YmapGrassInstanceBatch batch, - SpaceRayIntersectResult mouseRay, - float radius, - int amount, - Func spawnRayFunc, - Color color, - int ao, - int scale, - Vector3 pad, - bool randomScale) - { - - ReInitializeBoundingCache(); - var spawnPosition = mouseRay.Position; - var positions = new List(); - var normals = new List(); - - // Get rand positions. - GetSpawns(spawnPosition, spawnRayFunc, positions, normals, radius, amount); - if (positions.Count <= 0) return; - - // get the instance list - var instances = - batch.Instances?.ToList() ?? new List(); - var batchAABB = batch.Batch.BatchAABB; - - // make sure to store the old instance bounds for the original - // grass instances - var oldInstanceBounds = new BoundingBox(batchAABB.min.XYZ(), batchAABB.max.XYZ()); - - if (positions.Count <= 0) - return; - - // Begin the spawn bounds. - var grassBound = new BoundingBox(positions[0] - GrassMinMax, positions[0] + GrassMinMax); - grassBound = EncapsulatePositions(positions, grassBound); - - // Calculate the new spawn bounds. - var newInstanceBounds = new BoundingBox(oldInstanceBounds.Minimum, oldInstanceBounds.Maximum); - newInstanceBounds = instances.Count > 0 - ? newInstanceBounds.Encapsulate(grassBound) - : new BoundingBox(grassBound.Minimum, grassBound.Maximum); - - // now we need to recalculate the position of each instance - instances = RecalculateInstances(instances, oldInstanceBounds, newInstanceBounds); - - // Add new instances at each spawn position with - // the parameters in the brush. - SpawnInstances(positions, normals, instances, newInstanceBounds, color, ao, scale, pad, randomScale); - - // then recalc the bounds of the grass batch - var b = RecalcBatch(newInstanceBounds, batch); - - // plug our values back in and refresh the ymap. - batch.Batch = b; - - // Give back the new intsances - batch.Instances = instances.ToArray(); - grassBounds.Clear(); - } - - // bhv approach recommended by dexy. - public YmapGrassInstanceBatch[] OptimizeInstances(YmapGrassInstanceBatch batch, float minRadius) - { - // this function will return an array of grass instance batches - // that are split up into sectors (groups) with a specific size. - // say for instance we have 30,000 instances spread across a large - // distance. We will split those instances into a grid-like group - // and return the groups as an array of batches. - var oldInstanceBounds = new BoundingBox(batch.Batch.BatchAABB.min.XYZ(), batch.Batch.BatchAABB.max.XYZ()); - - if (oldInstanceBounds.Radius() < minRadius) - { - return new [] { batch }; - } - - // Get our optimized grassInstances - var split = SplitGrassRecursive(batch.Instances.ToList(), oldInstanceBounds, minRadius); - - // Initiate a new batch list. - var newBatches = new List(); - - foreach (var grassList in split) - { - // Create a new batch - var newBatch = new YmapGrassInstanceBatch + else if (i != idx) { - Archetype = batch.Archetype, - Ymap = batch.Ymap - }; - - // Get the boundary of the grassInstances - var newInstanceBounds = GetNewGrassBounds(grassList, oldInstanceBounds); - - // Recalculate the batch boundaries. - var b = RecalcBatch(newInstanceBounds, newBatch); - newBatch.Batch = b; - - var ins = RecalculateInstances(grassList, oldInstanceBounds, newInstanceBounds); - newBatch.Instances = ins.ToArray(); - newBatches.Add(newBatch); - } - - return newBatches.ToArray(); - } - - private List> SplitGrassRecursive( - IReadOnlyList grassInstances, - BoundingBox batchAABB, - float minRadius = 15F - ) - { - var ret = new List>(); - var oldPoints = SplitGrass(grassInstances, batchAABB); - while (true) - { - var stop = true; - var newPoints = new List>(); - foreach (var mb in oldPoints) - { - // for some reason we got a null group? - if (mb == null) - continue; - - // Get the bounds of the grassInstances list - var radius = GetNewGrassBounds(mb, batchAABB).Radius(); - - // check if the radius of the grassInstances - if (radius <= minRadius) - { - // this point list is within the minimum - // radius. - ret.Add(mb); - continue; // we don't need to continue. - } - - // since we're here let's keep going - stop = false; - - // split the grassInstances again - var s = SplitGrass(mb, batchAABB); - - // add it into the new grassInstances list. - newPoints.AddRange(s); + res = false; //indexes didn't match.. this shouldn't happen! } - - // set the old grassInstances to the new grassInstances. - oldPoints = newPoints.ToArray(); - - // if we're done, and all grassInstances are within the desired size - // then end the loop. - if (stop) break; - } - return ret; - } - - private List[] SplitGrass( - IReadOnlyList points, - BoundingBox batchAABB) - { - var pointGroup = new List[2]; - - // Calculate the bounds of these grassInstances. - var m = GetNewGrassBounds(points, batchAABB); - - // Get the center and size - var mm = new Vector3 - { - X = Math.Abs(m.Minimum.X - m.Maximum.X), - Y = Math.Abs(m.Minimum.Y - m.Maximum.Y), - Z = Math.Abs(m.Minimum.Z - m.Maximum.Z) - }; - - // x is the greatest axis... - if (mm.X > mm.Y && mm.X > mm.Z) - { - // Calculate both boundaries. - var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(mm.X * 0.5F, 0, 0)); - var rhs = new BoundingBox(m.Minimum + new Vector3(mm.X * 0.5F, 0, 0), m.Maximum); - - // Set the grassInstances accordingly. - pointGroup[0] = points - .Where(p => lhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - pointGroup[1] = points - .Where(p => rhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - } - // y is the greatest axis... - else if (mm.Y > mm.X && mm.Y > mm.Z) - { - // Calculate both boundaries. - var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(0, mm.Y * 0.5F, 0)); - var rhs = new BoundingBox(m.Minimum + new Vector3(0, mm.Y * 0.5F, 0), m.Maximum); - - // Set the grassInstances accordingly. - pointGroup[0] = points - .Where(p => lhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - pointGroup[1] = points - .Where(p => rhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - } - // z is the greatest axis... - else if (mm.Z > mm.X && mm.Z > mm.Y) - { - // Calculate both boundaries. - var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(0, 0, mm.Z * 0.5F)); - var rhs = new BoundingBox(m.Minimum + new Vector3(0, 0, mm.Z * 0.5F), m.Maximum); - - // Set the grassInstances accordingly. - pointGroup[0] = points - .Where(p => lhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - pointGroup[1] = points - .Where(p => rhs.Contains(GetGrassWorldPos(p.Position, batchAABB)) == ContainmentType.Contains).ToList(); - } - return pointGroup; - } - - private static BoundingBox GetNewGrassBounds(IReadOnlyList newGrass, BoundingBox oldAABB) - { - var grassPositions = newGrass.Select(x => GetGrassWorldPos(x.Position, oldAABB)).ToArray(); - return BoundingBox.FromPoints(grassPositions).Expand(1f); - } - - private void SpawnInstances( - IReadOnlyList positions, - IReadOnlyList normals, - ICollection instanceList, - BoundingBox instanceBounds, - Color color, - int ao, - int scale, - Vector3 pad, - bool randomScale) - { - for (var i = 0; i < positions.Count; i++) - { - var pos = positions[i]; - // create the new instance. - var newInstance = CreateNewInstance(normals[i], color, ao, scale, pad, randomScale); - - // get the grass position of the new instance and add it to the - // instance list - var grassPosition = GetGrassPos(pos, instanceBounds); - newInstance.Position = grassPosition; - instanceList.Add(newInstance); } } - - private rage__fwGrassInstanceListDef__InstanceData CreateNewInstance(Vector3 normal, Color color, int ao, int scale, Vector3 pad, - bool randomScale = false) + foreach(var oent in RootEntities) { - //Vector3 pad = FloatUtil.ParseVector3String(PadTextBox.Text); - //int scale = (int)ScaleNumericUpDown.Value; - var rand = new Random(); - if (randomScale) - scale = rand.Next(scale / 2, scale); - var newInstance = new rage__fwGrassInstanceListDef__InstanceData - { - Ao = (byte)ao, - Scale = (byte)scale, - Color = new ArrayOfBytes3 { b0 = color.R, b1 = color.G, b2 = color.B }, - Pad = new ArrayOfBytes3 { b0 = (byte)pad.X, b1 = (byte)pad.Y, b2 = (byte)pad.Z }, - NormalX = (byte)((normal.X + 1) * 0.5F * 255F), - NormalY = (byte)((normal.Y + 1) * 0.5F * 255F) - }; - return newInstance; + if (oent != ent) + newRootEntities.Add(oent); } - private rage__fwGrassInstanceListDef RecalcBatch(BoundingBox newInstanceBounds, YmapGrassInstanceBatch batch) + if (AllEntities.Length == newAllEntities.Count || RootEntities.Length == newRootEntities.Count) { - batch.AABBMax = newInstanceBounds.Maximum; - batch.AABBMin = newInstanceBounds.Minimum; - batch.Position = newInstanceBounds.Center(); - batch.Radius = newInstanceBounds.Radius(); - var b = batch.Batch; - b.BatchAABB = new rage__spdAABB - { - min = - new Vector4(newInstanceBounds.Minimum, - 0), // Let's pass the new stuff into the batchabb as well just because. - max = new Vector4(newInstanceBounds.Maximum, 0) - }; - return b; + res = false; } - private void GetSpawns( - Vector3 origin, Func spawnRayFunc, - ICollection positions, - ICollection normals, - float radius, - int resolution = 28) + LodManagerOldEntities = AllEntities; + AllEntities = newAllEntities.ToArray(); + RootEntities = newRootEntities.ToArray(); + + HasChanged = true; + LodManagerUpdate = true; + + return res; + } + + + public void AddCarGen(YmapCarGen cargen) + { + List cargens = new List(); + if (CarGenerators != null) + cargens.AddRange(CarGenerators); + cargen.Ymap = this; + cargens.Add(cargen); + CarGenerators = cargens.ToArray(); + + HasChanged = true; + } + + public bool RemoveCarGen(YmapCarGen cargen) + { + if (cargen == null) return false; + + List newcargens = new List(); + + if (CarGenerators != null) { - var rand = new Random(); - for (var i = 0; i < resolution; i++) + foreach(var cg in CarGenerators) { - var randX = (float)rand.NextDouble(-radius, radius); - var randY = (float)rand.NextDouble(-radius, radius); - if (Math.Abs(randX) > 0 && Math.Abs(randY) > 0) + if (cg != cargen) { - randX *= .7071f; - randY *= .7071f; + newcargens.Add(cg); } - var posOffset = origin + new Vector3(randX, randY, 2f); - var spaceRay = spawnRayFunc.Invoke(posOffset); - if (!spaceRay.Hit) continue; - // not truly O(n^2) but may be slow... - // actually just did some testing, not slow at all. - if (IsPointBlockedByInstance(spaceRay.Position)) continue; - normals.Add(spaceRay.Normal); - positions.Add(spaceRay.Position); + } + if (newcargens.Count == CarGenerators.Length) + { + return false; //nothing removed... wasn't present? } } - private static List RecalculateInstances( - List instances, - BoundingBox oldInstanceBounds, - BoundingBox newInstanceBounds) - { - var refreshList = new List(); - foreach (var inst in instances) - { - // Copy instance - var copy = - new rage__fwGrassInstanceListDef__InstanceData - { - Position = inst.Position, - Ao = inst.Ao, - Color = inst.Color, - NormalX = inst.NormalX, - NormalY = inst.NormalY, - Pad = inst.Pad, - Scale = inst.Scale - }; - // get the position from where we would be in the old bounds, and move it to - // the position it needs to be in the new bounds. - var oldPos = GetGrassWorldPos(copy.Position, oldInstanceBounds); - //var oldPos = oldInstanceBounds.min + oldInstanceBounds.Size * (grassPos * BatchVertMultiplier); - copy.Position = GetGrassPos(oldPos, newInstanceBounds); - refreshList.Add(copy); - } - instances = refreshList.ToList(); - return instances; - } - private static BoundingBox EncapsulatePositions(IEnumerable positions, BoundingBox bounds) - { - foreach (var pos in positions) - { - var posBounds = new BoundingBox(pos - (GrassMinMax + 0.1f), pos + (GrassMinMax + 0.1f)); - bounds = bounds.Encapsulate(posBounds); - } - return bounds; - } + CarGenerators = newcargens.ToArray(); - private static ArrayOfUshorts3 GetGrassPos(Vector3 worldPos, BoundingBox batchAABB) - { - var offset = worldPos - batchAABB.Minimum; - var size = batchAABB.Size(); - var percentage = - new Vector3( - offset.X / size.X, - offset.Y / size.Y, - offset.Z / size.Z - ); - var instancePos = percentage / BatchVertMultiplier; - return new ArrayOfUshorts3 - { - u0 = (ushort)instancePos.X, - u1 = (ushort)instancePos.Y, - u2 = (ushort)instancePos.Z - }; - } + HasChanged = true; - private static Vector3 GetGrassWorldPos(ArrayOfUshorts3 grassPos, BoundingBox batchAABB) + return true; + } + + + public void AddLodLight(YmapLODLight lodlight) + { + if (LODLights == null) { - return batchAABB.Minimum + batchAABB.Size() * (grassPos.XYZ() * BatchVertMultiplier); + LODLights = new YmapLODLights(); + LODLights.Ymap = this; + } + List lodlights = new List(); + if (LODLights?.LodLights != null) + lodlights.AddRange(LODLights.LodLights); + lodlight.LodLights = this.LODLights; + lodlight.Index = lodlights.Count; + lodlights.Add(lodlight); + LODLights.LodLights = lodlights.ToArray(); + + HasChanged = true; + + var parent = Parent; + if (parent?.DistantLODLights is not null) + { + parent.DistantLODLights.RebuildFromLodLights(LODLights.LodLights); + parent.HasChanged = true; } } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapPropInstanceBatch + public bool RemoveLodLight(YmapLODLight lodlight) { - public YmapFile Ymap { get; set; } + if (lodlight == null) + return false; + List newlodlights = new List(); + + var lodlights = LODLights?.LodLights; + if (lodlights != null) + { + foreach(var ll in lodlights) + { + if (ll != lodlight) + { + newlodlights.Add(ll); + } + } + if (newlodlights.Count == lodlights.Length) + { + return false; //nothing removed... wasn't present? + } + } + + for (int i = 0; i < newlodlights.Count; i++) + { + newlodlights[i].Index = i; + } + + LODLights.LodLights = newlodlights.ToArray(); + + HasChanged = true; + + var parent = Parent; + if (parent?.DistantLODLights != null) + { + parent.DistantLODLights.RebuildFromLodLights(LODLights.LodLights); + parent.HasChanged = true; + } + + return true; } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapDistantLODLights + + public void AddBoxOccluder(YmapBoxOccluder box) { - public CDistantLODLight CDistantLODLight { get; set; } - public uint[] colours { get; set; } - public MetaVECTOR3[] positions { get; set; } + if (box is null) + return; + var boxes = new List(); + if (BoxOccluders is not null) + boxes.AddRange(BoxOccluders); + box.Ymap = this; + box.Index = boxes.Count; + boxes.Add(box); + BoxOccluders = boxes.ToArray(); - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - public YmapFile Ymap { get; set; } - - public void CalcBB() - { - if (positions != null) - { - Vector3 min = new Vector3(float.MaxValue); - Vector3 max = new Vector3(float.MinValue); - for (int i = 0; i < positions.Length; i++) - { - var p = positions[i]; - Vector3 pv = p.ToVector3(); - min = Vector3.Min(min, pv); - max = Vector3.Max(max, pv); - } - BBMin = min; - BBMax = max; - } - - } - - - public void RebuildFromLodLights(YmapLODLight[] lodlights) - { - var n = lodlights?.Length ?? 0; - if (n == 0) return; - - colours = new uint[n]; - positions = new MetaVECTOR3[n]; - var nstreetlights = 0; - for (int i = 0; i < n; i++) - { - var ll = lodlights[i]; - colours[i] = (uint)(ll.Colour.ToBgra()); - positions[i] = new MetaVECTOR3(ll.Position); - if ((ll.StateFlags1 & 1) > 0) - { - nstreetlights++; - } - } - - var cdll = CDistantLODLight; - cdll.numStreetLights = (ushort)nstreetlights; - - CalcBB(); - - } - - - public override string ToString() - { - if (Ymap != null) - { - return Ymap.ToString(); - } - return base.ToString(); - } + HasChanged = true; } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapLODLights + public bool RemoveBoxOccluder(YmapBoxOccluder box) { - public CLODLight CLODLight { get; set; } - public MetaVECTOR3[] direction { get; set; } - public float[] falloff { get; set; } - public float[] falloffExponent { get; set; } - public uint[] timeAndStateFlags { get; set; } - public uint[] hash { get; set; } - public byte[] coneInnerAngle { get; set; } - public byte[] coneOuterAngleOrCapExt { get; set; } - public byte[] coronaIntensity { get; set; } - - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - public YmapFile Ymap { get; set; } - - public YmapLODLight[] LodLights { get; set; } - - public PathBVH BVH { get; set; } - - public void Init(YmapDistantLODLights parent) + if (box == null) return false; + var newboxes = new List(); + if (BoxOccluders != null) { - if (parent == null) return; - - BuildLodLights(parent); - CalcBB(); - BuildBVH(); - } - - public void BuildLodLights(YmapDistantLODLights parent) - { - var n = direction?.Length ?? 0; - n = Math.Min(n, parent.positions?.Length ?? 0); - n = Math.Min(n, parent.colours?.Length ?? 0); - n = Math.Min(n, falloff?.Length ?? 0); - n = Math.Min(n, falloffExponent?.Length ?? 0); - n = Math.Min(n, timeAndStateFlags?.Length ?? 0); - n = Math.Min(n, hash?.Length ?? 0); - n = Math.Min(n, coneInnerAngle?.Length ?? 0); - n = Math.Min(n, coneOuterAngleOrCapExt?.Length ?? 0); - n = Math.Min(n, coronaIntensity?.Length ?? 0); - if (n == 0) return; - - LodLights = new YmapLODLight[n]; - for (int i = 0; i < n; i++) + foreach (var oldbox in BoxOccluders) { - var l = new YmapLODLight(); - l.Init(this, parent, i); - LodLights[i] = l; - } - } - - public void BuildBVH() - { - BVH = new PathBVH(LodLights, 10, 10); - } - - - public void CalcBB() - { - var positions = Ymap?.Parent?.DistantLODLights?.positions; - if (positions != null) - { - Vector3 min = new Vector3(float.MaxValue); - Vector3 max = new Vector3(float.MinValue); - for (int i = 0; i < positions.Length; i++) + if (oldbox != box) { - var p = positions[i]; - Vector3 pv = p.ToVector3(); - min = Vector3.Min(min, pv); - max = Vector3.Max(max, pv); - } - BBMin = min; - BBMax = max; - } - else if (Ymap != null) - { - BBMin = Ymap._CMapData.entitiesExtentsMin; - BBMax = Ymap._CMapData.entitiesExtentsMax; - } - else - { } - } - - public void RebuildFromLodLights() - { - var n = LodLights?.Length ?? 0; - if (n <= 0) - { - direction = null; - falloff = null; - falloffExponent = null; - timeAndStateFlags = null; - hash = null; - coneInnerAngle = null; - coneOuterAngleOrCapExt = null; - coronaIntensity = null; - } - else - { - direction = new MetaVECTOR3[n]; - falloff = new float[n]; - falloffExponent = new float[n]; - timeAndStateFlags = new uint[n]; - hash = new uint[n]; - coneInnerAngle = new byte[n]; - coneOuterAngleOrCapExt = new byte[n]; - coronaIntensity = new byte[n]; - - for (int i = 0; i < n; i++) - { - var ll = LodLights[i]; - direction[i] = new MetaVECTOR3(ll.Direction); - falloff[i] = ll.Falloff; - falloffExponent[i] = ll.FalloffExponent; - timeAndStateFlags[i] = ll.TimeAndStateFlags; - hash[i] = ll.Hash; - coneInnerAngle[i] = ll.ConeInnerAngle; - coneOuterAngleOrCapExt[i] = ll.ConeOuterAngleOrCapExt; - coronaIntensity[i] = ll.CoronaIntensity; + oldbox.Index = newboxes.Count; + newboxes.Add(oldbox); } } - - } - - - public override string ToString() - { - if (Ymap != null) + if (newboxes.Count == BoxOccluders.Length) { - return Ymap.ToString(); + return false;//nothing removed... wasn't present? } - return base.ToString(); } + + BoxOccluders = newboxes.ToArray(); + + HasChanged = true; + + return true; } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapLODLight : BasePathNode + + public void AddOccludeModel(YmapOccludeModel model) { - public YmapFile Ymap { get { return LodLights?.Ymap ?? DistLodLights?.Ymap; } } - public YmapLODLights LodLights { get; set; } - public YmapDistantLODLights DistLodLights { get; set; } - public int Index { get; set; } - public Color Colour { get; set; } - public Vector3 Position { get; set; } - public Vector3 Direction { get; set; } - public float Falloff { get; set; } - public float FalloffExponent { get; set; } - public uint TimeAndStateFlags { get; set; } - public uint Hash { get; set; } - public byte ConeInnerAngle { get; set; } - public byte ConeOuterAngleOrCapExt { get; set; } - public byte CoronaIntensity { get; set; } + if (model is null) + return; + var models = new List(); + if (OccludeModels != null) + models.AddRange(OccludeModels); + model.Ymap = this; + models.Add(model); + OccludeModels = models.ToArray(); - public Quaternion Orientation { get; set; } - public Vector3 Scale { get; set; } + HasChanged = true; + } - public Vector3 TangentX { get; set; } - public Vector3 TangentY { get; set; } - - public LightType Type + public bool RemoveOccludeModel(YmapOccludeModel model) + { + if (model == null) return false; + var newmodels = new List(); + if (OccludeModels != null) { - get + foreach (var oldmodel in OccludeModels) { - return (LightType)((TimeAndStateFlags >> 26) & 7); + if (oldmodel != model) + { + oldmodel.Index = newmodels.Count; + newmodels.Add(oldmodel); + } } - set + if (newmodels.Count == OccludeModels.Length) { - TimeAndStateFlags = (TimeAndStateFlags & 0xE3FFFFFF) + (((uint)value & 7) << 26); - } - } - public FlagsUint TimeFlags - { - get - { - return (TimeAndStateFlags & 0xFFFFFF); - } - set - { - TimeAndStateFlags = (TimeAndStateFlags & 0xFF000000) + (value & 0xFFFFFF); - } - } - public uint StateFlags1 - { - get - { - return (TimeAndStateFlags >> 24) & 3; - } - set - { - TimeAndStateFlags = (TimeAndStateFlags & 0xFCFFFFFF) + ((value & 3) << 24); - } - } - public uint StateFlags2 - { - get - { - return (TimeAndStateFlags >> 29) & 7; - } - set - { - TimeAndStateFlags = (TimeAndStateFlags & 0x1FFFFFFF) + ((value & 7) << 29); + return false;//nothing removed... wasn't present? } } - public bool Enabled { get; set; } = true; + OccludeModels = newmodels.ToArray(); - public bool Visible { get; set; } = true; + HasChanged = true; - public void Init(YmapLODLights l, YmapDistantLODLights p, int i) + return true; + } + + + public void AddOccludeModelTriangle(YmapOccludeModelTriangle tri) + { + if (tri?.Model is null) + return; + + var tris = tri.Model.Triangles.ToList(); + tri.Index = tris.Count; + tris.Add(tri); + tri.Model.Triangles = tris.ToArray(); + + //tri.Model.BuildBVH(); + //... + + HasChanged = true; + } + + public bool RemoveOccludeModelTriangle(YmapOccludeModelTriangle tri) + { + if (tri?.Model is null) + return false; + + var newtris = new List(); + if (tri.Model.Triangles is not null) { - LodLights = l; - DistLodLights = p; - Index = i; + newtris.EnsureCapacity(tri.Model.Triangles.Length); + foreach (var oldtri in tri.Model.Triangles) + { + if (oldtri != tri) + { + oldtri.Index = newtris.Count; + newtris.Add(oldtri); + } + } + } + tri.Model.Triangles = newtris.ToArray(); + //tri.Model.BuildBVH(); + //... - if (p.colours == null) return; - if ((i < 0) || (i >= p.colours.Length)) return; + HasChanged = true; - Colour = Color.FromBgra(p.colours[i]); - Position = p.positions[i].ToVector3(); - Direction = l.direction[i].ToVector3(); - Falloff = l.falloff[i]; - FalloffExponent = l.falloffExponent[i]; - TimeAndStateFlags = l.timeAndStateFlags[i]; - Hash = l.hash[i]; - ConeInnerAngle = l.coneInnerAngle[i]; - ConeOuterAngleOrCapExt = l.coneOuterAngleOrCapExt[i]; - CoronaIntensity = l.coronaIntensity[i]; + return true; + } - UpdateTangentsAndOrientation(); - Scale = new Vector3(Falloff); + public void AddGrassBatch(YmapGrassInstanceBatch newbatch) + { + List batches = new List(); + if (GrassInstanceBatches is not null && GrassInstanceBatches.Length > 0) + batches.AddRange(GrassInstanceBatches); + newbatch.Ymap = this; + batches.Add(newbatch); + GrassInstanceBatches = batches.ToArray(); + + HasChanged = true; + UpdateGrassPhysDict(true); + } + + public bool RemoveGrassBatch(YmapGrassInstanceBatch batch) + { + if (batch is null) + return false; + + List batches = new List(GrassInstanceBatches.Length); + + if (GrassInstanceBatches is not null) + { + foreach(var gb in GrassInstanceBatches) + { + if (gb != batch) + { + batches.Add(gb); + } + } + if (batches.Count == GrassInstanceBatches.Length) + { + return false; //nothing removed... wasn't present? + } } - public void UpdateTangentsAndOrientation() + if (batches.Count <= 0) { - switch (Type) + UpdateGrassPhysDict(false); + } + + GrassInstanceBatches = batches.ToArray(); + + HasChanged = true; + + return true; + } + + + + + public void SetName(string newname) + { + var newnamex = newname + ".ymap"; + var newhash = JenkHash.GenHashLower(newname); + JenkIndex.EnsureLower(newname); + if (RpfFileEntry is not null) + { + RpfFileEntry.Name = newnamex; + } + Name = newnamex; + _CMapData.name = newhash; + } + public void SetFilePath(string filepath) + { + FilePath = filepath.ToLowerInvariant(); + var newname = Path.GetFileNameWithoutExtension(filepath); + SetName(newname); + } + + + public bool CalcFlags() + { + uint flags = 0; + uint contentFlags = 0; + + foreach (var yent in AllEntities) + { + switch (yent._CEntityDef.lodLevel) { - default: - case LightType.Point: - TangentX = Vector3.UnitX; - TangentY = Vector3.UnitY; - Orientation = Quaternion.Identity; + case rage__eLodType.LODTYPES_DEPTH_ORPHANHD: + case rage__eLodType.LODTYPES_DEPTH_HD: + contentFlags = SetBit(contentFlags, 0); //1 break; - case LightType.Spot: - TangentX = Vector3.Normalize(Direction.GetPerpVec()); - TangentY = Vector3.Normalize(Vector3.Cross(Direction, TangentX)); + case rage__eLodType.LODTYPES_DEPTH_LOD: + contentFlags = SetBit(contentFlags, 1); //2 + flags = SetBit(flags, 1); //2 break; - case LightType.Capsule: - TangentX = -Vector3.Normalize(Direction.GetPerpVec()); - TangentY = Vector3.Normalize(Vector3.Cross(Direction, TangentX)); + case rage__eLodType.LODTYPES_DEPTH_SLOD1: + contentFlags = SetBit(contentFlags, 4); //16 + flags = SetBit(flags, 1); //2 + break; + case rage__eLodType.LODTYPES_DEPTH_SLOD2: + case rage__eLodType.LODTYPES_DEPTH_SLOD3: + case rage__eLodType.LODTYPES_DEPTH_SLOD4: + contentFlags = SetBit(contentFlags, 2); //4 + contentFlags = SetBit(contentFlags, 4); //16 + flags = SetBit(flags, 1); //2 break; } - - if (Type == LightType.Point) + if (yent.MloInstance != null) { - Orientation = Quaternion.Identity; + contentFlags = SetBit(contentFlags, 3); //8 //(interior instance) } + } + + if (CMloInstanceDefs.Length > 0) + { + contentFlags = SetBit(contentFlags, 3); //8 //(interior instance) //is this still necessary? + } + if (physicsDictionaries.Length > 0) + { + contentFlags = SetBit(contentFlags, 6); //64 + } + if ((GrassInstanceBatches != null) && (GrassInstanceBatches.Length > 0)) + { + contentFlags = SetBit(contentFlags, 10); //64 + } + if ((LODLights != null) && ((LODLights.direction?.Length ?? 0) > 0)) + { + contentFlags = SetBit(contentFlags, 7); //128 + } + if ((DistantLODLights != null) && ((DistantLODLights.positions?.Length ?? 0) > 0)) + { + flags = SetBit(flags, 1); //2 + contentFlags = SetBit(contentFlags, 8); //256 + } + if ((BoxOccluders != null) || (OccludeModels != null)) + { + contentFlags = SetBit(contentFlags, 5); //32 + } + + + bool change = false; + if (_CMapData.flags != flags) + { + _CMapData.flags = flags; + change = true; + } + if (_CMapData.contentFlags != contentFlags) + { + _CMapData.contentFlags = contentFlags; + change = true; + } + return change; + } + + public bool CalcExtents() + { + Vector3 emin = new Vector3(float.MaxValue); + Vector3 emax = new Vector3(float.MinValue); + Vector3 smin = new Vector3(float.MaxValue); + Vector3 smax = new Vector3(float.MinValue); + Vector3[] c = new Vector3[8]; + Vector3[] s = new Vector3[8]; + + foreach(var ent in AllEntities) + { + var arch = ent.Archetype; + var ori = ent.Orientation; + float loddist = ent._CEntityDef.lodDist; + + Vector3 bbmin = ent.Position - ent.BSRadius; //sphere + Vector3 bbmax = ent.Position + ent.BSRadius; + Vector3 sbmin = bbmin - loddist; + Vector3 sbmax = bbmax + loddist; + if (arch != null) + { + if (loddist <= 0.0f) + { + loddist = arch.LodDist; + } + + Vector3 abmin = arch.BBMin * ent.Scale; //entity box + Vector3 abmax = arch.BBMax * ent.Scale; + c[0] = abmin; + c[1] = new Vector3(abmin.X, abmin.Y, abmax.Z); + c[2] = new Vector3(abmin.X, abmax.Y, abmin.Z); + c[3] = new Vector3(abmin.X, abmax.Y, abmax.Z); + c[4] = new Vector3(abmax.X, abmin.Y, abmin.Z); + c[5] = new Vector3(abmax.X, abmin.Y, abmax.Z); + c[6] = new Vector3(abmax.X, abmax.Y, abmin.Z); + c[7] = abmax; + + abmin = arch.BBMin * ent.Scale - loddist; //streaming box + abmax = arch.BBMax * ent.Scale + loddist; + s[0] = abmin; + s[1] = new Vector3(abmin.X, abmin.Y, abmax.Z); + s[2] = new Vector3(abmin.X, abmax.Y, abmin.Z); + s[3] = new Vector3(abmin.X, abmax.Y, abmax.Z); + s[4] = new Vector3(abmax.X, abmin.Y, abmin.Z); + s[5] = new Vector3(abmax.X, abmin.Y, abmax.Z); + s[6] = new Vector3(abmax.X, abmax.Y, abmin.Z); + s[7] = abmax; + + bbmin = new Vector3(float.MaxValue); + bbmax = new Vector3(float.MinValue); + sbmin = new Vector3(float.MaxValue); + sbmax = new Vector3(float.MinValue); + for (int j = 0; j < 8; j++) + { + Vector3 corn = ori.Multiply(in c[j]) + ent.Position; + Vectors.Min(in bbmin, in corn, out bbmin); + Vectors.Max(in bbmax, in corn, out bbmax); + + corn = ori.Multiply(in s[j]) + ent.Position; + Vectors.Min(in sbmin, in corn, out sbmin); + Vectors.Max(in sbmax, in corn, out sbmax); + } + } + + Vectors.Min(in emin, in bbmin, out emin); + Vectors.Max(in emax, in bbmax, out emax); + Vectors.Min(in smin, in sbmin, out smin); + Vectors.Max(in smax, in sbmax, out smax); + } + + if (GrassInstanceBatches != null) + { + //var lodoffset = Vector3.Zero;// new Vector3(0, 0, 100); //IDK WHY -neos7 //dexy: i guess it's not completely necessary... //blame neos + foreach (var batch in GrassInstanceBatches) //thanks to Neos7 + { + Vectors.Min(in emin, in batch.AABBMin, out emin); + Vectors.Max(in emax, in batch.AABBMax, out emax); + Vectors.Min(in smin, (batch.AABBMin - batch.Batch.lodDist), out smin); // + lodoffset + Vectors.Max(in smax, (batch.AABBMax + batch.Batch.lodDist), out smax); // - lodoffset + } + } + + if (CarGenerators != null) + { + foreach (var cargen in CarGenerators) + { + var len = cargen._CCarGen.perpendicularLength; + Vectors.Min(in emin, cargen.Position - len, out emin); + Vectors.Max(in emax, cargen.Position + len, out emax); + Vectors.Min(in smin, cargen.Position - len*2.0f, out smin); //just a random guess, maybe should be more? + Vectors.Max(in smax, cargen.Position + len*2.0f, out smax); + } + } + + if (LODLights != null) + { + LODLights.CalcBB(); + Vectors.Min(in emin, LODLights.BBMin - 20.0f, out emin); //about right + Vectors.Max(in emax, LODLights.BBMax + 20.0f, out emax); + Vectors.Min(in smin, LODLights.BBMin - 950.0f, out smin); //seems correct + Vectors.Max(in smax, LODLights.BBMax + 950.0f, out smax); + } + + if (DistantLODLights != null) + { + DistantLODLights.CalcBB(); + Vectors.Min(in emin, DistantLODLights.BBMin - 20.0f, out emin); //not exact, but probably close enough + Vectors.Max(in emax, DistantLODLights.BBMax + 20.0f, out emax); + Vectors.Min(in smin, (DistantLODLights.BBMin - 3000.0f), out smin); //seems correct + Vectors.Max(in smax, (DistantLODLights.BBMax + 3000.0f), out smax); + } + + if (BoxOccluders != null) + { + foreach (var box in BoxOccluders) + { + var siz = box.Size.Length() * 0.5f;//should really use box rotation instead.... + Vectors.Min(in emin, box.Position - siz, out emin); + Vectors.Max(in emax, box.Position + siz, out emax); + Vectors.Min(in smin, box.Position - siz, out smin);//check this! for some vanilla ymaps it seems right, others not + Vectors.Max(in smax, box.Position + siz, out smax);//occluders don't seem to have a loddist + } + } + + if (OccludeModels != null) + { + foreach (var model in OccludeModels) + { + var boundingBox = model.BVH?._Box ?? model._OccludeModel.BoundingBox; + Vectors.Min(in emin, in boundingBox.Minimum, out emin);//this needs to be updated! + Vectors.Max(in emax, in boundingBox.Maximum, out emax); + Vectors.Min(in smin, in boundingBox.Minimum, out smin);//check this! for some vanilla ymaps it seems right, others not + Vectors.Max(in smax, in boundingBox.Maximum, out smax);//occluders don't seem to have a loddist + } + } + + bool change = false; + if (_CMapData.entitiesExtentsMin != emin) + { + _CMapData.entitiesExtentsMin = emin; + change = true; + } + if (_CMapData.entitiesExtentsMax != emax) + { + _CMapData.entitiesExtentsMax = emax; + change = true; + } + if (_CMapData.streamingExtentsMin != smin) + { + _CMapData.streamingExtentsMin = smin; + change = true; + } + if (_CMapData.streamingExtentsMax != smax) + { + _CMapData.streamingExtentsMax = smax; + change = true; + } + return change; + } + + + private void UpdateGrassPhysDict(bool add) + { + var physDict = physicsDictionaries?.ToList() ?? new List(); + var vproc1 = JenkHash.GenHash("v_proc1"); + var vproc2 = JenkHash.GenHash("v_proc2"); // I think you need vproc2 as well. + var change = false; + if (!physDict.Contains(vproc1)) + { + change = true; + if (add) + physDict.Add(vproc1); else - { - var m = new Matrix(); - m.Row1 = new Vector4(TangentX, 0); - m.Row2 = new Vector4(TangentY, 0); - m.Row3 = new Vector4(Direction, 0); - Orientation = Quaternion.RotationMatrix(m); - } + physDict.Remove(vproc1); } - - public void SetColour(Color c) + if (!physDict.Contains(vproc2)) { - Colour = c; - - if ((DistLodLights?.colours != null) && (DistLodLights.colours.Length >= Index)) - { - DistLodLights.colours[Index] = (uint)(c.ToBgra()); - } - - } - public void SetPosition(Vector3 pos) - { - Position = pos; - - if ((DistLodLights?.positions != null) && (DistLodLights.positions.Length >= Index)) - { - DistLodLights.positions[Index] = new MetaVECTOR3(pos); - } - - } - public void SetOrientation(Quaternion ori) - { - var inv = Quaternion.Invert(Orientation); - var delta = ori * inv; - TangentX = Vector3.Normalize(delta.Multiply(TangentX)); - TangentY = Vector3.Normalize(delta.Multiply(TangentY)); - Direction = Vector3.Normalize(delta.Multiply(Direction)); - Orientation = ori; - } - public void SetScale(Vector3 scale) - { - switch (Type) - { - case LightType.Point: - case LightType.Spot: - Falloff = scale.Z; - break; - case LightType.Capsule: - Falloff = scale.X; - ConeOuterAngleOrCapExt = (byte)Math.Min(255, Math.Max(0, Math.Round(Math.Max((uint)ConeOuterAngleOrCapExt, 2) * Math.Abs(scale.Z / Math.Max(Scale.Z, 0.01f)))));//lols - break; - } - Scale = scale; - } - - - - public void CopyFrom(YmapLODLight l) - { - Colour = l.Colour; - Position = l.Position; - Direction = l.Direction; - Falloff = l.Falloff; - FalloffExponent = l.FalloffExponent; - TimeAndStateFlags = l.TimeAndStateFlags; - Hash = l.Hash; - ConeInnerAngle = l.ConeInnerAngle; - ConeOuterAngleOrCapExt = l.ConeOuterAngleOrCapExt; - CoronaIntensity = l.CoronaIntensity; - - Orientation = l.Orientation; - Scale = l.Scale; - TangentX = l.TangentX; - TangentY = l.TangentY; - } - - - public override string ToString() - { - return Index.ToString() + ": " + Position.ToString(); + change = true; + if (add) + physDict.Add(vproc2); + else + physDict.Remove(vproc2); } + if (change) + physicsDictionaries = physDict.ToArray(); } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapTimeCycleModifier + public void InitYmapEntityArchetypes(GameFileCache gfc) { - public CTimeCycleModifier CTimeCycleModifier { get; set; } - public World.TimecycleMod TimeCycleModData { get; set; } - - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - - public YmapFile Ymap { get; set; } - } - - - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapCarGen - { - public CCarGen _CCarGen; - public CCarGen CCarGen { get { return _CCarGen; } set { _CCarGen = value; } } - - public Vector3 Position { get; set; } - public Quaternion Orientation { get; set; } - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - - public YmapFile Ymap { get; set; } - - - public YmapCarGen(YmapFile ymap, CCarGen cargen) + if (AllEntities.Length > 0) { - float hlen = cargen.perpendicularLength * 0.5f; - Ymap = ymap; - CCarGen = cargen; - Position = cargen.position; - CalcOrientation(); - BBMin = new Vector3(-hlen); - BBMax = new Vector3(hlen); - } - - - public void CalcOrientation() - { - float angl = (float)Math.Atan2(_CCarGen.orientY, _CCarGen.orientX); - Orientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl); - } - - public void SetPosition(Vector3 pos) - { - Position = pos; - _CCarGen.position = pos; - } - public void SetOrientation(Quaternion ori) - { - Orientation = ori; - - float len = Math.Max(_CCarGen.perpendicularLength * 1.5f, 5.0f); - Vector3 v = new Vector3(len, 0, 0); - Vector3 t = ori.Multiply(v); - - _CCarGen.orientX = t.X; - _CCarGen.orientY = t.Y; - } - public void SetScale(Vector3 scale) - { - float s = scale.X; - float hlen = s * 0.5f; - _CCarGen.perpendicularLength = s; - - BBMin = new Vector3(-hlen); - BBMax = new Vector3(hlen); - } - - public void SetLength(float length) - { - _CCarGen.perpendicularLength = length; - float hlen = length * 0.5f; - - BBMin = new Vector3(-hlen); - BBMax = new Vector3(hlen); - } - - public string NameString() - { - MetaHash mh = _CCarGen.carModel; - if ((mh == 0) && (_CCarGen.popGroup != 0)) + foreach(var ent in AllEntities) { - mh = _CCarGen.popGroup; + var arch = gfc.GetArchetype(ent._CEntityDef.archetypeName); + ent.SetArchetype(arch); + if (ent.IsMlo) + ent.MloInstance.InitYmapEntityArchetypes(gfc); } - return mh.ToString(); } - - public override string ToString() + if (GrassInstanceBatches != null && GrassInstanceBatches.Length > 0) { - return _CCarGen.carModel.ToString() + ", " + Position.ToString() + ", " + _CCarGen.popGroup.ToString() + ", " + _CCarGen.livery.ToString(); - } - } - - - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapOccludeModel : BasePathData - { - public OccludeModel _OccludeModel; - - public OccludeModel OccludeModel { get { return _OccludeModel; } set { _OccludeModel = value; } } - - public YmapFile Ymap { get; set; } - - public byte[] Data { get; set; } - private int vertexCount; - private int indicesOffset { get => vertexCount * 12; } - public Span Vertices { get => MetaTypes.ConvertDataArray(Data, 0, vertexCount); } - public Span Indices { get => Data.AsSpan(indicesOffset); } - public int Index { get; set; } - - public YmapOccludeModelTriangle[] Triangles { get; set; } - public TriangleBVH BVH { get; set; } - - public FlagsUint Flags - { - get + foreach(var batch in GrassInstanceBatches) { - return _OccludeModel.flags; - } - set - { - _OccludeModel.flags = value; + batch.Archetype = gfc.GetArchetype(batch.Batch.archetypeName); } } - public YmapOccludeModel(YmapFile ymap, OccludeModel model) + if (TimeCycleModifiers != null && TimeCycleModifiers.Length > 0) { - Ymap = ymap; - _OccludeModel = model; - } - - - public void Load(Meta meta) - { - var vptr = _OccludeModel.verts; - var dataSize = _OccludeModel.dataSize; - var indicesOffset = _OccludeModel.numVertsInBytes; - vertexCount = indicesOffset / 12; - var indexCount = (int)(dataSize - indicesOffset);// / 4; - Data = MetaTypes.GetByteArray(meta, vptr, dataSize); - //Vertices = MetaTypes.ConvertDataArray(Data, 0, vertexCount).ToArray(); - //Indices = new byte[indexCount]; - //Buffer.BlockCopy(Data, indicesOffset, Indices, 0, indexCount); - BuildTriangles(); - } - - - public void BuildTriangles() - { - if ((Vertices == null) || (Indices == null)) + foreach(var tcm in TimeCycleModifiers) { - Triangles = null; - return; - } - var tris = new List(); - for (int i = 0; i < Indices.Length; i += 3) - { - var tri = new YmapOccludeModelTriangle(this, Vertices[Indices[i]], Vertices[Indices[i+1]], Vertices[Indices[i+2]], tris.Count); - tris.Add(tri); - } - Triangles = tris.ToArray(); - } - public void BuildBVH() - { - if (Triangles == null) - { - BVH = null; - return; - } - - BVH = new TriangleBVH(Triangles); - - } - public void BuildVertices() - { - //create vertices and indices arrays from Triangles - if (Triangles == null) - { - return; - } - - - - var vdict = new Dictionary(); - var verts = new List(); - var inds = new List(); - byte ensureVert(Vector3 v) - { - if (vdict.TryGetValue(v, out byte b)) + World.TimecycleMod wtcm; + if (gfc.TimeCycleModsDict.TryGetValue(tcm.CTimeCycleModifier.name.Hash, out wtcm)) { - return b; + tcm.TimeCycleModData = wtcm; } - if (verts.Count > 255) - { - return 0; - } - var i = (byte)verts.Count; - vdict[v] = i; - verts.Add(v); - return i; } - for (int i = 0; i < Triangles.Length; i++) - { - var tri = Triangles[i]; - inds.Add(ensureVert(tri.Corner1)); - inds.Add(ensureVert(tri.Corner2)); - inds.Add(ensureVert(tri.Corner3)); - } - - var newVertsSize = Vector3.SizeInBytes * verts.Count; - var newIndicesSize = Marshal.SizeOf() * inds.Count; - - if (newVertsSize + newIndicesSize != Data.Length) - { - Data = new byte[newVertsSize + newIndicesSize]; - } - vertexCount = verts.Count; - for (int i = 0; i < verts.Count; i++) - { - Vertices[i] = verts[i]; - } - for (int i = 0; i < inds.Count; i++) - { - Indices[i] = inds[i]; - } - } - public void BuildData() - { - //create Data from vertices and indices arrays - if (Vertices == null) return; - if (Indices == null) return; - var dlen = (Vertices.Length * Vector3.SizeInBytes) + (Indices.Length * 1); - if (dlen != Data.Length) - { - throw new InvalidOperationException("Size mismatch in YmapOccludeModel BuildData"); - } - //var d = new byte[dlen]; - //var vbytes = MetaTypes.ConvertArrayToBytes(Vertices); - //var ibytes = Indices; - //Buffer.BlockCopy(vbytes, 0, d, 0, vbytes.Length); - //Buffer.BlockCopy(ibytes, 0, d, vbytes.Length, ibytes.Length); - //Data = d; - var min = new Vector3(float.MaxValue); - var max = new Vector3(float.MinValue); - for (int i = 0; i < Vertices.Length; i++) - { - min = Vector3.Min(min, Vertices[i]); - max = Vector3.Max(max, Vertices[i]); - } - _OccludeModel.bmin = min; - _OccludeModel.bmax = max; - _OccludeModel.Unused0 = min.X; - _OccludeModel.Unused1 = max.X; - _OccludeModel.dataSize = (uint)dlen; - _OccludeModel.numVertsInBytes = (ushort)(vertexCount * Vector3.SizeInBytes); - _OccludeModel.numTris = (ushort)((Indices.Length / 3) + 32768);//is this actually a flag lurking..? - //_OccludeModel.flags = ... } - public YmapOccludeModelTriangle RayIntersect(ref Ray ray, ref float hitdist) - { - if (Triangles == null) - { - BuildTriangles(); - BuildBVH(); - } - else if (BVH == null) - { - BuildBVH(); - } - if (BVH == null) return null; - return BVH.RayIntersect(ref ray, ref hitdist) as YmapOccludeModelTriangle; - } - - public EditorVertex[] GetTriangleVertices() - { - if ((Vertices == null) || (Indices == null)) return null; - EditorVertex[] res = new EditorVertex[Indices.Length];//changing from indexed to nonindexed triangle list - var colour = new Color4(1.0f, 0.0f, 0.0f, 0.8f); //todo: colours for occluders? - var colourval = (uint)colour.ToRgba(); - for (int i = 0; i < Indices.Length; i++) - { - res[i].Position = Vertices[Indices[i]]; - res[i].Colour = colourval; - } - return res; - } - public EditorVertex[] GetPathVertices() - { - return null; - } - public Vector4[] GetNodePositions() - { - return null; - } - - public override string ToString() - { - return Index.ToString() + ": " + Vertices.Length.ToString() + " vertices, " + (Triangles?.Length ?? 0).ToString() + " triangles"; - } } - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapOccludeModelTriangle : TriangleBVHItem + private static uint SetBit(uint value, int bit) { - public YmapOccludeModel Model { get; set; } - public YmapFile Ymap { get { return Model?.Ymap; } } - public int Index { get; set; } - - public YmapOccludeModelTriangle(YmapOccludeModel model, Vector3 v1, Vector3 v2, Vector3 v3, int i) - { - Model = model; - Corner1 = v1; - Corner2 = v2; - Corner3 = v3; - Index = i; - } - } - - [TypeConverter(typeof(ExpandableObjectConverter))] - public class YmapBoxOccluder : BasePathData - { - public BoxOccluder _Box; - public BoxOccluder Box { get { return _Box; } set { _Box = value; } } - - public YmapFile Ymap { get; set; } - - - public Vector3 Position { get; set; } - public Vector3 Size { get; set; } - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - public Quaternion Orientation { get; set; } - public int Index { get; set; } - - - - public YmapBoxOccluder(YmapFile ymap, BoxOccluder box) - { - Ymap = ymap; - _Box = box; - - Position = new Vector3(box.iCenterX, box.iCenterY, box.iCenterZ) / 4.0f; - Size = new Vector3(box.iLength, box.iWidth, box.iHeight) / 4.0f; - BBMin = Size * -0.5f; - BBMax = Size * 0.5f; - - float cosz = box.iCosZ / 32767.0f;// ((float)short.MaxValue) - float sinz = box.iSinZ / 32767.0f; - - float angl = (float)Math.Atan2(cosz, sinz); - Orientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl); - - } - - public void UpdateBoxStruct() - { - _Box.iCenterX = (short)Math.Round(Position.X * 4.0f); - _Box.iCenterY = (short)Math.Round(Position.Y * 4.0f); - _Box.iCenterZ = (short)Math.Round(Position.Z * 4.0f); - _Box.iLength = (short)Math.Round(Size.X * 4.0f); - _Box.iWidth = (short)Math.Round(Size.Y * 4.0f); - _Box.iHeight = (short)Math.Round(Size.Z * 4.0f); - - var dir = Orientation.Multiply(Vector3.UnitX) * 0.5f; - _Box.iSinZ = (short)Math.Round(dir.X * 32767.0f); - _Box.iCosZ = (short)Math.Round(dir.Y * 32767.0f); - } - - - public void SetSize(Vector3 s) - { - Size = s; - BBMin = Size * -0.5f; - BBMax = Size * 0.5f; - } - - - public EditorVertex[] GetTriangleVertices() - { - Vector3 xform(float x, float y, float z) - { - return Orientation.Multiply(new Vector3(x, y, z)) + Position; - } - EditorVertex[] res = new EditorVertex[36]; - var colour = new Color4(0.0f, 0.0f, 1.0f, 0.8f); //todo: colours for occluders? - var c = (uint)colour.ToRgba(); - var s = Size * 0.5f; - var v0 = new EditorVertex() { Position = xform(-s.X, -s.Y, -s.Z), Colour = c }; - var v1 = new EditorVertex() { Position = xform(-s.X, -s.Y, +s.Z), Colour = c }; - var v2 = new EditorVertex() { Position = xform(-s.X, +s.Y, -s.Z), Colour = c }; - var v3 = new EditorVertex() { Position = xform(-s.X, +s.Y, +s.Z), Colour = c }; - var v4 = new EditorVertex() { Position = xform(+s.X, -s.Y, -s.Z), Colour = c }; - var v5 = new EditorVertex() { Position = xform(+s.X, -s.Y, +s.Z), Colour = c }; - var v6 = new EditorVertex() { Position = xform(+s.X, +s.Y, -s.Z), Colour = c }; - var v7 = new EditorVertex() { Position = xform(+s.X, +s.Y, +s.Z), Colour = c }; - res[00] = v0; res[01] = v1; res[02] = v2; res[03] = v2; res[04] = v1; res[05] = v3; - res[06] = v2; res[07] = v3; res[08] = v6; res[09] = v6; res[10] = v3; res[11] = v7; - res[12] = v1; res[13] = v5; res[14] = v3; res[15] = v3; res[16] = v5; res[17] = v7; - res[18] = v6; res[19] = v7; res[20] = v4; res[21] = v4; res[22] = v7; res[23] = v5; - res[24] = v4; res[25] = v5; res[26] = v0; res[27] = v0; res[28] = v5; res[29] = v1; - res[30] = v2; res[31] = v6; res[32] = v0; res[33] = v0; res[34] = v6; res[35] = v4; - return res; - } - public EditorVertex[] GetPathVertices() - { - return null; - } - public Vector4[] GetNodePositions() - { - return null; - } - - public override string ToString() - { - return Index.ToString() + ": " + FloatUtil.GetVector3String(Position); - } + return (value | (1u << bit)); } } + + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapEntityDef +{ + public Archetype Archetype { get; set; } //cached by GameFileCache on loading... + public Vector3 BBMin;//oriented archetype AABBmin + public Vector3 BBMax;//oriented archetype AABBmax + public Vector3 BBCenter; //oriented archetype AABB center + public Vector3 BBExtent; //oriented archetype AABB extent + public Vector3 BSCenter; //oriented archetype BS center + public float BSRadius;//cached from archetype + public float LodDist; + public float ChildLodDist; + + public CEntityDef _CEntityDef; + [TypeConverter(typeof(ExpandableObjectConverter))] + public ref CEntityDef CEntityDef => ref _CEntityDef; + + [TypeConverter(typeof(CollectionConverter))] + private List? ChildList { get; set; } + public YmapEntityDef[] Children { get; set; } + public YmapEntityDef[] ChildrenMerged { get; set; }// { get; set; } + + public Vector3 _Position; + public Vector3 Position { get => _Position; set => _Position = value; } + public Quaternion _Orientation; + public Quaternion Orientation { get => _Orientation; set => _Orientation = value; } + public Vector3 _Scale; + public Vector3 Scale { get => _Scale; set => _Scale = value; } + public bool IsMlo { get; set; } + public MloInstanceData MloInstance { get; set; } + public YmapEntityDef MloParent { get; set; } + public MloInstanceEntitySet MloEntitySet { get; set; } + public Vector3 MloRefPosition { get; set; } + public Quaternion MloRefOrientation { get; set; } + public MetaWrapper[] Extensions { get; set; } + + public int Index { get; set; } + + [NotifyParentProperty(true)] + public float Distance { get; set; } //used for rendering + public bool IsWithinLodDist { get; set; } //used for rendering + + [NotifyParentProperty(true)] + public bool ChildrenVisible { get; set; } //used for rendering + + [NotifyParentProperty(true)] + public bool ChildrenRendered { get; set; } //used when rendering ymap mode to reduce LOD flashing... + public YmapEntityDef Parent { get; set; } //for browsing convenience, also used/updated for rendering + public MetaHash ParentName { get; set; } //just for browsing convenience + + public YmapFile Ymap { get; set; } + + public Vector3 PivotPosition = Vector3.Zero; + public Quaternion PivotOrientation = Quaternion.Identity; + public Vector3 WidgetPosition = Vector3.Zero; + public Quaternion WidgetOrientation = Quaternion.Identity; + + public uint EntityHash { get; set; } = 0; //used by CW as a unique position+name identifier + + public LinkedList LodManagerChildren { get; set; } = null; + public object LodManagerRenderable = null; + + + public LightInstance[] Lights { get; set; } + //public uint[] LightHashTest { get; set; } + + public bool LodInParentYmap => ((_CEntityDef.flags >> 3) & 1) > 0; + + + public string Name => _CEntityDef.archetypeName.ToString(); + + + public YmapEntityDef() + { + Scale = Vector3.One; + Position = Vector3.One; + Orientation = Quaternion.Identity; + } + public YmapEntityDef(YmapFile ymap, int index, CEntityDef def) + { + Ymap = ymap; + Index = index; + _CEntityDef = def; + Scale = new Vector3(new Vector2(_CEntityDef.scaleXY), _CEntityDef.scaleZ); + Position = _CEntityDef.position; + Orientation = new Quaternion(_CEntityDef.rotation); + if (Orientation != Quaternion.Identity) + { + Orientation = Quaternion.Invert(Orientation); + } + IsMlo = false; + + UpdateWidgetPosition(); + UpdateWidgetOrientation(); + UpdateEntityHash(); + } + + public YmapEntityDef(YmapFile ymap, int index, CMloInstanceDef mlo) + { + Ymap = ymap; + Index = index; + _CEntityDef = mlo.CEntityDef; + Scale = new Vector3(new Vector2(_CEntityDef.scaleXY), _CEntityDef.scaleZ); + Position = _CEntityDef.position; + Orientation = new Quaternion(_CEntityDef.rotation); + //if (Orientation != Quaternion.Identity) + //{ + // Orientation = Quaternion.Invert(Orientation); + //} + IsMlo = true; + + MloInstance = new MloInstanceData(this, null);//is this necessary..? will get created in SetArchetype.. + MloInstance._Instance = mlo; + + UpdateWidgetPosition(); + UpdateWidgetOrientation(); + UpdateEntityHash(); + } + + + public void SetArchetype(Archetype arch) + { + Archetype = arch; + if (Archetype is null) + return; + + + UpdateBB(); + + if (Archetype.Type == MetaName.CMloArchetypeDef) + { + //transform interior entities into world space... + var mloa = Archetype as MloArchetype; + MloInstance = new MloInstanceData(this, mloa); + MloInstance._Instance = new CMloInstanceDef { CEntityDef = _CEntityDef }; + if (mloa != null) + { + if (!IsMlo) + { + IsMlo = true; + List mloEntities = Ymap.MloEntities.ToList(); + mloEntities.Add(this); + Ymap.MloEntities = mloEntities.ToArray(); + } + + MloInstance.CreateYmapEntities(); + } + + if (BSRadius == 0.0f) + { + BSRadius = LodDist;//need something so it doesn't get culled... + } + if (BBMin == BBMax) + { + BBMin = Position - BSRadius; + BBMax = Position + BSRadius;//it's not ideal + BBCenter = (BBMax + BBMin) * 0.5f; + BBExtent = (BBMax - BBMin) * 0.5f; + } + } + else if (IsMlo) // archetype is no longer an mlo + { + IsMlo = false; + MloInstance = null; + + if (Ymap.MloEntities.Length > 0) + { + List mloEntities = Ymap.MloEntities.ToList(); + if (mloEntities.Remove(this)) + { + Ymap.MloEntities = mloEntities.ToArray(); + } + } + } + } + + public void SetPosition(Vector3 pos) + { + Position = pos; + if (MloParent != null) + { + _CEntityDef.position = Quaternion.Normalize(Quaternion.Invert(MloParent.Orientation)).Multiply(pos - MloParent.Position); + MloRefPosition = _CEntityDef.position; + UpdateBB(); + UpdateMloArchetype(); + } + else + { + _CEntityDef.position = pos; + UpdateBB(); + } + + + if (MloInstance != null) + { + MloInstance.SetPosition(Position); + MloInstance.UpdateEntities(); + } + + UpdateEntityHash(); + UpdateWidgetPosition(); + } + + private void UpdateBB() + { + if (Archetype != null) + { + BSCenter = _Orientation.Multiply(Archetype.BSCenter) * Scale; + BSRadius = Archetype.BSRadius * Math.Max(Scale.X, Scale.Z); + if (_Orientation == Quaternion.Identity) + { + BBMin = (Vector3.Min(Archetype.BBMin, Archetype.BBMax) * _Scale) + _Position; + BBMax = (Vector3.Max(Archetype.BBMin, Archetype.BBMax) * _Scale) + _Position; + BBCenter = (BBMax + BBMin) * 0.5f; + BBExtent = (BBMax - BBMin) * 0.5f; + } + else + { + var mat = Matrix.Transformation(Vector3.Zero, Quaternion.Identity, _Scale, Vector3.Zero, _Orientation, _Position); + var matabs = mat; + matabs.Column1 = mat.Column1.Abs(); + matabs.Column2 = mat.Column2.Abs(); + matabs.Column3 = mat.Column3.Abs(); + matabs.Column4 = mat.Column4.Abs(); + var bbcenter = (Archetype.BBMax + Archetype.BBMin) * 0.5f; + var bbextent = (Archetype.BBMax - Archetype.BBMin) * 0.5f; + Vector3.TransformCoordinate(ref bbcenter, ref mat, out var ncenter); + var nextent = Vector3.TransformNormal(bbextent, matabs).Abs(); + BBCenter = ncenter; + BBExtent = nextent; + BBMin = ncenter - nextent; + BBMax = ncenter + nextent; + } + LodDist = _CEntityDef.lodDist; + if (LodDist <= 0) + { + LodDist = Archetype.LodDist; + } + ChildLodDist = _CEntityDef.childLodDist; + if (ChildLodDist < 0) + { + ChildLodDist = LodDist * 0.5f; + } + } + } + + public void UpdateEntityHash() + { + uint xhash = (uint)(Position.X * 100); + uint yhash = (uint)(Position.Y * 100); + uint zhash = (uint)(Position.Z * 100); + EntityHash = _CEntityDef.archetypeName.Hash ^ xhash ^ yhash ^ zhash & 0xffffffff; + } + + public void SetOrientation(Quaternion ori, bool inverse = false) + { + if (MloParent != null) + { + var mloInv = Quaternion.Normalize(Quaternion.Invert(MloParent.Orientation)); + Quaternion rel = Quaternion.Normalize(Quaternion.Multiply(mloInv, ori)); + Quaternion inv = Quaternion.Normalize(Quaternion.Invert(rel)); + Orientation = ori; + _CEntityDef.rotation = inv.ToVector4(); + } + else + { + Orientation = inverse ? Quaternion.Normalize(Quaternion.Invert(ori)) : ori; + if (MloInstance != null) + { + _CEntityDef.rotation = Orientation.ToVector4(); + } + else + { + Quaternion inv = inverse ? ori : Quaternion.Normalize(Quaternion.Invert(ori)); + _CEntityDef.rotation = inv.ToVector4(); + } + } + + if (MloInstance != null) + { + MloInstance.SetOrientation(ori); + MloInstance.UpdateEntities(); + } + + UpdateBB(); + UpdateWidgetPosition(); + UpdateWidgetOrientation(); + } + + public void SetScale(Vector3 s) + { + Scale = new Vector3(s.X, s.X, s.Z); + _CEntityDef.scaleXY = s.X; + _CEntityDef.scaleZ = s.Z; + + MloInstanceData mloInstance = MloParent?.MloInstance; + if (mloInstance != null) + { + var mcEntity = mloInstance.TryGetArchetypeEntity(this); + if (mcEntity != null) + { + mcEntity._Data.scaleXY = s.X; + mcEntity._Data.scaleZ = s.Z; + } + } + if (Archetype != null) + { + float smax = Math.Max(Scale.X, Scale.Z); + BSRadius = Archetype.BSRadius * smax; + } + + SetPosition(Position);//update the BB + } + + private void UpdateMloArchetype() + { + if (!(MloParent.Archetype is MloArchetype mloArchetype)) + return; + + MCEntityDef entity; + if ((MloEntitySet?.Entities != null) && (MloEntitySet?.EntitySet?.Entities != null)) + { + var idx = MloEntitySet.Entities.IndexOf(this); + if ((idx < 0) || (idx >= MloEntitySet.EntitySet.Entities.Length)) + return; + entity = MloEntitySet.EntitySet.Entities[idx]; + } + else + { + if (Index >= mloArchetype.entities.Length) + return; + entity = mloArchetype.entities[Index]; + } + + entity._Data.position = _CEntityDef.position; + entity._Data.rotation = _CEntityDef.rotation; + } + + + public void SetPivotPosition(Vector3 pos) + { + PivotPosition = pos; + + UpdateWidgetPosition(); + } + + public void SetPivotOrientation(Quaternion ori) + { + PivotOrientation = ori; + + UpdateWidgetOrientation(); + } + + + public void SetPositionFromWidget(Vector3 pos) + { + SetPosition(pos - Orientation.Multiply(in PivotPosition)); + } + public void SetOrientationFromWidget(Quaternion ori) + { + var newori = Quaternion.Normalize(Quaternion.Multiply(ori, Quaternion.Invert(PivotOrientation))); + var newpos = WidgetPosition - newori.Multiply(in PivotPosition); + SetOrientation(newori); + SetPosition(newpos); + } + public void SetPivotPositionFromWidget(Vector3 pos) + { + var orinv = Quaternion.Invert(Orientation); + SetPivotPosition(orinv.Multiply(pos - Position)); + } + public void SetPivotOrientationFromWidget(Quaternion ori) + { + var orinv = Quaternion.Invert(Orientation); + SetPivotOrientation(Quaternion.Multiply(orinv, ori)); + } + + + public void UpdateWidgetPosition() + { + WidgetPosition = Position + Orientation.Multiply(in PivotPosition); + } + public void UpdateWidgetOrientation() + { + WidgetOrientation = Quaternion.Multiply(Orientation, PivotOrientation); + } + + + public void AddChild(YmapEntityDef c) + { + ChildList ??= new List(); + c.Parent = this; + c.ParentName = _CEntityDef.archetypeName; + + ChildList.Add(c); + } + + public void ChildListToArray() + { + if (ChildList == null) return; + //if (Children == null) + //{ + Children = ChildList.ToArray(); + ChildrenMerged = Children;//include these by default in merged array + //} + //else + //{ + // List newc = new List(Children.Length + ChildList.Count); + // newc.AddRange(Children); + // newc.AddRange(ChildList); + // Children = newc.ToArray(); + //} + ChildList.Clear(); + ChildList = null; + } + public void ChildListToMergedArray() + { + if (ChildList is null) + return; + + if (ChildList.Count == 0) + { + ChildList = null; + return; + } + + if (ChildrenMerged is null) + { + ChildrenMerged = ChildList.ToArray(); + } + else + { + var newcArr = new YmapEntityDef[ChildrenMerged.Length + ChildList.Count]; + ChildrenMerged.CopyTo(newcArr, 0); + ChildList.CopyTo(newcArr, ChildrenMerged.Length); + ChildrenMerged = newcArr; + } + + ChildList.Clear(); + ChildList = null; + } + + + public void LodManagerAddChild(YmapEntityDef child) + { + LodManagerChildren ??= new LinkedList(); + LodManagerChildren.AddLast(child); + } + public void LodManagerRemoveChild(YmapEntityDef child) + { + LodManagerChildren?.Remove(child);//could improve this by caching the list node.... + } + + + public override string ToString() + { + return $"{_CEntityDef}{(ChildList is not null ? $" ({ChildList.Count} children)" : "")} {_CEntityDef.lodLevel}"; + } + + + + public void EnsureLights(DrawableBase db) + { + if (Lights is not null) + return; + if (Archetype is null) + return; + if (db == null) + return; + var skel = db.Skeleton; + LightAttributes[] lightAttrs = null; + Bounds b = null; + if (db is Drawable dd) + { + lightAttrs = dd.LightAttributes?.data_items; + b = dd.Bound; + } + else if (db is FragDrawable fd) + { + var frag = fd?.OwnerFragment; + skel = skel ?? frag?.Drawable?.Skeleton; + lightAttrs = frag?.LightAttributes?.data_items; + b = frag?.PhysicsLODGroup?.PhysicsLOD1?.Bound; + } + if (lightAttrs == null) return; + + Vector3.Min(ref Archetype.BBMin, ref db.BoundingBoxMin, out var abmin); + Vector3.Max(ref Archetype.BBMax, ref db.BoundingBoxMax, out var abmax); + if (b != null) + { + Vector3.Min(ref abmin, ref b.BoxMin, out abmin); + Vector3.Max(ref abmax, ref b.BoxMax, out abmax); + } + var bb = new BoundingBox(abmin, abmax).Transform(in _Position, in _Orientation, in _Scale); + var ints = new uint[7]; + ints[0] = (uint)(bb.Minimum.X * 10.0f); + ints[1] = (uint)(bb.Minimum.Y * 10.0f); + ints[2] = (uint)(bb.Minimum.Z * 10.0f); + ints[3] = (uint)(bb.Maximum.X * 10.0f); + ints[4] = (uint)(bb.Maximum.Y * 10.0f); + ints[5] = (uint)(bb.Maximum.Z * 10.0f); + + var bones = skel?.BonesMap; + var exts = Archetype.Extensions.Length;// + (Extensions?.Length ?? 0);//seems entity extensions aren't included in this + //todo: create extension light instances + + var lightInsts = new LightInstance[lightAttrs.Length]; + for (int i = 0; i < lightAttrs.Length; i++) + { + ints[6] = (uint)(exts + i); + var la = lightAttrs[i]; + + var xform = Matrix.Identity; + if ((bones != null) && (bones.TryGetValue(la.BoneId, out Bone bone))) + { + xform = bone.AbsTransform; + } + + var li = new LightInstance(); + li.Attributes = la; + li.Hash = ComputeLightHash(ints); + li.Position = Orientation.Multiply(xform.Multiply(la.Position)) + Position; + li.Direction = Orientation.Multiply(xform.MultiplyRot(la.Direction)); + lightInsts[i] = li; + } + Lights = lightInsts; + + //LightHashTest = new uint[25]; + //for (int i = 0; i < 25; i++) + //{ + // ints[6] = (uint)(i); + // LightHashTest[i] = ComputeLightHash(ints); + //} + + } + + + public static uint ComputeLightHash(uint[] ints, uint seed = 0) + { + var a2 = ints.Length; + var v3 = a2; + var v5 = (uint)(seed + 0xDEADBEEF + 4 * ints.Length); + var v6 = v5; + var v7 = v5; + + var c = 0; + for (var i = 0; i < (ints.Length - 4) / 3 + 1; i++, v3 -= 3, c += 3) + { + var v9 = ints[c + 2] + v5; + var v10 = ints[c + 1] + v6; + var v11 = ints[c] - v9; + var v13 = v10 + v9; + var v14 = (v7 + v11) ^ BitUtil.RotateLeft(v9, 4); + var v15 = v10 - v14; + var v17 = v13 + v14; + var v18 = v15 ^ BitUtil.RotateLeft(v14, 6); + var v19 = v13 - v18; + var v21 = v17 + v18; + var v22 = v19 ^ BitUtil.RotateLeft(v18, 8); + var v23 = v17 - v22; + var v25 = v21 + v22; + var v26 = v23 ^ BitUtil.RotateLeft(v22, 16); + var v27 = v21 - v26; + var v29 = v27 ^ BitUtil.RotateRight(v26, 13); + var v30 = v25 - v29; + v7 = v25 + v26; + v6 = v7 + v29; + v5 = v30 ^ BitUtil.RotateLeft(v29, 4); + } + + if (v3 == 3) + { + v5 += ints[c + 2]; + } + + if (v3 >= 2) + { + v6 += ints[c + 1]; + } + + if (v3 >= 1) + { + var v34 = (v6 ^ v5) - BitUtil.RotateLeft(v6, 14); + var v35 = (v34 ^ (v7 + ints[c])) - BitUtil.RotateLeft(v34, 11); + var v36 = (v35 ^ v6) - BitUtil.RotateRight(v35, 7); + var v37 = (v36 ^ v34) - BitUtil.RotateLeft(v36, 16); + var v38 = BitUtil.RotateLeft(v37, 4); + var v39 = (((v35 ^ v37) - v38) ^ v36) - BitUtil.RotateLeft((v35 ^ v37) - v38, 14); + return (v39 ^ v37) - BitUtil.RotateRight(v39, 8); + } + + return v5; + } + + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class LightInstance + { + public LightAttributes Attributes { get; set; } //just for display purposes! + public uint Hash { get; set; } + public Vector3 Position { get; set; } + public Vector3 Direction { get; set; } + + public override string ToString() + { + return $"{Hash}: {Attributes.Type}"; + } + } +} + + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapGrassInstanceBatch +{ + private const float BatchVertMultiplier = 0.00001525878f; + + public Archetype Archetype { get; set; } //cached by GameFileCache on loading... + public rage__fwGrassInstanceListDef Batch; + public rage__fwGrassInstanceListDef__InstanceData[] Instances { get; set; } + public Vector3 Position { get; set; } //calculated from AABB + public float Radius { get; set; } //calculated from AABB + public Vector3 AABBMin; + public Vector3 AABBMax; + public Vector3 CamRel; //used for rendering... + public float Distance; //used for rendering + public YmapFile Ymap { get; set; } + + private BoundingBox[] grassBounds; // for brush + public bool BrushEnabled; // for brush + public float BrushRadius = 5f; // for brush + public bool HasChanged; // for brush and renderer + + // TODO: Make configurable. + const float BoundingSize = 0.3F; + static readonly Vector3 GrassMinMax = Vector3.One * BoundingSize; + + public override string ToString() + { + return Batch.ToString(); + } + + public void UpdateInstanceCount() + { + var b = Batch; + b.InstanceList = b.InstanceList with { Count1 = (ushort)Instances.Length }; + Batch = b; + } + + public bool IsPointBlockedByInstance(Vector3 point) + { + for (int i = 0; i < grassBounds.Length; i++) + { + if (grassBounds[i].Contains(ref point) == ContainmentType.Contains) + { + return true; + } + } + + return false; + } + + private void ReInitializeBoundingCache() + { + // cache is already initialized correctly. + if (grassBounds is not null && grassBounds.Length == Instances.Length) + return; + + // Clear the current bounding cache. + grassBounds = new BoundingBox[Instances.Length]; + + for (int i = 0; i < Instances.Length; i++) + { + var inst = Instances[i]; + // create bounding box for this instance. + var worldPos = GetGrassWorldPos(in inst.Position, new BoundingBox(AABBMin, AABBMax)); + var bb = new BoundingBox(worldPos - GrassMinMax, worldPos + GrassMinMax); + grassBounds[i] = bb; + } + } + + public bool EraseInstancesAtMouse( + YmapGrassInstanceBatch batch, + in SpaceRayIntersectResult mouseRay, + float radius) + { + rage__spdAABB batchAABB = batch.Batch.BatchAABB; + var oldInstanceBounds = new BoundingBox + ( + batchAABB.min.XYZ(), + batchAABB.max.XYZ() + ); + var deleteSphere = new BoundingSphere(mouseRay.Position, radius); + + // check each instance to see if it's in the delete sphere + // thankfully we've just avoided an O(n^2) op using this bounds stuff (doesn't mean it's super fast though, + // but it's not super slow either, even at like 50,000 instances) + var insList = new List(); + foreach (var instance in batch.Instances) + { + // get the world pos + var worldPos = GetGrassWorldPos(in instance.Position, in oldInstanceBounds); + + // create a boundary around the instance. + var instanceBounds = new BoundingBox(worldPos - GrassMinMax, worldPos + GrassMinMax); + + // check if the sphere contains the boundary. + var bb = new BoundingBox(instanceBounds.Minimum, instanceBounds.Maximum); + var ct = deleteSphere.Contains(ref bb); + if (ct == ContainmentType.Contains || ct == ContainmentType.Intersects) + { + //delInstances.Add(instance); // Add a copy of this instance + continue; + } + insList.Add(instance); + } + if (insList.Count == Instances.Length) + return false; + + var newBounds = GetNewGrassBounds(insList, oldInstanceBounds); + // recalc instances + RecalcBatch(newBounds, batch); + insList = RecalculateInstances(insList, oldInstanceBounds, newBounds); + batch.Instances = insList.ToArray(); + return true; + } + + public void CreateInstancesAtMouse( + YmapGrassInstanceBatch batch, + SpaceRayIntersectResult mouseRay, + float radius, + int amount, + Func spawnRayFunc, + Color color, + int ao, + int scale, + Vector3 pad, + bool randomScale) + { + + ReInitializeBoundingCache(); + var spawnPosition = mouseRay.Position; + var positions = new List(); + var normals = new List(); + + // Get rand positions. + GetSpawns(spawnPosition, spawnRayFunc, positions, normals, radius, amount); + if (positions.Count <= 0) + return; + + // get the instance list + var instances = + batch.Instances?.ToList() ?? new List(); + var batchAABB = batch.Batch.BatchAABB; + + // make sure to store the old instance bounds for the original + // grass instances + var oldInstanceBounds = new BoundingBox(batchAABB.min.XYZ(), batchAABB.max.XYZ()); + + if (positions.Count <= 0) + return; + + // Begin the spawn bounds. + var grassBound = new BoundingBox(positions[0] - GrassMinMax, positions[0] + GrassMinMax); + grassBound = EncapsulatePositions(positions, grassBound); + + // Calculate the new spawn bounds. + var newInstanceBounds = new BoundingBox(oldInstanceBounds.Minimum, oldInstanceBounds.Maximum); + newInstanceBounds = instances.Count > 0 + ? newInstanceBounds.Encapsulate(ref grassBound) + : new BoundingBox(grassBound.Minimum, grassBound.Maximum); + + // now we need to recalculate the position of each instance + instances = RecalculateInstances(instances, oldInstanceBounds, newInstanceBounds); + + // Add new instances at each spawn position with + // the parameters in the brush. + SpawnInstances(positions, normals, instances, newInstanceBounds, color, ao, scale, pad, randomScale); + + // then recalc the bounds of the grass batch + RecalcBatch(newInstanceBounds, batch); + + // Give back the new intsances + batch.Instances = instances.ToArray(); + grassBounds = Array.Empty(); + } + + // bhv approach recommended by dexy. + public YmapGrassInstanceBatch[] OptimizeInstances(YmapGrassInstanceBatch batch, float minRadius) + { + // this function will return an array of grass instance batches + // that are split up into sectors (groups) with a specific size. + // say for instance we have 30,000 instances spread across a large + // distance. We will split those instances into a grid-like group + // and return the groups as an array of batches. + var oldInstanceBounds = new BoundingBox(batch.Batch.BatchAABB.min.XYZ(), batch.Batch.BatchAABB.max.XYZ()); + + if (oldInstanceBounds.Radius() < minRadius) + { + return new [] { batch }; + } + + // Get our optimized grassInstances + var split = SplitGrassRecursive(batch.Instances.ToList(), oldInstanceBounds, minRadius); + + // Initiate a new batch list. + var newBatches = new List(); + + foreach (var grassList in split) + { + // Create a new batch + var newBatch = new YmapGrassInstanceBatch + { + Archetype = batch.Archetype, + Ymap = batch.Ymap + }; + + // Get the boundary of the grassInstances + var newInstanceBounds = GetNewGrassBounds(grassList, oldInstanceBounds); + + // Recalculate the batch boundaries. + RecalcBatch(newInstanceBounds, newBatch); + + var ins = RecalculateInstances(grassList, oldInstanceBounds, newInstanceBounds); + newBatch.Instances = ins.ToArray(); + newBatches.Add(newBatch); + } + + return newBatches.ToArray(); + } + + private List> SplitGrassRecursive( + IReadOnlyList grassInstances, + BoundingBox batchAABB, + float minRadius = 15F + ) + { + var ret = new List>(); + var oldPoints = SplitGrass(grassInstances, batchAABB); + while (true) + { + var stop = true; + var newPoints = new List>(); + foreach (var mb in oldPoints) + { + // for some reason we got a null group? + if (mb == null) + continue; + + // Get the bounds of the grassInstances list + var radius = GetNewGrassBounds(mb, batchAABB).Radius(); + + // check if the radius of the grassInstances + if (radius <= minRadius) + { + // this point list is within the minimum + // radius. + ret.Add(mb); + continue; // we don't need to continue. + } + + // since we're here let's keep going + stop = false; + + // split the grassInstances again + var s = SplitGrass(mb, batchAABB); + + // add it into the new grassInstances list. + newPoints.AddRange(s); + } + + // set the old grassInstances to the new grassInstances. + oldPoints = newPoints.ToArray(); + + // if we're done, and all grassInstances are within the desired size + // then end the loop. + if (stop) break; + } + return ret; + } + + private List[] SplitGrass( + IReadOnlyList points, + BoundingBox batchAABB) + { + var pointGroup = new List[2]; + + // Calculate the bounds of these grassInstances. + var m = GetNewGrassBounds(points, batchAABB); + + // Get the center and size + var mm = new Vector3 + { + X = Math.Abs(m.Minimum.X - m.Maximum.X), + Y = Math.Abs(m.Minimum.Y - m.Maximum.Y), + Z = Math.Abs(m.Minimum.Z - m.Maximum.Z) + }; + + // x is the greatest axis... + if (mm.X > mm.Y && mm.X > mm.Z) + { + // Calculate both boundaries. + var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(mm.X * 0.5F, 0, 0)); + var rhs = new BoundingBox(m.Minimum + new Vector3(mm.X * 0.5F, 0, 0), m.Maximum); + + // Set the grassInstances accordingly. + pointGroup[0] = points + .Where(p => lhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + pointGroup[1] = points + .Where(p => rhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + } + // y is the greatest axis... + else if (mm.Y > mm.X && mm.Y > mm.Z) + { + // Calculate both boundaries. + var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(0, mm.Y * 0.5F, 0)); + var rhs = new BoundingBox(m.Minimum + new Vector3(0, mm.Y * 0.5F, 0), m.Maximum); + + // Set the grassInstances accordingly. + pointGroup[0] = points + .Where(p => lhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + pointGroup[1] = points + .Where(p => rhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + } + // z is the greatest axis... + else if (mm.Z > mm.X && mm.Z > mm.Y) + { + // Calculate both boundaries. + var lhs = new BoundingBox(m.Minimum, m.Maximum - new Vector3(0, 0, mm.Z * 0.5F)); + var rhs = new BoundingBox(m.Minimum + new Vector3(0, 0, mm.Z * 0.5F), m.Maximum); + + // Set the grassInstances accordingly. + pointGroup[0] = points + .Where(p => lhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + pointGroup[1] = points + .Where(p => rhs.Contains(GetGrassWorldPos(in p.Position, in batchAABB)) == ContainmentType.Contains).ToList(); + } + return pointGroup; + } + + private static BoundingBox GetNewGrassBounds(IReadOnlyList newGrass, BoundingBox oldAABB) + { + var grassPositions = newGrass.Select(x => GetGrassWorldPos(in x.Position, in oldAABB)).ToArray(); + var bounds = BoundingBox.FromPoints(grassPositions); + return bounds.Expand(1f); + } + + private void SpawnInstances( + IReadOnlyList positions, + IReadOnlyList normals, + ICollection instanceList, + BoundingBox instanceBounds, + Color color, + int ao, + int scale, + Vector3 pad, + bool randomScale) + { + for (var i = 0; i < positions.Count; i++) + { + var pos = positions[i]; + // create the new instance. + var newInstance = CreateNewInstance(normals[i], color, ao, scale, pad, randomScale); + + // get the grass position of the new instance and add it to the + // instance list + var grassPosition = GetGrassPos(in pos, in instanceBounds); + newInstance.Position = grassPosition; + instanceList.Add(newInstance); + } + } + + private rage__fwGrassInstanceListDef__InstanceData CreateNewInstance(in Vector3 normal, in Color color, int ao, int scale, in Vector3 pad, + bool randomScale = false) + { + //Vector3 pad = FloatUtil.ParseVector3String(PadTextBox.Text); + //int scale = (int)ScaleNumericUpDown.Value; + var rand = new Random(); + if (randomScale) + scale = rand.Next(scale / 2, scale); + var newInstance = new rage__fwGrassInstanceListDef__InstanceData + { + Ao = (byte)ao, + Scale = (byte)scale, + Color = new ArrayOfBytes3(color.R, color.G, color.B), + Pad = new ArrayOfBytes3((byte)pad.X,(byte)pad.Y, (byte)pad.Z), + NormalX = (byte)((normal.X + 1) * 0.5F * 255F), + NormalY = (byte)((normal.Y + 1) * 0.5F * 255F) + }; + return newInstance; + } + + private void RecalcBatch(in BoundingBox newInstanceBounds, YmapGrassInstanceBatch batch) + { + batch.AABBMax = newInstanceBounds.Maximum; + batch.AABBMin = newInstanceBounds.Minimum; + batch.Position = newInstanceBounds.Center(); + batch.Radius = newInstanceBounds.Radius(); + batch.Batch.BatchAABB = new rage__spdAABB(in newInstanceBounds.Minimum, in newInstanceBounds.Maximum); + } + + private void GetSpawns( + Vector3 origin, + Func spawnRayFunc, + List positions, + List normals, + float radius, + int resolution = 28) + { + var rand = new Random(); + for (var i = 0; i < resolution; i++) + { + var randX = (float)rand.NextDouble(-radius, radius); + var randY = (float)rand.NextDouble(-radius, radius); + if (Math.Abs(randX) > 0 && Math.Abs(randY) > 0) + { + randX *= .7071f; + randY *= .7071f; + } + var posOffset = origin + new Vector3(randX, randY, 2f); + var spaceRay = spawnRayFunc.Invoke(posOffset); + if (!spaceRay.Hit) + continue; + // not truly O(n^2) but may be slow... + // actually just did some testing, not slow at all. + if (IsPointBlockedByInstance(spaceRay.Position)) + continue; + normals.Add(spaceRay.Normal); + positions.Add(spaceRay.Position); + } + } + + private static List RecalculateInstances( + List instances, + BoundingBox oldInstanceBounds, + BoundingBox newInstanceBounds) + { + var refreshList = new List(); + foreach (var inst in instances) + { + // Copy instance + var copy = + new rage__fwGrassInstanceListDef__InstanceData + { + Position = inst.Position, + Ao = inst.Ao, + Color = inst.Color, + NormalX = inst.NormalX, + NormalY = inst.NormalY, + Pad = inst.Pad, + Scale = inst.Scale + }; + // get the position from where we would be in the old bounds, and move it to + // the position it needs to be in the new bounds. + var oldPos = GetGrassWorldPos(in copy.Position, in oldInstanceBounds); + //var oldPos = oldInstanceBounds.min + oldInstanceBounds.Size * (grassPos * BatchVertMultiplier); + copy.Position = GetGrassPos(in oldPos, in newInstanceBounds); + refreshList.Add(copy); + } + instances = refreshList.ToList(); + return instances; + } + + private static BoundingBox EncapsulatePositions(IEnumerable positions, BoundingBox bounds) + { + foreach (var pos in positions) + { + var posBounds = new BoundingBox(pos - (GrassMinMax + 0.1f), pos + (GrassMinMax + 0.1f)); + bounds = bounds.Encapsulate(ref posBounds); + } + return bounds; + } + + private static ArrayOfUshorts3 GetGrassPos(in Vector3 worldPos, in BoundingBox batchAABB) + { + var offset = worldPos - batchAABB.Minimum; + var size = batchAABB.Size(); + var percentage = + new Vector3( + offset.X / size.X, + offset.Y / size.Y, + offset.Z / size.Z + ); + var instancePos = percentage / BatchVertMultiplier; + return new ArrayOfUshorts3((ushort)instancePos.X, (ushort)instancePos.Y, (ushort)instancePos.Z); + } + + private static Vector3 GetGrassWorldPos(in ArrayOfUshorts3 grassPos, in BoundingBox batchAABB) + { + return batchAABB.Minimum + batchAABB.Size() * (grassPos.XYZ() * BatchVertMultiplier); + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapPropInstanceBatch +{ + public YmapFile Ymap { get; set; } + +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapDistantLODLights +{ + public CDistantLODLight CDistantLODLight; + public uint[] colours { get; set; } = Array.Empty(); + public MetaVECTOR3[] positions { get; set; } = Array.Empty(); + + public Vector3 BBMin; + public Vector3 BBMax; + public YmapFile Ymap { get; set; } + + public void CalcBB() + { + if (positions.Length > 0) + { + Vector3 min = new Vector3(float.MaxValue); + Vector3 max = new Vector3(float.MinValue); + + foreach(ref var position in positions.AsSpan()) + { + Vectors.Min(in min, in position, out min); + Vectors.Max(in max, in position, out max); + } + BBMin = min; + BBMax = max; + } + + } + + + public void RebuildFromLodLights(YmapLODLight[] lodlights) + { + var n = lodlights.Length; + if (n == 0) + return; + + colours = new uint[n]; + positions = new MetaVECTOR3[n]; + var nstreetlights = 0; + for (int i = 0; i < n; i++) + { + var ll = lodlights[i]; + colours[i] = (uint)(ll.Colour.ToBgra()); + positions[i] = new MetaVECTOR3(ll.Position); + if ((ll.StateFlags1 & 1) > 0) + { + nstreetlights++; + } + } + + var cdll = CDistantLODLight; + cdll.numStreetLights = (ushort)nstreetlights; + + CalcBB(); + } + + + public override string ToString() + { + if (Ymap != null) + { + return Ymap.ToString(); + } + return base.ToString(); + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapLODLights +{ + public CLODLight CLODLight { get; set; } + public MetaVECTOR3[] direction { get; set; } + public float[] falloff { get; set; } + public float[] falloffExponent { get; set; } + public uint[] timeAndStateFlags { get; set; } + public uint[] hash { get; set; } + public byte[] coneInnerAngle { get; set; } + public byte[] coneOuterAngleOrCapExt { get; set; } + public byte[] coronaIntensity { get; set; } + + public Vector3 BBMin { get; set; } + public Vector3 BBMax { get; set; } + public YmapFile Ymap { get; set; } + + public YmapLODLight[] LodLights { get; set; } + + public PathBVH BVH { get; set; } + + public void Init(YmapDistantLODLights parent) + { + if (parent == null) + return; + + BuildLodLights(parent); + CalcBB(); + BuildBVH(); + } + + public void BuildLodLights(YmapDistantLODLights parent) + { + var n = direction?.Length ?? 0; + n = Math.Min(n, parent.positions.Length); + n = Math.Min(n, parent.colours.Length); + n = Math.Min(n, falloff?.Length ?? 0); + n = Math.Min(n, falloffExponent?.Length ?? 0); + n = Math.Min(n, timeAndStateFlags?.Length ?? 0); + n = Math.Min(n, hash?.Length ?? 0); + n = Math.Min(n, coneInnerAngle?.Length ?? 0); + n = Math.Min(n, coneOuterAngleOrCapExt?.Length ?? 0); + n = Math.Min(n, coronaIntensity?.Length ?? 0); + if (n == 0) + return; + + LodLights = new YmapLODLight[n]; + for (int i = 0; i < n; i++) + { + var l = new YmapLODLight(); + l.Init(this, parent, i); + LodLights[i] = l; + } + } + + public void BuildBVH() + { + BVH = new PathBVH(LodLights, 10, 10); + } + + + public void CalcBB() + { + var positions = Ymap?.Parent?.DistantLODLights?.positions; + if (positions != null) + { + Vector3 min = new Vector3(float.MaxValue); + Vector3 max = new Vector3(float.MinValue); + foreach(ref var position in positions.AsSpan()) + { + Vectors.Min(in min, in position, out min); + Vectors.Max(in min, in position, out max); + } + BBMin = min; + BBMax = max; + } + else if (Ymap != null) + { + BBMin = Ymap._CMapData.entitiesExtentsMin; + BBMax = Ymap._CMapData.entitiesExtentsMax; + } + } + + public void RebuildFromLodLights() + { + var n = LodLights.Length; + if (n <= 0) + { + direction = null; + falloff = null; + falloffExponent = null; + timeAndStateFlags = null; + hash = null; + coneInnerAngle = null; + coneOuterAngleOrCapExt = null; + coronaIntensity = null; + } + else + { + direction = new MetaVECTOR3[n]; + falloff = new float[n]; + falloffExponent = new float[n]; + timeAndStateFlags = new uint[n]; + hash = new uint[n]; + coneInnerAngle = new byte[n]; + coneOuterAngleOrCapExt = new byte[n]; + coronaIntensity = new byte[n]; + + for (int i = 0; i < n; i++) + { + var ll = LodLights[i]; + direction[i] = new MetaVECTOR3(ll.Direction); + falloff[i] = ll.Falloff; + falloffExponent[i] = ll.FalloffExponent; + timeAndStateFlags[i] = ll.TimeAndStateFlags; + hash[i] = ll.Hash; + coneInnerAngle[i] = ll.ConeInnerAngle; + coneOuterAngleOrCapExt[i] = ll.ConeOuterAngleOrCapExt; + coronaIntensity[i] = ll.CoronaIntensity; + } + } + + } + + + public override string ToString() + { + if (Ymap != null) + { + return Ymap.ToString(); + } + return base.ToString(); + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapLODLight : BasePathNode +{ + public YmapFile? Ymap => LodLights?.Ymap ?? DistLodLights?.Ymap; + public YmapLODLights LodLights { get; set; } + public YmapDistantLODLights DistLodLights { get; set; } + public int Index { get; set; } + public Color Colour; + public Vector3 _Position; + public ref Vector3 Position => ref _Position; + public Vector3 Direction; + public float Falloff { get; set; } + public float FalloffExponent { get; set; } + public uint TimeAndStateFlags { get; set; } + public uint Hash { get; set; } + public byte ConeInnerAngle { get; set; } + public byte ConeOuterAngleOrCapExt { get; set; } + public byte CoronaIntensity { get; set; } + + public Quaternion Orientation; + public Vector3 Scale; + + public Vector3 TangentX; + public Vector3 TangentY; + + public LightType Type + { + get => (LightType)((TimeAndStateFlags >> 26) & 7); + set => TimeAndStateFlags = (TimeAndStateFlags & 0xE3FFFFFF) + (((uint)value & 7) << 26); + } + public FlagsUint TimeFlags + { + get => TimeAndStateFlags & 0xFFFFFF; + set => TimeAndStateFlags = (TimeAndStateFlags & 0xFF000000) + (value & 0xFFFFFF); + } + public uint StateFlags1 + { + get => (TimeAndStateFlags >> 24) & 3; + set => TimeAndStateFlags = (TimeAndStateFlags & 0xFCFFFFFF) + ((value & 3) << 24); + } + public uint StateFlags2 + { + get => (TimeAndStateFlags >> 29) & 7; + set => TimeAndStateFlags = (TimeAndStateFlags & 0x1FFFFFFF) + ((value & 7) << 29); + } + + public bool Enabled { get; set; } = true; + + public bool Visible { get; set; } = true; + + public void Init(YmapLODLights l, YmapDistantLODLights p, int i) + { + LodLights = l; + DistLodLights = p; + Index = i; + + if (p.colours == null) return; + if ((i < 0) || (i >= p.colours.Length)) return; + + Colour = Color.FromBgra(p.colours[i]); + Position = p.positions[i].ToVector3(); + Direction = l.direction[i].ToVector3(); + Falloff = l.falloff[i]; + FalloffExponent = l.falloffExponent[i]; + TimeAndStateFlags = l.timeAndStateFlags[i]; + Hash = l.hash[i]; + ConeInnerAngle = l.coneInnerAngle[i]; + ConeOuterAngleOrCapExt = l.coneOuterAngleOrCapExt[i]; + CoronaIntensity = l.coronaIntensity[i]; + + UpdateTangentsAndOrientation(); + + Scale = new Vector3(Falloff); + } + + public void UpdateTangentsAndOrientation() + { + switch (Type) + { + default: + case LightType.Point: + TangentX = Vector3.UnitX; + TangentY = Vector3.UnitY; + Orientation = Quaternion.Identity; + break; + case LightType.Spot: + TangentX = Vector3.Normalize(Direction.GetPerpVec()); + TangentY = Vector3.Normalize(Vector3.Cross(Direction, TangentX)); + break; + case LightType.Capsule: + TangentX = -Vector3.Normalize(Direction.GetPerpVec()); + TangentY = Vector3.Normalize(Vector3.Cross(Direction, TangentX)); + break; + } + + if (Type == LightType.Point) + { + Orientation = Quaternion.Identity; + } + else + { + var m = new Matrix(); + m.Row1 = new Vector4(TangentX, 0); + m.Row2 = new Vector4(TangentY, 0); + m.Row3 = new Vector4(Direction, 0); + Orientation = Quaternion.RotationMatrix(m); + } + } + + public void SetColour(in Color c) + { + Colour = c; + + if (DistLodLights is not null && DistLodLights.colours.Length >= Index) + { + DistLodLights.colours[Index] = (uint)(c.ToBgra()); + } + + } + public void SetPosition(in Vector3 pos) + { + Position = pos; + + if (DistLodLights is not null && DistLodLights.positions.Length >= Index) + { + DistLodLights.positions[Index] = new MetaVECTOR3(pos); + } + + } + public void SetOrientation(in Quaternion ori) + { + Quaternion.Invert(ref Orientation, out var inv); + var delta = ori * inv; + TangentX = Vector3.Normalize(delta.Multiply(in TangentX)); + TangentY = Vector3.Normalize(delta.Multiply(in TangentY)); + Direction = Vector3.Normalize(delta.Multiply(in Direction)); + Orientation = ori; + } + public void SetScale(in Vector3 scale) + { + switch (Type) + { + case LightType.Point: + case LightType.Spot: + Falloff = scale.Z; + break; + case LightType.Capsule: + Falloff = scale.X; + ConeOuterAngleOrCapExt = (byte)Math.Min(255, Math.Max(0, Math.Round(Math.Max((uint)ConeOuterAngleOrCapExt, 2) * Math.Abs(scale.Z / Math.Max(Scale.Z, 0.01f)))));//lols + break; + } + Scale = scale; + } + + + + public void CopyFrom(YmapLODLight l) + { + Colour = l.Colour; + Position = l.Position; + Direction = l.Direction; + Falloff = l.Falloff; + FalloffExponent = l.FalloffExponent; + TimeAndStateFlags = l.TimeAndStateFlags; + Hash = l.Hash; + ConeInnerAngle = l.ConeInnerAngle; + ConeOuterAngleOrCapExt = l.ConeOuterAngleOrCapExt; + CoronaIntensity = l.CoronaIntensity; + + Orientation = l.Orientation; + Scale = l.Scale; + TangentX = l.TangentX; + TangentY = l.TangentY; + } + + + public override string ToString() + { + return $"{Index}: {Position}"; + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapTimeCycleModifier +{ + public CTimeCycleModifier CTimeCycleModifier; + public World.TimecycleMod TimeCycleModData { get; set; } + + public Vector3 BBMin; + public Vector3 BBMax; + + public YmapFile Ymap { get; set; } +} + + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapCarGen +{ + public CCarGen _CCarGen; + public CCarGen CCarGen { get => _CCarGen; set => _CCarGen = value; } + + public Vector3 Position; + public Quaternion Orientation; + public Vector3 BBMin; + public Vector3 BBMax; + + public YmapFile Ymap { get; set; } + + + public YmapCarGen(YmapFile ymap, CCarGen cargen) + { + float hlen = cargen.perpendicularLength * 0.5f; + Ymap = ymap; + CCarGen = cargen; + Position = cargen.position; + CalcOrientation(); + BBMin = new Vector3(-hlen); + BBMax = new Vector3(hlen); + } + + + public void CalcOrientation() + { + float angl = (float)Math.Atan2(_CCarGen.orientY, _CCarGen.orientX); + Orientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl); + } + + public void SetPosition(in Vector3 pos) + { + Position = pos; + _CCarGen.position = pos; + } + public void SetOrientation(in Quaternion ori) + { + Orientation = ori; + + float len = Math.Max(_CCarGen.perpendicularLength * 1.5f, 5.0f); + Vector3 v = new Vector3(len, 0, 0); + Vector3 t = ori.Multiply(in v); + + _CCarGen.orientX = t.X; + _CCarGen.orientY = t.Y; + } + public void SetScale(in Vector3 scale) + { + float s = scale.X; + float hlen = s * 0.5f; + _CCarGen.perpendicularLength = s; + + BBMin = new Vector3(-hlen); + BBMax = new Vector3(hlen); + } + + public void SetLength(float length) + { + _CCarGen.perpendicularLength = length; + float hlen = length * 0.5f; + + BBMin = new Vector3(-hlen); + BBMax = new Vector3(hlen); + } + + public string NameString() + { + MetaHash mh = _CCarGen.carModel; + if ((mh == 0) && (_CCarGen.popGroup != 0)) + { + mh = _CCarGen.popGroup; + } + return mh.ToString(); + } + + public override string ToString() + { + return $"{_CCarGen.carModel}, {Position}, {_CCarGen.popGroup}, {_CCarGen.livery}"; + } +} + + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapOccludeModel : BasePathData +{ + public OccludeModel _OccludeModel; + + public OccludeModel OccludeModel { get => _OccludeModel; set => _OccludeModel = value; } + + public YmapFile Ymap { get; set; } + + public byte[]? Data { get; set; } + private int vertexCount; + private int indicesOffset => vertexCount * 12; + [NotNullIfNotNull(nameof(Data))] + public Span Vertices => Data is not null ? MetaTypes.ConvertDataArray(Data, 0, vertexCount) : Span.Empty; + [NotNullIfNotNull(nameof(Data))] + public Span Indices => Data is not null ? Data.AsSpan(indicesOffset) : Span.Empty; + public int Index { get; set; } + + public YmapOccludeModelTriangle[]? Triangles { get; set; } + public TriangleBVH? BVH { get; set; } + + public FlagsUint Flags + { + get => _OccludeModel.flags; + set => _OccludeModel.flags = value; + } + + public YmapOccludeModel(YmapFile ymap, OccludeModel model) + { + Ymap = ymap; + _OccludeModel = model; + } + + + public void Load(Meta meta) + { + var vptr = _OccludeModel.verts; + var dataSize = _OccludeModel.dataSize; + var indicesOffset = _OccludeModel.numVertsInBytes; + vertexCount = indicesOffset / 12; + Data = MetaTypes.GetByteArray(meta, in vptr, dataSize); + BuildTriangles(); + } + + + public void BuildTriangles() + { + if (Data is null) + { + Triangles = null; + return; + } + using var tris = new PooledList(); + for (int i = 0; i < Indices.Length; i += 3) + { + var tri = new YmapOccludeModelTriangle(this, Vertices[Indices[i]], Vertices[Indices[i+1]], Vertices[Indices[i+2]], tris.Count); + tris.Add(tri); + } + Triangles = tris.ToArray(); + } + public void BuildBVH() + { + if (Triangles is null) + { + BVH = null; + return; + } + + BVH = new TriangleBVH(Triangles); + + } + public void BuildVertices() + { + //create vertices and indices arrays from Triangles + if (Triangles is null) + { + return; + } + + + + var vdict = new Dictionary(); + var verts = new List(); + var inds = new List(); + byte ensureVert(in Vector3 v) + { + ref var b = ref CollectionsMarshal.GetValueRefOrAddDefault(vdict, v, out var exists); + if (exists) + { + return b; + } + if (verts.Count > 255) + { + return 0; + } + var i = (byte)verts.Count; + b = i; + verts.Add(v); + return i; + } + foreach(var tri in Triangles.AsSpan()) + { + inds.Add(ensureVert(tri.Corner1)); + inds.Add(ensureVert(tri.Corner2)); + inds.Add(ensureVert(tri.Corner3)); + } + + var newVertsSize = Vector3.SizeInBytes * verts.Count; + var newIndicesSize = Marshal.SizeOf() * inds.Count; + + if (newVertsSize + newIndicesSize != Data.Length) + { + Data = new byte[newVertsSize + newIndicesSize]; + } + vertexCount = verts.Count; + var _verts = verts.AsSpan(); + for (int i = 0; i < _verts.Length; i++) + { + Vertices[i] = _verts[i]; + } + var _inds = inds.AsSpan(); + for (int i = 0; i < _inds.Length; i++) + { + Indices[i] = _inds[i]; + } + } + public void BuildData() + { + //create Data from vertices and indices arrays + if (Data is null) + return; + var dlen = (Vertices.Length * Vector3.SizeInBytes) + (Indices.Length * 1); + if (dlen != Data.Length) + { + throw new InvalidOperationException("Size mismatch in YmapOccludeModel BuildData"); + } + //var d = new byte[dlen]; + //var vbytes = MetaTypes.ConvertArrayToBytes(Vertices); + //var ibytes = Indices; + //Buffer.BlockCopy(vbytes, 0, d, 0, vbytes.Length); + //Buffer.BlockCopy(ibytes, 0, d, vbytes.Length, ibytes.Length); + //Data = d; + var min = new Vector3(float.MaxValue); + var max = new Vector3(float.MinValue); + for (int i = 0; i < Vertices.Length; i++) + { + Vector3.Min(ref min, ref Vertices[i], out min); + Vector3.Max(ref max, ref Vertices[i], out max); + } + _OccludeModel.bmin = min; + _OccludeModel.bmax = max; + _OccludeModel.Unused0 = min.X; + _OccludeModel.Unused1 = max.X; + _OccludeModel.dataSize = (uint)dlen; + _OccludeModel.numVertsInBytes = (ushort)(vertexCount * Vector3.SizeInBytes); + _OccludeModel.numTris = (ushort)((Indices.Length / 3) + 32768);//is this actually a flag lurking..? + //_OccludeModel.flags = ... + } + + public YmapOccludeModelTriangle? RayIntersect(ref Ray ray, ref float hitdist) + { + if (Triangles is null) + { + BuildTriangles(); + BuildBVH(); + } + else if (BVH is null) + { + BuildBVH(); + } + + if (BVH is null) + return null; + return BVH.RayIntersect(ref ray, ref hitdist) as YmapOccludeModelTriangle; + } + + public EditorVertex[] GetTriangleVertices() + { + if (Data is null) + return Array.Empty(); + EditorVertex[] res = new EditorVertex[Indices.Length];//changing from indexed to nonindexed triangle list + var colour = new Color4(1.0f, 0.0f, 0.0f, 0.8f); //todo: colours for occluders? + var colourval = (uint)colour.ToRgba(); + for (int i = 0; i < Indices.Length; i++) + { + res[i].Position = Vertices[Indices[i]]; + res[i].Colour = colourval; + } + return res; + } + + public override string ToString() + { + return $"{Index}: {Vertices.Length} vertices, {Triangles?.Length ?? 0} triangles"; + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapOccludeModelTriangle : TriangleBVHItem +{ + public YmapOccludeModel Model { get; set; } + public YmapFile? Ymap => Model?.Ymap; + public int Index { get; set; } + + public YmapOccludeModelTriangle(YmapOccludeModel model, Vector3 v1, Vector3 v2, Vector3 v3, int i) + { + Model = model; + Corner1 = v1; + Corner2 = v2; + Corner3 = v3; + Index = i; + } +} + +[TypeConverter(typeof(ExpandableObjectConverter))] +public class YmapBoxOccluder : BasePathData +{ + public BoxOccluder _Box; + public ref BoxOccluder Box => ref _Box; + + public YmapFile Ymap { get; set; } + + + public Vector3 Position { get; set; } + public Vector3 Size { get; set; } + public Vector3 BBMin { get; set; } + public Vector3 BBMax { get; set; } + public Quaternion Orientation { get; set; } + public int Index { get; set; } + + + + public YmapBoxOccluder(YmapFile ymap, BoxOccluder box) + { + Ymap = ymap; + _Box = box; + + Position = new Vector3(box.iCenterX, box.iCenterY, box.iCenterZ) / 4.0f; + Size = new Vector3(box.iLength, box.iWidth, box.iHeight) / 4.0f; + BBMin = Size * -0.5f; + BBMax = Size * 0.5f; + + float cosz = box.iCosZ / 32767.0f;// ((float)short.MaxValue) + float sinz = box.iSinZ / 32767.0f; + + float angl = (float)Math.Atan2(cosz, sinz); + Orientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl); + + } + + public void UpdateBoxStruct() + { + _Box.iCenterX = (short)Math.Round(Position.X * 4.0f); + _Box.iCenterY = (short)Math.Round(Position.Y * 4.0f); + _Box.iCenterZ = (short)Math.Round(Position.Z * 4.0f); + _Box.iLength = (short)Math.Round(Size.X * 4.0f); + _Box.iWidth = (short)Math.Round(Size.Y * 4.0f); + _Box.iHeight = (short)Math.Round(Size.Z * 4.0f); + + var dir = Orientation.Multiply(in Vector3.UnitX) * 0.5f; + _Box.iSinZ = (short)Math.Round(dir.X * 32767.0f); + _Box.iCosZ = (short)Math.Round(dir.Y * 32767.0f); + } + + + public void SetSize(Vector3 s) + { + Size = s; + BBMin = Size * -0.5f; + BBMax = Size * 0.5f; + } + + + public EditorVertex[] GetTriangleVertices() + { + Vector3 xform(float x, float y, float z) + { + return Orientation.Multiply(new Vector3(x, y, z)) + Position; + } + EditorVertex[] res = new EditorVertex[36]; + var colour = new Color4(0.0f, 0.0f, 1.0f, 0.8f); //todo: colours for occluders? + var c = (uint)colour.ToRgba(); + var s = Size * 0.5f; + var v0 = new EditorVertex(xform(-s.X, -s.Y, -s.Z), c); + var v1 = new EditorVertex(xform(-s.X, -s.Y, +s.Z), c); + var v2 = new EditorVertex(xform(-s.X, +s.Y, -s.Z), c); + var v3 = new EditorVertex(xform(-s.X, +s.Y, +s.Z), c); + var v4 = new EditorVertex(xform(+s.X, -s.Y, -s.Z), c); + var v5 = new EditorVertex(xform(+s.X, -s.Y, +s.Z), c); + var v6 = new EditorVertex(xform(+s.X, +s.Y, -s.Z), c); + var v7 = new EditorVertex(xform(+s.X, +s.Y, +s.Z), c); + res[00] = v0; res[01] = v1; res[02] = v2; res[03] = v2; res[04] = v1; res[05] = v3; + res[06] = v2; res[07] = v3; res[08] = v6; res[09] = v6; res[10] = v3; res[11] = v7; + res[12] = v1; res[13] = v5; res[14] = v3; res[15] = v3; res[16] = v5; res[17] = v7; + res[18] = v6; res[19] = v7; res[20] = v4; res[21] = v4; res[22] = v7; res[23] = v5; + res[24] = v4; res[25] = v5; res[26] = v0; res[27] = v0; res[28] = v5; res[29] = v1; + res[30] = v2; res[31] = v6; res[32] = v0; res[33] = v0; res[34] = v6; res[35] = v4; + return res; + } + + public override string ToString() + { + return $"{Index}: {FloatUtil.GetVector3String(Position)}"; + } +} diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmfFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmfFile.cs index ff34af6..4b780c1 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmfFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmfFile.cs @@ -10,31 +10,29 @@ namespace CodeWalker.GameFiles { public class YmfFile : PackedFile { - public RpfFileEntry FileEntry { get; set; } + public RpfFileEntry? FileEntry { get; set; } - public Meta Meta { get; set; } - public PsoFile Pso { get; set; } - public RbfFile Rbf { get; set; } + public Meta? Meta { get; set; } + public PsoFile? Pso { get; set; } + public RbfFile? Rbf { get; set; } - public YmfMapDataGroup[] MapDataGroups { get; set; } - public CImapDependency[] imapDependencies { get; set; } - public YmfImapDependency2[] imapDependencies2 { get; set; } - public YmfItypDependency2[] itypDependencies2 { get; set; } - public CHDTxdAssetBinding[] HDTxdAssetBindings { get; set; } - public YmfInterior[] Interiors { get; set; } + public YmfMapDataGroup[] MapDataGroups { get; set; } = Array.Empty(); + public CImapDependency[] imapDependencies { get; set; } = Array.Empty(); + public YmfImapDependency2[] imapDependencies2 { get; set; } = Array.Empty(); + public YmfItypDependency2[] itypDependencies2 { get; set; } = Array.Empty(); + public CHDTxdAssetBinding[] HDTxdAssetBindings { get; set; } = Array.Empty(); + public YmfInterior[] Interiors { get; set; } = Array.Empty(); public void Load(byte[] data, RpfFileEntry entry) { FileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - MemoryStream ms = new MemoryStream(data); - if (RbfFile.IsRBF(ms)) + if (RbfFile.IsRBF(data.AsSpan(0, 4))) { Rbf = new RbfFile(); - Rbf.Load(ms); + Rbf.Load(data); //x64j.rpf\\levels\\gta5\\_citye\\indust_01\\id1_props.rpf\\_manifest.ymf //x64j.rpf\\levels\\gta5\\_citye\\indust_02\\id2_props.rpf\\_manifest.ymf @@ -43,10 +41,10 @@ namespace CodeWalker.GameFiles return; } - if (PsoFile.IsPSO(ms)) + if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); - Pso.Load(ms); + Pso.Load(data); //PsoTypes.EnsurePsoTypes(Pso); @@ -56,21 +54,14 @@ namespace CodeWalker.GameFiles } else { - + Console.WriteLine("Neither"); } return; } - else - { }//doesn't get here - - - - using var rd = new ResourceDataReader(resentry, data); Meta = rd.ReadBlock(); - } @@ -81,22 +72,22 @@ namespace CodeWalker.GameFiles //for TIMED YMAP stuff!!!! //check CMapDataGroup.HoursOnOff + ArgumentNullException.ThrowIfNull(Pso, nameof(Pso)); + var d = PsoTypes.GetRootItem(Pso); - MapDataGroups = PsoTypes.GetObjectArray(Pso, d.MapDataGroups); + MapDataGroups = PsoTypes.GetObjectArray(Pso, in d._MapDataGroups) ?? Array.Empty(); - imapDependencies = PsoTypes.GetItemArray(Pso, d.imapDependencies).ToArray(); + imapDependencies = PsoTypes.GetItemArray(Pso, in d._imapDependencies)?.ToArray() ?? Array.Empty(); - imapDependencies2 = PsoTypes.GetObjectArray(Pso, d.imapDependencies_2); + imapDependencies2 = PsoTypes.GetObjectArray(Pso, in d._imapDependencies_2) ?? Array.Empty(); - itypDependencies2 = PsoTypes.GetObjectArray(Pso, d.itypDependencies_2); - - HDTxdAssetBindings = PsoTypes.GetItemArray(Pso, d.HDTxdBindingArray).ToArray(); - - Interiors = PsoTypes.GetObjectArray(Pso, d.Interiors); + itypDependencies2 = PsoTypes.GetObjectArray(Pso, in d._itypDependencies_2) ?? Array.Empty(); + HDTxdAssetBindings = PsoTypes.GetItemArray(Pso, in d._HDTxdBindingArray)?.ToArray() ?? Array.Empty(); + Interiors = PsoTypes.GetObjectArray(Pso, in d._Interiors) ?? Array.Empty(); } @@ -109,8 +100,8 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class YmfMapDataGroup : PsoClass { public CMapDataGroup DataGroup { get; set; } //ymap name - public MetaHash[] Bounds { get; set; } - public MetaHash[] WeatherTypes { get; set; } + public MetaHash[] Bounds { get; set; } = Array.Empty(); + public MetaHash[] WeatherTypes { get; set; } = Array.Empty(); public MetaHash Name { get; set; } public ushort Flags { get; set; } public uint HoursOnOff { get; set; } @@ -120,11 +111,11 @@ namespace CodeWalker.GameFiles return DataGroup.ToString(); } - public override void Init(PsoFile pso, ref CMapDataGroup v) + public override void Init(PsoFile pso, in CMapDataGroup v) { DataGroup = v; - Bounds = PsoTypes.GetHashArray(pso, v.Bounds); - WeatherTypes = PsoTypes.GetHashArray(pso, v.WeatherTypes); + Bounds = PsoTypes.GetHashArray(pso, v.Bounds) ?? Array.Empty(); + WeatherTypes = PsoTypes.GetHashArray(pso, v.WeatherTypes) ?? Array.Empty(); Name = v.Name; Flags = v.Flags; HoursOnOff = v.HoursOnOff; @@ -136,7 +127,7 @@ namespace CodeWalker.GameFiles public CImapDependencies Dep { get; set; } public MetaHash[] itypDepArray { get; set; }//ybn hashes? - public override void Init(PsoFile pso, ref CImapDependencies v) + public override void Init(PsoFile pso, in CImapDependencies v) { Dep = v; itypDepArray = PsoTypes.GetHashArray(pso, v.itypDepArray); @@ -153,7 +144,7 @@ namespace CodeWalker.GameFiles public CItypDependencies Dep { get; set; } public MetaHash[] itypDepArray { get; set; }//ytyp hashes? - public override void Init(PsoFile pso, ref CItypDependencies v) + public override void Init(PsoFile pso, in CItypDependencies v) { Dep = v; itypDepArray = PsoTypes.GetHashArray(pso, v.itypDepArray); @@ -170,15 +161,12 @@ namespace CodeWalker.GameFiles public CInteriorBoundsFiles Interior { get; set; } public MetaHash[] Bounds { get; set; }//ybn hashes? - public override string ToString() - { - return Interior.ToString(); - } + public override string ToString() => Interior.ToString(); - public override void Init(PsoFile pso, ref CInteriorBoundsFiles v) + public override void Init(PsoFile pso, in CInteriorBoundsFiles v) { Interior = v; - Bounds = PsoTypes.GetHashArray(pso, v.Bounds); + Bounds = PsoTypes.GetHashArray(pso, in v._Bounds); } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmtFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmtFile.cs index bd92886..9bc85c9 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmtFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmtFile.cs @@ -59,8 +59,7 @@ namespace CodeWalker.GameFiles FilePath = Name; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry != null) + if (entry is RpfResourceFileEntry resentry) { using var rd = new ResourceDataReader(resentry, data); @@ -80,12 +79,10 @@ namespace CodeWalker.GameFiles } - MemoryStream ms = new MemoryStream(data); - - if (RbfFile.IsRBF(ms)) + if (RbfFile.IsRBF(data.AsSpan(0, 4))) { Rbf = new RbfFile(); - var rbfstruct = Rbf.Load(ms); + var rbfstruct = Rbf.Load(data); if (rbfstruct.Name == "CMapParentTxds") { @@ -97,30 +94,24 @@ namespace CodeWalker.GameFiles Loaded = true; return; } - if (PsoFile.IsPSO(ms)) + else if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); - Pso.Load(ms); + Pso.Load(data); //PsoTypes.EnsurePsoTypes(Pso); var root = PsoTypes.GetRootEntry(Pso); - if (root != null) + + if (root.NameHash == MetaName.CScenarioPointManifest) { - if (root.NameHash == MetaName.CScenarioPointManifest) - { - LoadScenarioPointManifest(Pso); - } + LoadScenarioPointManifest(Pso); } Loaded = true; return; } - else - { - - } @@ -134,29 +125,29 @@ namespace CodeWalker.GameFiles ContentType = YmtFileContentType.MapParentTxds; CMapParentTxds = new Dictionary(); + + if (rbfstruct.Children is null || rbfstruct.Children.Count == 0) + return; + //StringBuilder sblist = new StringBuilder(); foreach(var child in rbfstruct.Children) { - var childstruct = child as RbfStructure; - if ((childstruct != null) && (childstruct.Name == "txdRelationships")) + if (child is RbfStructure childstruct && childstruct.Name == "txdRelationships" && childstruct.Children is not null) { foreach (var txdrel in childstruct.Children) { - var txdrelstruct = txdrel as RbfStructure; - if ((txdrelstruct != null) && (txdrelstruct.Name == "item")) + if (txdrel is RbfStructure txdrelstruct && txdrelstruct.Name == "item" && txdrelstruct.Children is not null) { string parentstr = string.Empty; string childstr = string.Empty; - foreach(var item in txdrelstruct.Children) + foreach (var item in txdrelstruct.Children) { - var itemstruct = item as RbfStructure; - if ((itemstruct != null)) + if (item is RbfStructure itemstruct) { - var strbytes = itemstruct.Children[0] as RbfBytes; string thisstr = string.Empty; - if (strbytes != null) + if (itemstruct.Children is not null && itemstruct.Children[0] is RbfBytes strbytes) { - thisstr = Encoding.ASCII.GetString(strbytes.Value).Replace("\0", ""); + thisstr = strbytes.GetNullTerminatedString(); } switch (item.Name) { @@ -170,15 +161,9 @@ namespace CodeWalker.GameFiles } } - if((!string.IsNullOrEmpty(parentstr)) && (!string.IsNullOrEmpty(childstr))) + if (!string.IsNullOrEmpty(parentstr) && !string.IsNullOrEmpty(childstr)) { - if (!CMapParentTxds.ContainsKey(childstr)) - { - CMapParentTxds.Add(childstr, parentstr); - } - else - { - } + _ = CMapParentTxds.TryAdd(childstr, parentstr); //sblist.AppendLine(childstr + ": " + parentstr); } } @@ -211,7 +196,7 @@ namespace CodeWalker.GameFiles CScenarioPointRegion = new MCScenarioPointRegion(); CScenarioPointRegion.Ymt = this; - CScenarioPointRegion.Load(meta, cdata); + CScenarioPointRegion.Load(meta, in cdata); ScenarioRegion = new ScenarioRegion(); @@ -225,33 +210,32 @@ namespace CodeWalker.GameFiles - public byte[] Save() + public byte[]? Save() { - switch (ContentType) + return ContentType switch { - case YmtFileContentType.MapParentTxds: return SaveMapParentTxds(); - case YmtFileContentType.ScenarioPointManifest: return SaveScenarioPointManifest(); - case YmtFileContentType.ScenarioPointRegion: return SaveScenarioPointRegion(); - } - - return null; + YmtFileContentType.MapParentTxds => SaveMapParentTxds(), + YmtFileContentType.ScenarioPointManifest => SaveScenarioPointManifest(), + YmtFileContentType.ScenarioPointRegion => SaveScenarioPointRegion(), + _ => null, + }; } - private byte[] SaveMapParentTxds() + private byte[]? SaveMapParentTxds() { return null; } - private byte[] SaveScenarioPointManifest() + private byte[]? SaveScenarioPointManifest() { return null; } - private byte[] SaveScenarioPointRegion() + private byte[]? SaveScenarioPointRegion() { - if (ScenarioRegion != null) + if (ScenarioRegion is not null) { return ScenarioRegion.Save(); } @@ -267,7 +251,7 @@ namespace CodeWalker.GameFiles private void LogSaveWarning(string w) { - if (SaveWarnings == null) SaveWarnings = new List(); + SaveWarnings ??= new List(); SaveWarnings.Add(w); } @@ -276,10 +260,7 @@ namespace CodeWalker.GameFiles - public override string ToString() - { - return RpfFileEntry.ToString(); - } + public override string? ToString() => RpfFileEntry?.ToString(); } @@ -300,10 +281,11 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public class YmtScenarioPointManifest + [TypeConverter(typeof(ExpandableObjectConverter))] + public class YmtScenarioPointManifest { public CScenarioPointManifest _Data; - public CScenarioPointManifest Data { get { return _Data; } set { _Data = value; } } + public CScenarioPointManifest Data { get => _Data; init => _Data = value; } public CScenarioPointRegionDef[] RegionDefs { get; set; } public CScenarioPointGroup[] Groups { get; set; } @@ -312,10 +294,10 @@ namespace CodeWalker.GameFiles public void Load(PsoFile pso) { - Data = PsoTypes.GetRootItem(pso); - RegionDefs = PsoTypes.ConvertDataArray(pso, _Data.RegionDefs); - Groups = PsoTypes.ConvertDataArray(pso, _Data.Groups); - InteriorNames = PsoTypes.GetHashArray(pso, _Data.InteriorNames); + _Data = PsoTypes.GetRootItem(pso); + RegionDefs = PsoTypes.ConvertDataArray(pso, in _Data._RegionDefs); + Groups = PsoTypes.ConvertDataArray(pso, in _Data._Groups); + InteriorNames = PsoTypes.GetHashArray(pso, in _Data._InteriorNames); } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YndFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YndFile.cs index 24b924d..8c61526 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YndFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YndFile.cs @@ -1,8 +1,10 @@ using CodeWalker.World; +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Xml; @@ -18,9 +20,9 @@ namespace CodeWalker.GameFiles public YndLink[] Links { get; set; } public YndJunction[] Junctions { get; set; } - public EditorVertex[] LinkedVerts { get; set; }//populated by the space (needs to use grid of all ynd's!) - public EditorVertex[] TriangleVerts { get; set; } //used for junctions display - public Vector4[] NodePositions { get; set; } + public EditorVertex[] LinkedVerts { get; set; } = [];//populated by the space (needs to use grid of all ynd's!) + public EditorVertex[] TriangleVerts { get; set; } = []; //used for junctions display + public Vector4[] NodePositions { get; set; } = []; public Vector3 BBMin { get; set; } public Vector3 BBMax { get; set; } @@ -31,10 +33,7 @@ namespace CodeWalker.GameFiles public int AreaID { - get - { - return CellY * 32 + CellX; - } + get => CellY * 32 + CellX; set { CellX = value % 32; @@ -78,10 +77,10 @@ namespace CodeWalker.GameFiles Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -219,9 +218,9 @@ namespace CodeWalker.GameFiles public void InitNodesFromDictionary() { - if (NodeDictionary != null) + if (NodeDictionary is not null) { - if (NodeDictionary.Nodes != null) + if (NodeDictionary.Nodes is not null) { var nodes = NodeDictionary.Nodes; Nodes = new YndNode[nodes.Length]; @@ -230,11 +229,9 @@ namespace CodeWalker.GameFiles var n = new YndNode(); n.Init(this, nodes[i]); Nodes[i] = n; - if (n.NodeID != i) - { } //never hit here - nodeid's have to match the index! } } - if ((NodeDictionary.JunctionRefs != null) && (NodeDictionary.Junctions != null)) + if (NodeDictionary.JunctionRefs is not null && NodeDictionary.Junctions is not null) { var juncrefs = NodeDictionary.JunctionRefs; var juncs = NodeDictionary.Junctions; @@ -243,7 +240,7 @@ namespace CodeWalker.GameFiles { var juncref = juncrefs[i]; if (juncref.JunctionID >= juncs.Length) - { continue; } + continue; var j = new YndJunction(); j.Init(this, juncs[juncref.JunctionID], juncref); @@ -295,7 +292,7 @@ namespace CodeWalker.GameFiles Nodes = nnodes; NodeDictionary.NodesCount = (uint)ncnt; - var links = new List(); + using var links = new PooledList(); if (Links != null) { links.AddRange(Links); @@ -343,7 +340,7 @@ namespace CodeWalker.GameFiles return; } // Sort nodes so ped nodes are at the end - var nodes = new List(Nodes.Length); + using var nodes = new PooledList(Nodes.Length); var affectedNodesList = new List(); var vehicleNodes = Nodes.Where(n => !n.IsPedNode).OrderBy(n => n.NodeID).ToArray(); var pedNodes = Nodes.Where(n => n.IsPedNode).OrderBy(n => n.NodeID).ToArray(); @@ -395,7 +392,7 @@ namespace CodeWalker.GameFiles rmLinks.AddRange(nodeRmLinks); } - if (rmLinks.Any()) + if (rmLinks.Count != 0) { Links = Links.Where(l => !rmLinks.Contains(l)).ToArray(); return true; @@ -420,12 +417,12 @@ namespace CodeWalker.GameFiles public void UpdateAllNodePositions() { - int cnt = Nodes?.Length ?? 0; - if (cnt <= 0) + if (Nodes is null || Nodes.Length == 0) { - NodePositions = null; + NodePositions = Array.Empty(); return; } + int cnt = Nodes.Length; var np = new Vector4[cnt]; for (int i = 0; i < cnt; i++) { @@ -451,12 +448,12 @@ namespace CodeWalker.GameFiles vc = Links.Length * 6; } - List verts = new List(vc); - EditorVertex v0 = new EditorVertex(); - EditorVertex v1 = new EditorVertex(); - EditorVertex v2 = new EditorVertex(); - EditorVertex v3 = new EditorVertex(); - if ((Links != null) && (Nodes != null)) + using PooledList verts = new PooledList(vc); + //EditorVertex v0 = new EditorVertex(); + //EditorVertex v1 = new EditorVertex(); + //EditorVertex v2 = new EditorVertex(); + //EditorVertex v3 = new EditorVertex(); + if (Links is not null && Nodes is not null) { foreach (var node in Nodes) { @@ -496,16 +493,13 @@ namespace CodeWalker.GameFiles outer += halfwidth; } - - v0.Position = p1 + ax * inner; - v1.Position = p0 + ax * inner; - v2.Position = p1 + ax * outer; - v3.Position = p0 + ax * outer; var c = (uint)link.GetColour().ToRgba(); - v0.Colour = c; - v1.Colour = c; - v2.Colour = c; - v3.Colour = c; + + var v0 = new EditorVertex(p1 + ax * inner, c); + var v1 = new EditorVertex(p0 + ax * inner, c); + var v2 = new EditorVertex(p1 + ax * outer, c); + var v3 = new EditorVertex(p0 + ax * outer, c); + verts.Add(v0); verts.Add(v1); verts.Add(v2); @@ -523,31 +517,34 @@ namespace CodeWalker.GameFiles } else { - TriangleVerts = null; + TriangleVerts = []; } } - private void UpdateJunctionTriangleVertices(YndNode[] selectedNodes) + private void UpdateJunctionTriangleVertices(YndNode[]? selectedNodes) { - if (selectedNodes == null) + if (selectedNodes is null) { return; } //build triangles for the junctions bytes display.... - List verts = new List(); - EditorVertex v0 = new EditorVertex(); - EditorVertex v1 = new EditorVertex(); - EditorVertex v2 = new EditorVertex(); - EditorVertex v3 = new EditorVertex(); + using PooledList verts = new PooledList(); + EditorVertex v0; + EditorVertex v1; + EditorVertex v2; + EditorVertex v3; foreach (var node in selectedNodes) { - if (node.Ynd != this) continue; - if (node.Junction == null) continue; + if (node.Ynd != this) + continue; + if (node.Junction is null) + continue; var j = node.Junction; var d = j.Heightmap; - if (d == null) continue; + if (d is null) + continue; float maxz = j.MaxZ / 32.0f; float minz = j.MinZ / 32.0f; @@ -576,14 +573,10 @@ namespace CodeWalker.GameFiles var val2 = row1.Values[x - 1] / 255.0f; var val3 = row1.Values[x] / 255.0f; float offx = x * 2.0f; - v0.Position = cnr + new Vector3(offx - 2.0f, offy - 2.0f, val0 * rngz); - v1.Position = cnr + new Vector3(offx + 0.0f, offy - 2.0f, val1 * rngz); - v2.Position = cnr + new Vector3(offx - 2.0f, offy + 0.0f, val2 * rngz); - v3.Position = cnr + new Vector3(offx + 0.0f, offy + 0.0f, val3 * rngz); - v0.Colour = (uint)new Color4(val0, 1.0f - val0, 0.0f, 0.3f).ToRgba(); - v1.Colour = (uint)new Color4(val1, 1.0f - val1, 0.0f, 0.3f).ToRgba(); - v2.Colour = (uint)new Color4(val2, 1.0f - val2, 0.0f, 0.3f).ToRgba(); - v3.Colour = (uint)new Color4(val3, 1.0f - val3, 0.0f, 0.3f).ToRgba(); + v0 = new EditorVertex(cnr + new Vector3(offx - 2.0f, offy - 2.0f, val0 * rngz), (uint)new Color4(val0, 1.0f - val0, 0.0f, 0.3f).ToRgba()); + v1 = new EditorVertex(cnr + new Vector3(offx + 0.0f, offy - 2.0f, val1 * rngz), (uint)new Color4(val1, 1.0f - val1, 0.0f, 0.3f).ToRgba()); + v2 = new EditorVertex(cnr + new Vector3(offx - 2.0f, offy + 0.0f, val2 * rngz), (uint)new Color4(val2, 1.0f - val2, 0.0f, 0.3f).ToRgba()); + v3 = new EditorVertex(cnr + new Vector3(offx + 0.0f, offy + 0.0f, val3 * rngz), (uint)new Color4(val3, 1.0f - val3, 0.0f, 0.3f).ToRgba()); verts.Add(v0); verts.Add(v1); verts.Add(v2); @@ -597,7 +590,7 @@ namespace CodeWalker.GameFiles if (verts.Count > 0) { var vertsarr = verts.ToArray(); - if (TriangleVerts != null) + if (TriangleVerts.Length > 0) { var nvc = vertsarr.Length; var tvc = TriangleVerts.Length; @@ -689,18 +682,13 @@ namespace CodeWalker.GameFiles return true; } - affectedFiles = Array.Empty(); + affectedFiles = []; return false; } - - - public override string ToString() - { - return RpfFileEntry?.ToString() ?? string.Empty; - } + public override string ToString() => RpfFileEntry?.ToString() ?? string.Empty; } public enum YndNodeSpeed @@ -725,26 +713,29 @@ namespace CodeWalker.GameFiles OffRoadJunction = 20 } - [TypeConverter(typeof(ExpandableObjectConverter))] public class YndNode : BasePathNode + [TypeConverter(typeof(ExpandableObjectConverter))] + public class YndNode : BasePathNode { public Node _RawData; public YndFile Ynd { get; set; } - public Node RawData { get { return _RawData; } set { _RawData = value; } } - public Vector3 Position { get; set; } + public Node RawData { get => _RawData; set => _RawData = value; } + + public Vector3 _Position; + public ref Vector3 Position => ref _Position; public int LinkCount { get; set; } public int LinkCountUnk { get; set; } - public YndLink[] Links { get; set; } + public YndLink[]? Links { get; set; } - public ushort AreaID { get { return _RawData.AreaID; } set { _RawData.AreaID = value; } } - public ushort NodeID { get { return _RawData.NodeID; } set { _RawData.NodeID = value; } } - public ushort LinkID { get { return _RawData.LinkID; } set { _RawData.LinkID = value; } } - public FlagsByte Flags0 { get { return _RawData.Flags0; } set { _RawData.Flags0 = value; } } - public FlagsByte Flags1 { get { return _RawData.Flags1; } set { _RawData.Flags1 = value; } } - public FlagsByte Flags2 { get { return _RawData.Flags2; } set { _RawData.Flags2 = value; } } - public FlagsByte Flags3 { get { return _RawData.Flags3; } set { _RawData.Flags3 = value; } } - public FlagsByte Flags4 { get { return _RawData.Flags4; } set { _RawData.Flags4 = value; } } - public TextHash StreetName { get { return _RawData.StreetName; } set { _RawData.StreetName = value; } } + public ushort AreaID { get => _RawData.AreaID; set => _RawData.AreaID = value; } + public ushort NodeID { get => _RawData.NodeID; set => _RawData.NodeID = value; } + public ushort LinkID { get => _RawData.LinkID; set => _RawData.LinkID = value; } + public FlagsByte Flags0 { get => _RawData.Flags0; set => _RawData.Flags0 = value; } + public FlagsByte Flags1 { get => _RawData.Flags1; set => _RawData.Flags1 = value; } + public FlagsByte Flags2 { get => _RawData.Flags2; set => _RawData.Flags2 = value; } + public FlagsByte Flags3 { get => _RawData.Flags3; set => _RawData.Flags3 = value; } + public FlagsByte Flags4 { get => _RawData.Flags4; set => _RawData.Flags4 = value; } + public TextHash StreetName { get => _RawData.StreetName; set => _RawData.StreetName = value; } public Color4 Colour { get; set; } @@ -754,14 +745,8 @@ namespace CodeWalker.GameFiles public YndNodeSpeed Speed { - get - { - return (YndNodeSpeed)((LinkCountUnk >> 1) & 3); - } - set - { - LinkCountUnk = (LinkCountUnk &~ 6) | (((int)value & 3) << 1); - } + get => (YndNodeSpeed)((LinkCountUnk >> 1) & 3); + set => LinkCountUnk = (LinkCountUnk & ~6) | (((int)value & 3) << 1); } //// Flag0 Properties @@ -843,14 +828,14 @@ namespace CodeWalker.GameFiles } public bool IsDisabledUnk1 { - get { return (Flags2.Value & 16) > 0; } + get => (Flags2.Value & 16) > 0; set => Flags2 = (byte)(value ? Flags2 | 16 : Flags2 &~ 16); } // Flag3 Properties public bool Tunnel { - get { return (Flags3 & 1) > 0; } + get => (Flags3 & 1) > 0; set => Flags3 = (byte)(value ? Flags3 | 1 : Flags3 &~ 1); } public int HeuristicValue @@ -894,11 +879,7 @@ namespace CodeWalker.GameFiles { Ynd = ynd; RawData = node; - Vector3 p = new Vector3(); - p.X = node.PositionX / 4.0f; - p.Y = node.PositionY / 4.0f; - p.Z = node.PositionZ / 32.0f; - Position = p; + Position = new Vector3(node.PositionX / 4.0f, node.PositionY / 4.0f, node.PositionZ / 32.0f); LinkCount = node.LinkCountFlags.Value >> 3; LinkCountUnk = node.LinkCountFlags.Value & 7; @@ -947,7 +928,8 @@ namespace CodeWalker.GameFiles public void UpdateLinkLengths() { - if (Links == null) return; + if (Links is null) + return; for (int i = 0; i < Links.Length; i++) { var link = Links[i]; @@ -1011,7 +993,7 @@ namespace CodeWalker.GameFiles } - public YndLink AddLink(YndNode tonode = null, bool bidirectional = true) + public YndLink AddLink(YndNode? tonode = null, bool bidirectional = true) { if (Links == null) { @@ -1027,13 +1009,13 @@ namespace CodeWalker.GameFiles YndLink l = new YndLink(); l._RawData.AreaID = AreaID; l.Node1 = this; - if (tonode != null) + if (tonode is not null) { l.Node2 = tonode; l._RawData.AreaID = tonode.AreaID; l._RawData.NodeID = tonode.NodeID; } - else if ((Ynd.Nodes != null) && (Ynd.Nodes.Length > 0)) + else if (Ynd.Nodes is not null && Ynd.Nodes.Length > 0) { l.Node2 = Ynd.Nodes[0]; } @@ -1066,8 +1048,13 @@ namespace CodeWalker.GameFiles return l; } - public bool TryGetLinkForNode(YndNode node, out YndLink link) + public bool TryGetLinkForNode(YndNode node, [MaybeNullWhen(false)] out YndLink link) { + if (Links is null) + { + link = null; + return false; + } for (int i = 0; i < Links.Length; i++) { if (Links[i].Node2 == node) @@ -1114,15 +1101,15 @@ namespace CodeWalker.GameFiles private void FloodCopyFlags(YndNode basis, List seenNodes, out YndFile[] affectedFiles) { var affectedFilesList = new List(); - if (Links == null || !Links.Any()) + if (Links == null || Links.Length == 0) { - affectedFiles = Array.Empty(); + affectedFiles = []; return; } if (seenNodes.Contains(this)) { - affectedFiles = Array.Empty(); + affectedFiles = []; return; } @@ -1177,20 +1164,20 @@ namespace CodeWalker.GameFiles var oldPosition = Position; SetPosition(newPosition); - var expectedArea = space.NodeGrid.GetCellForPosition(newPosition); + var expectedArea = space.NodeGrid.GetCellForPosition(in newPosition); - if (AreaID != expectedArea.ID) + if (AreaID != expectedArea?.ID) { var nodeYnd = space.NodeGrid.GetCell(AreaID).Ynd; - var newYnd = expectedArea.Ynd; - if (newYnd == null) + var newYnd = expectedArea?.Ynd; + if (newYnd is null) { SetPosition(oldPosition); affectedFiles = Array.Empty(); return; } - if ((nodeYnd == null) || + if ((nodeYnd is null) || nodeYnd.RemoveYndNode(space, this, false, out var affectedFilesFromDelete)) { totalAffectedFiles.Add(nodeYnd); @@ -1249,7 +1236,8 @@ namespace CodeWalker.GameFiles for (int x = 0; x < sizeX; x++) { var offx = x * 2.0f; - var result = space.RayIntersect(new Ray(start + new Vector3(offx, offy, 0f), new Vector3(0f, 0f, -1f)), maxDist, layers); + var ray = new Ray(start + new Vector3(offx, offy, 0f), new Vector3(0f, 0f, -1f)); + var result = space.RayIntersect(ref ray, maxDist, layers); var p = start + new Vector3(offx, offy, 0f); //t.AppendLine($"{p.X}, {p.Y}, {p.Z}"); @@ -1287,7 +1275,7 @@ namespace CodeWalker.GameFiles public override string ToString() { //return AreaID.ToString() + "." + NodeID.ToString(); - return StreetName.ToString() + ", " + Position.X.ToString() + ", " + Position.Y.ToString() + ", " + Position.Z.ToString() + ", " + NodeID.ToString(); + return $"{StreetName}, {Position.X}, {Position.Y}, {Position.Z}, {NodeID}"; } } @@ -1357,8 +1345,8 @@ namespace CodeWalker.GameFiles public void UpdateLength() { - if (Node1 == null) return; - if (Node2 == null) return; + if (Node1 is null || Node2 is null) + return; LinkLength = (byte)Math.Min(255, (Node2.Position - Node1.Position).Length()); } @@ -1366,7 +1354,8 @@ namespace CodeWalker.GameFiles public void CopyFlags(YndLink link) { - if (link == null) return; + if (link is null) + return; Flags0 = link.Flags0; Flags1 = link.Flags1; Flags2 = link.Flags2; @@ -1678,7 +1667,7 @@ namespace CodeWalker.GameFiles StringBuilder sb = new StringBuilder(); for (int i = 0; i < Values.Length; i++) { - if (i > 0) sb.Append(" "); + if (i > 0) sb.Append(' '); sb.Append(Values[i].ToString().PadLeft(3, '0')); //sb.Append(Convert.ToString(Values[i], 16).ToUpper().PadLeft(2, '0')); } @@ -1694,7 +1683,7 @@ namespace CodeWalker.GameFiles public int Depth; public int MaxDepth; public int Threshold; - public List Nodes; + public BasePathNode[] Nodes; public BoundingBox Box; public BoundingSphere Sphere; public PathBVHNode Node1; @@ -1703,14 +1692,15 @@ namespace CodeWalker.GameFiles public void CalcBounds() { - if ((Nodes == null) || (Nodes.Count <= 0)) return; + if (Nodes is null || Nodes.Length == 0) + return; Box.Minimum = new Vector3(float.MaxValue); Box.Maximum = new Vector3(float.MinValue); foreach (var node in Nodes) { - Box.Minimum = Vector3.Min(Box.Minimum, node.Position); - Box.Maximum = Vector3.Max(Box.Maximum, node.Position); + Vectors.Min(in Box.Minimum, in node.Position, out Box.Minimum); + Vectors.Max(in Box.Maximum, in node.Position, out Box.Maximum); } Sphere.Center = (Box.Minimum + Box.Maximum) * 0.5f; Sphere.Radius = (Box.Maximum - Box.Minimum).Length() * 0.5f; @@ -1719,24 +1709,28 @@ namespace CodeWalker.GameFiles public void Build() { - if ((Nodes == null) || (Nodes.Count <= Threshold) || (Depth >= MaxDepth)) return; + if (Nodes == null || Nodes.Length == 0 || Nodes.Length <= Threshold || Depth >= MaxDepth) + return; Vector3 avgsum = Vector3.Zero; foreach (var node in Nodes) { avgsum += node.Position; } - Vector3 avg = avgsum * (1.0f / Nodes.Count); + Vector3 avg = avgsum * Nodes.Length; int countx = 0, county = 0, countz = 0; foreach (var node in Nodes) { - if (node.Position.X < avg.X) countx++; - if (node.Position.Y < avg.Y) county++; - if (node.Position.Z < avg.Z) countz++; + if (node.Position.X < avg.X) + countx++; + if (node.Position.Y < avg.Y) + county++; + if (node.Position.Z < avg.Z) + countz++; } - int target = Nodes.Count / 2; + int target = Nodes.Length / 2; int dx = Math.Abs(target - countx); int dy = Math.Abs(target - county); int dz = Math.Abs(target - countz); @@ -1747,37 +1741,41 @@ namespace CodeWalker.GameFiles else axis = 2; //z seems best - List l1 = new List(); - List l2 = new List(); + using PooledList l1 = new PooledList(Nodes.Length); + using PooledList l2 = new PooledList(Nodes.Length); foreach (var node in Nodes) { - bool s = false; - switch (axis) + var s = axis switch { - default: - case 0: s = (node.Position.X > avg.X); break; - case 1: s = (node.Position.Y > avg.Y); break; - case 2: s = (node.Position.Z > avg.Z); break; - } - if (s) l1.Add(node); - else l2.Add(node); + 1 => (node.Position.Y > avg.Y), + 2 => (node.Position.Z > avg.Z), + _ => (node.Position.X > avg.X), + }; + if (s) + l1.Add(node); + else + l2.Add(node); } var cdepth = Depth + 1; - Node1 = new PathBVHNode(); - Node1.Depth = cdepth; - Node1.MaxDepth = MaxDepth; - Node1.Threshold = Threshold; - Node1.Nodes = new List(l1); + Node1 = new PathBVHNode + { + Depth = cdepth, + MaxDepth = MaxDepth, + Threshold = Threshold, + Nodes = l1.ToArray(), + }; Node1.CalcBounds(); Node1.Build(); - Node2 = new PathBVHNode(); - Node2.Depth = cdepth; - Node2.MaxDepth = MaxDepth; - Node2.Threshold = Threshold; - Node2.Nodes = new List(l2); + Node2 = new PathBVHNode + { + Depth = cdepth, + MaxDepth = MaxDepth, + Threshold = Threshold, + Nodes = l2.ToArray(), + }; Node2.CalcBounds(); Node2.Build(); } @@ -1785,12 +1783,13 @@ namespace CodeWalker.GameFiles public void UpdateForNode(BasePathNode node) { - if (!Nodes.Contains(node)) return; - Box.Minimum = Vector3.Min(Box.Minimum, node.Position); - Box.Maximum = Vector3.Max(Box.Maximum, node.Position); + if (!Nodes.Contains(node)) + return; + Vectors.Min(in Box.Minimum, in node.Position, out Box.Minimum); + Vectors.Max(in Box.Maximum, in node.Position, out Box.Maximum); - if (Node1 != null) Node1.UpdateForNode(node); - if (Node2 != null) Node2.UpdateForNode(node); + Node1?.UpdateForNode(node); + Node2?.UpdateForNode(node); } } @@ -1802,11 +1801,19 @@ namespace CodeWalker.GameFiles { Threshold = threshold; MaxDepth = maxdepth; - Nodes = (nodes != null) ? new List(nodes) : new List(); + Nodes = nodes?.ToArray() ?? []; CalcBounds(); Build(); } + public PathBVH(BasePathNode[] nodes, int threshold, int maxdepth) + { + Threshold = threshold; + MaxDepth = maxdepth; + Nodes = nodes; + CalcBounds(); + Build(); + } } @@ -1814,27 +1821,19 @@ namespace CodeWalker.GameFiles public interface BasePathNode { - Vector3 Position { get; set; } + ref Vector3 Position { get; } } public interface BasePathData { //reuse this interface for file types that need to get paths rendered... - EditorVertex[] GetPathVertices(); - EditorVertex[] GetTriangleVertices(); - Vector4[] GetNodePositions(); + EditorVertex[] GetPathVertices() => Array.Empty(); + EditorVertex[] GetTriangleVertices() => Array.Empty(); + Vector4[] GetNodePositions() => Array.Empty(); } - - - - - - - - public class YndXml : MetaXmlBase { diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index a2ac2b4..bcf0f07 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Xml; +using Collections.Pooled; using SharpDX; namespace CodeWalker.GameFiles @@ -28,7 +30,7 @@ namespace CodeWalker.GameFiles //fields used by the editor: public bool HasChanged { get; set; } = false; - public List SaveWarnings = null; + public List? SaveWarnings = null; public bool BuildStructsOnSave { get; set; } = true; @@ -38,13 +40,11 @@ namespace CodeWalker.GameFiles public int AreaID { - get - { - return (int)(Nav?.AreaID ?? 0); - } + get => (int)(Nav?.AreaID ?? 0); set { - if (Nav != null) Nav.AreaID = (uint)value; + if (Nav is not null) + Nav.AreaID = (uint)value; } } public int CellX { get { return AreaID % 100; } set { AreaID = (CellY * 100) + value; } } @@ -53,12 +53,12 @@ namespace CodeWalker.GameFiles //getters for property grids viewing of the lists - public Vector3[] AllVertices { get { return Vertices?.ToArray(); } } - public ushort[] AllIndices { get { return Indices?.ToArray(); } } - public YnvEdge[] AllEdges { get { return Edges?.ToArray(); } } - public YnvPoly[] AllPolys { get { return Polys?.ToArray(); } } - public YnvPortal[] AllPortals { get { return Portals?.ToArray(); } } - public YnvPoint[] AllPoints { get { return Points?.ToArray(); } } + public Vector3[] AllVertices => Vertices?.ToArray(); + public ushort[] AllIndices => Indices?.ToArray(); + public YnvEdge[] AllEdges => Edges?.ToArray(); + public YnvPoly[] AllPolys => Polys?.ToArray(); + public YnvPortal[] AllPortals => Portals?.ToArray(); + public YnvPoint[] AllPoints => Points?.ToArray(); @@ -84,10 +84,10 @@ namespace CodeWalker.GameFiles Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -104,14 +104,13 @@ namespace CodeWalker.GameFiles BuildBVH(); - Loaded = true; LoadQueued = true; } public void InitFromNav() { - if (Nav == null) return; + if (Nav is null) return; Vector3 posoffset = Nav.SectorTree?.AABBMin.XYZ() ?? Vector3.Zero; Vector3 aabbsize = Nav.AABBSize; @@ -294,7 +293,7 @@ namespace CodeWalker.GameFiles { }//debug e._RawData._Poly1.AreaIDInd = EnsureEdgeAreaID(e.AreaID1, areadict, arealist); e._RawData._Poly2.AreaIDInd = EnsureEdgeAreaID(e.AreaID2, areadict, arealist); - edge = e.RawData; + edge = e._RawData; } else { @@ -597,7 +596,7 @@ namespace CodeWalker.GameFiles (bmax.Y >= min.Y) && (bmin.Y <= max.Y);// && //(bmax.Z >= min.Z) && (bmin.Z <= max.Z); } - private bool BoxOverlaps(NavMeshAABB a, NavMeshAABB b) + private bool BoxOverlaps(in NavMeshAABB a, in NavMeshAABB b) { return (a.MaxX >= b.MinX) && (a.MinX <= b.MaxX) && (a.MaxY >= b.MinY) && (a.MinY <= b.MaxY); @@ -622,11 +621,8 @@ namespace CodeWalker.GameFiles public void UpdateAllNodePositions() { - if (Nav == null) return; - - - Vector3 posoffset = Nav.SectorTree.AABBMin.XYZ(); - Vector3 aabbsize = Nav.AABBSize; + if (Nav is null) + return; EditorVertex v = new EditorVertex(); v.Colour = 0xFF0000FF; @@ -635,9 +631,9 @@ namespace CodeWalker.GameFiles ////### add portal positions to the node list, also add links to the link vertex array - int cnt = Portals?.Count ?? 0; - if (cnt > 0) + if (Portals is not null && Portals.Count > 0) { + int cnt = Portals.Count; for (int i = 0; i < cnt; i++) { var portal = Portals[i]; @@ -649,9 +645,10 @@ namespace CodeWalker.GameFiles ////### add point positions to the node list - cnt = Points?.Count ?? 0; - if (cnt >= 0) + + if (Points is not null && Points.Count > 0) { + int cnt = Points.Count; for (int i = 0; i < cnt; i++) { var point = Points[i]; @@ -660,8 +657,8 @@ namespace CodeWalker.GameFiles } - NodePositions = (nv.Count > 0) ? nv.ToArray() : null; - PathVertices = (lv.Count > 0) ? lv.ToArray() : null; + NodePositions = (nv.Count > 0) ? nv.ToArray() : Array.Empty(); + PathVertices = (lv.Count > 0) ? lv.ToArray() : Array.Empty(); } @@ -673,10 +670,8 @@ namespace CodeWalker.GameFiles //go through the nav mesh polys and generate verts to render... - if ((Polys == null) || (Polys.Count == 0)) return; - - - int vc = Vertices.Count; + if (Polys is null || Polys.Count == 0) + return; List rverts = new List(); EditorVertex p0 = new EditorVertex(); @@ -708,6 +703,12 @@ namespace CodeWalker.GameFiles } } + if (rverts.Count == 0) + { + TriangleVerts = Array.Empty(); + return; + } + TriangleVerts = rverts.ToArray(); } @@ -717,10 +718,16 @@ namespace CodeWalker.GameFiles public void UpdateContentFlags(bool vehicle) { NavMeshFlags f = NavMeshFlags.None; - if (Polys?.Count > 0) f = f | NavMeshFlags.Polygons; - if (Portals?.Count > 0) f = f | NavMeshFlags.Portals; - if (vehicle) f = f | NavMeshFlags.Vehicle; - else f = f | NavMeshFlags.Unknown8; //what exactly is this? + if (Polys?.Count > 0) + f |= NavMeshFlags.Polygons; + if (Portals?.Count > 0) + f |= NavMeshFlags.Portals; + + if (vehicle) + f |= NavMeshFlags.Vehicle; + else + f |= NavMeshFlags.Unknown8; //what exactly is this? + Nav.ContentFlags = f; } @@ -729,10 +736,14 @@ namespace CodeWalker.GameFiles public void BuildBVH() { - var nodes = new List(); - if (Portals != null) nodes.AddRange(Portals); - if (Points != null) nodes.AddRange(Points); - BVH = new PathBVH(nodes, 10, 10); + using var nodes = new PooledList(); + if (Portals is not null && Portals.Count > 0) + nodes.AddRange(Portals); + + if (Points is not null && Points.Count > 0) + nodes.AddRange(Points); + + BVH = new PathBVH(nodes.ToArray(), 10, 10); } @@ -809,7 +820,7 @@ namespace CodeWalker.GameFiles public int Index { get; set; } public ushort[] Indices { get; set; } - public Vector3[] Vertices { get; set; } + public Vector3[]? Vertices { get; set; } public YnvEdge[] Edges { get; set; } public ushort[] PortalLinks { get; set; } @@ -831,18 +842,18 @@ namespace CodeWalker.GameFiles var indices = Ynv.Indices; var vertices = Ynv.Vertices; var edges = Ynv.Edges; - if ((indices == null) || (vertices == null) || (edges == null)) - { return; } + if (indices == null || vertices == null || edges == null) + return; var vc = vertices.Count; var ic = _RawData.IndexCount; var startid = _RawData.IndexID; var endid = startid + ic; if (startid >= indices.Count) - { return; } + return; if (endid > indices.Count) - { return; } + return; if (endid > edges.Count) - { return; } + return; Indices = new ushort[ic]; Vertices = new Vector3[ic]; @@ -864,10 +875,10 @@ namespace CodeWalker.GameFiles public void LoadPortalLinks() { if (PortalLinkCount == 0) - { return; } + return; var links = Ynv.Nav?.PortalLinks; - if (links == null) - { return; } + if (links is null) + return; var ll = links.Length; @@ -879,16 +890,12 @@ namespace CodeWalker.GameFiles int idx = offset + i; PortalLinks[i] = (idx < ll) ? links[idx] : (ushort)0; } - - if (PortalLinkCount != 2) - { }//debug - } public void SetPosition(Vector3 pos) { - Vector3 delta = pos - Position; + //Vector3 delta = pos - Position; Position = pos; //TODO: update vertex positions!!! } @@ -962,17 +969,18 @@ namespace CodeWalker.GameFiles public void CalculatePosition() { + if (Vertices is null || Vertices.Length == 0) + { + Position = Vector3.Zero; + return; + } //calc poly center for display purposes. Vector3 pcenter = Vector3.Zero; - if (Vertices != null) + for (int i = 0; i < Vertices.Length; i++) { - for (int i = 0; i < Vertices.Length; i++) - { - pcenter += Vertices[i]; - } + pcenter += Vertices[i]; } - float c = ((float)Vertices?.Length); - if (c == 0.0f) c = 1.0f; + float c = Vertices.Length; Position = pcenter * (1.0f / c); } @@ -980,18 +988,18 @@ namespace CodeWalker.GameFiles { Vector3 min = Vector3.Zero; Vector3 max = Vector3.Zero; - if ((Vertices != null) && (Vertices.Length > 0)) + if (Vertices is not null && Vertices.Length > 0) { min = new Vector3(float.MaxValue); max = new Vector3(float.MinValue); for (int i = 0; i < Vertices.Length; i++) { - min = Vector3.Min(min, Vertices[i]); - max = Vector3.Max(max, Vertices[i]); + Vector3.Min(ref min, ref Vertices[i], out min); + Vector3.Max(ref max, ref Vertices[i], out max); } } - _RawData.CellAABB = new NavMeshAABB() { Min = min, Max = max }; + _RawData.CellAABB = new NavMeshAABB(in min, in max); } @@ -1005,7 +1013,7 @@ namespace CodeWalker.GameFiles foreach (var e in Edges) { YnvXml.Indent(sb, cind); - sb.AppendFormat("{0}:{1}, {2}:{3}", e.AreaID1, e.PolyID1, e.AreaID2, e.PolyID2); + sb.AppendFormat($"{e.AreaID1}:{e.PolyID1}, {e.AreaID2}:{e.PolyID2}"); sb.AppendLine(); } YnvXml.CloseTag(sb, indent, "Edges"); @@ -1078,9 +1086,12 @@ namespace CodeWalker.GameFiles public YnvFile Ynv { get; set; } public NavMeshPortal RawData { get { return _RawData; } set { _RawData = value; } } - public Vector3 Position { get { return PositionFrom; } set { PositionFrom = value; } } - public Vector3 PositionFrom { get; set; } - public Vector3 PositionTo { get; set; } + public ref Vector3 Position => ref PositionFrom; + + public Vector3 _PositionFrom; + public ref Vector3 PositionFrom => ref _PositionFrom; + public Vector3 _PositionTo; + public ref Vector3 PositionTo => ref _PositionTo; public byte Angle { get { return _RawData.Angle; } set { _RawData.Angle = value; } } public float Direction @@ -1099,7 +1110,7 @@ namespace CodeWalker.GameFiles get { return Quaternion.RotationAxis(Vector3.UnitZ, Direction); } set { - Vector3 dir = value.Multiply(Vector3.UnitX); + Vector3 dir = value.Multiply(in Vector3.UnitX); float dira = (float)Math.Atan2(dir.Y, dir.X); Direction = dira; } @@ -1160,14 +1171,16 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class YnvPoint : BasePathNode, IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public class YnvPoint : BasePathNode, IMetaXmlItem { public NavMeshPoint _RawData; public YnvFile Ynv { get; set; } public NavMeshPoint RawData { get { return _RawData; } set { _RawData = value; } } - public Vector3 Position { get; set; } + public Vector3 _Position; + public ref Vector3 Position => ref _Position; public byte Angle { get { return _RawData.Angle; } set { _RawData.Angle = value; } } public float Direction { @@ -1185,7 +1198,7 @@ namespace CodeWalker.GameFiles get { return Quaternion.RotationAxis(Vector3.UnitZ, Direction); } set { - Vector3 dir = value.Multiply(Vector3.UnitX); + Vector3 dir = value.Multiply(in Vector3.UnitX); float dira = (float)Math.Atan2(dir.Y, dir.X); Direction = dira; } @@ -1223,18 +1236,16 @@ namespace CodeWalker.GameFiles Position = Xml.GetChildVector3Attributes(node, "Position"); } - public override string ToString() - { - return Index.ToString() + ": " + Type.ToString(); - } + public override string ToString() => $"{Index}: {Type} ({Position})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class YnvEdge + [TypeConverter(typeof(ExpandableObjectConverter))] + public class YnvEdge { public NavMeshEdge _RawData; - public NavMeshEdge RawData { get { return _RawData; } set { _RawData = value; } } + public NavMeshEdge RawData => _RawData; public YnvFile Ynv { get; set; } @@ -1261,26 +1272,20 @@ namespace CodeWalker.GameFiles public void Init(YnvFile ynv, NavMeshEdge edge) { Ynv = ynv; - RawData = edge; + _RawData = edge; if (ynv.Nav == null) return; var n = ynv.Nav; - var ai1 = edge.Poly1.AreaIDInd; - var ai2 = edge.Poly2.AreaIDInd; + var ai1 = edge._Poly1.AreaIDInd; + var ai2 = edge._Poly2.AreaIDInd; AreaID1 = (ai1 < n.AdjAreaIDs.Count) ? n.AdjAreaIDs.Get(ai1) : 16383; AreaID2 = (ai2 < n.AdjAreaIDs.Count) ? n.AdjAreaIDs.Get(ai2) : 16383; } - public override string ToString() - { - return AreaID1.ToString() + ", " + AreaID2.ToString() + ", " + PolyID1.ToString() + ", " + PolyID2.ToString() + ", " + - _RawData._Poly1.Unk2.ToString() + ", " + _RawData._Poly2.Unk2.ToString() + ", " + - _RawData._Poly1.Unk3.ToString() + ", " + _RawData._Poly2.Unk3.ToString(); - } - + public override string ToString() => $"{AreaID1}, {AreaID2}, {PolyID1}, {PolyID2}, {_RawData._Poly1.Unk2}, {_RawData._Poly2.Unk2}, {_RawData._Poly1.Unk3}, {_RawData.Poly2.Unk3}"; } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YptFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YptFile.cs index c56164e..0e64d95 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YptFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YptFile.cs @@ -38,10 +38,10 @@ namespace CodeWalker.GameFiles RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YtdFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YtdFile.cs index 19356c8..9919b91 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YtdFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YtdFile.cs @@ -32,16 +32,25 @@ namespace CodeWalker.GameFiles Loaded = true; } + public async Task LoadAsync(byte[] data) + { + //direct load from a raw, compressed ytd file + + await RpfFile.LoadResourceFileAsync(this, data, 13); + + Loaded = true; + } + public void Load(byte[] data, RpfFileEntry entry) { Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); @@ -65,13 +74,8 @@ namespace CodeWalker.GameFiles return data; } - new public long MemoryUsage - { - get - { - return TextureDict.MemoryUsage; - } - } + public long PhysicalMemoryUsage => TextureDict.MemoryUsage; + public long VirtualMemoryUsage => 0; } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs index ed79a47..b401ce0 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs @@ -1,54 +1,55 @@ -using System; +using SharpDX.Win32; +using System; +using System.Buffers.Binary; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace CodeWalker.GameFiles { [TypeConverter(typeof(ExpandableObjectConverter))] + [SkipLocalsInit] public class YtypFile : GameFile, PackedFile { - - - public Meta Meta { get; set; } - public PsoFile Pso { get; set; } - public RbfFile Rbf { get; set; } + public Meta? Meta { get; set; } + public PsoFile? Pso { get; set; } + public RbfFile? Rbf { get; set; } public uint NameHash { get; set; } - public string[] Strings { get; set; } + public string[] Strings => Meta?.GetStrings() ?? []; public CMapTypes _CMapTypes; - public CMapTypes CMapTypes { get { return _CMapTypes; } set { _CMapTypes = value; } } + public CMapTypes CMapTypes => _CMapTypes; - public Archetype[] AllArchetypes { get; set; } + public Archetype[] AllArchetypes { get => allArchetypes; set => allArchetypes = value; } + public MetaWrapper[] Extensions { get; set; } = []; - public MetaWrapper[] Extensions { get; set; } + public MloArchetype[] MloArchetypes => allArchetypes.Where(p => p is MloArchetype).Select(p => (p as MloArchetype)!).ToArray(); - public CCompositeEntityType[] CompositeEntityTypes { get; set; } + public CCompositeEntityType[] CompositeEntityTypes { get; set; } = []; //fields used by the editor: public bool HasChanged { get; set; } = false; - public List SaveWarnings = null; - - + public List? SaveWarnings = null; + private Archetype[] allArchetypes = []; public YtypFile() : base(null, GameFileType.Ytyp) { } + public YtypFile(RpfFileEntry entry) : base(entry, GameFileType.Ytyp) { } - public override string ToString() - { - return (RpfFileEntry != null) ? RpfFileEntry.Name : string.Empty; - } + public override string ToString() => RpfFileEntry?.Name ?? string.Empty; public byte[] Save() { @@ -58,30 +59,25 @@ namespace CodeWalker.GameFiles CMapTypes mapTypes = _CMapTypes; - if (Extensions == null || Extensions.Length <= 0) + if (Extensions.Length == 0) mapTypes.extensions = new Array_StructurePointer(); else mapTypes.extensions = mb.AddWrapperArrayPtr(Extensions); - if ((AllArchetypes != null) && (AllArchetypes.Length > 0)) + if (AllArchetypes.Length > 0) { - for (int i = 0; i < AllArchetypes.Length; i++) + MetaPOINTER[] ptrs = new MetaPOINTER[AllArchetypes.Length]; + var i = 0; + foreach(var arch in AllArchetypes) { - var arch = AllArchetypes[i]; //save the extensions first.. if (arch._BaseArchetypeDef.extensions.Count1 > 0) { arch._BaseArchetypeDef.extensions = mb.AddWrapperArrayPtr(arch.Extensions); } - } - - MetaPOINTER[] ptrs = new MetaPOINTER[AllArchetypes.Length]; - for (int i = 0; i < AllArchetypes.Length; i++) - { - var arch = AllArchetypes[i]; switch (arch) { case TimeArchetype t: - ptrs[i] = mb.AddItemPtr(MetaName.CTimeArchetypeDef, t._TimeArchetypeDef); + ptrs[i] = mb.AddItemPtr(MetaName.CTimeArchetypeDef, in t._TimeArchetypeDef); break; case MloArchetype m: try @@ -92,16 +88,17 @@ namespace CodeWalker.GameFiles m._MloArchetypeDef._MloArchetypeDef.entitySets = mb.AddWrapperArray(m.entitySets); m._MloArchetypeDef._MloArchetypeDef.timeCycleModifiers = mb.AddItemArrayPtr(MetaName.CMloTimeCycleModifier, m.timeCycleModifiers); } - catch/* (Exception e)*/ + catch(Exception ex) { - //todo: log save error. + Console.WriteLine(ex); } - ptrs[i] = mb.AddItemPtr(MetaName.CMloArchetypeDef, m._MloArchetypeDef); + ptrs[i] = mb.AddItemPtr(MetaName.CMloArchetypeDef, in m._MloArchetypeDef); break; case Archetype a: - ptrs[i] = mb.AddItemPtr(MetaName.CBaseArchetypeDef, a._BaseArchetypeDef); + ptrs[i] = mb.AddItemPtr(MetaName.CBaseArchetypeDef, in a._BaseArchetypeDef); break; } + i++; } mapTypes.archetypes = mb.AddPointerArray(ptrs); } @@ -110,14 +107,14 @@ namespace CodeWalker.GameFiles mapTypes.archetypes = new Array_StructurePointer(); } - if (CompositeEntityTypes != null && CompositeEntityTypes.Length > 0) + if (CompositeEntityTypes.Length > 0) { var cptrs = new MetaPOINTER[CompositeEntityTypes.Length]; for (int i = 0; i < cptrs.Length; i++) { var cet = CompositeEntityTypes[i]; - cptrs[i] = mb.AddItemPtr(MetaName.CCompositeEntityType, cet); + cptrs[i] = mb.AddItemPtr(MetaName.CCompositeEntityType, in cet); } mapTypes.compositeEntityTypes = mb.AddItemArrayPtr(MetaName.CCompositeEntityType, cptrs); } @@ -127,13 +124,13 @@ namespace CodeWalker.GameFiles mb.AddStructureInfo(MetaName.CMapTypes); - if ((AllArchetypes != null && AllArchetypes.Length > 0)) + if (AllArchetypes is not null && AllArchetypes.Length > 0) { mb.AddStructureInfo(MetaName.CBaseArchetypeDef); mb.AddEnumInfo(MetaName.rage__fwArchetypeDef__eAssetType); // ASSET_TYPE_ } - if ((AllArchetypes != null) && (AllArchetypes.Any(x => x is MloArchetype))) + if (AllArchetypes is not null && AllArchetypes.Any(x => x is MloArchetype)) { mb.AddStructureInfo(MetaName.CMloArchetypeDef); mb.AddStructureInfo(MetaName.CMloRoomDef); @@ -142,25 +139,24 @@ namespace CodeWalker.GameFiles mb.AddStructureInfo(MetaName.CMloTimeCycleModifier); } - if ((AllArchetypes != null) && (AllArchetypes.Any(x => x is MloArchetype m && m.entities.Length > 0))) + if (AllArchetypes is not null && AllArchetypes.Any(x => x is MloArchetype m && m.entities.Length > 0)) { mb.AddStructureInfo(MetaName.CEntityDef); mb.AddEnumInfo(MetaName.rage__eLodType); //LODTYPES_ mb.AddEnumInfo(MetaName.rage__ePriorityLevel); //PRI_ } - if ((AllArchetypes != null) && (AllArchetypes.Any(x => x is TimeArchetype))) + if (AllArchetypes is not null && AllArchetypes.Any(x => x is TimeArchetype)) { mb.AddStructureInfo(MetaName.CTimeArchetypeDef); } - if (CompositeEntityTypes?.Length > 0) + if (CompositeEntityTypes.Length > 0) { mb.AddStructureInfo(MetaName.CCompositeEntityType); } - - mb.AddItem(MetaName.CMapTypes, mapTypes); + mb.AddItem(MetaName.CMapTypes, in mapTypes); Meta meta = mb.GetMeta(); byte[] data = ResourceBuilder.Build(meta, 2); @@ -179,101 +175,117 @@ namespace CodeWalker.GameFiles Loaded = true; } + public async ValueTask LoadAsync(byte[] data) + { + //direct load from a raw, compressed ytyp file (openIV-compatible format) + + await RpfFile.LoadResourceFileAsync(this, data, 2); + + Loaded = true; + } + public void Load(byte[] data, RpfFileEntry entry) { Name = entry.Name; RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - MemoryStream ms = new MemoryStream(data); - if (RbfFile.IsRBF(ms)) + if (RbfFile.IsRBF(data.AsSpan(0, 4))) { Rbf = new RbfFile(); - Rbf.Load(ms); + Rbf.Load(data); } - else if (PsoFile.IsPSO(ms)) + else if (PsoFile.IsPSO(data.AsSpan(0, 4))) { Pso = new PsoFile(); - Pso.Load(ms); - //PsoTypes.EnsurePsoTypes(Pso); - } - else - { + Pso.Load(data); } return; } - - - - using var rd = new ResourceDataReader(resentry, data); - Meta = rd.ReadBlock(); + var meta = rd.ReadBlock(); + Meta = meta; - _CMapTypes = MetaTypes.GetTypedData(Meta, MetaName.CMapTypes); + _CMapTypes = MetaTypes.GetTypedData(meta, MetaName.CMapTypes); + var ptrs = MetaTypes.GetPointerArray(meta, in _CMapTypes.archetypes); + //List allarchs = new List(ptrs.Length); - List allarchs = new List(); - - var ptrs = MetaTypes.GetPointerArray(Meta, _CMapTypes.archetypes); - if (ptrs != null) + if (ptrs.Length > 0) { + Archetype[] allarchs = new Archetype[ptrs.Length]; + var count = 0; for (int i = 0; i < ptrs.Length; i++) { - var ptr = ptrs[i]; + ref var ptr = ref ptrs[i]; var offset = ptr.Offset; var block = Meta.GetBlock(ptr.BlockID); if (block == null) - { continue; } + { + continue; + } if ((offset < 0) || (block.Data == null) || (offset >= block.Data.Length)) - { continue; } + { + continue; + } - Archetype a = null; + Archetype? a; switch (block.StructureNameHash) { case MetaName.CBaseArchetypeDef: - var basearch = PsoTypes.ConvertDataRaw(block.Data, offset); + //PsoTypes.TryConvertDataRaw(block.Data, offset, out var basearch); a = new Archetype(); - a.Init(this, ref basearch); - a.Extensions = MetaTypes.GetExtensions(Meta, basearch.extensions); + a.Init(this, block.Data.AsSpan(offset)); + a.Extensions = MetaTypes.GetExtensions(meta, in a._BaseArchetypeDef.extensions) ?? []; break; case MetaName.CTimeArchetypeDef: - var timearch = PsoTypes.ConvertDataRaw(block.Data, offset); + //PsoTypes.TryConvertDataRaw(block.Data, offset, out var timearch); var ta = new TimeArchetype(); - ta.Init(this, ref timearch); - ta.Extensions = MetaTypes.GetExtensions(Meta, timearch._BaseArchetypeDef.extensions); + ta.Init(this, block.Data.AsSpan(offset)); + ta.Extensions = MetaTypes.GetExtensions(meta, in ta._BaseArchetypeDef.extensions) ?? []; a = ta; break; case MetaName.CMloArchetypeDef: - var mloarch = PsoTypes.ConvertDataRaw(block.Data, offset); + //PsoTypes.TryConvertDataRaw(block.Data, offset, out var mloarch); var ma = new MloArchetype(); - ma.Init(this, ref mloarch); - ma.Extensions = MetaTypes.GetExtensions(Meta, mloarch._BaseArchetypeDef.extensions); + ma.Init(this, block.Data.AsSpan(offset)); + ma.Extensions = MetaTypes.GetExtensions(meta, in ma._BaseArchetypeDef.extensions) ?? []; ma.LoadChildren(Meta); a = ma; break; default: + a = null; continue; } - if (a != null) + if (a is not null) { - allarchs.Add(a); + allarchs[count] = a; + count++; } } + + + if (allarchs.Length != count) + { + Console.WriteLine("Resizing array"); + Array.Resize(ref allarchs, count); + } + + allArchetypes = allarchs; + } + else + { + allArchetypes = []; } - AllArchetypes = allarchs.ToArray(); - Extensions = MetaTypes.GetExtensions(Meta, _CMapTypes.extensions); - - if (Extensions != null) - { } + Extensions = MetaTypes.GetExtensions(Meta, in _CMapTypes.extensions) ?? Array.Empty(); //AudioEmitters = MetaTypes.GetTypedDataArray(Meta, MetaName.CExtensionDefAudioEmitter); @@ -283,12 +295,10 @@ namespace CodeWalker.GameFiles //CEntityDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CEntityDef); - CompositeEntityTypes = MetaTypes.ConvertDataArray(Meta, MetaName.CCompositeEntityType, _CMapTypes.compositeEntityTypes); - if (CompositeEntityTypes != null) - { } + CompositeEntityTypes = MetaTypes.ConvertDataArray(Meta, MetaName.CCompositeEntityType, in _CMapTypes.compositeEntityTypes) ?? Array.Empty(); NameHash = _CMapTypes.name; - if ((NameHash == 0) && (entry.Name != null)) + if (NameHash == 0 && entry.Name is not null) { int ind = entry.Name.LastIndexOf('.'); if (ind > 0) @@ -301,16 +311,11 @@ namespace CodeWalker.GameFiles } } - Strings = MetaTypes.GetStrings(Meta); - if (Strings != null) + foreach(var str in Strings) { - foreach (string str in Strings) - { - JenkIndex.Ensure(str); //just shove them in there - } + JenkIndex.Ensure(str); //just shove them in there } - //foreach (var block in Meta.DataBlocks) //{ // switch(block.StructureNameHash) @@ -364,22 +369,26 @@ namespace CodeWalker.GameFiles public void AddArchetype(Archetype archetype) { - if (AllArchetypes == null) - AllArchetypes = new Archetype[0]; + allArchetypes ??= Array.Empty(); - List archetypes = AllArchetypes.ToList(); + Array.Resize(ref allArchetypes, allArchetypes.Length + 1); + allArchetypes[allArchetypes.Length - 1] = archetype; archetype.Ytyp = this; - archetypes.Add(archetype); - AllArchetypes = archetypes.ToArray(); } public Archetype AddArchetype() { - var a = new Archetype(); - a._BaseArchetypeDef.assetType = rage__fwArchetypeDef__eAssetType.ASSET_TYPE_DRAWABLE; - a._BaseArchetypeDef.lodDist = 60; - a._BaseArchetypeDef.hdTextureDist = 15; - a.Ytyp = this; + var a = new Archetype + { + _BaseArchetypeDef = new CBaseArchetypeDef + { + assetType = rage__fwArchetypeDef__eAssetType.ASSET_TYPE_DRAWABLE, + lodDist = 60, + hdTextureDist = 15, + }, + Ytyp = this + }; + AddArchetype(a); return a; } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YvrFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YvrFile.cs index c0f7ecb..7d50fa2 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YvrFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YvrFile.cs @@ -25,10 +25,10 @@ namespace CodeWalker.GameFiles RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/FileTypes/YwrFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YwrFile.cs index 7f8a0f1..d3f3ce0 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YwrFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YwrFile.cs @@ -25,10 +25,10 @@ namespace CodeWalker.GameFiles RpfFileEntry = entry; - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - if (resentry == null) + if (entry is not RpfResourceFileEntry resentry) { - throw new Exception("File entry wasn't a resource! (is it binary data?)"); + ThrowFileIsNotAResourceException(); + return; } using var rd = new ResourceDataReader(resentry, data); diff --git a/CodeWalker.Core/GameFiles/GameFile.cs b/CodeWalker.Core/GameFiles/GameFile.cs index aa115a1..b6b01f8 100644 --- a/CodeWalker.Core/GameFiles/GameFile.cs +++ b/CodeWalker.Core/GameFiles/GameFile.cs @@ -1,58 +1,159 @@  using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace CodeWalker.GameFiles { - public abstract class GameFile : Cacheable + + // This would make more sense as a enum, but that would cause lots of bloat casting values + public static class LoadState { - public volatile bool Loaded = false; - public volatile bool LoadQueued = false; + public const int None = 0; + public const int Loaded = 1; + public const int LoadQueued = 2; + } + public abstract class GameFile : Cacheable, IDisposable + { + public byte LoadAttempts = 0; + + public int loadState = (int)LoadState.None; + + [NotifyParentProperty(true)] + public bool LoadQueued { + get => (loadState & LoadState.LoadQueued) == LoadState.LoadQueued; + set { + if (value) + { + Interlocked.Or(ref loadState, LoadState.LoadQueued); + } + else + { + Interlocked.And(ref loadState, ~LoadState.LoadQueued); + } + } + } + + [NotifyParentProperty(true)] + public bool Loaded + { + get => (loadState & LoadState.Loaded) == LoadState.Loaded; + set + { + if (value) + { + Interlocked.Or(ref loadState, LoadState.Loaded); + } + else + { + Interlocked.And(ref loadState, ~LoadState.Loaded); + } + } + } + public DateTime LastLoadTime = DateTime.MinValue; - public RpfFileEntry RpfFileEntry { get; set; } + public RpfFileEntry? RpfFileEntry { get; set; } public string Name { get; set; } public string FilePath { get; set; } //used by the project form. public GameFileType Type { get; set; } + public bool IsDisposed { get; set; } = false; - public GameFile(RpfFileEntry entry, GameFileType type) + public GameFile(RpfFileEntry? entry, GameFileType type) { RpfFileEntry = entry; Type = type; MemoryUsage = (entry != null) ? entry.GetFileSize() : 0; - if (entry is RpfResourceFileEntry) + if (entry is RpfResourceFileEntry resent) { - var resent = entry as RpfResourceFileEntry; var newuse = resent.SystemSize + resent.GraphicsSize; MemoryUsage = newuse; } - else if (entry is RpfBinaryFileEntry) + else if (entry is RpfBinaryFileEntry binent) { - var binent = entry as RpfBinaryFileEntry; var newuse = binent.FileUncompressedSize; if (newuse > MemoryUsage) { MemoryUsage = newuse; } } + } + + public bool SetLoadQueued(bool value) + { + if (value) + { + return (Interlocked.Or(ref loadState, LoadState.LoadQueued) & LoadState.LoadQueued) == 0; + } else { + return (Interlocked.And(ref loadState, ~LoadState.LoadQueued) & LoadState.LoadQueued) == LoadState.LoadQueued; } } - public override string ToString() + public bool SetLoaded(bool value) { - return (string.IsNullOrEmpty(Name)) ? JenkIndex.GetString(Key.Hash) : Name; + if (value) + { + return (Interlocked.Or(ref loadState, LoadState.Loaded) & LoadState.Loaded) == 0; + } + else + { + return (Interlocked.And(ref loadState, ~LoadState.Loaded) & LoadState.Loaded) == LoadState.Loaded; + } } + public override string ToString() => string.IsNullOrEmpty(Name) ? JenkIndex.GetString(Key.Hash) : Name; + public virtual void Dispose() + { + IsDisposed = true; + GC.SuppressFinalize(this); + } + + [DoesNotReturn] + public static void ThrowFileIsNotAResourceException() + { + throw new Exception("File entry wasn't a resource! (is it binary data?)"); + } + } + + public class GameFileByPathComparer : IEqualityComparer + { + public static readonly GameFileByPathComparer Instance = new GameFileByPathComparer(); + public bool Equals(GameFile? x, GameFile? y) + { + if (x is null && y is null) + return true; + if (x is null || y is null) + return false; + if (ReferenceEquals(x, y)) + return true; + + if (x.Type != y.Type) + return false; + + if (x.RpfFileEntry is null && y.RpfFileEntry is null) + return true; + if (x.RpfFileEntry is null || y.RpfFileEntry is null) + return false; + + return x.RpfFileEntry.Path.Equals(y.RpfFileEntry.Path, StringComparison.OrdinalIgnoreCase); + } + + public int GetHashCode([DisallowNull] GameFile obj) + { + return HashCode.Combine(obj.RpfFileEntry?.Path.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0, obj.Type); + } } - public enum GameFileType : int + public enum GameFileType : byte { Ydd = 0, Ydr = 1, @@ -86,52 +187,12 @@ namespace CodeWalker.GameFiles Mrf = 29, DistantLights = 30, Ypdb = 31, + PedShopMeta = 32, } - public struct GameFileCacheKey : IEquatable - { - public uint Hash { get; set; } - public GameFileType Type { get; set; } - - public GameFileCacheKey(uint hash, GameFileType type) - { - Hash = hash; - Type = type; - } - - public override readonly bool Equals(object obj) - { - if (obj == null) - return false; - if (obj is not GameFileCacheKey gameFileCacheKey) - return false; - return gameFileCacheKey.Hash == Hash && gameFileCacheKey.Type == Type; - } - - public readonly bool Equals(GameFileCacheKey obj) - { - if (obj == null) - return false; - return obj.Hash == Hash && obj.Type == Type; - } - - public static bool operator ==(GameFileCacheKey first, GameFileCacheKey second) - { - return first.Equals(second); - } - - public static bool operator !=(GameFileCacheKey first, GameFileCacheKey second) - { - return !first.Equals(second); - } - - public override readonly int GetHashCode() - { - return (int)Hash; - } - } + public readonly record struct GameFileCacheKey(uint Hash, GameFileType Type); } diff --git a/CodeWalker.Core/GameFiles/GameFileCache.cs b/CodeWalker.Core/GameFiles/GameFileCache.cs index dc38797..b28d248 100644 --- a/CodeWalker.Core/GameFiles/GameFileCache.cs +++ b/CodeWalker.Core/GameFiles/GameFileCache.cs @@ -1,10 +1,17 @@ -using CodeWalker.Core.Utils; +using CodeWalker.Core.GameFiles.FileTypes; +using CodeWalker.Core.GameFiles.Resources; +using CodeWalker.Core.Utils; +using CodeWalker.World; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; using SharpDX; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -14,6 +21,7 @@ namespace CodeWalker.GameFiles { public partial class GameFileCache { + public static GameFileCache Instance; public RpfManager RpfMan; public event Action UpdateStatus; public event Action ErrorLog; @@ -23,13 +31,16 @@ namespace CodeWalker.GameFiles ////dynamic cache private Cache mainCache; + + public Cache MainCache => mainCache; + public volatile bool IsInited = false; private volatile bool archetypesLoaded = false; - private ConcurrentDictionary archetypeDict = new ConcurrentDictionary(); + private Dictionary archetypeDict; private ConcurrentDictionary textureLookup = new ConcurrentDictionary(); private Dictionary textureParents; - private Dictionary hdtexturelookup; + private ConcurrentDictionary hdtexturelookup; private object updateSyncRoot = new object(); private object requestSyncRoot = new object(); @@ -73,21 +84,23 @@ namespace CodeWalker.GameFiles public List DlcActiveRpfs { get; set; } = new List(); public List DlcSetupFiles { get; set; } = new List(); public List DlcExtraFolderMounts { get; set; } = new List(); - public Dictionary DlcPatchedPaths { get; set; } = new Dictionary(); + public Dictionary DlcPatchedPaths { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); public List DlcCacheFileList { get; set; } = new List(); public List DlcNameList { get; set; } = new List(); + public Dictionary DlcNameLookup { get; set; } = new Dictionary(); public string SelectedDlc { get; set; } = string.Empty; - public Dictionary ActiveMapRpfFiles { get; set; } = new Dictionary(); + public Dictionary ActiveMapRpfFiles { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); public Dictionary TimeCycleModsDict = new Dictionary(); public Dictionary VehiclesInitDict { get; set; } public Dictionary PedsInitDict { get; set; } - public Dictionary PedVariationsDict { get; set; } + public Dictionary> PedVariationsDict { get; set; } public Dictionary> PedDrawableDicts { get; set; } public Dictionary> PedTextureDicts { get; set; } public Dictionary> PedClothDicts { get; set; } + public Dictionary PedsFiles { get; set; } public List AudioDatRelFiles; @@ -124,35 +137,11 @@ namespace CodeWalker.GameFiles - public int QueueLength - { - get - { - return requestQueue.Count; - } - } - public int ItemCount - { - get - { - return mainCache.Count; - } - } - public long MemoryUsage - { - get - { - return mainCache.CurrentMemoryUsage; - } - } + public int QueueLength => requestQueue.Count; + public int ItemCount => mainCache.Count; + public long MemoryUsage => mainCache.CurrentMemoryUsage; - public long MaxMemoryUsage - { - get - { - return mainCache.MaxMemoryUsage; - } - } + public long MaxMemoryUsage => mainCache.MaxMemoryUsage; @@ -165,6 +154,8 @@ namespace CodeWalker.GameFiles GTAFolder = folder; ExcludeFolders = excludeFolders; Key = key; + + Instance = this; } @@ -176,7 +167,7 @@ namespace CodeWalker.GameFiles //textureLookup.Clear(); - requestQueue.Clear(); + //requestQueue.Clear(); } public void SetGtaFolder(string folder) @@ -187,7 +178,7 @@ namespace CodeWalker.GameFiles } public volatile bool IsIniting = false; - public void Init(Action updateStatus = null, Action errorLog = null, bool force = true) + public async Task InitAsync(Action updateStatus = null, Action errorLog = null, bool force = true) { if (IsIniting) { @@ -215,7 +206,7 @@ namespace CodeWalker.GameFiles InitGlobal(); - InitDlc(); + await InitDlcAsync(); @@ -274,7 +265,7 @@ namespace CodeWalker.GameFiles IsIniting = false; } } - public void Init(Action updateStatus, Action errorLog, List allRpfs, bool force = true) + public async Task InitAsync(Action? updateStatus, Action? errorLog, List allRpfs, bool force = true) { if (IsIniting) { @@ -285,12 +276,13 @@ namespace CodeWalker.GameFiles IsIniting = true; try { + ETWEvents.Log.InitFileCacheStart(); using var _ = new DisposableTimer("GameFileCache.Init"); - if (updateStatus != null) + if (updateStatus is not null) { UpdateStatus += updateStatus; } - if (errorLog != null) + if (errorLog is not null) { ErrorLog += errorLog; } @@ -307,18 +299,24 @@ namespace CodeWalker.GameFiles BaseRpfs = allRpfs; DlcRpfs = new List(); - - Task.WhenAll( - Task.Run(() => InitGlobalDicts(force)), - Task.Run(() => InitManifestDicts(force)), - Task.Run(() => InitGtxds(force)), - Task.Run(() => InitArchetypeDicts(force)), - Task.Run(() => InitStringDictsAsync(force)), - Task.Run(() => InitAudio(force)) - ).GetAwaiter().GetResult(); + InitGlobalDicts(force); + await InitManifestDicts(force); + await InitGtxds(force); + await InitArchetypeDicts(force); + await InitStringDictsAsync(force); + await InitAudio(force); + //await Task.WhenAll( + // Task.Run(() => InitGlobalDicts(force)), + // InitManifestDicts(force), + // InitGtxds(force), + // InitArchetypeDicts(force), + // InitStringDictsAsync(force), + // InitAudio(force) + //); vehicleFiles.Clear(); + ETWEvents.Log.InitFileCacheStop(); IsInited = true; } catch (Exception ex) { @@ -341,25 +339,35 @@ namespace CodeWalker.GameFiles InitGlobalDicts(); } - private void InitDlc(bool force = true) + private async Task InitDlcAsync(bool force = true) { InitDlcList(); InitActiveMapRpfFiles(); - Task.WhenAll( - Task.Run(() => { - InitMapDicts(force); - InitMapCaches(force); - }), - Task.Run(() => InitManifestDicts(force)), - Task.Run(() => InitArchetypeDicts(force)), - Task.Run(() => InitStringDictsAsync(force)), - Task.Run(() => InitVehicles(force)), - Task.Run(() => InitPeds(force)), - Task.Run(() => InitAudio(force)), - Task.Run(() => InitGtxds(force)) - ).GetAwaiter().GetResult(); + InitMapDicts(force); + InitMapCaches(force); + await InitManifestDicts(force); + await InitArchetypeDicts(force); + await InitStringDictsAsync(force); + await InitVehicles(force); + await InitPeds(force); + await InitAudio(force); + await InitGtxds(force); + + //await Task.WhenAll( + // Task.Run(() => { + // InitMapDicts(force); + // InitMapCaches(force); + // }), + // Task.Run(() => InitManifestDicts(force)), + // Task.Run(() => InitArchetypeDicts(force)), + // Task.Run(() => InitStringDictsAsync(force)), + // Task.Run(() => InitVehicles(force)), + // Task.Run(() => InitPeds(force)), + // Task.Run(() => InitAudio(force)), + // Task.Run(() => InitGtxds(force)) + //); vehicleFiles.Clear(); } @@ -381,6 +389,7 @@ namespace CodeWalker.GameFiles if ((dlclistxml == null) || (dlclistxml.DocumentElement == null)) { ErrorLog?.Invoke("InitDlcList: Couldn't load " + dlclistpath + "."); + Console.WriteLine("InitDlcList: Couldn't load " + dlclistpath + "."); } else { @@ -410,6 +419,8 @@ namespace CodeWalker.GameFiles } } + var xmlContentFileNameTable = new NameTable(); + //find all the paths for patched files in update.rpf and build the dict @@ -417,13 +428,13 @@ namespace CodeWalker.GameFiles string updrpfpath = "update\\update.rpf"; var updrpffile = RpfMan.FindRpfFile(updrpfpath); - if (updrpffile != null) + if (updrpffile is not null) { XmlDocument updsetupdoc = RpfMan.GetFileXml(updrpfpath + "\\setup2.xml"); DlcSetupFile updsetupfile = new DlcSetupFile(); updsetupfile.Load(updsetupdoc); - XmlDocument updcontentdoc = RpfMan.GetFileXml(updrpfpath + "\\" + updsetupfile.datFile); + using XmlReader updcontentdoc = RpfMan.GetFileXmlReader($"{updrpfpath}\\{updsetupfile.datFile}", xmlContentFileNameTable); DlcContentFile updcontentfile = new DlcContentFile(); updcontentfile.Load(updcontentdoc); @@ -447,11 +458,12 @@ namespace CodeWalker.GameFiles { continue; } - var dlcpath = dlcfile.Path + "\\"; + var dlcpath = $"{dlcfile.Path}\\"; var files = updrpffile.GetFiles(relpath, true); foreach (var file in files) { - if (file == null) continue; + if (file is null) + continue; var fpath = file.Path; var frelpath = fpath.Replace(updrpfpath, "update:").Replace('\\', '/').Replace(lpath, dlcpath).Replace('/', '\\'); if (frelpath.StartsWith("mods\\", StringComparison.OrdinalIgnoreCase)) @@ -465,7 +477,8 @@ namespace CodeWalker.GameFiles } else { - ErrorLog("InitDlcList: update.rpf not found!"); + ErrorLog?.Invoke("InitDlcList: update.rpf not found!"); + Console.WriteLine("InitDlcList: update.rpf not found!"); } @@ -481,13 +494,13 @@ namespace CodeWalker.GameFiles { try { - string setuppath = GetDlcPatchedPath(dlcfile.Path + "\\setup2.xml"); + string setuppath = GetDlcPatchedPath($"{dlcfile.Path}\\setup2.xml"); XmlDocument setupdoc = RpfMan.GetFileXml(setuppath); DlcSetupFile setupfile = new DlcSetupFile(); setupfile.Load(setupdoc); - string contentpath = GetDlcPatchedPath(dlcfile.Path + "\\" + setupfile.datFile); - XmlDocument contentdoc = RpfMan.GetFileXml(contentpath); + string contentpath = GetDlcPatchedPath($"{dlcfile.Path}\\{setupfile.datFile}"); + using XmlReader contentdoc = RpfMan.GetFileXmlReader(contentpath, xmlContentFileNameTable); DlcContentFile contentfile = new DlcContentFile(); contentfile.Load(contentdoc); @@ -506,7 +519,8 @@ namespace CodeWalker.GameFiles } catch (Exception ex) { - ErrorLog("InitDlcList: Error processing DLC " + path + "\n" + ex.ToString()); + ErrorLog?.Invoke($"InitDlcList: Error processing DLC {path}\n{ex}"); + Console.WriteLine(ex); } } } @@ -518,8 +532,9 @@ namespace CodeWalker.GameFiles DlcNameList.Clear(); foreach (var sfile in DlcSetupFiles) { - if ((sfile == null) || (sfile.DlcFile == null)) continue; - DlcNameList.Add(GetDlcNameFromPath(sfile.DlcFile.Path).ToLowerInvariant()); + if ((sfile == null) || (sfile.DlcFile == null)) + continue; + DlcNameList.Add(GetDlcNameFromPath(sfile.DlcFile.Path)); } if (DlcNameList.Count > 0) @@ -615,7 +630,7 @@ namespace CodeWalker.GameFiles //int maxdlcorder = 10000000; - Dictionary> overlays = new Dictionary>(); + Dictionary> overlays = new Dictionary>(StringComparer.OrdinalIgnoreCase); foreach (var setupfile in DlcSetupFiles) { @@ -631,13 +646,15 @@ namespace CodeWalker.GameFiles for (int i = 1; i <= setupfile.subPackCount; i++) { - var subpackPath = dlcfile.Path.Replace("\\dlc.rpf", "\\dlc" + i.ToString() + ".rpf"); + var subpackPath = dlcfile.Path.Replace("\\dlc.rpf", $"\\dlc{i}.rpf"); var subpack = RpfMan.FindRpfFile(subpackPath); if (subpack != null) { DlcActiveRpfs.Add(subpack); - if (setupfile.DlcSubpacks == null) setupfile.DlcSubpacks = new List(); + if (setupfile.DlcSubpacks is null) + setupfile.DlcSubpacks = new List(); + setupfile.DlcSubpacks.Add(subpack); } } @@ -666,19 +683,40 @@ namespace CodeWalker.GameFiles - DlcExtraFolderMountFile extramount; - DlcContentDataFile rpfdatafile; + DlcExtraFolderMountFile? extramount; + DlcContentDataFile? rpfdatafile; foreach (var changeset in contentfile.contentChangeSets) { if (changeset.useCacheLoader) { - uint cachehash = JenkHash.GenHash(changeset.changeSetName.ToLowerInvariant()); - string cachefilename = dlcname + "_" + cachehash.ToString() + "_cache_y.dat"; - string cachefilepath = dlcfile.Path + "\\x64\\data\\cacheloaderdata_dlc\\" + cachefilename; + uint cachehash = JenkHash.GenHashLower(changeset.changeSetName); + string cachefilename = $"{dlcname}_{cachehash}_cache_y.dat"; + string cachefilepath = $"{dlcfile.Path}\\x64\\data\\cacheloaderdata_dlc\\{cachefilename}"; string cachefilepathpatched = GetDlcPatchedPath(cachefilepath); - DlcCacheFileList.Add(cachefilepathpatched); + var entry = RpfMan.GetEntry(cachefilepathpatched); + if (entry is not null) + { + DlcCacheFileList.Add(cachefilepathpatched); + } + else + { + if (setupfile.DlcSubpacks is not null) + { + foreach(var subfile in setupfile.DlcSubpacks) + { + cachefilepath = $"{subfile.Path}\\x64\\data\\cacheloaderdata_dlc\\{cachefilename}"; + cachefilepathpatched = GetDlcPatchedPath(cachefilepath); + entry = RpfMan.GetEntry(cachefilepathpatched); + if (entry is not null) + { + DlcCacheFileList.Add(cachefilepathpatched); + break; + } + } + } + } //if ((changeset.mapChangeSetData != null) && (changeset.mapChangeSetData.Count > 0)) //{ } @@ -721,38 +759,27 @@ namespace CodeWalker.GameFiles AddDlcActiveMapRpfFile(dfn, phpath, setupfile); } - else - { - if (dfn.EndsWith(".rpf")) - { } - } } } - if (changeset.executionConditions != null) - { } + //if (changeset.executionConditions != null) + //{ } if (changeset.mapChangeSetData != null) { foreach (var mapcs in changeset.mapChangeSetData) { - //if (mapcs.mapChangeSetData != null) - //{ }//not used if (mapcs.filesToInvalidate != null) { foreach (string file in mapcs.filesToInvalidate) { string upath = GetDlcMountedPath(file); string fpath = GetDlcPlatformPath(upath); - if (fpath.EndsWith(".rpf")) + if (fpath.EndsWith(".rpf", StringComparison.OrdinalIgnoreCase)) { RemoveDlcActiveMapRpfFile(fpath, overlays); } - else - { } //how to deal with individual files? milo_.interior } } - if (mapcs.filesToDisable != null) - { } if (mapcs.filesToEnable != null) { foreach (string file in mapcs.filesToEnable) @@ -761,9 +788,6 @@ namespace CodeWalker.GameFiles string umpath = GetDlcUnmountedPath(fpath); string phpath = GetDlcRpfPhysicalPath(umpath, setupfile); - if (fpath != umpath) - { } - AddDlcOverlayRpf(fpath, umpath, setupfile, overlays); AddDlcActiveMapRpfFile(fpath, phpath, setupfile); @@ -787,17 +811,13 @@ namespace CodeWalker.GameFiles private void AddDlcActiveMapRpfFile(string vpath, string phpath, DlcSetupFile setupfile) { - vpath = vpath.ToLowerInvariant(); - phpath = phpath.ToLowerInvariant(); - if (phpath.EndsWith(".rpf")) + if (phpath.EndsWith(".rpf", StringComparison.OrdinalIgnoreCase)) { RpfFile rpffile = RpfMan.FindRpfFile(phpath); if (rpffile != null) { - ActiveMapRpfFiles[vpath] = rpffile; + ActiveMapRpfFiles[vpath.ToLowerInvariant()] = rpffile; } - else - { } } else { } //how to handle individual files? eg interiorProxies.meta @@ -825,8 +845,6 @@ namespace CodeWalker.GameFiles { ActiveMapRpfFiles.Remove(overlayPath); } - else - { } } overlays.Remove(vpath); } @@ -910,6 +928,28 @@ namespace CodeWalker.GameFiles } return path; } + public static ReadOnlySpan GetFilePathWithoutDeviceName(ReadOnlySpan path) + { + var index = path.IndexOf(":"); + + if (index > 0) + { + return path.Slice(index + 2); + } + + return path; + } + public static ReadOnlySpan GetDeviceNameFromPath(ReadOnlySpan path) + { + var index = path.IndexOf(":"); + + if (index > 0) + { + return path.Slice(0, index); + } + + return path; + } public static string GetDlcPlatformPath(string path) { return path.Replace("%PLATFORM%", "x64").Replace('\\', '/').Replace("platform:", "x64").ToLowerInvariant(); @@ -920,7 +960,7 @@ namespace CodeWalker.GameFiles { foreach (var fm in efm.FolderMounts) { - if ((fm.platform == null) || (fm.platform == "x64")) + if (fm.platform is null || fm.platform == "x64") { if (path.StartsWith(fm.path, StringComparison.OrdinalIgnoreCase)) { @@ -1014,7 +1054,8 @@ namespace CodeWalker.GameFiles YedDict ??= new Dictionary(300); foreach (var rpffile in AllRpfs) { - if (rpffile.AllEntries == null) continue; + if (rpffile.AllEntries is null) + continue; foreach (var entry in rpffile.AllEntries) { if (entry is RpfFileEntry fentry) @@ -1063,7 +1104,8 @@ namespace CodeWalker.GameFiles AllYmapsDict.Clear(); foreach (var rpffile in ActiveMapRpfFiles.Values) //RpfMan.BaseRpfs) { - if (rpffile.AllEntries == null) continue; + if (rpffile.AllEntries is null) + continue; foreach (var entry in rpffile.AllEntries) { if (entry is RpfFileEntry fentry) @@ -1090,20 +1132,23 @@ namespace CodeWalker.GameFiles Console.WriteLine($"YmapDict: {YmapDict.Count}; YbnDict: {YbnDict.Count}; YnvDict: {YnvDict.Count}; AllYmapsDict: {AllYmapsDict.Count};"); } - private async ValueTask InitManifestDicts(bool force = true) + private async Task InitManifestDicts(bool force = true) { UpdateStatus?.Invoke("Loading manifests..."); using var _ = new DisposableTimer("InitManifestDicts"); AllManifests ??= new List(2000); - hdtexturelookup ??= new Dictionary(24000); + hdtexturelookup ??= new ConcurrentDictionary(Environment.ProcessorCount, 24000); AllManifests.Clear(); hdtexturelookup.Clear(); IEnumerable rpfs = PreloadedMode ? AllRpfs : ActiveMapRpfFiles.Values; - await Parallel.ForEachAsync(rpfs, async (file, cancellationToken) => - { - if (file.AllEntries == null) - return; + var allManifests = new ConcurrentBag(); + + var filteredRpfs = rpfs.Where(p => p.AllEntries is not null).ToArray(); + + await Parallel.ForAsync(0, filteredRpfs.Length, async (i, cancellationToken) => + { + var file = filteredRpfs[i]; //manifest and meta parsing.. foreach (RpfEntry entry in file.AllEntries) { @@ -1114,43 +1159,35 @@ namespace CodeWalker.GameFiles try { UpdateStatus?.Invoke(entry.Path); - YmfFile ymffile = await RpfMan.GetFileAsync(entry).ConfigureAwait(false); - if (ymffile != null) + YmfFile? ymffile = await RpfManager.GetFileAsync(entry); + if (ymffile is null) + return; + + allManifests.Add(ymffile); + + foreach(var b in ymffile.HDTxdAssetBindings) { - lock(AllManifests) - { - AllManifests.Add(ymffile); - } - - if (ymffile.HDTxdAssetBindings != null) - { - for (int i = 0; i < ymffile.HDTxdAssetBindings.Length; i++) - { - var b = ymffile.HDTxdAssetBindings[i]; - var targetasset = JenkHash.GenHashLower(b.targetAsset.ToString()); - var hdtxd = JenkHash.GenHashLower(b.HDTxd.ToString()); - lock(hdtexturelookup) - { - hdtexturelookup[targetasset] = hdtxd; - } - } - } - + var targetasset = JenkHash.GenHashLower(b._targetAsset.GetBytesNullTerminated()); + var hdtxd = JenkHash.GenHashLower(b._HDTxd.GetBytesNullTerminated()); + hdtexturelookup[targetasset] = hdtxd; } } catch (Exception ex) { - string errstr = entry.Path + "\n" + ex.ToString(); + string errstr = $"{entry.Path}\n{ex}"; ErrorLog?.Invoke(errstr); Console.WriteLine(errstr); } } }).ConfigureAwait(false); + AllManifests.AddRange(allManifests); + Console.WriteLine($"hdtexturelookup: {hdtexturelookup.Count}; AllManifests: {AllManifests.Count};"); } private static ConcurrentDictionary vehicleFiles = new(4, 72, StringComparer.OrdinalIgnoreCase); + [SkipLocalsInit] private async Task InitGtxds(bool force = true) { UpdateStatus?.Invoke("Loading global texture list..."); @@ -1159,11 +1196,12 @@ namespace CodeWalker.GameFiles IEnumerable rpfs = PreloadedMode ? AllRpfs : (IEnumerable)ActiveMapRpfFiles.Values; - static void addTxdRelationships(Dictionary from, ConcurrentDictionary parentTxds) { - foreach (var kvp in from) + [SkipLocalsInit] + static void addTxdRelationships(PooledDictionary from, ConcurrentDictionary parentTxds) { + foreach (var (key, value) in from) { - uint chash = JenkHash.GenHashLower(kvp.Key); - uint phash = JenkHash.GenHashLower(kvp.Value); + uint chash = JenkHash.GenHashLower(key); + uint phash = JenkHash.GenHashLower(value); parentTxds.TryAdd(chash, phash); } @@ -1177,8 +1215,11 @@ namespace CodeWalker.GameFiles allRpfs = allRpfs.Concat(DlcActiveRpfs); } - await Parallel.ForEachAsync(allRpfs, async (file, cancellationToken) => + var filteredRpfs = allRpfs.ToArray(); + + await Parallel.ForAsync(0, filteredRpfs.Length, async (i, cancellationToken) => { + var file = filteredRpfs[i]; foreach (RpfEntry entry in file.AllEntries) { if ( @@ -1187,21 +1228,24 @@ namespace CodeWalker.GameFiles || entry.Name.Equals("mph4_gtxd.ymt", StringComparison.OrdinalIgnoreCase) ) { - GtxdFile ymt = await RpfMan.GetFileAsync(entry).ConfigureAwait(false); - if (ymt.TxdRelationships != null) + GtxdFile? ymt = await RpfManager.GetFileAsync(entry); + var txdRelationShips = ymt?.TxdRelationships; + if (txdRelationShips is not null) { - addTxdRelationships(ymt.TxdRelationships, parentTxds); + addTxdRelationships(txdRelationShips, parentTxds); } + ymt?.Dispose(); } else if (entry.Name.Equals("vehicles.meta", StringComparison.OrdinalIgnoreCase)) { if (!vehicleFiles.TryGetValue(entry.Path, out var vf)) { - vf = vehicleFiles[entry.Path] = await RpfMan.GetFileAsync(entry).ConfigureAwait(false); + vf = vehicleFiles[entry.Path] = await RpfManager.GetFileAsync(entry); } - if (vf.TxdRelationships != null) + var txdRelationShips = vf?.TxdRelationships; + if (txdRelationShips is not null) { - addTxdRelationships(vf.TxdRelationships, parentTxds); + addTxdRelationships(txdRelationShips, parentTxds); } } } @@ -1210,13 +1254,34 @@ namespace CodeWalker.GameFiles textureParents = parentTxds.ToDictionary(p => p.Key, p => p.Value); //ensure resident global texture dicts: - YtdFile ytd1 = new YtdFile(GetYtdEntry(JenkHash.GenHash("mapdetail"))); - LoadFile(ytd1); - AddTextureLookups(ytd1); + var ytdEntry1 = GetYtdEntry(JenkHash.GenHash("mapdetail")); + if (ytdEntry1 is null) + { + Console.WriteLine("Failed to load mapdetail.ytd!"); + throw new Exception("Failed to load mapdetail.ytd"); + } + else + { + YtdFile ytd1 = new YtdFile(); + LoadFile(ytd1); + AddTextureLookups(ytd1); + } + + var ytdEntry2 = GetYtdEntry(JenkHash.GenHash("vehshare")); + + if (ytdEntry2 is null) + { + Console.WriteLine("Failed to load vehshare.ytd!"); + throw new Exception("Failed to laod vehshare.ytd!"); + } + else + { + YtdFile ytd2 = new YtdFile(); + LoadFile(ytd2); + AddTextureLookups(ytd2); + } + - YtdFile ytd2 = new YtdFile(GetYtdEntry(JenkHash.GenHash("vehshare"))); - LoadFile(ytd2); - AddTextureLookups(ytd2); Console.WriteLine($"textureParents: {textureParents.Count}"); @@ -1235,7 +1300,7 @@ namespace CodeWalker.GameFiles try { var cache = RpfMan.GetFile(path); - if (cache != null) + if (cache is not null) { AllCacheFiles.Add(cache); foreach (var node in cache.AllMapNodes) @@ -1252,15 +1317,17 @@ namespace CodeWalker.GameFiles } else if (finalAttempt) { - ErrorLog(path + ": main cachefile not loaded! Possibly an unsupported GTAV installation version."); + ErrorLog($"{path}: main cachefile not loaded! Possibly an unsupported GTAV installation version."); } else //update\x64\dlcpacks\mpspecialraces\dlc.rpf\x64\data\cacheloaderdata_dlc\mpspecialraces_3336915258_cache_y.dat (hash of: mpspecialraces_interior_additions) - { } + { + Console.WriteLine($"Failed to load {path}"); + } return cache; } catch (Exception ex) { - ErrorLog(path + ": " + ex.ToString()); + ErrorLog($"{path}: {ex}"); } return null; } @@ -1299,13 +1366,19 @@ namespace CodeWalker.GameFiles archetypesLoaded = false; try { + archetypeDict ??= new Dictionary(175000); archetypeDict.Clear(); using var timer = new DisposableTimer("InitArchetypeDicts"); var rpfs = EnableDlc ? AllRpfs : BaseRpfs; var allYtypes = rpfs - .Where(p => p.AllEntries != null && (EnableDlc || !p.Path.StartsWith("update", StringComparison.OrdinalIgnoreCase))); + .Where(p => p.AllEntries != null); + + if (!EnableDlc) + { + allYtypes = allYtypes.Where(p => !p.Path.StartsWith("update", StringComparison.OrdinalIgnoreCase)); + } //.SelectMany(p => p.AllEntries.Where(p => p.IsExtension(".ytyp"))); //await allYtypes.ParallelForEachAsync(async (file) => @@ -1323,25 +1396,33 @@ namespace CodeWalker.GameFiles // } //}, maxDegreeOfParallelism: 8); - - await Parallel.ForEachAsync(allYtypes, async (file, cancellationToken) => + using (var timer1 = new DisposableTimer("InitArchetypeDicts GetFiles")) { - foreach (var entry in file.AllEntries) + var allYtypsArr = allYtypes.ToArray(); + await Parallel.ForAsync(0, allYtypsArr.Length, async (i, cancellationToken) => { - if (entry.IsExtension(".ytyp")) + var file = allYtypsArr[i]; + foreach (var entry in file.AllEntries) { - try + if (entry.IsExtension(".ytyp")) { - ytypCache.Add(await RpfMan.GetFileAsync(entry).ConfigureAwait(false)); - } - catch (Exception ex) - { - Console.WriteLine(ex.ToString()); - ErrorLog(entry.Path + ": " + ex.ToString()); + try + { + var ytypFile = await RpfManager.GetFileAsync(entry); + if (ytypFile is not null) + ytypCache.Add(ytypFile); + else + Console.WriteLine($"Couldn't load file {entry.Path}"); + } + catch (Exception ex) + { + Console.WriteLine($"{entry.Path}: {ex}"); + ErrorLog($"{entry.Path}: {ex}"); + } } } - } - }).ConfigureAwait(false); + }); + } YtypDict = new Dictionary(ytypCache.Count); @@ -1350,6 +1431,8 @@ namespace CodeWalker.GameFiles AddYtypToDictionary(ytyp.RpfFileEntry, ytyp); } + Console.WriteLine($"archetypeDict: {archetypeDict.Count}"); + //Parallel.ForEach(allYtypes, new ParallelOptions { MaxDegreeOfParallelism = 4 }, (file) => //{ // foreach(var entry in file.AllEntries) @@ -1392,32 +1475,32 @@ namespace CodeWalker.GameFiles private void AddYtypToDictionary(RpfEntry entry, YtypFile ytypFile) { - if (ytypFile == null) + if (ytypFile is null) { throw new Exception("Couldn't load ytyp file."); //couldn't load the file for some reason... shouldn't happen.. } - if (ytypFile.Meta == null) + if (ytypFile.Meta is null) { - if (ytypFile.Pso == null && ytypFile.Rbf == null) + if (ytypFile.Pso is null && ytypFile.Rbf is null) { throw new Exception("ytyp file was not in meta format."); } return; } - ytypCache.Add(ytypFile); YtypDict[ytypFile.NameHash] = ytypFile; - if ((ytypFile.AllArchetypes == null) || (ytypFile.AllArchetypes.Length == 0)) + if (ytypFile.AllArchetypes.Length == 0) { - ErrorLog(entry.Path + ": no archetypes found"); + ErrorLog?.Invoke($"{entry.Path}: no archetypes found"); } else { foreach (var arch in ytypFile.AllArchetypes) { uint hash = arch.Hash; - if (hash == 0) continue; + if (hash == 0) + continue; archetypeDict[hash] = arch; } } @@ -1463,7 +1546,7 @@ namespace CodeWalker.GameFiles } - public async ValueTask InitStringDictsAsync(bool force = true) + public async Task InitStringDictsAsync(bool force = true) { UpdateStatus?.Invoke("Loading strings..."); using var timer = new DisposableTimer("InitStringDicts"); @@ -1486,12 +1569,11 @@ namespace CodeWalker.GameFiles if (DoFullStringIndex) { - var gxt2 = await RpfMan.GetFileAsync(entry).ConfigureAwait(false); - if (gxt2 != null) + var gxt2 = await RpfManager.GetFileAsync(entry); + if (gxt2 is not null) { - for (int i = 0; i < gxt2.TextEntries.Length; i++) + foreach(var e in gxt2.TextEntries) { - var e = gxt2.TextEntries[i]; GlobalText.Ensure(e.Text, e.Hash); } gxt2files.Add(gxt2); @@ -1505,12 +1587,11 @@ namespace CodeWalker.GameFiles if (!DoFullStringIndex) { string globalgxt2path = "x64b.rpf\\data\\lang\\" + langstr + ".rpf\\global.gxt2"; - var globalgxt2 = RpfMan.GetFile(globalgxt2path); - if (globalgxt2 != null) + var globalgxt2 = await RpfMan.GetFileAsync(globalgxt2path); + if (globalgxt2 is not null) { - for (int i = 0; i < globalgxt2.TextEntries.Length; i++) + foreach(var e in globalgxt2.TextEntries) { - var e = globalgxt2.TextEntries[i]; GlobalText.Ensure(e.Text, e.Hash); } } @@ -1560,7 +1641,24 @@ namespace CodeWalker.GameFiles StatsNames.FullIndexBuilt = true; } - public void InitVehicles(bool force = true) + public void AddInitDatas() + { + var vehiclesInitDict = VehiclesInitDict; + foreach (var vf in vehicleFiles.Values) + { + if (vf.InitDatas is not null) + { + foreach (var initData in vf.InitDatas.Span) + { + var name = initData.modelName; + var hash = JenkHash.GenHashLower(name); + vehiclesInitDict.TryAdd(hash, initData); + } + } + } + } + + public async Task InitVehicles(bool force = true) { if (!LoadVehicles) return; if (!force && VehiclesLoaded) return; @@ -1587,7 +1685,6 @@ namespace CodeWalker.GameFiles IEnumerable rpfs = PreloadedMode ? AllRpfs : (IEnumerable)ActiveMapRpfFiles.Values; - var allVehicles = new Dictionary(900); //var allCarCols = new List(); //var allCarModCols = new List(); //var allCarVariations = new List(); @@ -1601,7 +1698,7 @@ namespace CodeWalker.GameFiles allRpfs = allRpfs.Concat(DlcActiveRpfs); } - Parallel.ForEach(allRpfs.Where(p => p.AllEntries != null).SelectMany(p => p.AllEntries), (entry) => + await Parallel.ForEachAsync(allRpfs.Where(p => p.AllEntries != null).SelectMany(p => p.AllEntries), async (entry, _) => { if (!entry.Name.Equals("vehicles.meta", StringComparison.OrdinalIgnoreCase)) { @@ -1609,7 +1706,10 @@ namespace CodeWalker.GameFiles } try { - vehicleFiles[entry.Path] = RpfMan.GetFile(entry); + if (!vehicleFiles.ContainsKey(entry.Path)) + { + vehicleFiles[entry.Path] = await RpfManager.GetFileAsync(entry); + } //if ((entry.Name.Equals("carcols.ymt", StringComparison.OrdinalIgnoreCase)) || (entry.Name.Equals("carcols.meta", StringComparison.OrdinalIgnoreCase))) //{ // var cf = RpfMan.GetFile(entry); @@ -1648,34 +1748,21 @@ namespace CodeWalker.GameFiles } catch (Exception ex) { - string errstr = entry.Path + "\n" + ex.ToString(); + string errstr = $"{entry.Path}\n{ex}"; ErrorLog(errstr); Console.WriteLine(errstr); } }); - foreach(var vf in vehicleFiles.Values) - { - if (vf.InitDatas != null) - { - foreach (var initData in vf.InitDatas) - { - var name = initData.modelName; - var hash = JenkHash.GenHashLower(name); - if (!allVehicles.ContainsKey(hash)) - { - allVehicles[hash] = initData; - } - } - } - } + VehiclesInitDict ??= new Dictionary(900); + VehiclesInitDict.Clear(); - Console.WriteLine($"allVehicles: {allVehicles.Count}; vehicleFiles: {vehicleFiles.Count}"); + AddInitDatas(); - VehiclesInitDict = allVehicles; + Console.WriteLine($"VehiclesInitDict: {VehiclesInitDict.Count}; vehicleFiles: {vehicleFiles.Count}"); } - public void InitPeds(bool force = true) + public async Task InitPeds(bool force = true) { if (!LoadPeds) return; if (!force && PedsLoaded) return; @@ -1683,43 +1770,54 @@ namespace CodeWalker.GameFiles UpdateStatus?.Invoke("Loading peds..."); using var _ = new DisposableTimer("InitPeds"); IEnumerable rpfs = PreloadedMode ? AllRpfs : (IEnumerable)ActiveMapRpfFiles.Values; - List dlcrpfs = null; - if (EnableDlc) - { - dlcrpfs = new List(); - foreach (var rpf in DlcActiveRpfs) - { - dlcrpfs.Add(rpf); - if (rpf.Children == null) continue; - dlcrpfs.AddRange(rpf.Children); - } - } + PooledList? dlcrpfs = null; + //if (EnableDlc) + //{ + // Console.WriteLine("Loading DLC peds"); + // dlcrpfs = new PooledList(); + // foreach (var rpf in DlcActiveRpfs) + // { + // dlcrpfs.Add(rpf); + // if (rpf.Children is null) + // continue; + + // dlcrpfs.AddRange(rpf.Children); + // } + //} var allPeds = new ConcurrentDictionary(4, 1100); //var allPedsFiles = new List(); - var allPedYmts = new ConcurrentDictionary(4, 1100); + var allPedYmts = new ConcurrentBag(); + var allPedsFiles = new ConcurrentDictionary(); var allPedDrwDicts = new ConcurrentDictionary>(4, 1100); var allPedTexDicts = new ConcurrentDictionary>(4, 1100); var allPedClothDicts = new ConcurrentDictionary>(4, 200); - - Dictionary ensureDict(ConcurrentDictionary> coll, MetaHash hash) + static Dictionary createDict(MetaHash key) { - return coll.GetOrAdd(hash, (key) => new Dictionary()); + return new Dictionary(); } - var addPedDicts = new Action((name, hash, dir) => + static Dictionary ensureDict(ConcurrentDictionary> coll, MetaHash hash) { + return coll.GetOrAdd(hash, createDict); + } + + void addPedDicts(ReadOnlySpan name, MetaHash hash, PedFile pedFile) + { + var dir = pedFile.RpfFileEntry.Parent; + var pedsFiles = allPedsFiles.GetOrAdd(hash, (hash) => new PedsFiles()); Dictionary pedClotsDict = null; var files = dir?.Files; if (files != null) { - foreach (var file in files) + foreach (var file in files.Span) { - if (file.Name.Equals(name + ".yld", StringComparison.OrdinalIgnoreCase)) + if (file.IsExtension(".yld") && file.ShortName.Equals(name, StringComparison.OrdinalIgnoreCase)) { + pedsFiles.AddClothsDict(pedFile, file); pedClotsDict ??= ensureDict(allPedClothDicts, hash); lock(pedClotsDict) { @@ -1731,9 +1829,9 @@ namespace CodeWalker.GameFiles if (dir?.Directories != null) { - foreach (var cdir in dir.Directories) + foreach (var cdir in dir.Directories.Span) { - if (cdir.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) + if (cdir.Name.AsSpan().Equals(name, StringComparison.OrdinalIgnoreCase)) { dir = cdir; break; @@ -1744,11 +1842,12 @@ namespace CodeWalker.GameFiles { Dictionary pedDrwDicts = null; Dictionary pedTextDicts = null; - foreach (var file in files) + foreach (var file in files.Span) { if (file?.Name == null) continue; if (file.IsExtension(".ydd")) { + pedsFiles.AddDrawable(pedFile, file); pedDrwDicts ??= ensureDict(allPedDrwDicts, hash); lock(pedDrwDicts) { @@ -1757,6 +1856,7 @@ namespace CodeWalker.GameFiles } else if (file.IsExtension(".ytd")) { + pedsFiles.AddTextureDict(pedFile, file); pedTextDicts ??= ensureDict(allPedTexDicts, hash); lock(pedTextDicts) { @@ -1765,6 +1865,7 @@ namespace CodeWalker.GameFiles } else if (file.IsExtension(".yld")) { + pedsFiles.AddClothsDict(pedFile, file); pedClotsDict ??= ensureDict(allPedClothDicts, hash); lock(pedClotsDict) { @@ -1774,83 +1875,123 @@ namespace CodeWalker.GameFiles } } } - }); - - var numDlcs = dlcrpfs?.Count ?? 0; + }; var allRpfs = rpfs; - if (numDlcs > 0) + if (dlcrpfs is not null && dlcrpfs.Count > 0) { allRpfs = rpfs.Concat(dlcrpfs); } var allEntries = allRpfs .Where(p => p.AllEntries != null) - .SelectMany(p => p.AllEntries) - .Where(p => p.Name.EndsWithAny(".ymt", ".meta")); + .Where(p => p.Name.EndsWithAny(".ymt", ".meta")) + .ToArray(); - Parallel.ForEach(allEntries, new ParallelOptions { MaxDegreeOfParallelism = 4 }, (entry) => + await Parallel.ForAsync(0, allEntries.Length, new ParallelOptions { MaxDegreeOfParallelism = 4 }, async (i, cancellationToken) => { - if (!entry.Name.Equals("peds.ymt", StringComparison.OrdinalIgnoreCase) && !entry.Name.Equals("peds.meta", StringComparison.OrdinalIgnoreCase)) + var file = allEntries[i]; + foreach(var entry in file.AllEntries) { - return; - } - try - { - var pf = RpfMan.GetFile(entry); - if (pf.InitDataList?.InitDatas != null) + if (!entry.Name.Equals("peds.ymt", StringComparison.OrdinalIgnoreCase) && !entry.Name.Equals("peds.meta", StringComparison.OrdinalIgnoreCase)) { - foreach (var initData in pf.InitDataList.InitDatas) - { - var name = initData.Name; - var hash = JenkHash.GenHashLower(name); - allPeds.TryAdd(hash, initData); - } + return; + } + try + { + var pf = await RpfManager.GetFileAsync(entry); + if (pf.InitDataList?.InitDatas != null) + { + foreach (var initData in pf.InitDataList.InitDatas) + { + var name = initData.Name; + var hash = JenkHash.GenHashLower(name); + allPeds.TryAdd(hash, initData); + } + } + //allPedsFiles.Add(pf); + } + catch (Exception ex) + { + string errstr = entry.Path + "\n" + ex.ToString(); + ErrorLog?.Invoke(errstr); + Console.WriteLine(errstr); } - //allPedsFiles.Add(pf); - } - catch (Exception ex) - { - string errstr = entry.Path + "\n" + ex.ToString(); - ErrorLog?.Invoke(errstr); - Console.WriteLine(errstr); } + }); - Parallel.ForEach(allEntries, new ParallelOptions { MaxDegreeOfParallelism = 4 }, (entry) => + var pedLookup = new Dictionary(); + + foreach(var entry in DlcSetupFiles) { - if (!entry.IsExtension(".ymt")) + foreach(var dataFile in entry.ContentFile.dataFiles.Where(p => p.fileType == "SHOP_PED_APPAREL_META_FILE")) { - return; - } - try - { - var shortName = entry.ShortName; - var shortHash = entry.ShortNameHash; - if (allPeds.ContainsKey(shortHash)) + var path = GetFilePathWithoutDeviceName(GameFileCache.GetDlcPlatformPath(dataFile.filename)).ToString().Replace("/", "\\"); + + foreach(var file in entry.ContentFile.DlcFile.AllEntries) { - var pf = RpfMan.GetFile(entry); - if (pf != null) + if (file.Path.EndsWith(path, StringComparison.OrdinalIgnoreCase)) { - allPedYmts.TryAdd(shortHash, pf); - addPedDicts(shortName, shortHash, entry.Parent); + var loadedFile = await RpfManager.GetFileAsync(file); + var fullDlcNameHash = JenkHash.GenHashLower(loadedFile.FullDlcName); + var dlcNameHash = JenkHash.GenHashLower(loadedFile.DlcName); + var pedHash = JenkHash.GenHashLower(loadedFile.PedName); + pedLookup[fullDlcNameHash] = pedHash; + pedLookup[dlcNameHash] = pedHash; + var deviceName = entry.deviceName.Replace("dlc_", ""); + DlcNameLookup[fullDlcNameHash] = deviceName; + DlcNameLookup[dlcNameHash] = deviceName; + break; } } } - catch (Exception ex) + } + + await Parallel.ForAsync(0, allEntries.Length, new ParallelOptions { MaxDegreeOfParallelism = 4 }, async (i, cancellationToken) => + { + var file = allEntries[i]; + foreach (var entry in file.AllEntries) { - string errstr = entry.Path + "\n" + ex.ToString(); - ErrorLog?.Invoke(errstr); - Console.WriteLine(errstr); + if (!entry.IsExtension(".ymt")) + { + return; + } + try + { + var shortHash = entry.ShortNameHash; + if (!pedLookup.TryGetValue(shortHash, out var pedhash)) + { + pedhash = shortHash; + } + if (allPeds.ContainsKey(pedhash)) + { + var pf = await RpfManager.GetFileAsync(entry); + if (pf is not null) + { + allPedYmts.Add(pf); + addPedDicts(entry.ShortName, pedhash, pf); + } + } + } + catch (Exception ex) + { + string errstr = entry.Path + "\n" + ex.ToString(); + ErrorLog?.Invoke(errstr); + Console.WriteLine(errstr); + } } }); PedsInitDict = allPeds.ToDictionary(p => p.Key, p => p.Value); - PedVariationsDict = allPedYmts.ToDictionary(p => p.Key, p => p.Value); + var groupedYmts = allPedYmts.GroupBy(p => p.RpfFileEntry.ShortNameHash, (key, group) => KeyValuePair.Create((MetaHash)key, (ICollection)group.ToHashSet())); + PedVariationsDict = new Dictionary>(groupedYmts); + //PedVariationsDict = allPedYmts.ToDictionary(p => p.Key, p => p.Value); PedDrawableDicts = allPedDrwDicts.ToDictionary(p => p.Key, p => p.Value); PedTextureDicts = allPedTexDicts.ToDictionary(p => p.Key, p => p.Value); PedClothDicts = allPedClothDicts.ToDictionary(p => p.Key, p => p.Value); + PedsFiles = allPedsFiles.ToDictionary(p => p.Key, p => p.Value); //foreach (var kvp in PedsInitDict) @@ -1859,12 +2000,12 @@ namespace CodeWalker.GameFiles // { }//checking we found them all! //} - + dlcrpfs?.Dispose(); } private bool AudioLoaded = false; public readonly ReaderWriterLockSlim AudioDatRelFilesLock = new ReaderWriterLockSlim(); - public async ValueTask InitAudio(bool force = true) + public async Task InitAudio(bool force = true) { if (!LoadAudio) return; if (AudioLoaded && !force) return; @@ -1918,15 +2059,15 @@ namespace CodeWalker.GameFiles try { - AudioDatRelFiles ??= new List(20); + AudioDatRelFiles ??= new List(220); AudioConfigDict ??= new Dictionary(150); - AudioSpeechDict ??= new Dictionary(90000); - AudioSynthsDict ??= new Dictionary(1500); - AudioMixersDict ??= new Dictionary(3500); + AudioSpeechDict ??= new Dictionary(150000); + AudioSynthsDict ??= new Dictionary(5000); + AudioMixersDict ??= new Dictionary(5000); AudioCurvesDict ??= new Dictionary(1000); AudioCategsDict ??= new Dictionary(250); - AudioSoundsDict ??= new Dictionary(60000); - AudioGameDict ??= new Dictionary(20000); + AudioSoundsDict ??= new Dictionary(150000); + AudioGameDict ??= new Dictionary(30000); var audioDatRelFiles = AudioDatRelFiles; var audioConfigDict = AudioConfigDict; @@ -1940,10 +2081,12 @@ namespace CodeWalker.GameFiles var relFiles = new ConcurrentBag(); + var datrelentriesArr = datrelentries.Values.ToArray(); - await Parallel.ForEachAsync(datrelentries.Values, async (datrelentry, cancellationToken) => + await Parallel.ForAsync(0, datrelentriesArr.Length, async (i, cancellationToken) => { - var relfile = await RpfMan.GetFileAsync(datrelentry).ConfigureAwait(false); + var datrelentry = datrelentriesArr[i]; + var relfile = await RpfManager.GetFileAsync(datrelentry).ConfigureAwait(false); if (relfile == null) return; @@ -2034,7 +2177,7 @@ namespace CodeWalker.GameFiles //mainCache.Clear(); ClearCachedMaps(); - InitDlc(); + InitDlcAsync().GetAwaiter().GetResult(); } } } @@ -2058,7 +2201,7 @@ namespace CodeWalker.GameFiles mainCache.Clear(); InitGlobal(); - InitDlc(); + InitDlcAsync().GetAwaiter().GetResult(); } } } @@ -2074,7 +2217,7 @@ namespace CodeWalker.GameFiles foreach (var ymap in AllYmapsDict.Values) { GameFileCacheKey k = new GameFileCacheKey(ymap.ShortNameHash, GameFileType.Ymap); - mainCache.Remove(k); + mainCache.Remove(in k); } } } @@ -2084,17 +2227,21 @@ namespace CodeWalker.GameFiles public void AddProjectFile(GameFile f) { - if (f == null) return; - if (f.RpfFileEntry == null) return; - if (f.RpfFileEntry.ShortNameHash == 0) return; + if (f?.RpfFileEntry is null) + return; + if (f.RpfFileEntry.ShortNameHash == 0) + return; + var key = new GameFileCacheKey(f.RpfFileEntry.ShortNameHash, f.Type); projectFiles[key] = f; } public void RemoveProjectFile(GameFile f) { - if (f == null) return; - if (f.RpfFileEntry == null) return; - if (f.RpfFileEntry.ShortNameHash == 0) return; + if (f?.RpfFileEntry is null) + return; + if (f.RpfFileEntry.ShortNameHash == 0) + return; + var key = new GameFileCacheKey(f.RpfFileEntry.ShortNameHash, f.Type); projectFiles.TryRemove(key, out _); } @@ -2103,14 +2250,17 @@ namespace CodeWalker.GameFiles projectFiles.Clear(); } - public void AddProjectArchetype(Archetype a) + public void AddProjectArchetype(Archetype? a) { - if ((a?.Hash ?? 0) == 0) return; + if (a is null || a.Hash == 0) + return; + projectArchetypes[a.Hash] = a; } - public void RemoveProjectArchetype(Archetype a) + public void RemoveProjectArchetype(Archetype? a) { - if ((a?.Hash ?? 0) == 0) return; + if (a is null || a.Hash == 0) + return; try { projectArchetypes.TryGetValue(a.Hash, out var tarch); @@ -2140,47 +2290,52 @@ namespace CodeWalker.GameFiles } private readonly SemaphoreSlim maxCacheLock = new SemaphoreSlim(Environment.ProcessorCount / 2, Environment.ProcessorCount / 2); - public async Task TryLoadEnqueue(GameFile gf) + public async ValueTask TryLoadEnqueue(T gf) where T : GameFile { if (gf.Loaded || gf.LoadQueued) - { - return; - } - if (requestQueue.Count < 20)// && (!gf.LoadQueued) - { - gf.LoadQueued = true; - gf.LastLoadTime = DateTime.Now; + return gf; - await Task.Run(async () => + //if (requestQueue.Count < 20)// && (!gf.LoadQueued) + //{ + + if (!gf.SetLoadQueued(true)) + return gf; + + gf.LastLoadTime = DateTime.Now; + + await Task.Run(async () => + { + await maxCacheLock.WaitAsync(); + try { - await maxCacheLock.WaitAsync(); - try - { - await LoadFileAsync(gf).ConfigureAwait(false); - } - catch(Exception ex) - { - Console.WriteLine(ex); - throw; - } - finally - { - maxCacheLock.Release(); - } - }); + await LoadFileAsync(gf).ConfigureAwait(false); + } + catch (Exception ex) + { + Console.WriteLine(ex); + throw; + } + finally + { + maxCacheLock.Release(); + } + }); + + return gf; //requestQueue.Enqueue(gf); - } + //} } - public Archetype GetArchetype(uint hash) + public Archetype? GetArchetype(uint hash) { - if (!archetypesLoaded) return null; + if (!archetypesLoaded) + return null; archetypeLock.EnterReadLock(); try { - if (projectArchetypes.TryGetValue(hash, out var arch) && arch != null) + if (projectArchetypes.TryGetValue(hash, out var arch) && arch is not null) { return arch; } @@ -2194,28 +2349,30 @@ namespace CodeWalker.GameFiles } public MapDataStoreNode GetMapNode(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; YmapHierarchyDict.TryGetValue(hash, out var node); return node; } private readonly object ydrLock = new object(); - public YdrFile GetYdr(uint hash, bool immediate = false) + public YdrFile? GetYdr(uint hash, bool immediate = false) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (ydrLock) { var key = new GameFileCacheKey(hash, GameFileType.Ydr); - if (projectFiles.TryGetValue(key, out GameFile pgf)) + if (projectFiles.TryGetValue(key, out GameFile? pgf)) { return pgf as YdrFile; } - YdrFile ydr = mainCache.TryGet(key) as YdrFile; - if (ydr == null) + YdrFile? ydr = mainCache.TryGet(in key) as YdrFile; + if (ydr is null) { var e = GetYdrEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2235,21 +2392,23 @@ namespace CodeWalker.GameFiles } private readonly object yddLock = new object(); - public YddFile GetYdd(uint hash) + public YddFile? GetYdd(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; + lock (yddLock) { var key = new GameFileCacheKey(hash, GameFileType.Ydd); - if (projectFiles.TryGetValue(key, out GameFile pgf)) + if (projectFiles.TryGetValue(key, out GameFile? pgf)) { return pgf as YddFile; } - YddFile ydd = mainCache.TryGet(key) as YddFile; - if (ydd == null) + YddFile? ydd = mainCache.TryGet(in key) as YddFile; + if (ydd is null) { var e = GetYddEntry(hash); - if (e == null) return null; + if (e is null) return null; ydd = new YddFile(e); if (!mainCache.TryAdd(key, ydd)) @@ -2267,21 +2426,23 @@ namespace CodeWalker.GameFiles } private readonly SemaphoreSlim ytdLock = new SemaphoreSlim(1, 1); - public YtdFile GetYtd(uint hash) + public YtdFile? GetYtd(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; + ytdLock.Wait(); try { var key = new GameFileCacheKey(hash, GameFileType.Ytd); - if (projectFiles.TryGetValue(key, out GameFile pgf)) + if (projectFiles.TryGetValue(key, out var pgf)) { return pgf as YtdFile; } - YtdFile ytd = mainCache.TryGet(key) as YtdFile; - if (ytd == null) + YtdFile? ytd = mainCache.TryGet(in key) as YtdFile; + if (ytd is null) { var e = GetYtdEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2296,57 +2457,97 @@ namespace CodeWalker.GameFiles _ = TryLoadEnqueue(ytd); } return ytd; - } finally + } + finally { ytdLock.Release(); } } - private readonly object ymapLock = new object(); - public YmapFile GetYmap(uint hash) + private YmapFile? getYmapFile(uint hash) { - if (!IsInited) return null; + YmapFile? ymap; lock (ymapLock) { var key = new GameFileCacheKey(hash, GameFileType.Ymap); - YmapFile ymap = mainCache.TryGet(key) as YmapFile; - if (ymap == null) + ymap = mainCache.TryGet(in key) as YmapFile; + if (projectFiles.TryGetValue(key, out GameFile? pgf) && pgf is YmapFile ymapFile) + { + return ymapFile; + } + if (ymap is null) { var e = GetYmapEntry(hash); - if (e == null) + if (e is null) { + Console.WriteLine($"Couldn't find ymap {JenkIndex.GetString(hash)} ({hash})"); return null; } ymap = new YmapFile(e); if (!mainCache.TryAdd(key, ymap)) { + Console.WriteLine($"Couldn't add ymap {JenkIndex.GetString(hash)} ({hash}) to cache"); return null; } } - if (!ymap.Loaded && !ymap.LoadQueued) - { - _ = TryLoadEnqueue(ymap); - } - return ymap; } + + return ymap; + } + + private readonly object ymapLock = new object(); + public YmapFile? GetYmap(uint hash) + { + if (!IsInited) + return null; + + var ymap = getYmapFile(hash); + + if (ymap is null) + return null; + + if (!ymap.Loaded && !ymap.LoadQueued) + { + _ = TryLoadEnqueue(ymap); + } + return ymap; + } + + public ValueTask GetYmapAsync(uint hash) + { + if (!IsInited) + return ValueTask.FromResult((YmapFile?)null); + + var ymap = getYmapFile(hash); + + if (ymap is null) + return ValueTask.FromResult((YmapFile?)null); + + if (!ymap.Loaded && !ymap.LoadQueued) + { + return TryLoadEnqueue(ymap)!; + } + + return ValueTask.FromResult(ymap)!; } private readonly object yftLock = new object(); - public YftFile GetYft(uint hash) + public YftFile? GetYft(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (yftLock) { var key = new GameFileCacheKey(hash, GameFileType.Yft); - YftFile yft = mainCache.TryGet(key) as YftFile; - if (projectFiles.TryGetValue(key, out GameFile pgf)) + YftFile? yft = mainCache.TryGet(in key) as YftFile; + if (projectFiles.TryGetValue(key, out GameFile? pgf) && pgf is YftFile yftFile) { - return pgf as YftFile; + return yftFile; } - if (yft == null) + if (yft is null) { var e = GetYftEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2365,17 +2566,18 @@ namespace CodeWalker.GameFiles } private readonly object ybnLock = new object(); - public YbnFile GetYbn(uint hash) + public YbnFile? GetYbn(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (ybnLock) { var key = new GameFileCacheKey(hash, GameFileType.Ybn); - YbnFile ybn = mainCache.TryGet(key) as YbnFile; - if (ybn == null) + YbnFile? ybn = mainCache.TryGet(in key) as YbnFile; + if (ybn is null) { var e = GetYbnEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2394,17 +2596,18 @@ namespace CodeWalker.GameFiles } private readonly object ycdLock = new object(); - public YcdFile GetYcd(uint hash) + public YcdFile? GetYcd(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (ycdLock) { var key = new GameFileCacheKey(hash, GameFileType.Ycd); - YcdFile ycd = mainCache.TryGet(key) as YcdFile; - if (ycd == null) + YcdFile? ycd = mainCache.TryGet(in key) as YcdFile; + if (ycd is null) { var e = GetYcdEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2423,17 +2626,18 @@ namespace CodeWalker.GameFiles } private readonly object yedLock = new object(); - public YedFile GetYed(uint hash) + public YedFile? GetYed(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (yedLock) { var key = new GameFileCacheKey(hash, GameFileType.Yed); - YedFile yed = mainCache.TryGet(key) as YedFile; - if (yed == null) + YedFile? yed = mainCache.TryGet(in key) as YedFile; + if (yed is null) { var e = GetYedEntry(hash); - if (e == null) + if (e is null) { return null; } @@ -2452,13 +2656,14 @@ namespace CodeWalker.GameFiles } private readonly object yvnLock = new object(); - public YnvFile GetYnv(uint hash) + public YnvFile? GetYnv(uint hash) { - if (!IsInited) return null; + if (!IsInited) + return null; lock (yvnLock) { var key = new GameFileCacheKey(hash, GameFileType.Ynv); - YnvFile ynv = mainCache.TryGet(key) as YnvFile; + YnvFile? ynv = mainCache.TryGet(in key) as YnvFile; if (ynv == null) { var e = GetYnvEntry(hash); @@ -2481,28 +2686,24 @@ namespace CodeWalker.GameFiles } - public RpfFileEntry GetYdrEntry(uint hash) + public RpfFileEntry? GetYdrEntry(uint hash) { - RpfFileEntry entry; - YdrDict.TryGetValue(hash, out entry); + YdrDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYddEntry(uint hash) + public RpfFileEntry? GetYddEntry(uint hash) { - RpfFileEntry entry; - YddDict.TryGetValue(hash, out entry); + YddDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYtdEntry(uint hash) + public RpfFileEntry? GetYtdEntry(uint hash) { - RpfFileEntry entry; - YtdDict.TryGetValue(hash, out entry); + YtdDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYmapEntry(uint hash) + public RpfFileEntry? GetYmapEntry(uint hash) { - RpfFileEntry entry; - if (!YmapDict.TryGetValue(hash, out entry)) + if (!YmapDict.TryGetValue(hash, out var entry)) { if (!AllYmapsDict.TryGetValue(hash, out entry)) { @@ -2511,34 +2712,29 @@ namespace CodeWalker.GameFiles } return entry; } - public RpfFileEntry GetYftEntry(uint hash) + public RpfFileEntry? GetYftEntry(uint hash) { - RpfFileEntry entry; - YftDict.TryGetValue(hash, out entry); + YftDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYbnEntry(uint hash) + public RpfFileEntry? GetYbnEntry(uint hash) { - RpfFileEntry entry; - YbnDict.TryGetValue(hash, out entry); + YbnDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYcdEntry(uint hash) + public RpfFileEntry? GetYcdEntry(uint hash) { - RpfFileEntry entry; - YcdDict.TryGetValue(hash, out entry); + YcdDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYedEntry(uint hash) + public RpfFileEntry? GetYedEntry(uint hash) { - RpfFileEntry entry; - YedDict.TryGetValue(hash, out entry); + YedDict.TryGetValue(hash, out var entry); return entry; } - public RpfFileEntry GetYnvEntry(uint hash) + public RpfFileEntry? GetYnvEntry(uint hash) { - RpfFileEntry entry; - YnvDict.TryGetValue(hash, out entry); + YnvDict.TryGetValue(hash, out var entry); return entry; } @@ -2546,9 +2742,10 @@ namespace CodeWalker.GameFiles public bool LoadFile(T file) where T : GameFile, PackedFile { - if (file == null) return false; - RpfFileEntry entry = file.RpfFileEntry; - if (entry != null) + if (file is null) + return false; + RpfFileEntry? entry = file.RpfFileEntry; + if (entry is not null) { return RpfMan.LoadFile(file, entry); } @@ -2557,9 +2754,10 @@ namespace CodeWalker.GameFiles public ValueTask LoadFileAsync(T file) where T : GameFile, PackedFile { - if (file == null) return new ValueTask(false); - RpfFileEntry entry = file.RpfFileEntry; - if (entry != null) + if (file is null) + return new ValueTask(false); + RpfFileEntry? entry = file.RpfFileEntry; + if (entry is not null) { return RpfMan.LoadFileAsync(file, entry); } @@ -2603,40 +2801,40 @@ namespace CodeWalker.GameFiles //UpdateStatus?.Invoke("Loading " + req.RpfFileEntry.Name + "..."); //} - switch (req.Type) + switch (req) { - case GameFileType.Ydr: - req.Loaded = await LoadFileAsync(req as YdrFile); + case YdrFile ydrFile: + req.Loaded = await LoadFileAsync(ydrFile); break; - case GameFileType.Ydd: - req.Loaded = await LoadFileAsync(req as YddFile); + case YddFile yddFile: + req.Loaded = await LoadFileAsync(yddFile); break; - case GameFileType.Ytd: - req.Loaded = await LoadFileAsync(req as YtdFile); + case YtdFile ytdFile: + req.Loaded = await LoadFileAsync(ytdFile); //if (req.Loaded) AddTextureLookups(req as YtdFile); break; - case GameFileType.Ymap: - YmapFile y = req as YmapFile; - req.Loaded = await LoadFileAsync(y); - if (req.Loaded) y.InitYmapEntityArchetypes(this); + case YmapFile ymapFile: + req.Loaded = await LoadFileAsync(ymapFile); + if (req.Loaded) + ymapFile.InitYmapEntityArchetypes(this); break; - case GameFileType.Yft: - req.Loaded = await LoadFileAsync(req as YftFile); + case YftFile yftFile: + req.Loaded = await LoadFileAsync(yftFile); break; - case GameFileType.Ybn: - req.Loaded = await LoadFileAsync(req as YbnFile); + case YbnFile ybnFile: + req.Loaded = await LoadFileAsync(ybnFile); break; - case GameFileType.Ycd: - req.Loaded = await LoadFileAsync(req as YcdFile); + case YcdFile ycdFile: + req.Loaded = await LoadFileAsync(ycdFile); break; - case GameFileType.Yed: - req.Loaded = await LoadFileAsync(req as YedFile); + case YedFile yedFile: + req.Loaded = await LoadFileAsync(yedFile); break; - case GameFileType.Ynv: - req.Loaded = await LoadFileAsync(req as YnvFile); + case YnvFile ynvFile: + req.Loaded = await LoadFileAsync(ynvFile); break; - case GameFileType.Yld: - req.Loaded = await LoadFileAsync(req as YldFile); + case YldFile yldFile: + req.Loaded = await LoadFileAsync(yldFile); break; default: break; @@ -2657,7 +2855,17 @@ namespace CodeWalker.GameFiles req.LoadQueued = false; req.Loaded = false; Console.WriteLine(e); - _ = TryLoadEnqueue(req); + + // Retry loading, at most 2 times + if (req.LoadAttempts > 2) + { + req.LoadAttempts++; + _ = TryLoadEnqueue(req); + } + else + { + Console.WriteLine($"Loading of file {req.Name} at {req.FilePath} failed with error: {e}"); + } } finally { @@ -2729,7 +2937,7 @@ namespace CodeWalker.GameFiles //ErrorLog(str); if (!req.Loaded) { - ErrorLog("Error loading " + req.ToString()); + ErrorLog?.Invoke($"Error loading {req}"); } } catch (Exception e) @@ -2748,7 +2956,10 @@ namespace CodeWalker.GameFiles public bool ContentThreadProc() { - mainCache.BeginFrame(); + //mainCache.BeginFrame(); + if (requestQueue.Count == 0) + return false; + int itemcount = 0; lock (updateSyncRoot) { @@ -3050,7 +3261,7 @@ namespace CodeWalker.GameFiles if (doydr && entry.IsExtension(".ydr")) { UpdateStatus?.Invoke(entry.Path); - YdrFile ydr = RpfMan.GetFile(entry); + YdrFile ydr = RpfManager.GetFile(entry); if (ydr == null) { continue; } if (ydr.Drawable == null) { continue; } @@ -3059,7 +3270,7 @@ namespace CodeWalker.GameFiles else if (doydd & entry.IsExtension(".ydd")) { UpdateStatus?.Invoke(entry.Path); - YddFile ydd = RpfMan.GetFile(entry); + YddFile ydd = RpfManager.GetFile(entry); if (ydd == null) { continue; } if (ydd.Dict == null) { continue; } @@ -3071,7 +3282,7 @@ namespace CodeWalker.GameFiles else if (doyft && entry.IsExtension(".yft")) { UpdateStatus?.Invoke(entry.Path); - YftFile yft = RpfMan.GetFile(entry); + YftFile yft = RpfManager.GetFile(entry); if (yft == null) { continue; } if (yft.Fragment == null) { continue; } @@ -3097,7 +3308,7 @@ namespace CodeWalker.GameFiles else if (doypt && entry.IsExtension(".ypt")) { UpdateStatus?.Invoke(entry.Path); - YptFile ypt = RpfMan.GetFile(entry); + YptFile ypt = RpfManager.GetFile(entry); if (ypt == null) { continue; } if (ypt.DrawableDict == null) { continue; } @@ -3187,16 +3398,16 @@ namespace CodeWalker.GameFiles if (arch.Type == MetaName.CTimeArchetypeDef) { var ta = arch as TimeArchetype; - var t = ta.TimeFlags; + var t = ta.ActiveHours.TimeFlags; sb.Append(arch.Name); - sb.Append(","); + sb.Append(','); sb.Append(arch.AssetName); - sb.Append(","); + sb.Append(','); for (int i = 0; i < 32; i++) { bool v = ((t >> i) & 1) == 1; sb.Append(v ? "1" : "0"); - sb.Append(","); + sb.Append(','); } sb.AppendLine(); } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs index c02935a..14d2b05 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs @@ -1,8 +1,13 @@ +using Collections.Pooled; using SharpDX; using System; +using System.Buffers; using System.Collections.Generic; using System.ComponentModel; +using System.Data; using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; @@ -14,58 +19,59 @@ namespace CodeWalker.GameFiles public virtual MetaName Type => MetaName.CBaseArchetypeDef; public CBaseArchetypeDef _BaseArchetypeDef; - public CBaseArchetypeDef BaseArchetypeDef => _BaseArchetypeDef; // for browsing. + public ref CBaseArchetypeDef BaseArchetypeDef => ref _BaseArchetypeDef; // for browsing. public MetaHash Hash { get; set; } public YtypFile Ytyp { get; set; } - public MetaHash DrawableDict { get; set; } - public MetaHash TextureDict { get; set; } - public MetaHash ClipDict { get; set; } - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - public Vector3 BSCenter { get; set; } - public float BSRadius { get; set; } - public float LodDist { get; set; } + public MetaHash DrawableDict { get => _BaseArchetypeDef.drawableDictionary; set => _BaseArchetypeDef.drawableDictionary = value; } + public MetaHash TextureDict { get => _BaseArchetypeDef.textureDictionary; set => _BaseArchetypeDef.textureDictionary = value; } + public MetaHash ClipDict { get => _BaseArchetypeDef.clipDictionary; set => _BaseArchetypeDef.clipDictionary = value; } + public ref Vector3 BBMin { get => ref _BaseArchetypeDef.bbMin; } + public ref Vector3 BBMax { get => ref _BaseArchetypeDef.bbMax; } + public ref Vector3 BSCenter { get => ref _BaseArchetypeDef.bsCentre; } + public float BSRadius { get => _BaseArchetypeDef.bsRadius; set => _BaseArchetypeDef.bsRadius = value; } + public float LodDist { get => _BaseArchetypeDef.lodDist; set => _BaseArchetypeDef.lodDist = value; } public MetaWrapper[] Extensions { get; set; } - public string Name + public string Name => _BaseArchetypeDef.name.ToString(); + public string AssetName => _BaseArchetypeDef.assetName.ToString(); + + protected void InitVars() { - get - { - return _BaseArchetypeDef.name.ToString(); - } - } - public string AssetName - { - get - { - return _BaseArchetypeDef.assetName.ToString(); - } + Hash = _BaseArchetypeDef.assetName; + if (Hash.Hash == 0) + Hash = _BaseArchetypeDef.name; + //DrawableDict = _BaseArchetypeDef.drawableDictionary; + //TextureDict = _BaseArchetypeDef.textureDictionary; + //ClipDict = _BaseArchetypeDef.clipDictionary; + //BBMin = _BaseArchetypeDef.bbMin; + //BBMax = _BaseArchetypeDef.bbMax; + //BSCenter = _BaseArchetypeDef.bsCentre; + //BSRadius = _BaseArchetypeDef.bsRadius; + //LodDist = _BaseArchetypeDef.lodDist; } - - protected void InitVars(ref CBaseArchetypeDef arch) + protected void InitVars(in CBaseArchetypeDef arch) { _BaseArchetypeDef = arch; - Hash = arch.assetName; - if (Hash.Hash == 0) Hash = arch.name; - DrawableDict = arch.drawableDictionary; - TextureDict = arch.textureDictionary; - ClipDict = arch.clipDictionary; - BBMin = arch.bbMin; - BBMax = arch.bbMax; - BSCenter = arch.bsCentre; - BSRadius = arch.bsRadius; - LodDist = arch.lodDist; + InitVars(); } - public void Init(YtypFile ytyp, ref CBaseArchetypeDef arch) + public void Init(YtypFile ytyp, in CBaseArchetypeDef arch) { Ytyp = ytyp; - InitVars(ref arch); + InitVars(in arch); + } + + public void Init(YtypFile ytyp, Span data) + { + Ytyp = ytyp; + + PsoTypes.TryConvertDataRaw(data, out _BaseArchetypeDef); + InitVars(); } public virtual bool IsActive(float hour) @@ -79,77 +85,57 @@ namespace CodeWalker.GameFiles } } + public readonly struct ActiveHours(uint flags) + { + public readonly uint TimeFlags = flags; + + public readonly bool this[int index] => ((TimeFlags >> index) & 1) == 1; + + public static implicit operator ActiveHours(uint d) => new (d); + public static implicit operator uint(ActiveHours d) => d.TimeFlags; + } + [TypeConverter(typeof(ExpandableObjectConverter))] + [SkipLocalsInit] public class TimeArchetype : Archetype { public override MetaName Type => MetaName.CTimeArchetypeDef; public CTimeArchetypeDef _TimeArchetypeDef; public CTimeArchetypeDef TimeArchetypeDef => _TimeArchetypeDef; // for browsing. - - public uint TimeFlags { get; set; } - public bool[] ActiveHours { get; set; } - private readonly Lazy _activeHoursText; - public string[] ActiveHoursText { get => _activeHoursText.Value; } - public bool ExtraFlag { get { return ((TimeFlags >> 24) & 1) == 1; } } + public ActiveHours ActiveHours; + public bool ExtraFlag => ActiveHours[24]; public TimeArchetype() - { - _activeHoursText = new Lazy(() => - { - var activeHoursText = new string[24]; - for (int i = 0; i < ActiveHours.Length; i++) - { - var nxth = (i < 23) ? (i + 1) : 0; - var hrs = string.Format("{0:00}:00 - {1:00}:00", i, nxth); - activeHoursText[i] = (hrs + (ActiveHours[i] ? " - On" : " - Off")); - } + { } - return activeHoursText; - }); - } - - public void Init(YtypFile ytyp, ref CTimeArchetypeDef arch) + public void Init(YtypFile ytyp, in CTimeArchetypeDef arch) { Ytyp = ytyp; - InitVars(ref arch._BaseArchetypeDef); + InitVars(in arch._BaseArchetypeDef); _TimeArchetypeDef = arch; + ActiveHours = arch._TimeArchetypeDef.timeFlags; + } - TimeFlags = arch.TimeArchetypeDef.timeFlags; - - UpdateActiveHours(); + new public void Init(YtypFile ytyp, Span data) + { + Ytyp = ytyp; + PsoTypes.TryConvertDataRaw(data, out _TimeArchetypeDef); + InitVars(in _TimeArchetypeDef._BaseArchetypeDef); } public override bool IsActive(float hour) { - if (ActiveHours == null) return true; int h = ((int)hour) % 24; - if ((h < 0) || (h > 23)) return true; + if ((h < 0) || (h > 23)) + return true; return ActiveHours[h]; } - - public void UpdateActiveHours() - { - if (ActiveHours == null) - { - ActiveHours = new bool[24]; - } - for (int i = 0; i < 24; i++) - { - bool v = ((TimeFlags >> i) & 1) == 1; - ActiveHours[i] = v; - } - } - public void SetTimeFlags(uint flags) { - TimeFlags = flags; + ActiveHours = flags; _TimeArchetypeDef._TimeArchetypeDef.timeFlags = flags; - - UpdateActiveHours(); } - - } public class MloArchetype : Archetype @@ -159,7 +145,7 @@ namespace CodeWalker.GameFiles public CMloArchetypeDef MloArchetypeDef => _MloArchetypeDef; // for browsing. public CMloArchetypeDef _MloArchetypeDef; - public CMloArchetypeDefData _MloArchetypeDefData; + public ref CMloArchetypeDefData _MloArchetypeDefData => ref _MloArchetypeDef._MloArchetypeDef; public MCEntityDef[] entities { get; set; } public MCMloRoomDef[] rooms { get; set; } @@ -168,17 +154,27 @@ namespace CodeWalker.GameFiles public CMloTimeCycleModifier[] timeCycleModifiers { get; set; } - public void Init(YtypFile ytyp, ref CMloArchetypeDef arch) + public void Init(YtypFile ytyp, in CMloArchetypeDef arch) { Ytyp = ytyp; - InitVars(ref arch._BaseArchetypeDef); + InitVars(in arch._BaseArchetypeDef); _MloArchetypeDef = arch; - _MloArchetypeDefData = arch.MloArchetypeDef; + //_MloArchetypeDefData = ref arch._MloArchetypeDef; + } + + public void Init(YtypFile ytyp, Span data) + { + Ytyp = ytyp; + PsoTypes.TryConvertDataRaw(data, out _MloArchetypeDef); + InitVars(in _MloArchetypeDef._BaseArchetypeDef); + + //_MloArchetypeDefData = ref _MloArchetypeDef._MloArchetypeDef; } public bool AddEntity(YmapEntityDef ent, int roomIndex, int portalIndex = -1, int entsetIndex = -1) { - if (ent == null) return false; + if (ent is null) + return false; if (roomIndex >= (rooms?.Length ?? 0)) { @@ -193,7 +189,7 @@ namespace CodeWalker.GameFiles throw new ArgumentOutOfRangeException($"EntitySet index {entsetIndex} exceeds the amount of entitySets in {Name}."); } - var mcEntityDef = new MCEntityDef(ref ent._CEntityDef, this); + var mcEntityDef = new MCEntityDef(in ent._CEntityDef, this); if ((roomIndex >= 0) || (portalIndex >= 0)) @@ -243,7 +239,8 @@ namespace CodeWalker.GameFiles } public bool RemoveEntity(YmapEntityDef ent) { - if (ent == null) return false; + if (ent is null) + return false; if ((ent.MloEntitySet?.Entities != null) && (ent.MloEntitySet?.EntitySet != null)) { @@ -305,7 +302,8 @@ namespace CodeWalker.GameFiles public void AddRoom(MCMloRoomDef room) { - if (room == null) return; + if (room is null) + return; room.OwnerMlo = this; room.Index = rooms?.Length ?? 0; @@ -316,7 +314,8 @@ namespace CodeWalker.GameFiles } public void RemoveRoom(MCMloRoomDef room) { - if (room == null) return; + if (room is null) + return; var newrooms = rooms.ToList(); newrooms.Remove(room); @@ -332,12 +331,13 @@ namespace CodeWalker.GameFiles public void AddPortal(MCMloPortalDef portal) { - if (portal == null) return; + if (portal is null) + return; portal.OwnerMlo = this; portal.Index = portals?.Length ?? 0; - var newportals = portals?.ToList() ?? new List(); + using var newportals = portals?.ToPooledList() ?? new PooledList(); newportals.Add(portal); portals = newportals.ToArray(); @@ -345,9 +345,10 @@ namespace CodeWalker.GameFiles } public void RemovePortal(MCMloPortalDef portal) { - if (portal == null) return; + if (portal is null) + return; - var newportals = portals.ToList(); + using var newportals = portals.ToPooledList(); newportals.Remove(portal); portals = newportals.ToArray(); @@ -361,7 +362,8 @@ namespace CodeWalker.GameFiles public void AddEntitySet(MCMloEntitySet set) { - if (set == null) return; + if (set is null) + return; set.OwnerMlo = this; set.Index = entitySets?.Length ?? 0; @@ -372,7 +374,8 @@ namespace CodeWalker.GameFiles } public void RemoveEntitySet(MCMloEntitySet set) { - if (set == null) return; + if (set is null) + return; var newsets = entitySets.ToList(); newsets.Remove(set); @@ -393,17 +396,19 @@ namespace CodeWalker.GameFiles { foreach (var portal in portals) { - if (portal.AttachedObjects == null || portal.AttachedObjects.Length == 0) + if (portal.AttachedObjects is null || portal.AttachedObjects.Length == 0) continue; - List newAttachedObjects = new List(); + using PooledList newAttachedObjects = new PooledList(portal.AttachedObjects.Length); foreach (var objIndex in portal.AttachedObjects) { - if (objIndex == deletedIndex) continue; + if (objIndex == deletedIndex) + continue; if (objIndex > deletedIndex) newAttachedObjects.Add(objIndex - 1); // move the index back so it matches the index in the entitiy array. else newAttachedObjects.Add(objIndex); // else just add the index to the attached objects. } + portal.AttachedObjects = newAttachedObjects.ToArray(); } } @@ -411,13 +416,14 @@ namespace CodeWalker.GameFiles { foreach (var room in rooms) { - if (room.AttachedObjects == null || room.AttachedObjects.Length == 0) + if (room.AttachedObjects is null || room.AttachedObjects.Length == 0) continue; - List newAttachedObjects = new List(); + using PooledList newAttachedObjects = new PooledList(room.AttachedObjects.Length); foreach (var objIndex in room.AttachedObjects) { - if (objIndex == deletedIndex) continue; + if (objIndex == deletedIndex) + continue; if (objIndex > deletedIndex) newAttachedObjects.Add(objIndex - 1); // move the index back so it matches the index in the entitiy array. else newAttachedObjects.Add(objIndex); // else just add the index to the attached objects. @@ -452,14 +458,15 @@ namespace CodeWalker.GameFiles public void UpdatePortalCounts() { - if ((rooms == null) || (portals == null)) return; + if (rooms is null || portals is null) + return; foreach (var room in rooms) { uint count = 0; foreach (var portal in portals) { - if ((portal._Data.roomFrom == room.Index) || (portal._Data.roomTo == room.Index)) + if (portal._Data.roomFrom == room.Index || portal._Data.roomTo == room.Index) { count++; } @@ -472,50 +479,65 @@ namespace CodeWalker.GameFiles public void LoadChildren(Meta meta) { - var centities = MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, _MloArchetypeDefData.entities); - if (centities != null) + if (_MloArchetypeDefData.entities.Count1 > 0) { + var centitiesBuffer = ArrayPool.Shared.Rent(_MloArchetypeDefData.entities.Count1); + MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, in _MloArchetypeDefData.entities, centitiesBuffer); + var centities = centitiesBuffer.AsSpan(0, _MloArchetypeDefData.entities.Count1); entities = new MCEntityDef[centities.Length]; for (int i = 0; i < centities.Length; i++) { - entities[i] = new MCEntityDef(meta, ref centities[i]) { OwnerMlo = this, Index = i }; + entities[i] = new MCEntityDef(meta, centities[i]) { OwnerMlo = this, Index = i }; } + ArrayPool.Shared.Return(centitiesBuffer); } - var crooms = MetaTypes.ConvertDataArray(meta, MetaName.CMloRoomDef, _MloArchetypeDefData.rooms); - if (crooms != null) + if (_MloArchetypeDefData.rooms.Count1 > 0) { + var croomsBuffer = ArrayPool.Shared.Rent(_MloArchetypeDefData.rooms.Count1); + MetaTypes.ConvertDataArray(meta, MetaName.CMloRoomDef, in _MloArchetypeDefData.rooms, croomsBuffer); + var crooms = croomsBuffer.AsSpan(0, _MloArchetypeDefData.rooms.Count1); rooms = new MCMloRoomDef[crooms.Length]; for (int i = 0; i < crooms.Length; i++) { rooms[i] = new MCMloRoomDef(meta, crooms[i]) { OwnerMlo = this, Index = i }; } + ArrayPool.Shared.Return(croomsBuffer); } - var cportals = MetaTypes.ConvertDataArray(meta, MetaName.CMloPortalDef, _MloArchetypeDefData.portals); - if (cportals != null) + if (_MloArchetypeDefData.portals.Count1 > 0) { + var cportalsBuffer = ArrayPool.Shared.Rent(_MloArchetypeDefData.portals.Count1); + MetaTypes.ConvertDataArray(meta, MetaName.CMloPortalDef, in _MloArchetypeDefData.portals, cportalsBuffer); + var cportals = cportalsBuffer.AsSpan(0, _MloArchetypeDefData.portals.Count1); portals = new MCMloPortalDef[cportals.Length]; for (int i = 0; i < cportals.Length; i++) { portals[i] = new MCMloPortalDef(meta, cportals[i]) { OwnerMlo = this, Index = i }; } + ArrayPool.Shared.Return(cportalsBuffer); } - var centitySets = MetaTypes.ConvertDataArray(meta, MetaName.CMloEntitySet, _MloArchetypeDefData.entitySets); - if (centitySets != null) + if (_MloArchetypeDefData.entitySets.Count1 > 0) { + var centitySetsBuffer = ArrayPool.Shared.Rent(_MloArchetypeDefData.entitySets.Count1); + MetaTypes.ConvertDataArray(meta, MetaName.CMloEntitySet, in _MloArchetypeDefData.entitySets, centitySetsBuffer); + var centitySets = centitySetsBuffer.AsSpan(0, _MloArchetypeDefData.entitySets.Count1); + entitySets = new MCMloEntitySet[centitySets.Length]; for (int i = 0; i < centitySets.Length; i++) { - entitySets[i] = new MCMloEntitySet(meta, centitySets[i], this) { OwnerMlo = this, Index = i }; + entitySets[i] = new MCMloEntitySet(meta, centitySets[i], this) { Index = i }; } + ArrayPool.Shared.Return(centitySetsBuffer); UpdateAllEntityIndexes(); + } - - timeCycleModifiers = MetaTypes.ConvertDataArray(meta, MetaName.CMloTimeCycleModifier, _MloArchetypeDefData.timeCycleModifiers); - + if (_MloArchetypeDefData.timeCycleModifiers.Count1 > 0) + { + timeCycleModifiers = MetaTypes.ConvertDataArray(meta, MetaName.CMloTimeCycleModifier, in _MloArchetypeDefData.timeCycleModifiers); + } } public int GetEntityObjectIndex(MCEntityDef ent) @@ -531,7 +553,7 @@ namespace CodeWalker.GameFiles } return -1; } - public MCMloRoomDef GetEntityRoom(MCEntityDef ent) + public MCMloRoomDef? GetEntityRoom(MCEntityDef ent) { if (rooms == null) return null; @@ -558,17 +580,19 @@ namespace CodeWalker.GameFiles return null; } - public MCMloPortalDef GetEntityPortal(MCEntityDef ent) + public MCMloPortalDef? GetEntityPortal(MCEntityDef ent) { - if (portals == null) return null; + if (portals is null) + return null; int objectIndex = GetEntityObjectIndex(ent); - if (objectIndex < 0) return null; + if (objectIndex < 0) + return null; for (int i = 0; i < portals.Length; i++) { var p = portals[i]; - if (p.AttachedObjects != null) + if (p.AttachedObjects is not null) { for (int j = 0; j < p.AttachedObjects.Length; j++) { @@ -583,7 +607,7 @@ namespace CodeWalker.GameFiles return null; } - public MCMloEntitySet GetEntitySet(MCEntityDef ent) + public MCMloEntitySet? GetEntitySet(MCEntityDef ent) { if (entitySets == null) return null; @@ -613,7 +637,7 @@ namespace CodeWalker.GameFiles public YmapEntityDef Owner { get; set; } public MloArchetype MloArch { get; set; } public CMloInstanceDef _Instance; - public CMloInstanceDef Instance { get { return _Instance; } set { _Instance = value; } } + public ref CMloInstanceDef Instance => ref _Instance; public uint[] defaultEntitySets { get; set; } public YmapEntityDef[] Entities { get; set; } @@ -627,11 +651,13 @@ namespace CodeWalker.GameFiles public void CreateYmapEntities() { - if (Owner == null) return; - if (MloArch?.entities == null) return; + if (Owner is null) + return; + if (MloArch?.entities is null) + return; var ec = MloArch.entities.Length; - var entlist = new List(); + var entlist = new List(ec); for (int i = 0; i < ec; i++) { var e = CreateYmapEntity(Owner, MloArch.entities[i], i); @@ -662,7 +688,7 @@ namespace CodeWalker.GameFiles } } - if ((defaultEntitySets != null) && (EntitySets != null)) + if (defaultEntitySets != null && EntitySets != null) { for (var i = 0; i < defaultEntitySets.Length; i++) { @@ -678,19 +704,19 @@ namespace CodeWalker.GameFiles public void InitYmapEntityArchetypes(GameFileCache gfc) { - if (Owner == null) return; + if (Owner is null) + return; var arch = Owner.Archetype; - if (Entities != null) + if (Entities is not null) { - for (int j = 0; j < Entities.Length; j++) + foreach(var ient in Entities) { - var ient = Entities[j]; var iarch = gfc.GetArchetype(ient._CEntityDef.archetypeName); - if (iarch == null) + if (iarch is null) { - Console.WriteLine($"Can't find archetype for {ient._CEntityDef.archetypeName}!"); + Console.WriteLine($"Can't find archetype for {ient._CEntityDef.archetypeName} for ymap {Owner.Name}!"); } else { @@ -701,23 +727,22 @@ namespace CodeWalker.GameFiles UpdateBBs(arch); } - if (EntitySets != null) + if (EntitySets is not null) { - for (int e = 0; e < EntitySets.Length; e++) + foreach(var entitySet in EntitySets) { - var entitySet = EntitySets[e]; var entities = entitySet.Entities; - if (entities == null) continue; + if (entities is null) + continue; for (int i = 0; i < entities.Count; i++) { var ient = entities[i]; var iarch = gfc.GetArchetype(ient._CEntityDef.archetypeName); - ient.SetArchetype(iarch); - if (iarch == null) + if (iarch is null) { - Console.WriteLine($"Couldn't find archetype {ient._CEntityDef.archetypeName}"); + Console.WriteLine($"Couldn't find archetype {ient._CEntityDef.archetypeName} ({ient._CEntityDef.archetypeName.Hash}) for ymap {Owner.Name}"); } else { @@ -731,18 +756,16 @@ namespace CodeWalker.GameFiles public void UpdateBBs(Archetype arch) { //update archetype room AABB's.. bad to have this here? where else to put it? - var mloa = arch as MloArchetype; - if (mloa != null) + if (arch is MloArchetype mloa) { Vector3 mlobbmin = Vector3.Zero; Vector3 mlobbmax = Vector3.Zero; Vector3[] c = new Vector3[8]; var rooms = mloa.rooms; - if (rooms != null) + if (rooms is not null) { - for (int j = 0; j < rooms.Length; j++) + foreach(var room in rooms) { - var room = rooms[j]; if (room.AttachedObjects == null || room.AttachedObjects.Length == 0) continue; Vector3 min = new Vector3(float.MaxValue); @@ -770,9 +793,9 @@ namespace CodeWalker.GameFiles c[7] = abmax; for (int n = 0; n < 8; n++) { - Vector3 corn = ori.Multiply(c[n]) + pos; - min = Vector3.Min(min, corn); - max = Vector3.Max(max, corn); + Vector3 corn = ori.Multiply(in c[n]) + pos; + Vectors.Min(in min, in corn, out min); + Vectors.Max(in max, in corn, out max); } } } @@ -790,7 +813,7 @@ namespace CodeWalker.GameFiles public YmapEntityDef CreateYmapEntity(YmapEntityDef owner, MCEntityDef ment, int index) { - YmapEntityDef e = new YmapEntityDef(null, index, ref ment._Data); + YmapEntityDef e = new YmapEntityDef(null, index, ment._Data); e.Extensions = ment.Extensions; e.MloRefPosition = e.Position; e.MloRefOrientation = e.Orientation; @@ -803,11 +826,14 @@ namespace CodeWalker.GameFiles return e; } - public MCEntityDef TryGetArchetypeEntity(YmapEntityDef ymapEntity) + public MCEntityDef? TryGetArchetypeEntity(YmapEntityDef ymapEntity) { - if (ymapEntity == null) return null; - if (Owner?.Archetype == null) return null; - if (!(Owner.Archetype is MloArchetype mloa)) return null; + if (ymapEntity is null) + return null; + if (Owner?.Archetype is null) + return null; + if (Owner.Archetype is not MloArchetype mloa) + return null; var index = Array.FindIndex(Entities, x => x == ymapEntity); if ((index >= 0) && (index < mloa.entities.Length)) @@ -817,13 +843,13 @@ namespace CodeWalker.GameFiles if (EntitySets != null) { - for (int e = 0; e < EntitySets.Length; e++) + foreach(var entset in EntitySets) { - var entset = EntitySets[e]; var ents = entset.Entities; var set = entset.EntitySet; var setents = set?.Entities; - if ((ents == null) || (setents == null)) continue; + if (ents is null || setents is null) + continue; var idx = ents.IndexOf(ymapEntity); if ((idx >= 0) && (idx < setents.Length)) { @@ -835,11 +861,14 @@ namespace CodeWalker.GameFiles return null; } - public YmapEntityDef TryGetYmapEntity(MCEntityDef mcEntity) + public YmapEntityDef? TryGetYmapEntity(MCEntityDef mcEntity) { - if (mcEntity == null) return null; - if (Owner?.Archetype == null) return null; - if (!(Owner.Archetype is MloArchetype mloa)) return null; + if (mcEntity is null) + return null; + if (Owner?.Archetype is null) + return null; + if (Owner.Archetype is not MloArchetype mloa) + return null; var index = Array.FindIndex(mloa.entities, x => x == mcEntity); if ((index >= 0) && (index < Entities.Length)) @@ -847,15 +876,15 @@ namespace CodeWalker.GameFiles return Entities[index]; } - if (EntitySets != null) + if (EntitySets is not null) { - for (int e = 0; e < EntitySets.Length; e++) + foreach(var entset in EntitySets) { - var entset = EntitySets[e]; var ents = entset.Entities; var set = entset.EntitySet; var setents = set?.Entities; - if ((ents == null) || (setents == null)) continue; + if (ents is null || setents is null) + continue; var idx = Array.FindIndex(setents, x => x == mcEntity); if ((idx >= 0) && (idx < ents.Count)) { @@ -883,21 +912,21 @@ namespace CodeWalker.GameFiles public void UpdateEntities() { - if (Entities == null) return; - if (Owner == null) return; + if (Entities is null) + return; + if (Owner is null) + return; - for (int i = 0; i < Entities.Length; i++) + foreach(var ent in Entities) { - var ent = Entities[i]; UpdateEntity(ent); } - if (EntitySets != null) + if (EntitySets != null && EntitySets.Length > 0) { - for (int e = 0; e < EntitySets.Length; e++) + foreach(var entset in EntitySets) { - var entset = EntitySets[e]; - if (entset?.Entities != null) + if (entset?.Entities is not null) { for (int i = 0; i < entset.Entities.Count; i++) { @@ -921,15 +950,16 @@ namespace CodeWalker.GameFiles public void AddEntity(YmapEntityDef e) { - if (e == null) return; + if (e is null) + return; - if (e.MloEntitySet != null) + if (e.MloEntitySet is not null) { e.MloEntitySet.AddEntity(e); } else { - if (Entities == null) Entities = new YmapEntityDef[0]; + Entities ??= Array.Empty(); var entities = Entities.ToList(); entities.Add(e); Entities = entities.ToArray(); @@ -937,21 +967,21 @@ namespace CodeWalker.GameFiles UpdateAllEntityIndexes(); } - public bool DeleteEntity(YmapEntityDef ent) + public bool DeleteEntity(YmapEntityDef entityToRemove) { var del = false; - if (ent.MloEntitySet != null) + if (entityToRemove.MloEntitySet is not null) { - del = ent.MloEntitySet.DeleteEntity(ent); + del = entityToRemove.MloEntitySet.DeleteEntity(entityToRemove); UpdateAllEntityIndexes(); return del; } - if (Entities == null) + if (Entities is null) { throw new NullReferenceException("The Entities list returned null in our MloInstanceData. This could be an issue with initialization. The MloInstance probably doesn't exist."); } - if (ent.Index >= Entities.Length) + if (entityToRemove.Index >= Entities.Length) { throw new ArgumentOutOfRangeException("The index of the entity was greater than the amount of entities that exist in this MloInstance. Likely an issue with initializion."); } @@ -959,14 +989,14 @@ namespace CodeWalker.GameFiles int index = 0; var newentities = new YmapEntityDef[Entities.Length - 1]; - for (int i = 0; i < Entities.Length; i++) - { - if (i == ent.Index) + foreach(var thisEnt in Entities) + { + if (thisEnt.Index == entityToRemove.Index) { del = true; continue; } - newentities[index] = Entities[i]; + newentities[index] = thisEnt; newentities[index].Index = index; index++; } @@ -982,15 +1012,16 @@ namespace CodeWalker.GameFiles public void AddEntitySet(MCMloEntitySet set) { var instset = new MloInstanceEntitySet(set, this); - var esets = EntitySets?.ToList() ?? new List(); + using var esets = EntitySets?.ToPooledList() ?? new PooledList(); esets.Add(instset); EntitySets = esets.ToArray(); } public bool DeleteEntitySet(MCMloEntitySet set) { - if (EntitySets == null) return false; - var esets = EntitySets.ToList(); + if (EntitySets is null) + return false; + using var esets = EntitySets.ToPooledList(); var rem = esets.RemoveAll(s => s.EntitySet == set); EntitySets = esets.ToArray(); UpdateAllEntityIndexes(); @@ -1022,22 +1053,23 @@ namespace CodeWalker.GameFiles private void UpdateAllEntityIndexes() { var index = 0; - if (Entities != null) + if (Entities is not null) { - for (int i = 0; i < Entities.Length; i++) + foreach(var ent in Entities) { - Entities[i].Index = index++; + ent.Index = index++; } } - if (EntitySets != null) + if (EntitySets is not null) { - for (int e = 0; e < EntitySets.Length; e++) + foreach(var set in EntitySets) { - var set = EntitySets[e]; - if (set?.Entities == null) continue; - for (int i = 0; i < set.Entities.Count; i++) + if (set?.Entities is null) + continue; + + foreach(var ent in set.Entities) { - set.Entities[i].Index = index++; + ent.Index = index++; } } } @@ -1060,8 +1092,13 @@ namespace CodeWalker.GameFiles public uint[] Locations { - get { return EntitySet?.Locations; } - set { if (EntitySet != null) EntitySet.Locations = value; } + get { + return EntitySet?.Locations; + } + set { + if (EntitySet != null) + EntitySet.Locations = value; + } } public bool Visible { get; set; } @@ -1069,8 +1106,10 @@ namespace CodeWalker.GameFiles { get { - if (Visible) return true; - if (EntitySet == null) return false; + if (Visible) + return true; + if (EntitySet == null) + return false; return EntitySet.ForceVisible; } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs index 9799fff..b303609 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs @@ -1,4 +1,5 @@ -using System;using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; @@ -8,18 +9,22 @@ using SharpDX; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; +using System.Buffers; +using CodeWalker.Core.Utils; +using System.Runtime.InteropServices; +using System.Reflection; +using Collections.Pooled; +using static System.Runtime.InteropServices.JavaScript.JSType; namespace CodeWalker.GameFiles { - [TC(typeof(EXP))] public class Meta : ResourceFileBase + [TC(typeof(EXP))] + public class Meta : ResourceFileBase, IResourceBlockSpan { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; // structure data public int Unknown_10h { get; set; } = 0x50524430; @@ -47,17 +52,17 @@ namespace CodeWalker.GameFiles public uint Unknown_6Ch { get; set; } = 0x00000000; // reference data - public ResourceSimpleArray StructureInfos { get; set; } - public ResourceSimpleArray EnumInfos { get; set; } - public ResourceSimpleArray DataBlocks { get; set; } - public string Name { get; set; } + public ResourceSimpleArray? StructureInfos { get; set; } + public ResourceSimpleArray? EnumInfos { get; set; } + public ResourceSimpleArray? DataBlocks { get; set; } + public string? Name { get; set; } //public string[] Strings { get; set; } - public MetaEncryptedStringsBlock EncryptedStrings { get; set; } - private string_r NameBlock = null; + private string_r? NameBlock = null; #if DEBUG + public MetaEncryptedStringsBlock EncryptedStrings { get; set; } public ResourceAnalyzer Analyzer { get; set; } #endif @@ -172,10 +177,14 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(base.GetReferences()); - if ((StructureInfos != null) && (StructureInfos.Count > 0)) list.Add(StructureInfos); - if ((EnumInfos != null) && (EnumInfos.Count > 0)) list.Add(EnumInfos); - if ((DataBlocks != null) && (DataBlocks.Count > 0)) list.Add(DataBlocks); + using var list = new PooledList(base.GetReferences()); + if (StructureInfos is not null && StructureInfos.Count > 0) + list.Add(StructureInfos); + if (EnumInfos is not null && EnumInfos.Count > 0) + list.Add(EnumInfos); + if (DataBlocks is not null && DataBlocks.Count > 0) + list.Add(DataBlocks); + if (!string.IsNullOrEmpty(Name)) { NameBlock = (string_r)Name; @@ -187,10 +196,12 @@ namespace CodeWalker.GameFiles - public MetaDataBlock FindBlock(MetaName name) + public MetaDataBlock? FindBlock(MetaName name) { - if (DataBlocks == null) return null; - foreach (var block in DataBlocks) + if (DataBlocks is null) + return null; + + foreach (var block in DataBlocks.Span) { if (block.StructureNameHash == name) { @@ -201,35 +212,37 @@ namespace CodeWalker.GameFiles } - public MetaDataBlock GetRootBlock() + public MetaDataBlock? GetRootBlock() { - MetaDataBlock block = null; + if (DataBlocks?.Data is null) + return null; + + MetaDataBlock? block = null; var rootind = RootBlockIndex - 1; - if ((rootind >= 0) && (rootind < DataBlocks.Count) && (DataBlocks.Data != null)) + if (rootind >= 0 && rootind < DataBlocks.Count) { block = DataBlocks[rootind]; } return block; } - public MetaDataBlock GetBlock(int id) + public MetaDataBlock? GetBlock(int id) { - MetaDataBlock block = null; - var ind = id - 1; - if ((ind >= 0) && (ind < DataBlocks.Count) && (DataBlocks.Data != null)) - { - block = DataBlocks[ind]; - } - return block; - } + if (DataBlocks?.Data is null) + return null; + var ind = id - 1; + if (ind >= 0 && ind < DataBlocks.Count) + { + return DataBlocks[ind]; + } + return null; + } } - [TC(typeof(EXP))] public class MetaStructureInfo : ResourceSystemBlock + [TC(typeof(EXP))] + public class MetaStructureInfo : ResourceSystemBlock, IResourceBlockSpan { - public override long BlockLength - { - get { return 32; } - } + public override long BlockLength => 32; // structure data public MetaName StructureNameHash { get; set; } @@ -249,6 +262,7 @@ namespace CodeWalker.GameFiles public MetaStructureInfo() { } + public MetaStructureInfo(MetaName nameHash, uint key, uint unknown, int length, params MetaStructureEntryInfo_s[] entries) { StructureNameHash = nameHash; @@ -277,7 +291,22 @@ namespace CodeWalker.GameFiles // read reference data this.Entries = reader.ReadStructsAt((ulong)this.EntriesPointer, (uint)this.EntriesCount); + } + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.StructureNameHash = (MetaName)reader.ReadInt32(); + this.StructureKey = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt32(); + this.Unknown_Ch = reader.ReadUInt32(); + this.EntriesPointer = reader.ReadInt64(); + this.StructureSize = reader.ReadInt32(); + this.Unknown_1Ch = reader.ReadInt16(); + this.EntriesCount = reader.ReadInt16(); + + // read reference data + this.Entries = reader.ReadStructsAt((ulong)this.EntriesPointer, (int)this.EntriesCount).ToArray(); } /// @@ -307,21 +336,13 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - if (EntriesBlock == null) - { - EntriesBlock = new ResourceSystemStructBlock(Entries); - } - if (EntriesBlock != null) list.Add(EntriesBlock); + EntriesBlock ??= new ResourceSystemStructBlock(Entries); //if (Entries != null) list.Add(Entries); //TODO: fix - return list.ToArray(); + return [EntriesBlock]; } - public override string ToString() - { - return StructureNameHash.ToString(); - } + public override string ToString() => StructureNameHash.ToString(); } public enum MetaStructureEntryDataType : byte @@ -354,71 +375,47 @@ namespace CodeWalker.GameFiles { public static string GetCSharpTypeName(MetaStructureEntryDataType t) { - switch (t) + return t switch { - case MetaStructureEntryDataType.Boolean: return "bool"; - case MetaStructureEntryDataType.SignedByte: return "sbyte"; - case MetaStructureEntryDataType.UnsignedByte: return "byte"; - case MetaStructureEntryDataType.SignedShort: return "short"; - case MetaStructureEntryDataType.UnsignedShort: return "ushort"; - case MetaStructureEntryDataType.SignedInt: return "int"; - case MetaStructureEntryDataType.UnsignedInt: return "uint"; - case MetaStructureEntryDataType.Float: return "float"; - case MetaStructureEntryDataType.Float_XYZ: return "Vector3"; - case MetaStructureEntryDataType.Float_XYZW: return "Vector4"; - - case MetaStructureEntryDataType.Hash: return "uint"; //uint hashes... - case MetaStructureEntryDataType.ByteEnum: return "byte"; //convert to enum later.. - case MetaStructureEntryDataType.IntEnum: return "int"; - case MetaStructureEntryDataType.ShortFlags: return "short"; - case MetaStructureEntryDataType.IntFlags1: return "int"; - case MetaStructureEntryDataType.IntFlags2: return "int"; - - case MetaStructureEntryDataType.Array: - case MetaStructureEntryDataType.ArrayOfChars: - case MetaStructureEntryDataType.ArrayOfBytes: - case MetaStructureEntryDataType.DataBlockPointer: - case MetaStructureEntryDataType.CharPointer: - case MetaStructureEntryDataType.StructurePointer: - case MetaStructureEntryDataType.Structure: - default: - return t.ToString(); - } + MetaStructureEntryDataType.Boolean => "bool", + MetaStructureEntryDataType.SignedByte => "sbyte", + MetaStructureEntryDataType.UnsignedByte => "byte", + MetaStructureEntryDataType.SignedShort => "short", + MetaStructureEntryDataType.UnsignedShort => "ushort", + MetaStructureEntryDataType.SignedInt => "int", + MetaStructureEntryDataType.UnsignedInt => "uint", + MetaStructureEntryDataType.Float => "float", + MetaStructureEntryDataType.Float_XYZ => "Vector3", + MetaStructureEntryDataType.Float_XYZW => "Vector4", + MetaStructureEntryDataType.Hash => "uint",//uint hashes... + MetaStructureEntryDataType.ByteEnum => "byte",//convert to enum later.. + MetaStructureEntryDataType.IntEnum => "int", + MetaStructureEntryDataType.ShortFlags => "short", + MetaStructureEntryDataType.IntFlags1 => "int", + MetaStructureEntryDataType.IntFlags2 => "int", + _ => t.ToString(), + }; } } - [TC(typeof(EXP))] public struct MetaStructureEntryInfo_s + [TC(typeof(EXP))] + public readonly struct MetaStructureEntryInfo_s(MetaName nameHash, int dataOffset, MetaStructureEntryDataType dataType, byte unk9h, short referenceTypeIndex, MetaName referenceKey) { // structure data - public MetaName EntryNameHash { get; set; } - public int DataOffset { get; set; } - public MetaStructureEntryDataType DataType { get; set; } - public byte Unknown_9h { get; set; } - public short ReferenceTypeIndex { get; set; } - public MetaName ReferenceKey { get; set; } + public MetaName EntryNameHash { get; init; } = nameHash; + public int DataOffset { get; init; } = dataOffset; + public MetaStructureEntryDataType DataType { get; init; } = dataType; + public byte Unknown_9h { get; init; } = unk9h; + public short ReferenceTypeIndex { get; init; } = referenceTypeIndex; + public MetaName ReferenceKey { get; init; } = referenceKey; - public MetaStructureEntryInfo_s(MetaName nameHash, int dataOffset, MetaStructureEntryDataType dataType, byte unk9h, short referenceTypeIndex, MetaName referenceKey) - { - EntryNameHash = nameHash; - DataOffset = dataOffset; - DataType = dataType; - Unknown_9h = unk9h; - ReferenceTypeIndex = referenceTypeIndex; - ReferenceKey = referenceKey; - } - - public override string ToString() - { - return DataOffset.ToString() + ": " + DataType.ToString() + ": " + ReferenceKey.ToString() + ": " + EntryNameHash.ToString(); - } + public override string ToString() => $"{DataOffset}: {DataType}: {ReferenceKey}: {EntryNameHash}"; } - [TC(typeof(EXP))] public class MetaEnumInfo : ResourceSystemBlock + [TC(typeof(EXP))] + public class MetaEnumInfo : ResourceSystemBlock, IResourceBlockSpan { - public override long BlockLength - { - get { return 24; } - } + public override long BlockLength => 24; // structure data public MetaName EnumNameHash { get; set; } @@ -462,7 +459,22 @@ namespace CodeWalker.GameFiles // this.EntriesCount //); this.Entries = reader.ReadStructsAt((ulong)this.EntriesPointer, (uint)this.EntriesCount); + } + public void Read(ref SequenceReader reader, params object[] parameters) + { + this.EnumNameHash = (MetaName)reader.ReadInt32(); + this.EnumKey = reader.ReadUInt32(); + this.EntriesPointer = reader.ReadInt64(); + this.EntriesCount = reader.ReadInt32(); + this.Unknown_14h = reader.ReadInt32(); + + // read reference data + //this.Entries = reader.ReadBlockAt>( + // (ulong)this.EntriesPointer, // offset + // this.EntriesCount + //); + this.Entries = reader.ReadStructsAt((ulong)this.EntriesPointer, (uint)this.EntriesCount).ToArray(); } /// @@ -489,47 +501,25 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); //if (Entries != null) list.Add(Entries); - if (EntriesBlock == null) - { - EntriesBlock = new ResourceSystemStructBlock(Entries); - } - if (EntriesBlock != null) list.Add(EntriesBlock); + EntriesBlock ??= new ResourceSystemStructBlock(Entries); - return list.ToArray(); + return [EntriesBlock]; } - public override string ToString() - { - return EnumNameHash.ToString(); - } + public override string ToString() => EnumNameHash.ToString(); } - [TC(typeof(EXP))] public struct MetaEnumEntryInfo_s + [TC(typeof(EXP))] + public readonly record struct MetaEnumEntryInfo_s(MetaName EntryNameHash, int EntryValue) { - // structure data - public MetaName EntryNameHash { get; set; } - public int EntryValue { get; set; } - - public MetaEnumEntryInfo_s(MetaName nameHash, int value) - { - EntryNameHash = nameHash; - EntryValue = value; - } - - public override string ToString() - { - return EntryNameHash.ToString() + ": " + EntryValue.ToString(); - } + public override string ToString() => $"{EntryNameHash}: {EntryValue}"; } - [TC(typeof(EXP))] public class MetaDataBlock : ResourceSystemBlock + [TC(typeof(EXP))] + public class MetaDataBlock : ResourceSystemBlock, IResourceBlockSpan { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public MetaName StructureNameHash { get; set; } @@ -538,7 +528,7 @@ namespace CodeWalker.GameFiles // reference data public byte[] Data { get; set; } - private ResourceSystemDataBlock DataBlock = null; + private ResourceSystemDataBlock? DataBlock = null; /// /// Reads the data-block from a stream. @@ -546,13 +536,21 @@ namespace CodeWalker.GameFiles public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data - this.StructureNameHash = (MetaName)reader.ReadInt32(); + this.StructureNameHash = (MetaName)reader.ReadInt32(); this.DataLength = reader.ReadInt32(); this.DataPointer = reader.ReadInt64(); - this.Data = reader.ReadBytesAt((ulong)this.DataPointer, (uint)DataLength); + } + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.StructureNameHash = (MetaName)reader.ReadInt32(); + this.DataLength = reader.ReadInt32(); + this.DataPointer = reader.ReadInt64(); + + this.Data = reader.ReadBytesAt((ulong)this.DataPointer, (uint)DataLength).ToArray(); } /// @@ -576,32 +574,19 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - if (DataBlock == null) - { - DataBlock = new ResourceSystemDataBlock(Data); - } - if (DataBlock != null) list.Add(DataBlock); + DataBlock ??= new ResourceSystemDataBlock(Data); //if (Data != null) list.Add(Data); - return list.ToArray(); + return [DataBlock]; } - public override string ToString() - { - return StructureNameHash.ToString() + ": " + DataPointer.ToString() + " (" + DataLength.ToString() + ")"; - } + public override string ToString() => $"{StructureNameHash}: {DataPointer} ({DataLength})"; } - [TC(typeof(EXP))] public class MetaEncryptedStringsBlock : ResourceSystemBlock + [TC(typeof(EXP))] + public class MetaEncryptedStringsBlock : ResourceSystemBlock { - public override long BlockLength - { - get - { - return 4 + Count;// + PadCount; - } - } + public override long BlockLength => 4 + Count; // + PadCount; public uint Count { get; set; } public byte[] EncryptedData { get; set; } @@ -648,72 +633,44 @@ namespace CodeWalker.GameFiles //derived types - manually created (array & pointer structs) - [TC(typeof(EXP))] public struct Array_StructurePointer //16 bytes - pointer for a structure pointer array + [TC(typeof(EXP))] + public readonly record struct Array_StructurePointer //16 bytes - pointer for a structure pointer array { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + public readonly uint Unk0 => (uint)(Pointer >> 32); + public readonly uint PointerDataId => (uint)(Pointer & 0xFFF); + public readonly uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public readonly uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); - public void SwapEnd() + public readonly Array_StructurePointer SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_StructurePointer: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; - } - - public override bool Equals(object obj) - { - return obj is Array_StructurePointer pointer && - Pointer == pointer.Pointer && - Count1 == pointer.Count1 && - Count2 == pointer.Count2 && - Unk1 == pointer.Unk1; - } - - public override int GetHashCode() - { - int hashCode = -1900453823; - hashCode = hashCode * -1521134295 + Pointer.GetHashCode(); - hashCode = hashCode * -1521134295 + Count1.GetHashCode(); - hashCode = hashCode * -1521134295 + Count2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk1.GetHashCode(); - return hashCode; - } - - public static bool operator ==(Array_StructurePointer left, Array_StructurePointer right) - { - return left.Equals(right); - } - - public static bool operator !=(Array_StructurePointer left, Array_StructurePointer right) - { - return !(left == right); + return new Array_StructurePointer + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1), + }; } + public override readonly string ToString() => $"Array_StructurePointer: {PointerDataIndex} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct Array_Structure //16 bytes - pointer for a structure array + + [TC(typeof(EXP))] + public readonly record struct Array_Structure //16 bytes - pointer for a structure array { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } set { Pointer = (Pointer & 0xFFFFFFFFFFFFF000) + (value & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } set { PointerDataId = value + 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } set { Pointer = (Pointer & 0xFFFFFFFF00000FFF) + ((value << 12) & 0xFFFFF000); } } - + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + public readonly uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId { readonly get { return (uint)(Pointer & 0xFFF); } init { Pointer = (Pointer & 0xFFFFFFFFFFFFF000) + (value & 0xFFF); } } + public uint PointerDataIndex { readonly get { return (uint)(Pointer & 0xFFF) - 1; } init { PointerDataId = value + 1; } } + public uint PointerDataOffset { readonly get { return (uint)((Pointer >> 12) & 0xFFFFF); } init { Pointer = (Pointer & 0xFFFFFFFF00000FFF) + ((value << 12) & 0xFFFFF000); } } public Array_Structure(ulong ptr, int cnt) { @@ -722,7 +679,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_Structure(MetaBuilderPointer ptr) + public Array_Structure(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -730,61 +687,30 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public Array_Structure SwapEnd() + public readonly Array_Structure SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - return this; - } - public override string ToString() - { - return "Array_Structure: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; - } - - public static bool operator ==(Array_Structure x, Array_Structure y) - { - return x.Equals(y); - } - - public static bool operator !=(Array_Structure x, Array_Structure y) - { - return !x.Equals(y); - } - - public override bool Equals(object obj) - { - if (obj is null || obj is not Array_Structure arrObj) - return false; - - return arrObj.Pointer == this.Pointer - && arrObj.Count1 == this.Count1 - && arrObj.Count2 == this.Count2 - && arrObj.Unk1 == this.Unk1; - } - - public override int GetHashCode() - { - int hashCode = -1900453823; - hashCode = hashCode * -1521134295 + Pointer.GetHashCode(); - hashCode = hashCode * -1521134295 + Count1.GetHashCode(); - hashCode = hashCode * -1521134295 + Count2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk1.GetHashCode(); - return hashCode; + return new Array_Structure + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1), + }; } + public override readonly string ToString() => $"Array_Structure: {PointerDataIndex} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct Array_uint //16 bytes - pointer for a uint array + [TC(typeof(EXP))] + public readonly record struct Array_uint //16 bytes - pointer for a uint array { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + public uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId => (uint)(Pointer & 0xFFF); + public uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public Array_uint(ulong ptr, int cnt) @@ -794,7 +720,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_uint(MetaBuilderPointer ptr) + public Array_uint(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -802,60 +728,31 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public Array_uint SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_uint: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; - } - - public static bool operator ==(Array_uint x, Array_uint y) - { - return x.Equals(y); - } - - public static bool operator !=(Array_uint x, Array_uint y) - { - return !x.Equals(y); - } - - public override bool Equals(object obj) - { - if (obj is null || obj is not Array_uint arrObj) - return false; - - return arrObj.Pointer == this.Pointer - && arrObj.Count1 == this.Count1 - && arrObj.Count2 == this.Count2 - && arrObj.Unk1 == this.Unk1; - } - - public override int GetHashCode() - { - int hashCode = -1900453823; - hashCode = hashCode * -1521134295 + Pointer.GetHashCode(); - hashCode = hashCode * -1521134295 + Count1.GetHashCode(); - hashCode = hashCode * -1521134295 + Count2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk1.GetHashCode(); - return hashCode; + return new Array_uint + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1), + }; } + public override string ToString() => $"Array_uint {{ PointerDataIndex = {PointerDataIndex}, Count1 = {Count1}, Count2 = {Count2} }}"; } - [TC(typeof(EXP))] public struct Array_ushort //16 bytes - pointer for a ushort array - { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly struct Array_ushort //16 bytes - pointer for a ushort array + { + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + + public readonly uint Unk0 => (uint)(Pointer >> 32); + public readonly uint PointerDataId => (uint)(Pointer & 0xFFF); + public readonly uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public readonly uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public Array_ushort(ulong ptr, int cnt) @@ -865,7 +762,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_ushort(MetaBuilderPointer ptr) + public Array_ushort(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -873,60 +770,31 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public readonly Array_ushort SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_ushort: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; - } - - public static bool operator ==(Array_ushort x, Array_ushort y) - { - return x.Equals(y); - } - - public static bool operator !=(Array_ushort x, Array_ushort y) - { - return !x.Equals(y); - } - - public override bool Equals(object obj) - { - if (obj is null || obj is not Array_ushort arrObj) - return false; - - return arrObj.Pointer == this.Pointer - && arrObj.Count1 == this.Count1 - && arrObj.Count2 == this.Count2 - && arrObj.Unk1 == this.Unk1; - } - - public override int GetHashCode() - { - int hashCode = -1900453823; - hashCode = hashCode * -1521134295 + Pointer.GetHashCode(); - hashCode = hashCode * -1521134295 + Count1.GetHashCode(); - hashCode = hashCode * -1521134295 + Count2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk1.GetHashCode(); - return hashCode; + return new Array_ushort + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1), + }; } + public override readonly string ToString() => $"Array_ushort {{ PointerDataIndex = {PointerDataIndex}, Count1 = {Count1}, Count2 = {Count2} }}"; } - [TC(typeof(EXP))] public struct Array_byte //16 bytes - pointer for a byte array - { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly record struct Array_byte //16 bytes - pointer for a byte array + { + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + + public readonly uint Unk0 => (uint)(Pointer >> 32); + public readonly uint PointerDataId => (uint)(Pointer & 0xFFF); + public readonly uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public readonly uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public Array_byte(ulong ptr, int cnt) { @@ -935,7 +803,8 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_byte(MetaBuilderPointer ptr) + + public Array_byte(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -943,58 +812,32 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public readonly Array_byte SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_byte: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; + return new Array_byte + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1), + }; } - public override bool Equals(object obj) - { - return obj is Array_byte @byte && - Pointer == @byte.Pointer && - Count1 == @byte.Count1 && - Count2 == @byte.Count2 && - Unk1 == @byte.Unk1; - } - - public override int GetHashCode() - { - int hashCode = -1900453823; - hashCode = hashCode * -1521134295 + Pointer.GetHashCode(); - hashCode = hashCode * -1521134295 + Count1.GetHashCode(); - hashCode = hashCode * -1521134295 + Count2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk1.GetHashCode(); - return hashCode; - } - - public static bool operator ==(Array_byte left, Array_byte right) - { - return left.Equals(right); - } - - public static bool operator !=(Array_byte left, Array_byte right) - { - return !(left == right); - } + public override readonly string ToString() => $"Array_byte: {PointerDataIndex} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct Array_float //16 bytes - pointer for a float array - { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly struct Array_float //16 bytes - pointer for a float array + { + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + + public uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId => (uint)(Pointer & 0xFFF); + public uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public Array_float(ulong ptr, int cnt) { @@ -1003,7 +846,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_float(MetaBuilderPointer ptr) + public Array_float(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -1011,29 +854,31 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public Array_float SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_float: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; + return new Array_float + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1) + }; } + public override string ToString() => $"Array_float: {PointerDataIndex} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct Array_Vector3 //16 bytes - pointer for a Vector3 array - { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly struct Array_Vector3 //16 bytes - pointer for a Vector3 array + { + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + + public uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId => (uint)(Pointer & 0xFFF); + public uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public Array_Vector3(ulong ptr, int cnt) { @@ -1042,7 +887,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public Array_Vector3(MetaBuilderPointer ptr) + public Array_Vector3(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -1050,29 +895,31 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public Array_Vector3 SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "Array_Vector3: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; + return new Array_Vector3 + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1) + }; } + public override string ToString() => $"Array_Vector3: {PointerDataIndex} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct CharPointer //16 bytes - pointer for a char array - { - public ulong Pointer { get; set; } - public ushort Count1 { get; set; } - public ushort Count2 { get; set; } - public uint Unk1 { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly struct CharPointer //16 bytes - pointer for a char array + { + public ulong Pointer { get; init; } + public ushort Count1 { get; init; } + public ushort Count2 { get; init; } + public uint Unk1 { get; init; } + + public uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId => (uint)(Pointer & 0xFFF); + public uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public CharPointer(ulong ptr, int len) { @@ -1081,7 +928,7 @@ namespace CodeWalker.GameFiles Count2 = Count1; Unk1 = 0; } - public CharPointer(MetaBuilderPointer ptr) + public CharPointer(in MetaBuilderPointer ptr) { Pointer = ptr.Pointer; Count1 = (ushort)ptr.Length; @@ -1089,26 +936,28 @@ namespace CodeWalker.GameFiles Unk1 = 0; } - public void SwapEnd() + public CharPointer SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); - Count1 = MetaTypes.SwapBytes(Count1); - Count2 = MetaTypes.SwapBytes(Count2); - Unk1 = MetaTypes.SwapBytes(Unk1); - } - public override string ToString() - { - return "CharPointer: " + Pointer.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")"; + return new CharPointer + { + Pointer = MetaTypes.SwapBytes(Pointer), + Count1 = MetaTypes.SwapBytes(Count1), + Count2 = MetaTypes.SwapBytes(Count2), + Unk1 = MetaTypes.SwapBytes(Unk1) + }; } + public override string ToString() => $"CharPointer: {Pointer} ({Count1}/{Count2})"; } - [TC(typeof(EXP))] public struct DataBlockPointer //8 bytes - pointer to data block - { - public ulong Pointer { get; set; } - public uint Unk0 { get { return (uint)(Pointer >> 32); } } - public uint PointerDataId { get { return (uint)(Pointer & 0xFFF); } } - public uint PointerDataIndex { get { return (uint)(Pointer & 0xFFF) - 1; } } - public uint PointerDataOffset { get { return (uint)((Pointer >> 12) & 0xFFFFF); } } + [TC(typeof(EXP))] + public readonly struct DataBlockPointer //8 bytes - pointer to data block + { + public ulong Pointer { get; init; } + + public uint Unk0 => (uint)(Pointer >> 32); + public uint PointerDataId => (uint)(Pointer & 0xFFF); + public uint PointerDataIndex => (uint)(Pointer & 0xFFF) - 1; + public uint PointerDataOffset => (uint)((Pointer >> 12) & 0xFFFFF); public DataBlockPointer(int blockId, int offset) @@ -1116,204 +965,196 @@ namespace CodeWalker.GameFiles Pointer = ((uint)blockId & 0xFFF) | (((uint)offset & 0xFFFFF) << 12); } - public override string ToString() - { - return "DataBlockPointer: " + Pointer.ToString(); - } + public override string ToString() => $"DataBlockPointer: {Pointer}"; - public void SwapEnd() + public DataBlockPointer SwapEnd() { - Pointer = MetaTypes.SwapBytes(Pointer); + return new DataBlockPointer() + { + Pointer = MetaTypes.SwapBytes(Pointer) + }; } } - [TC(typeof(EXP))] public struct ArrayOfUshorts3 //array of 3 ushorts + [TC(typeof(EXP))] + public readonly struct ArrayOfUshorts3 //array of 3 ushorts { - public ushort u0, u1, u2; + public readonly ushort u0, u1, u2; + + public ArrayOfUshorts3(ushort u0, ushort u1, ushort u2) + { + this.u0 = u0; + this.u1 = u1; + this.u2 = u2; + } + public Vector3 XYZ() { return new Vector3(u0, u1, u2); } - public override string ToString() - { - return u0.ToString() + ", " + u1.ToString() + ", " + u2.ToString(); - } + public override string ToString() => $"{u0}, {u1}, {u2}"; } - [TC(typeof(EXP))] public struct ArrayOfBytes3 //array of 3 bytes + + [TC(typeof(EXP))] + public readonly struct ArrayOfBytes3 //array of 3 bytes { - public byte b0, b1, b2; + public readonly byte b0, b1, b2; + + public ArrayOfBytes3(byte b0, byte b1, byte b2) + { + this.b0 = b0; + this.b1 = b1; + this.b2 = b2; + } + public byte[] GetArray() { - return new[] { b0, b1, b2 }; - } - public override string ToString() - { - return b0.ToString() + ", " + b1.ToString() + ", " + b2.ToString(); + return [b0, b1, b2]; } + public override string ToString() => $"{b0}, {b1}, {b2}"; } - [TC(typeof(EXP))] public struct ArrayOfBytes4 //array of 4 bytes + + [TC(typeof(EXP))] + public readonly struct ArrayOfBytes4 //array of 4 bytes { - public byte b0, b1, b2, b3; + public readonly byte b0, b1, b2, b3; public byte[] GetArray() { - return new[] { b0, b1, b2, b3 }; - } - public override string ToString() - { - return b0.ToString() + ", " + b1.ToString() + ", " + b2.ToString() + ", " + b3.ToString(); + return [b0, b1, b2, b3]; } + public override string ToString() => $"{b0}, {b1}, {b2}, {b3}"; } - [TC(typeof(EXP))] public struct ArrayOfBytes5 //array of 5 bytes + + [TC(typeof(EXP))] + public readonly struct ArrayOfBytes5 //array of 5 bytes { - public byte b0, b1, b2, b3, b4; + public readonly byte b0, b1, b2, b3, b4; public byte[] GetArray() { - return new[] { b0, b1, b2, b3, b4 }; + return [b0, b1, b2, b3, b4]; } } - [TC(typeof(EXP))] public struct ArrayOfBytes6 //array of 6 bytes + + [TC(typeof(EXP))] + public readonly struct ArrayOfBytes6 //array of 6 bytes { - public byte b0, b1, b2, b3, b4, b5; + public readonly byte b0, b1, b2, b3, b4, b5; public byte[] GetArray() { - return new[] { b0, b1, b2, b3, b4, b5 }; + return [b0, b1, b2, b3, b4, b5]; } } - [TC(typeof(EXP))] public struct ArrayOfBytes12 //array of 12 bytes + + [TC(typeof(EXP))] + public readonly struct ArrayOfBytes12 //array of 12 bytes { - public byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11; + public readonly byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11; public byte[] GetArray() { - return new[] { b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11 }; + return [b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11]; } } - [TC(typeof(EXP))] public struct ArrayOfChars64 //array of 64 chars (bytes) + + [TC(typeof(EXP))] + public readonly struct ArrayOfChars64 //array of 64 chars (bytes) { - public byte + public readonly byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49, b50, b51, b52, b53, b54, b55, b56, b57, b58, b59, b60, b61, b62, b63; + //public override readonly string ToString() + //{ + // byte[] bytes = + // { + // b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, + // b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, + // b40, b41, b42, b43, b44, b45, b46, b47, b48, b49, b50, b51, b52, b53, b54, b55, b56, b57, b58, b59, + // b60, b61, b62, b63 + // }; + // StringBuilder sb = new StringBuilder(); + // for (int i = 0; i < bytes.Length; i++) + // { + // if (bytes[i] == 0) + // break; + // sb.Append((char)bytes[i]); + // } + // return sb.ToString(); + //} + + public ReadOnlySpan GetBytes() + { + return MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(in this, 1)); + } + public override string ToString() { - byte[] bytes = + var byteArr = GetBytes(); + + var index = byteArr.IndexOf((byte)0); + + if (index == -1) { - b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, - b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, - b40, b41, b42, b43, b44, b45, b46, b47, b48, b49, b50, b51, b52, b53, b54, b55, b56, b57, b58, b59, - b60, b61, b62, b63 - }; - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < bytes.Length; i++) - { - if (bytes[i] == 0) break; - sb.Append((char)bytes[i]); + return Encoding.ASCII.GetString(byteArr); } - return sb.ToString(); + + return Encoding.ASCII.GetString(byteArr.Slice(0, index)); } } - [TC(typeof(EXP))] public struct MetaVECTOR3 //12 bytes, Key:2751397072 + [TC(typeof(EXP))] + public readonly struct MetaVECTOR3(in Vector3 v) //12 bytes, Key:2751397072 { - public float x { get; set; } //0 0: Float: 0: x - public float y { get; set; } //4 4: Float: 0: y - public float z { get; set; } //8 8: Float: 0: z + public float X { get; init; } = v.X; //0 0: Float: 0: x + public float Y { get; init; } = v.Y; //4 4: Float: 0: y + public float Z { get; init; } = v.Z; //8 8: Float: 0: z - public override string ToString() - { - return x.ToString() + ", " + y.ToString() + ", " + z.ToString(); - } - - public MetaVECTOR3(Vector3 v) - { - x = v.X; - y = v.Y; - z = v.Z; - } - - public Vector3 ToVector3() - { - return new Vector3(x, y, z); - } + public override string ToString() => $"{X}, {Y}, {Z}"; + public Vector3 ToVector3() => new Vector3(X, Y, Z); } - [TC(typeof(EXP))] public struct MetaPOINTER //8 bytes - pointer to data item //was: SectionUNKNOWN10 + [TC(typeof(EXP))] + public readonly record struct MetaPOINTER //8 bytes - pointer to data item //was: SectionUNKNOWN10 { - public ulong Pointer { get; set; } + public readonly ulong Pointer; - public int BlockIndex { get { return BlockID - 1; } } - public int BlockID { get { return (int)(Pointer & 0xFFF); } set { Pointer = (Pointer & 0xFFFFF000) + ((uint)value & 0xFFF); } } - public int Offset { get { return (int)((Pointer >> 12) & 0xFFFFF); } set { Pointer = (Pointer & 0xFFF) + (((uint)value << 12) & 0xFFFFF000); } } + public int BlockIndex => BlockID - 1; + public int BlockID => (int)(Pointer & 0xFFF); + public int Offset => (int)((Pointer >> 12) & 0xFFFFF); public MetaPOINTER(int blockID, int itemOffset) { Pointer = (((uint)itemOffset << 12) & 0xFFFFF000) + ((uint)blockID & 0xFFF); } - public override string ToString() - { - return BlockID.ToString() + ", " + Offset.ToString(); - } + public override string ToString() => $"{BlockID}, {Offset}"; } - - - - - - - - - - [TC(typeof(EXP))] public struct MetaHash : IEquatable + [TC(typeof(EXP))] + public readonly record struct MetaHash(uint Hash) : IEquatable { - public uint Hash { get; set; } - - public string Hex - { - get - { - return Hash.ToString("X").PadLeft(8, '0'); - } - } - - public float Float - { - get - { - return MetaTypes.ConvertData(MetaTypes.ConvertToBytes(Hash)); - } - } - - public short Short1 - { - get - { - return (short)(Hash & 0xFFFF); - } - } - public short Short2 - { - get - { - return (short)((Hash >> 16) & 0xFFFF); - } - } - - - public MetaHash(uint h) { Hash = h; } + public string Hex => Hash.ToString("X8"); + public float Float => MetaTypes.ConvertData(MetaTypes.ConvertToBytes(Hash)); + public short Short1 => (short)(Hash & 0xFFFF); + public short Short2 => (short)((Hash >> 16) & 0xFFFF); public override string ToString() { - var str = JenkIndex.TryGetString(Hash); - if (!string.IsNullOrEmpty(str)) return str; - if (MetaNames.TryGetString(Hash, out str)) return str; + if (JenkIndex.TryGetString(Hash, out var str)) + { + return str; + } + if (MetaNames.TryGetString(Hash, out str)) + { + return str; + } return GlobalText.GetString(Hash); } public string ToCleanString() { - if (Hash == 0) return string.Empty; + if (Hash == 0) + return string.Empty; return ToString(); } @@ -1327,51 +1168,17 @@ namespace CodeWalker.GameFiles return new MetaHash(v); } - public override readonly bool Equals(object obj) + public override int GetHashCode() { - if (obj == null) return false; - if (obj is not MetaHash metaHash) return false; - - return metaHash.Hash == Hash; - } - - public readonly bool Equals(MetaHash obj) - { - if (obj == null) return false; - - return obj.Hash == Hash; - } - - public override readonly int GetHashCode() - { - return (int)Hash; - } - - public static bool operator ==(MetaHash a, MetaHash b) - { - return a.Equals(b); - } - - public static bool operator !=(MetaHash a, MetaHash b) - { - return !a.Equals(b); + return Hash.GetHashCode(); } } - [TC(typeof(EXP))] public struct TextHash + [TC(typeof(EXP))] + public readonly record struct TextHash(uint Hash) { - public uint Hash { get; set; } - - public string Hex - { - get - { - return Hash.ToString("X"); - } - } - - public TextHash(uint h) { Hash = h; } + public string Hex => Hash.ToString("X"); public override string ToString() { @@ -1389,12 +1196,4 @@ namespace CodeWalker.GameFiles return new TextHash(v); } } - - - - - - - - } \ No newline at end of file diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs index 5e32ba7..9665830 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs @@ -10,7 +10,7 @@ namespace CodeWalker.GameFiles public class MetaBuilder { - List Blocks = new List(); + readonly List Blocks = new List(); int MaxBlockLength = 0x4000; //TODO: figure what this should be! @@ -31,16 +31,18 @@ namespace CodeWalker.GameFiles } public MetaBuilderBlock AddBlock(MetaName type) { - MetaBuilderBlock b = new MetaBuilderBlock(); - b.StructureNameHash = type; - b.Index = Blocks.Count; + MetaBuilderBlock b = new MetaBuilderBlock + { + StructureNameHash = type, + Index = Blocks.Count + }; Blocks.Add(b); return b; } - public MetaBuilderPointer AddItem(MetaName type, T item) where T : struct + public MetaBuilderPointer AddItem(MetaName type, in T item) where T : struct { - byte[] data = MetaTypes.ConvertToBytes(item); + byte[] data = MetaTypes.ConvertToBytes(in item); return AddItem(type, data); } @@ -56,11 +58,11 @@ namespace CodeWalker.GameFiles data = newdata; //make sure item size is multiple of 16... so pointers don't need sub offsets! } int idx = block.AddItem(data); - MetaBuilderPointer r = new MetaBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = (idx * data.Length); - r.Length = data.Length; - return r; + return new MetaBuilderPointer( + blockId: block.Index + 1, + offset: (idx * data.Length), + length: data.Length + ); } public MetaBuilderPointer AddItemArray(MetaName type, T[] items) where T : struct @@ -82,12 +84,13 @@ namespace CodeWalker.GameFiles byte[] newdata = new byte[newlen]; Buffer.BlockCopy(data, 0, newdata, 0, datalen); int offs = block.TotalSize; - int idx = block.AddItem(newdata); - MetaBuilderPointer r = new MetaBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = offs; //(idx * data.Length);; - r.Length = length; - return r; + _ = block.AddItem(newdata); + return new MetaBuilderPointer + ( + blockId: block.Index + 1, + offset: offs, //(idx * data.Length);; + length: length + ); } public MetaBuilderPointer AddString(string str) @@ -99,17 +102,18 @@ namespace CodeWalker.GameFiles byte[] newdata = new byte[newlen]; Buffer.BlockCopy(data, 0, newdata, 0, datalen); int offs = block.TotalSize; - int idx = block.AddItem(newdata); - MetaBuilderPointer r = new MetaBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = offs;// (idx * data.Length); - r.Length = datalen; //actual length of string. (not incl null terminator) - return r; + _ = block.AddItem(newdata); + return new MetaBuilderPointer + ( + blockId: block.Index + 1, + offset: offs,// (idx * data.Length); + length: datalen //actual length of string. (not incl null terminator) + ); } - public MetaPOINTER AddItemPtr(MetaName type, T item) where T : struct //helper method for AddItem + public MetaPOINTER AddItemPtr(MetaName type, in T item) where T : struct //helper method for AddItem { - var ptr = AddItem(type, item); + var ptr = AddItem(type, in item); return new MetaPOINTER(ptr.BlockID, ptr.Offset); } @@ -121,14 +125,16 @@ namespace CodeWalker.GameFiles public Array_Structure AddItemArrayPtr(MetaName type, T[] items) where T : struct //helper method for AddItemArray { - if ((items == null) || (items.Length == 0)) return new Array_Structure(); + if (items is null || items.Length == 0) + return new Array_Structure(); var ptr = AddItemArray(type, items); return new Array_Structure(ptr); } public Array_Structure AddItemArrayPtr(MetaName type, byte[][] data) //helper method for AddItemArray { - if ((data == null) || (data.Length == 0)) return new Array_Structure(); + if ((data?.Length ?? 0) == 0) + return new Array_Structure(); int len = 0; @@ -153,40 +159,43 @@ namespace CodeWalker.GameFiles public Array_Vector3 AddPaddedVector3ArrayPtr(Vector4[] items) { - if (items == null || items.Length == 0) + if ((items?.Length ?? 0) == 0) return new Array_Vector3(); var ptr = AddItemArray((MetaName)MetaTypeName.VECTOR4, items); //padded to vec4... return new Array_Vector3(ptr); } public Array_uint AddHashArrayPtr(MetaHash[] items) { - if (items == null || items.Length == 0) + if ((items?.Length ?? 0) == 0) return new Array_uint(); var ptr = AddItemArray((MetaName)MetaTypeName.HASH, items); return new Array_uint(ptr); } public Array_uint AddUintArrayPtr(uint[] items) { - if (items == null || items.Length == 0) + if ((items?.Length ?? 0) == 0) return new Array_uint(); var ptr = AddItemArray((MetaName)MetaTypeName.UINT, items); return new Array_uint(ptr); } public Array_ushort AddUshortArrayPtr(ushort[] items) { - if ((items == null) || (items.Length == 0)) return new Array_ushort(); + if ((items?.Length ?? 0) == 0) + return new Array_ushort(); var ptr = AddItemArray((MetaName)MetaTypeName.USHORT, items); return new Array_ushort(ptr); } public Array_byte AddByteArrayPtr(byte[] items) { - if ((items == null) || (items.Length == 0)) return new Array_byte(); + if ((items?.Length ?? 0) == 0) + return new Array_byte(); var ptr = AddItemArray((MetaName)MetaTypeName.BYTE, items); return new Array_byte(ptr); } public Array_float AddFloatArrayPtr(float[] items) { - if ((items == null) || (items.Length == 0)) return new Array_float(); + if ((items?.Length ?? 0) == 0) + return new Array_float(); var ptr = AddItemArray((MetaName)MetaTypeName.FLOAT, items); return new Array_float(ptr); } @@ -199,55 +208,45 @@ namespace CodeWalker.GameFiles { var block = AddBlock(type); int offs = block.TotalSize;//should always be 0... - int idx = block.AddItem(data); + _ = block.AddItem(data); var ptr = new DataBlockPointer(block.Index + 1, offs); return ptr; } - public Array_StructurePointer AddPointerArray(MetaPOINTER[] arr) + public Array_StructurePointer AddPointerArray(MetaPOINTER[]? arr) { - if ((arr == null) || (arr.Length == 0)) return new Array_StructurePointer(); + if (arr is null || arr.Length == 0) + return new Array_StructurePointer(); + var ptr = AddItemArray((MetaName)MetaTypeName.POINTER, arr); - Array_StructurePointer sp = new Array_StructurePointer(); - sp.Count1 = (ushort)arr.Length; - sp.Count2 = sp.Count1; - sp.Pointer = ptr.Pointer; + Array_StructurePointer sp = new Array_StructurePointer { + Count1 = (ushort)arr.Length, + Count2 = (ushort)arr.Length, + Pointer = ptr.Pointer, + }; return sp; } - public Array_StructurePointer AddItemPointerArrayPtr(MetaName type, T[] items) where T : struct + public Array_StructurePointer AddItemPointerArrayPtr(MetaName type, T[]? items) where T : struct { //helper method for creating a pointer array - if ((items == null) || (items.Length == 0)) return new Array_StructurePointer(); + if (items is null || items.Length == 0) + return new Array_StructurePointer(); MetaPOINTER[] ptrs = new MetaPOINTER[items.Length]; for (int i = 0; i < items.Length; i++) { - ptrs[i] = AddItemPtr(type, items[i]); + ptrs[i] = AddItemPtr(type, in items[i]); } return AddPointerArray(ptrs); - - //Array_StructurePointer sp = new Array_StructurePointer(); - //sp.Count1 = (ushort)items.Length; - //sp.Count2 = sp.Count1; - //for (int i = 0; i < items.Length; i++) - //{ - // var item = items[i]; - // var meptr = AddItemPtr(type, item); - // var mptr = AddItem((MetaName)MetaTypeName.POINTER, meptr); - // if (i == 0) - // { - // sp.Pointer = mptr.Pointer; //main pointer points to the first item. - // } - //} - //return sp; } - public Array_StructurePointer AddWrapperArrayPtr(MetaWrapper[] items) + public Array_StructurePointer AddWrapperArrayPtr(MetaWrapper[]? items) { - if ((items == null) || (items.Length == 0)) return new Array_StructurePointer(); + if (items is null || items.Length == 0) + return new Array_StructurePointer(); MetaPOINTER[] ptrs = new MetaPOINTER[items.Length]; @@ -256,43 +255,31 @@ namespace CodeWalker.GameFiles ptrs[i] = items[i].Save(this); } return AddPointerArray(ptrs); - - //Array_StructurePointer sp = new Array_StructurePointer(); - //sp.Count1 = (ushort)items.Length; - //sp.Count2 = sp.Count1; - //for (int i = 0; i < items.Length; i++) - //{ - // var item = items[i]; - // var meptr = item.Save(this); - // var mptr = AddItem((MetaName)MetaTypeName.POINTER, meptr); - // if (i == 0) - // { - // sp.Pointer = mptr.Pointer; //main pointer points to the first item. - // } - //} - //return sp; } - public Array_Structure AddWrapperArray(MetaWrapper[] items) + public Array_Structure AddWrapperArray(MetaWrapper[]? items) { - if ((items == null) || (items.Length == 0)) return new Array_Structure(); + if (items is null || items.Length == 0) + return new Array_Structure(); - var sa = new Array_Structure(); - sa.Count1 = (ushort)items.Length; - sa.Count2 = sa.Count1; + var pointer = 0UL; for (int i = 0; i < items.Length; i++) { var item = items[i]; var meptr = item.Save(this); if (i == 0) { - MetaBuilderPointer mbp = new MetaBuilderPointer(); - mbp.BlockID = meptr.BlockID; - mbp.Offset = meptr.Offset; - sa.Pointer = mbp.Pointer; + MetaBuilderPointer mbp = new MetaBuilderPointer(meptr.BlockID, meptr.Offset, 0); + pointer = mbp.Pointer; } } - return sa; + + return new Array_Structure + { + Count1 = (ushort)items.Length, + Count2 = (ushort)items.Length, + Pointer = pointer, + }; } @@ -315,15 +302,13 @@ namespace CodeWalker.GameFiles offset += bdata.Length; } } - if (offset != data.Length) - { } return data; } - Dictionary StructureInfos = new Dictionary(); - Dictionary EnumInfos = new Dictionary(); + readonly Dictionary StructureInfos = new Dictionary(); + readonly Dictionary EnumInfos = new Dictionary(); public void AddStructureInfo(MetaName name) { @@ -363,11 +348,7 @@ namespace CodeWalker.GameFiles if (StructureInfos.Count > 0) { - m.StructureInfos = new ResourceSimpleArray(); - foreach (var si in StructureInfos.Values) - { - m.StructureInfos.Add(si); - } + m.StructureInfos = new ResourceSimpleArray(StructureInfos.Values); m.StructureInfosCount = (short)m.StructureInfos.Count; } else @@ -378,11 +359,7 @@ namespace CodeWalker.GameFiles if (EnumInfos.Count > 0) { - m.EnumInfos = new ResourceSimpleArray(); - foreach (var ei in EnumInfos.Values) - { - m.EnumInfos.Add(ei); - } + m.EnumInfos = new ResourceSimpleArray(EnumInfos.Values); m.EnumInfosCount = (short)m.EnumInfos.Count; } else @@ -431,9 +408,10 @@ namespace CodeWalker.GameFiles } - public MetaDataBlock GetMetaDataBlock() + public MetaDataBlock? GetMetaDataBlock() { - if (TotalSize <= 0) return null; + if (TotalSize <= 0) + return null; byte[] data = new byte[TotalSize]; int offset = 0; @@ -455,12 +433,12 @@ namespace CodeWalker.GameFiles } - public struct MetaBuilderPointer + public readonly struct MetaBuilderPointer(int blockId, int offset, int length) { - public int BlockID { get; set; } //1-based id - public int Offset { get; set; } //byte offset - public int Length { get; set; } //for temp use... - public uint Pointer + public int BlockID { get; init; } = blockId; //1-based id + public int Offset { get; init; } = offset; //byte offset + public int Length { get; init; } = length; //for temp use... + public readonly uint Pointer { get { diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs index d0de3f1..0b35a27 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -11,21 +13,46 @@ namespace CodeWalker.GameFiles public static class MetaNames { - public static ConcurrentDictionary stringCache = new ConcurrentDictionary(); - public static bool TryGetString(uint h, out string str) + public static ConcurrentDictionary? stringCache = null; + + [MethodImpl(MethodImplOptions.Synchronized)] + [MemberNotNull(nameof(stringCache))] + public static void InitializeCache() { + if (stringCache is not null) + { + return; + } + var values = Enum.GetValues(); + var names = Enum.GetNames(); + + stringCache = new ConcurrentDictionary(Environment.ProcessorCount, names.Length); + + for (int i = 0; i < values.Length; i++) + { + var str = names[i]; + + if (str?.StartsWith('@') ?? false) + { + str = str.Substring(1); + } + + stringCache.TryAdd((uint)values[i], str); + } + } + + public static bool TryGetString(uint h, [MaybeNullWhen(false)] out string str) + { + if (stringCache is null) + { + InitializeCache(); + } + if (stringCache.TryGetValue(h, out str)) { - return str != null; + return str is not null; } - if (Enum.IsDefined(typeof(MetaName), h)) - { - str = ((MetaName)h).ToString(); - if (str.StartsWith("@")) str = str.Substring(1); //mainly to handle the @null entry - stringCache.TryAdd(h, str); - return true; - } - stringCache.TryAdd(h, str); + str = null; return false; } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs index 9941ff5..3bd10ba 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs @@ -12,11 +12,22 @@ using EXP = System.ComponentModel.ExpandableObjectConverter; using CodeWalker.World; using System.Reflection; using System.Threading; +using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; +using System.Buffers.Binary; +using System.Buffers; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; +using CommunityToolkit.HighPerformance.Buffers; +using CommunityToolkit.Diagnostics; +using static System.Runtime.InteropServices.JavaScript.JSType; +using CodeWalker.Core.Utils; namespace CodeWalker.GameFiles { //this is a helper class for parsing the data. + [SkipLocalsInit] public static class MetaTypes { @@ -32,7 +43,7 @@ namespace CodeWalker.GameFiles public static void EnsureMetaTypes(Meta meta) { - if (meta.EnumInfos != null) + if (meta.EnumInfos is not null) { foreach (MetaEnumInfo mei in meta.EnumInfos) { @@ -51,7 +62,7 @@ namespace CodeWalker.GameFiles } } - if (meta.StructureInfos != null) + if (meta.StructureInfos is not null) { foreach (MetaStructureInfo msi in meta.StructureInfos) { @@ -76,15 +87,17 @@ namespace CodeWalker.GameFiles { //returns true if they are the same. - if (a.Entries.Length != b.Entries.Length) + var aEntries = a.Entries; + var bEntries = b.Entries; + if (aEntries.Length != bEntries.Length) { return false; } - for (int i = 0; i < a.Entries.Length; i++) + for (int i = 0; i < aEntries.Length; i++) { - if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || - (a.Entries[i].EntryValue != b.Entries[i].EntryValue)) + if ((aEntries[i].EntryNameHash != bEntries[i].EntryNameHash) || + (aEntries[i].EntryValue != bEntries[i].EntryValue)) { return false; } @@ -96,16 +109,19 @@ namespace CodeWalker.GameFiles { //returns true if they are the same. - if (a.Entries.Length != b.Entries.Length) + var aEntries = a.Entries; + var bEntries = b.Entries; + + if (aEntries.Length != bEntries.Length) { return false; } - for (int i = 0; i < a.Entries.Length; i++) + for (int i = 0; i < aEntries.Length; i++) { - if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || - (a.Entries[i].DataOffset != b.Entries[i].DataOffset) || - (a.Entries[i].DataType != b.Entries[i].DataType)) + if ((aEntries[i].EntryNameHash != bEntries[i].EntryNameHash) || + (aEntries[i].DataOffset != bEntries[i].DataOffset) || + (aEntries[i].DataType != bEntries[i].DataType)) { return false; } @@ -247,7 +263,7 @@ namespace CodeWalker.GameFiles private static void AddStructureInfoString(MetaStructureInfo si, StringBuilder sb) { var ns = GetMetaNameString(si.StructureNameHash); - sb.AppendFormat("case " + ns + ":"); + sb.AppendFormat("case " + ns + ':'); sb.AppendLine(); sb.AppendFormat("return new MetaStructureInfo({0}, {1}, {2}, {3},", ns, si.StructureKey, si.Unknown_8h, si.StructureSize); sb.AppendLine(); @@ -260,7 +276,7 @@ namespace CodeWalker.GameFiles refkey = GetMetaNameString(e.ReferenceKey); } sb.AppendFormat(" new MetaStructureEntryInfo_s({0}, {1}, MetaStructureEntryDataType.{2}, {3}, {4}, {5})", GetMetaNameString(e.EntryNameHash), e.DataOffset, e.DataType, e.Unknown_9h, e.ReferenceTypeIndex, refkey); - if (i < si.Entries.Length - 1) sb.Append(","); + if (i < si.Entries.Length - 1) sb.Append(','); sb.AppendLine(); } sb.AppendFormat(");"); @@ -269,7 +285,7 @@ namespace CodeWalker.GameFiles private static void AddEnumInfoString(MetaEnumInfo ei, StringBuilder sb) { var ns = GetMetaNameString(ei.EnumNameHash); - sb.AppendFormat("case " + ns + ":"); + sb.AppendFormat("case " + ns + ':'); sb.AppendLine(); sb.AppendFormat("return new MetaEnumInfo({0}, {1},", ns, ei.EnumKey); sb.AppendLine(); @@ -277,7 +293,7 @@ namespace CodeWalker.GameFiles { var e = ei.Entries[i]; sb.AppendFormat(" new MetaEnumEntryInfo_s({0}, {1})", GetMetaNameString(e.EntryNameHash), e.EntryValue); - if (i < ei.Entries.Length - 1) sb.Append(","); + if (i < ei.Entries.Length - 1) sb.Append(','); sb.AppendLine(); } sb.AppendFormat(");"); @@ -296,166 +312,151 @@ namespace CodeWalker.GameFiles } - public static MetaStructureInfo GetStructureInfo(MetaName name) + public static MetaStructureInfo? GetStructureInfo(MetaName name) { //to generate structinfos - switch (name) + return name switch { - case MetaName.CScenarioPointContainer: - return new MetaStructureInfo(MetaName.CScenarioPointContainer, 2489654897, 768, 48, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), - new MetaStructureEntryInfo_s(MetaName.LoadSavePoints, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPoint), - new MetaStructureEntryInfo_s(MetaName.MyPoints, 16, MetaStructureEntryDataType.Array, 0, 2, 0) - ); - case MetaName.CScenarioChainingGraph: - return new MetaStructureInfo(MetaName.CScenarioChainingGraph, 88255871, 768, 88, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingNode), - new MetaStructureEntryInfo_s(MetaName.Nodes, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingEdge), - new MetaStructureEntryInfo_s(MetaName.Edges, 16, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChain), - new MetaStructureEntryInfo_s(MetaName.Chains, 32, MetaStructureEntryDataType.Array, 0, 4, 0) - ); - case MetaName.rage__spdGrid2D: - return new MetaStructureInfo(MetaName.rage__spdGrid2D, 894636096, 768, 64, - new MetaStructureEntryInfo_s(MetaName.MinCellX, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.MaxCellX, 16, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.MinCellY, 20, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.MaxCellY, 24, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CellDimX, 44, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CellDimY, 48, MetaStructureEntryDataType.Float, 0, 0, 0) - ); - case MetaName.CScenarioPointLookUps: - return new MetaStructureInfo(MetaName.CScenarioPointLookUps, 2669361587, 768, 96, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.TypeNames, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.PedModelSetNames, 16, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.VehicleModelSetNames, 32, MetaStructureEntryDataType.Array, 0, 4, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.GroupNames, 48, MetaStructureEntryDataType.Array, 0, 6, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.InteriorNames, 64, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.RequiredIMapNames, 80, MetaStructureEntryDataType.Array, 0, 10, 0) - ); - case MetaName.CScenarioPointRegion: - return new MetaStructureInfo(MetaName.CScenarioPointRegion, 3501351821, 768, 376, - new MetaStructureEntryInfo_s(MetaName.VersionNumber, 0, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Points, 8, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointContainer), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioEntityOverride), - new MetaStructureEntryInfo_s(MetaName.EntityOverrides, 72, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.ChainingGraph, 96, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingGraph), - new MetaStructureEntryInfo_s(MetaName.AccelGrid, 184, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdGrid2D), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)3844724227, 248, MetaStructureEntryDataType.Array, 0, 6, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointCluster), - new MetaStructureEntryInfo_s(MetaName.Clusters, 264, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s(MetaName.LookUps, 280, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointLookUps) - ); - case MetaName.CScenarioPoint: - return new MetaStructureInfo(MetaName.CScenarioPoint, 402442150, 1024, 64, - new MetaStructureEntryInfo_s(MetaName.iType, 21, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ModelSetId, 22, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iInterior, 23, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iRequiredIMapId, 24, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iProbability, 25, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.uAvailableInMpSp, 26, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iTimeStartOverride, 27, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iTimeEndOverride, 28, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iRadius, 29, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iTimeTillPedLeaves, 30, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iScenarioGroup, 32, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Flags, 36, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), - new MetaStructureEntryInfo_s(MetaName.vPositionAndDirection, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) - ); - case MetaName.CScenarioEntityOverride: - return new MetaStructureInfo(MetaName.CScenarioEntityOverride, 1271200492, 1024, 80, - new MetaStructureEntryInfo_s(MetaName.EntityPosition, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.EntityType, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), - new MetaStructureEntryInfo_s(MetaName.ScenarioPoints, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.EntityMayNotAlwaysExist, 64, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.SpecificallyPreventArtPoints, 65, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CExtensionDefSpawnPoint: - return new MetaStructureInfo(MetaName.CExtensionDefSpawnPoint, 3077340721, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.spawnType, 48, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.pedType, 52, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.group, 56, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.interior, 60, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.requiredImap, 64, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.availableInMpSp, 68, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CSpawnPoint__AvailabilityMpSp), - new MetaStructureEntryInfo_s(MetaName.probability, 72, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.timeTillPedLeaves, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.radius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.start, 84, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.end, 85, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 88, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), - new MetaStructureEntryInfo_s(MetaName.highPri, 92, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extendedRange, 93, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.shortRange, 94, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CScenarioChainingNode: - return new MetaStructureInfo(MetaName.CScenarioChainingNode, 1811784424, 1024, 32, - new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)2602393771, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ScenarioType, 20, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.HasIncomingEdges, 24, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.HasOutgoingEdges, 25, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CScenarioChainingEdge: - return new MetaStructureInfo(MetaName.CScenarioChainingEdge, 2004985940, 256, 8, - new MetaStructureEntryInfo_s(MetaName.NodeIndexFrom, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.NodeIndexTo, 2, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Action, 4, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eAction), - new MetaStructureEntryInfo_s(MetaName.NavMode, 5, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eNavMode), - new MetaStructureEntryInfo_s(MetaName.NavSpeed, 6, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eNavSpeed) - ); - case MetaName.CScenarioChain: - return new MetaStructureInfo(MetaName.CScenarioChain, 2751910366, 768, 40, - new MetaStructureEntryInfo_s((MetaName)1156691834, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.EdgeIds, 8, MetaStructureEntryDataType.Array, 0, 1, 0) - ); - case MetaName.rage__spdSphere: - return new MetaStructureInfo(MetaName.rage__spdSphere, 1189037266, 1024, 16, - new MetaStructureEntryInfo_s(MetaName.centerAndRadius, 0, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) - ); - case MetaName.CScenarioPointCluster: - return new MetaStructureInfo(MetaName.CScenarioPointCluster, 3622480419, 1024, 80, - new MetaStructureEntryInfo_s(MetaName.Points, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointContainer), - new MetaStructureEntryInfo_s(MetaName.ClusterSphere, 48, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdSphere), - new MetaStructureEntryInfo_s((MetaName)1095875445, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)3129415068, 68, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CStreamingRequestRecord: - return new MetaStructureInfo(MetaName.CStreamingRequestRecord, 3825587854, 768, 40, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CStreamingRequestFrame), - new MetaStructureEntryInfo_s(MetaName.Frames, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CStreamingRequestCommonSet), - new MetaStructureEntryInfo_s(MetaName.CommonSets, 16, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.NewStyle, 32, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CStreamingRequestFrame: - return new MetaStructureInfo(MetaName.CStreamingRequestFrame, 1112444512, 1024, 112, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.AddList, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.RemoveList, 16, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)896120921, 32, MetaStructureEntryDataType.Array, 0, 4, 0), - new MetaStructureEntryInfo_s(MetaName.CamPos, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CamDir, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)1762439591, 80, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s(MetaName.Flags, 96, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); + MetaName.CScenarioPointContainer => new MetaStructureInfo(MetaName.CScenarioPointContainer, 2489654897, 768, 48, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), + new MetaStructureEntryInfo_s(MetaName.LoadSavePoints, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPoint), + new MetaStructureEntryInfo_s(MetaName.MyPoints, 16, MetaStructureEntryDataType.Array, 0, 2, 0) + ), + MetaName.CScenarioChainingGraph => new MetaStructureInfo(MetaName.CScenarioChainingGraph, 88255871, 768, 88, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingNode), + new MetaStructureEntryInfo_s(MetaName.Nodes, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingEdge), + new MetaStructureEntryInfo_s(MetaName.Edges, 16, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChain), + new MetaStructureEntryInfo_s(MetaName.Chains, 32, MetaStructureEntryDataType.Array, 0, 4, 0) + ), + MetaName.rage__spdGrid2D => new MetaStructureInfo(MetaName.rage__spdGrid2D, 894636096, 768, 64, + new MetaStructureEntryInfo_s(MetaName.MinCellX, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.MaxCellX, 16, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.MinCellY, 20, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.MaxCellY, 24, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CellDimX, 44, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CellDimY, 48, MetaStructureEntryDataType.Float, 0, 0, 0) + ), + MetaName.CScenarioPointLookUps => new MetaStructureInfo(MetaName.CScenarioPointLookUps, 2669361587, 768, 96, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.TypeNames, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.PedModelSetNames, 16, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.VehicleModelSetNames, 32, MetaStructureEntryDataType.Array, 0, 4, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.GroupNames, 48, MetaStructureEntryDataType.Array, 0, 6, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.InteriorNames, 64, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.RequiredIMapNames, 80, MetaStructureEntryDataType.Array, 0, 10, 0) + ), + MetaName.CScenarioPointRegion => new MetaStructureInfo(MetaName.CScenarioPointRegion, 3501351821, 768, 376, + new MetaStructureEntryInfo_s(MetaName.VersionNumber, 0, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Points, 8, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointContainer), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioEntityOverride), + new MetaStructureEntryInfo_s(MetaName.EntityOverrides, 72, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.ChainingGraph, 96, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioChainingGraph), + new MetaStructureEntryInfo_s(MetaName.AccelGrid, 184, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdGrid2D), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)3844724227, 248, MetaStructureEntryDataType.Array, 0, 6, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointCluster), + new MetaStructureEntryInfo_s(MetaName.Clusters, 264, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s(MetaName.LookUps, 280, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointLookUps) + ), + MetaName.CScenarioPoint => new MetaStructureInfo(MetaName.CScenarioPoint, 402442150, 1024, 64, + new MetaStructureEntryInfo_s(MetaName.iType, 21, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ModelSetId, 22, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iInterior, 23, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iRequiredIMapId, 24, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iProbability, 25, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.uAvailableInMpSp, 26, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iTimeStartOverride, 27, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iTimeEndOverride, 28, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iRadius, 29, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iTimeTillPedLeaves, 30, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iScenarioGroup, 32, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Flags, 36, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), + new MetaStructureEntryInfo_s(MetaName.vPositionAndDirection, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) + ), + MetaName.CScenarioEntityOverride => new MetaStructureInfo(MetaName.CScenarioEntityOverride, 1271200492, 1024, 80, + new MetaStructureEntryInfo_s(MetaName.EntityPosition, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.EntityType, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), + new MetaStructureEntryInfo_s(MetaName.ScenarioPoints, 24, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.EntityMayNotAlwaysExist, 64, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.SpecificallyPreventArtPoints, 65, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CExtensionDefSpawnPoint => new MetaStructureInfo(MetaName.CExtensionDefSpawnPoint, 3077340721, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.spawnType, 48, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.pedType, 52, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.group, 56, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.interior, 60, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.requiredImap, 64, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.availableInMpSp, 68, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CSpawnPoint__AvailabilityMpSp), + new MetaStructureEntryInfo_s(MetaName.probability, 72, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.timeTillPedLeaves, 76, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.radius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.start, 84, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.end, 85, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 88, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), + new MetaStructureEntryInfo_s(MetaName.highPri, 92, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extendedRange, 93, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.shortRange, 94, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CScenarioChainingNode => new MetaStructureInfo(MetaName.CScenarioChainingNode, 1811784424, 1024, 32, + new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)2602393771, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ScenarioType, 20, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.HasIncomingEdges, 24, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.HasOutgoingEdges, 25, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CScenarioChainingEdge => new MetaStructureInfo(MetaName.CScenarioChainingEdge, 2004985940, 256, 8, + new MetaStructureEntryInfo_s(MetaName.NodeIndexFrom, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.NodeIndexTo, 2, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Action, 4, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eAction), + new MetaStructureEntryInfo_s(MetaName.NavMode, 5, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eNavMode), + new MetaStructureEntryInfo_s(MetaName.NavSpeed, 6, MetaStructureEntryDataType.ByteEnum, 0, 0, MetaName.CScenarioChainingEdge__eNavSpeed) + ), + MetaName.CScenarioChain => new MetaStructureInfo(MetaName.CScenarioChain, 2751910366, 768, 40, + new MetaStructureEntryInfo_s((MetaName)1156691834, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.EdgeIds, 8, MetaStructureEntryDataType.Array, 0, 1, 0) + ), + MetaName.rage__spdSphere => new MetaStructureInfo(MetaName.rage__spdSphere, 1189037266, 1024, 16, + new MetaStructureEntryInfo_s(MetaName.centerAndRadius, 0, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) + ), + MetaName.CScenarioPointCluster => new MetaStructureInfo(MetaName.CScenarioPointCluster, 3622480419, 1024, 80, + new MetaStructureEntryInfo_s(MetaName.Points, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CScenarioPointContainer), + new MetaStructureEntryInfo_s(MetaName.ClusterSphere, 48, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdSphere), + new MetaStructureEntryInfo_s((MetaName)1095875445, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)3129415068, 68, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CStreamingRequestRecord => new MetaStructureInfo(MetaName.CStreamingRequestRecord, 3825587854, 768, 40, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CStreamingRequestFrame), + new MetaStructureEntryInfo_s(MetaName.Frames, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CStreamingRequestCommonSet), + new MetaStructureEntryInfo_s(MetaName.CommonSets, 16, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.NewStyle, 32, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CStreamingRequestFrame => new MetaStructureInfo(MetaName.CStreamingRequestFrame, 1112444512, 1024, 112, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.AddList, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.RemoveList, 16, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)896120921, 32, MetaStructureEntryDataType.Array, 0, 4, 0), + new MetaStructureEntryInfo_s(MetaName.CamPos, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CamDir, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)1762439591, 80, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s(MetaName.Flags, 96, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), //case MetaName.CStreamingRequestFrame: // return new MetaStructureInfo(MetaName.CStreamingRequestFrame, 3672937465, 1024, 96, // new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), @@ -468,43 +469,40 @@ namespace CodeWalker.GameFiles // new MetaStructureEntryInfo_s((MetaName)1762439591, 64, MetaStructureEntryDataType.Array, 0, 6, 0), // new MetaStructureEntryInfo_s(MetaName.Flags, 80, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) // ); - case MetaName.CStreamingRequestCommonSet: - return new MetaStructureInfo(MetaName.CStreamingRequestCommonSet, 3710200606, 768, 16, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Requests, 0, MetaStructureEntryDataType.Array, 0, 0, 0) - ); - case MetaName.CMapTypes: - return new MetaStructureInfo(MetaName.CMapTypes, 2608875220, 768, 80, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 8, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.archetypes, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.name, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.dependencies, 48, MetaStructureEntryDataType.Array, 0, 5, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompositeEntityType), - new MetaStructureEntryInfo_s(MetaName.compositeEntityTypes, 64, MetaStructureEntryDataType.Array, 0, 7, 0) - ); - case MetaName.CBaseArchetypeDef: - return new MetaStructureInfo(MetaName.CBaseArchetypeDef, 2411387556, 1024, 144, - new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), - new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0) - ); + MetaName.CStreamingRequestCommonSet => new MetaStructureInfo(MetaName.CStreamingRequestCommonSet, 3710200606, 768, 16, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Requests, 0, MetaStructureEntryDataType.Array, 0, 0, 0) + ), + MetaName.CMapTypes => new MetaStructureInfo(MetaName.CMapTypes, 2608875220, 768, 80, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 8, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.archetypes, 24, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.name, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.dependencies, 48, MetaStructureEntryDataType.Array, 0, 5, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompositeEntityType), + new MetaStructureEntryInfo_s(MetaName.compositeEntityTypes, 64, MetaStructureEntryDataType.Array, 0, 7, 0) + ), + MetaName.CBaseArchetypeDef => new MetaStructureInfo(MetaName.CBaseArchetypeDef, 2411387556, 1024, 144, + new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), + new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0) + ), //case MetaName.CBaseArchetypeDef: // return new MetaStructureInfo(MetaName.CBaseArchetypeDef, 2352343492, 1024, 128, // new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), @@ -523,896 +521,822 @@ namespace CodeWalker.GameFiles // new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), // new MetaStructureEntryInfo_s(MetaName.extensions, 112, MetaStructureEntryDataType.Array, 0, 13, 0) // ); - case MetaName.CCreatureMetaData: - return new MetaStructureInfo(MetaName.CCreatureMetaData, 2181653572, 768, 56, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CShaderVariableComponent), - new MetaStructureEntryInfo_s(MetaName.shaderVariableComponents, 8, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropExpressionData), - new MetaStructureEntryInfo_s(MetaName.pedPropExpressions, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedCompExpressionData), - new MetaStructureEntryInfo_s(MetaName.pedCompExpressions, 40, MetaStructureEntryDataType.Array, 0, 4, 0) - ); - case MetaName.CShaderVariableComponent: - return new MetaStructureInfo(MetaName.CShaderVariableComponent, 3085831725, 768, 72, - new MetaStructureEntryInfo_s(MetaName.pedcompID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.maskID, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.shaderVariableHashString, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.components, 56, MetaStructureEntryDataType.Array, 0, 7, 0) - ); - case MetaName.CPedPropExpressionData: - return new MetaStructureInfo(MetaName.CPedPropExpressionData, 1355135810, 768, 88, - new MetaStructureEntryInfo_s(MetaName.pedPropID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.pedPropVarIndex, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.pedPropExpressionIndex, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.types, 56, MetaStructureEntryDataType.Array, 0, 7, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.components, 72, MetaStructureEntryDataType.Array, 0, 9, 0) - ); - case MetaName.CPedCompExpressionData: - return new MetaStructureInfo(MetaName.CPedCompExpressionData, 3458164745, 768, 88, - new MetaStructureEntryInfo_s(MetaName.pedCompID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.pedCompVarIndex, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.pedCompExpressionIndex, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.types, 56, MetaStructureEntryDataType.Array, 0, 7, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.components, 72, MetaStructureEntryDataType.Array, 0, 9, 0) - ); - case MetaName.rage__fwInstancedMapData: - return new MetaStructureInfo(MetaName.rage__fwInstancedMapData, 1836780118, 768, 48, - new MetaStructureEntryInfo_s(MetaName.ImapLink, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwPropInstanceListDef), - new MetaStructureEntryInfo_s(MetaName.PropInstanceList, 16, MetaStructureEntryDataType.Array, 0, 1, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwGrassInstanceListDef), - new MetaStructureEntryInfo_s(MetaName.GrassInstanceList, 32, MetaStructureEntryDataType.Array, 0, 3, 0) - ); - case MetaName.CLODLight: - return new MetaStructureInfo(MetaName.CLODLight, 2325189228, 768, 136, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.FloatXYZ), - new MetaStructureEntryInfo_s(MetaName.direction, 8, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.falloff, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.falloffExponent, 40, MetaStructureEntryDataType.Array, 0, 4, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.timeAndStateFlags, 56, MetaStructureEntryDataType.Array, 0, 6, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.hash, 72, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coneInnerAngle, 88, MetaStructureEntryDataType.Array, 0, 10, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coneOuterAngleOrCapExt, 104, MetaStructureEntryDataType.Array, 0, 12, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coronaIntensity, 120, MetaStructureEntryDataType.Array, 0, 14, 0) - ); - case MetaName.CDistantLODLight: - return new MetaStructureInfo(MetaName.CDistantLODLight, 2820908419, 768, 48, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.FloatXYZ), - new MetaStructureEntryInfo_s(MetaName.position, 8, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.RGBI, 24, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.numStreetLights, 40, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.category, 42, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0) - ); - case MetaName.CBlockDesc: - return new MetaStructureInfo(MetaName.CBlockDesc, 2015795449, 768, 72, - new MetaStructureEntryInfo_s(MetaName.version, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 4, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.exportedBy, 24, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.owner, 40, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.time, 56, MetaStructureEntryDataType.CharPointer, 0, 0, 0) - ); - case MetaName.CMapData: - return new MetaStructureInfo(MetaName.CMapData, 3448101671, 1024, 512, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.parent, 12, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.contentFlags, 20, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.streamingExtentsMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.streamingExtentsMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.entitiesExtentsMin, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.entitiesExtentsMax, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.entities, 96, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwContainerLodDef), - new MetaStructureEntryInfo_s(MetaName.containerLods, 112, MetaStructureEntryDataType.Array, 0, 10, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.BoxOccluder), - new MetaStructureEntryInfo_s(MetaName.boxOccluders, 128, MetaStructureEntryDataType.Array, 4, 12, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.OccludeModel), - new MetaStructureEntryInfo_s(MetaName.occludeModels, 144, MetaStructureEntryDataType.Array, 4, 14, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.physicsDictionaries, 160, MetaStructureEntryDataType.Array, 0, 16, 0), - new MetaStructureEntryInfo_s(MetaName.instancedData, 176, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwInstancedMapData), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CTimeCycleModifier), - new MetaStructureEntryInfo_s(MetaName.timeCycleModifiers, 224, MetaStructureEntryDataType.Array, 0, 19, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCarGen), - new MetaStructureEntryInfo_s(MetaName.carGenerators, 240, MetaStructureEntryDataType.Array, 0, 21, 0), - new MetaStructureEntryInfo_s(MetaName.LODLightsSOA, 256, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CLODLight), - new MetaStructureEntryInfo_s(MetaName.DistantLODLightsSOA, 392, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CDistantLODLight), - new MetaStructureEntryInfo_s(MetaName.block, 440, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CBlockDesc) - ); - case MetaName.CEntityDef: - return new MetaStructureInfo(MetaName.CEntityDef, 1825799514, 1024, 128, - new MetaStructureEntryInfo_s(MetaName.archetypeName, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.guid, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.rotation, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scaleXY, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scaleZ, 68, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.parentIndex, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lodDist, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.childLodDist, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lodLevel, 84, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__eLodType), - new MetaStructureEntryInfo_s(MetaName.numChildren, 88, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.priorityLevel, 92, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__ePriorityLevel), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 96, MetaStructureEntryDataType.Array, 0, 13, 0), - new MetaStructureEntryInfo_s(MetaName.ambientOcclusionMultiplier, 112, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.artificialAmbientOcclusion, 116, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tintValue, 120, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CTimeCycleModifier: - return new MetaStructureInfo(MetaName.CTimeCycleModifier, 2683420777, 1024, 64, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.minExtents, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.maxExtents, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.percentage, 48, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.range, 52, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.startHour, 56, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.endHour, 60, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CTimeArchetypeDef: - return new MetaStructureInfo(MetaName.CTimeArchetypeDef, 2520619910, 1024, 160, - new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), - new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0), - new MetaStructureEntryInfo_s(MetaName.timeFlags, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CExtensionDefLightEffect: - return new MetaStructureInfo(MetaName.CExtensionDefLightEffect, 2436199897, 1024, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CLightAttrDef), - new MetaStructureEntryInfo_s(MetaName.instances, 32, MetaStructureEntryDataType.Array, 0, 2, 0) - ); - case MetaName.CLightAttrDef: - return new MetaStructureInfo(MetaName.CLightAttrDef, 2363260268, 768, 160, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.posn, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 0, (MetaName)3), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.colour, 20, MetaStructureEntryDataType.ArrayOfBytes, 0, 2, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.flashiness, 23, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.intensity, 24, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.boneTag, 32, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lightType, 34, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.groupId, 35, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.timeFlags, 36, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.falloff, 40, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.falloffExponent, 44, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.cullingPlane, 48, MetaStructureEntryDataType.ArrayOfBytes, 0, 13, (MetaName)4), - new MetaStructureEntryInfo_s(MetaName.shadowBlur, 64, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.padding1, 65, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.padding2, 66, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.padding3, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volIntensity, 72, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volSizeScale, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volOuterColour, 80, MetaStructureEntryDataType.ArrayOfBytes, 0, 21, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.lightHash, 83, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volOuterIntensity, 84, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coronaSize, 88, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volOuterExponent, 92, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lightFadeDistance, 96, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.shadowFadeDistance, 97, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.specularFadeDistance, 98, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.volumetricFadeDistance, 99, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.shadowNearClip, 100, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coronaIntensity, 104, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coronaZBias, 108, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.direction, 112, MetaStructureEntryDataType.ArrayOfBytes, 0, 34, (MetaName)3), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tangent, 124, MetaStructureEntryDataType.ArrayOfBytes, 0, 36, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.coneInnerAngle, 136, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.coneOuterAngle, 140, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extents, 144, MetaStructureEntryDataType.ArrayOfBytes, 0, 40, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.projectedTextureKey, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CMloInstanceDef: - return new MetaStructureInfo(MetaName.CMloInstanceDef, 2151576752, 1024, 160, - new MetaStructureEntryInfo_s(MetaName.archetypeName, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.guid, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.rotation, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scaleXY, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scaleZ, 68, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.parentIndex, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lodDist, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.childLodDist, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lodLevel, 84, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__eLodType), - new MetaStructureEntryInfo_s(MetaName.numChildren, 88, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.priorityLevel, 92, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__ePriorityLevel), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 96, MetaStructureEntryDataType.Array, 0, 13, 0), - new MetaStructureEntryInfo_s(MetaName.ambientOcclusionMultiplier, 112, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.artificialAmbientOcclusion, 116, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.tintValue, 120, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.groupId, 128, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.floorId, 132, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.defaultEntitySets, 136, MetaStructureEntryDataType.Array, 0, 20, 0), - new MetaStructureEntryInfo_s(MetaName.numExitPortals, 152, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.MLOInstflags, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.BoxOccluder: - return new MetaStructureInfo(MetaName.BoxOccluder, 1831736438, 256, 16, - new MetaStructureEntryInfo_s(MetaName.iCenterX, 0, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iCenterY, 2, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iCenterZ, 4, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iCosZ, 6, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iLength, 8, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iWidth, 10, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iHeight, 12, MetaStructureEntryDataType.SignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iSinZ, 14, MetaStructureEntryDataType.SignedShort, 0, 0, 0) - ); - case MetaName.OccludeModel: - return new MetaStructureInfo(MetaName.OccludeModel, 1172796107, 1024, 64, - new MetaStructureEntryInfo_s(MetaName.bmin, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bmax, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.dataSize, 32, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.verts, 40, MetaStructureEntryDataType.DataBlockPointer, 4, 3, (MetaName)2), - new MetaStructureEntryInfo_s(MetaName.numVertsInBytes, 48, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.numTris, 50, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 52, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CMloArchetypeDef: - return new MetaStructureInfo(MetaName.CMloArchetypeDef, 937664754, 1024, 240, - new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), - new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0), - new MetaStructureEntryInfo_s(MetaName.mloFlags, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.entities, 152, MetaStructureEntryDataType.Array, 0, 18, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloRoomDef), - new MetaStructureEntryInfo_s(MetaName.rooms, 168, MetaStructureEntryDataType.Array, 0, 20, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloPortalDef), - new MetaStructureEntryInfo_s(MetaName.portals, 184, MetaStructureEntryDataType.Array, 0, 22, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloEntitySet), - new MetaStructureEntryInfo_s(MetaName.entitySets, 200, MetaStructureEntryDataType.Array, 0, 24, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloTimeCycleModifier), - new MetaStructureEntryInfo_s(MetaName.timeCycleModifiers, 216, MetaStructureEntryDataType.Array, 0, 26, 0) - ); - case MetaName.CMloRoomDef: - return new MetaStructureInfo(MetaName.CMloRoomDef, 3885428245, 1024, 112, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.blend, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.timecycleName, 68, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.secondaryTimecycleName, 72, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 76, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.portalCount, 80, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.floorId, 84, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.exteriorVisibiltyDepth, 88, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.attachedObjects, 96, MetaStructureEntryDataType.Array, 0, 10, 0) - ); - case MetaName.CMloPortalDef: - return new MetaStructureInfo(MetaName.CMloPortalDef, 1110221513, 768, 64, - new MetaStructureEntryInfo_s(MetaName.roomFrom, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.roomTo, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.mirrorPriority, 20, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.opacity, 24, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.audioOcclusion, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.corners, 32, MetaStructureEntryDataType.Array, 0, 6, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.attachedObjects, 48, MetaStructureEntryDataType.Array, 0, 8, 0) - ); - case MetaName.CMloTimeCycleModifier: - return new MetaStructureInfo(MetaName.CMloTimeCycleModifier, 838874674, 1024, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.sphere, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.percentage, 32, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.range, 36, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.startHour, 40, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.endHour, 44, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CExtensionDefParticleEffect: - return new MetaStructureInfo(MetaName.CExtensionDefParticleEffect, 466596385, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fxName, 48, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fxType, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.boneTag, 68, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scale, 72, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.probability, 76, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 80, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.color, 84, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CCompositeEntityType: - return new MetaStructureInfo(MetaName.CCompositeEntityType, 659539004, 1024, 304, - new MetaStructureEntryInfo_s(MetaName.Name, 0, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.lodDist, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.specialAttribute, 72, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMin, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bbMax, 96, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsCentre, 112, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bsRadius, 128, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.StartModel, 136, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.EndModel, 200, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.StartImapFile, 264, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.EndImapFile, 268, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.PtFxAssetName, 272, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompEntityAnims), - new MetaStructureEntryInfo_s(MetaName.Animations, 280, MetaStructureEntryDataType.Array, 0, 13, 0) - ); - case MetaName.CCompEntityAnims: - return new MetaStructureInfo(MetaName.CCompEntityAnims, 4110496011, 768, 216, - new MetaStructureEntryInfo_s(MetaName.AnimDict, 0, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.AnimName, 64, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.AnimatedModel, 128, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.punchInPhase, 192, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.punchOutPhase, 196, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompEntityEffectsData), - new MetaStructureEntryInfo_s(MetaName.effectsData, 200, MetaStructureEntryDataType.Array, 0, 5, 0) - ); - case MetaName.CCompEntityEffectsData: - return new MetaStructureInfo(MetaName.CCompEntityEffectsData, 1724963966, 1024, 160, - new MetaStructureEntryInfo_s(MetaName.fxType, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fxOffsetPos, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fxOffsetRot, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.boneTag, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.startPhase, 52, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.endPhase, 56, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxIsTriggered, 60, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxTag, 61, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), - new MetaStructureEntryInfo_s(MetaName.ptFxScale, 128, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxProbability, 132, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxHasTint, 136, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxTintR, 137, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxTintG, 138, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxTintB, 139, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ptFxSize, 144, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0) - ); - case MetaName.CExtensionDefAudioCollisionSettings: - return new MetaStructureInfo(MetaName.CExtensionDefAudioCollisionSettings, 2701897500, 1024, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.settings, 32, MetaStructureEntryDataType.Hash, 0, 0, 0) - ); - case MetaName.CExtensionDefAudioEmitter: - return new MetaStructureInfo(MetaName.CExtensionDefAudioEmitter, 15929839, 1024, 64, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.effectHash, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CExtensionDefExplosionEffect: - return new MetaStructureInfo(MetaName.CExtensionDefExplosionEffect, 2840366784, 1024, 80, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.explosionName, 48, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.boneTag, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.explosionTag, 68, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.explosionType, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 76, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.CExtensionDefLadder: - return new MetaStructureInfo(MetaName.CExtensionDefLadder, 1978210597, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bottom, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.top, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.normal, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.materialType, 80, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLadderMaterialType), - new MetaStructureEntryInfo_s(MetaName.template, 84, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.canGetOffAtTop, 88, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.canGetOffAtBottom, 89, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CExtensionDefBuoyancy: - return new MetaStructureInfo(MetaName.CExtensionDefBuoyancy, 2383039928, 1024, 32, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0) - ); - case MetaName.CExtensionDefExpression: - return new MetaStructureInfo(MetaName.CExtensionDefExpression, 24441706, 1024, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.expressionDictionaryName, 32, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.expressionName, 36, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.creatureMetadataName, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.initialiseOnCollision, 44, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CExtensionDefLightShaft: - return new MetaStructureInfo(MetaName.CExtensionDefLightShaft, 2526429398, 1024, 176, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.cornerA, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.cornerB, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.cornerC, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.cornerD, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.direction, 96, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.directionAmount, 112, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.length, 116, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeInTimeStart, 120, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeInTimeEnd, 124, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeOutTimeStart, 128, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeOutTimeEnd, 132, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeDistanceStart, 136, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.fadeDistanceEnd, 140, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.color, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.intensity, 148, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flashiness, 152, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.densityType, 160, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftDensityType), - new MetaStructureEntryInfo_s(MetaName.volumeType, 164, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftVolumeType), - new MetaStructureEntryInfo_s(MetaName.softness, 168, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.scaleBySunIntensity, 172, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.FloatXYZ: - return new MetaStructureInfo(MetaName.FloatXYZ, 2751397072, 512, 12, - new MetaStructureEntryInfo_s(MetaName.x, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.y, 4, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.z, 8, MetaStructureEntryDataType.Float, 0, 0, 0) - ); - case MetaName.CPedPropInfo: - return new MetaStructureInfo(MetaName.CPedPropInfo, 1792487819, 768, 40, - new MetaStructureEntryInfo_s(MetaName.numAvailProps, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropMetaData), - new MetaStructureEntryInfo_s(MetaName.aPropMetaData, 8, MetaStructureEntryDataType.Array, 0, 1, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CAnchorProps), - new MetaStructureEntryInfo_s(MetaName.aAnchors, 24, MetaStructureEntryDataType.Array, 0, 3, 0) - ); - case MetaName.CPedVariationInfo: - return new MetaStructureInfo(MetaName.CPedVariationInfo, 4030871161, 768, 112, - new MetaStructureEntryInfo_s(MetaName.bHasTexVariations, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bHasDrawblVariations, 1, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bHasLowLODs, 2, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bIsSuperLOD, 3, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.availComp, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)MetaTypeName.PsoPOINTER), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVComponentData), - new MetaStructureEntryInfo_s(MetaName.aComponentData3, 16, MetaStructureEntryDataType.Array, 0, 6, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedSelectionSet), - new MetaStructureEntryInfo_s(MetaName.aSelectionSets, 32, MetaStructureEntryDataType.Array, 0, 8, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CComponentInfo), - new MetaStructureEntryInfo_s(MetaName.compInfos, 48, MetaStructureEntryDataType.Array, 0, 10, 0), - new MetaStructureEntryInfo_s(MetaName.propInfo, 64, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropInfo), - new MetaStructureEntryInfo_s(MetaName.dlcName, 104, MetaStructureEntryDataType.Hash, 0, 0, 0) - ); - case MetaName.CPVComponentData: - return new MetaStructureInfo(MetaName.CPVComponentData, 2024084511, 768, 24, - new MetaStructureEntryInfo_s(MetaName.numAvailTex, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData), - new MetaStructureEntryInfo_s(MetaName.aDrawblData3, 8, MetaStructureEntryDataType.Array, 0, 1, 0) - ); - case MetaName.CPVDrawblData__CPVClothComponentData: - return new MetaStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 508935687, 0, 24, - new MetaStructureEntryInfo_s(MetaName.ownsCloth, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0) - ); - case MetaName.CPVDrawblData: - return new MetaStructureInfo(MetaName.CPVDrawblData, 124073662, 768, 48, - new MetaStructureEntryInfo_s(MetaName.propMask, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.numAlternatives, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVTextureData), - new MetaStructureEntryInfo_s(MetaName.aTexData, 8, MetaStructureEntryDataType.Array, 0, 2, 0), - new MetaStructureEntryInfo_s(MetaName.clothData, 24, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData__CPVClothComponentData) - ); - case MetaName.CPVTextureData: - return new MetaStructureInfo(MetaName.CPVTextureData, 4272717794, 0, 3, - new MetaStructureEntryInfo_s(MetaName.texId, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.distribution, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) - ); - case MetaName.CComponentInfo: - return new MetaStructureInfo(MetaName.CComponentInfo, 3693847250, 512, 48, - new MetaStructureEntryInfo_s((MetaName)802196719, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)4233133352, 4, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)128864925, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 2, (MetaName)5), - new MetaStructureEntryInfo_s(MetaName.flags, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.inclusions, 32, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), - new MetaStructureEntryInfo_s(MetaName.exclusions, 36, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), - new MetaStructureEntryInfo_s((MetaName)1613922652, 40, MetaStructureEntryDataType.ShortFlags, 0, 16, MetaName.ePedVarComp), - new MetaStructureEntryInfo_s((MetaName)2114993291, 42, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)3509540765, 44, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)4196345791, 45, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) - ); - case MetaName.CPedPropMetaData: - return new MetaStructureInfo(MetaName.CPedPropMetaData, 2029738350, 768, 56, - new MetaStructureEntryInfo_s(MetaName.audioId, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.expressionMods, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)5), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropTexData), - new MetaStructureEntryInfo_s(MetaName.texData, 24, MetaStructureEntryDataType.Array, 0, 3, 0), - new MetaStructureEntryInfo_s(MetaName.renderFlags, 40, MetaStructureEntryDataType.IntFlags1, 0, 3, MetaName.ePropRenderFlags), - new MetaStructureEntryInfo_s(MetaName.propFlags, 44, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 48, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.anchorId, 50, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.propId, 51, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)2894625425, 52, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) - ); - case MetaName.CPedPropTexData: - return new MetaStructureInfo(MetaName.CPedPropTexData, 2767296137, 512, 12, - new MetaStructureEntryInfo_s(MetaName.inclusions, 0, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), - new MetaStructureEntryInfo_s(MetaName.exclusions, 4, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), - new MetaStructureEntryInfo_s(MetaName.texId, 8, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.inclusionId, 9, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.exclusionId, 10, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.distribution, 11, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) - ); - case MetaName.CAnchorProps: - return new MetaStructureInfo(MetaName.CAnchorProps, 403574180, 768, 24, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.props, 0, MetaStructureEntryDataType.Array, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.anchor, 16, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.eAnchorPoints) - ); - case MetaName.CPedSelectionSet: - return new MetaStructureInfo(MetaName.CPedSelectionSet, 3120284999, 512, 48, - new MetaStructureEntryInfo_s(MetaName.name, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.compDrawableId, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)MetaTypeName.PsoPOINTER), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.compTexId, 16, MetaStructureEntryDataType.ArrayOfBytes, 0, 3, (MetaName)MetaTypeName.PsoPOINTER), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.propAnchorId, 28, MetaStructureEntryDataType.ArrayOfBytes, 0, 5, (MetaName)6), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.propDrawableId, 34, MetaStructureEntryDataType.ArrayOfBytes, 0, 7, (MetaName)6), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.propTexId, 40, MetaStructureEntryDataType.ArrayOfBytes, 0, 9, (MetaName)6) - ); - case MetaName.CExtensionDefDoor: - return new MetaStructureInfo(MetaName.CExtensionDefDoor, 2671601385, 1024, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.enableLimitAngle, 32, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.startsLocked, 33, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.canBreak, 34, MetaStructureEntryDataType.Boolean, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.limitAngle, 36, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.doorTargetRatio, 40, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.audioHash, 44, MetaStructureEntryDataType.Hash, 0, 0, 0) - ); - case MetaName.CMloEntitySet: - return new MetaStructureInfo(MetaName.CMloEntitySet, 4180211587, 768, 48, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.locations, 16, MetaStructureEntryDataType.Array, 0, 1, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.entities, 32, MetaStructureEntryDataType.Array, 0, 3, 0) - ); - case MetaName.CExtensionDefSpawnPointOverride: - return new MetaStructureInfo(MetaName.CExtensionDefSpawnPointOverride, 2551875873, 1024, 64, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ScenarioType, 32, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iTimeStartOverride, 36, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.iTimeEndOverride, 37, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Group, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.ModelSet, 44, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.AvailabilityInMpSp, 48, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CSpawnPoint__AvailabilityMpSp), - new MetaStructureEntryInfo_s(MetaName.Flags, 52, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), - new MetaStructureEntryInfo_s(MetaName.Radius, 56, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.TimeTillPedLeaves, 60, MetaStructureEntryDataType.Float, 0, 0, 0) - ); - case MetaName.CExtensionDefWindDisturbance: - return new MetaStructureInfo(MetaName.CExtensionDefWindDisturbance, 3971538917, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.disturbanceType, 48, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.boneTag, 52, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.size, 64, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.strength, 80, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 84, MetaStructureEntryDataType.SignedInt, 0, 0, 0) - ); - case MetaName.CCarGen: - return new MetaStructureInfo(MetaName.CCarGen, 2345238261, 1024, 80, - new MetaStructureEntryInfo_s(MetaName.position, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.orientX, 32, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.orientY, 36, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.perpendicularLength, 40, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.carModel, 44, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bodyColorRemap1, 52, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bodyColorRemap2, 56, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bodyColorRemap3, 60, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.bodyColorRemap4, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.popGroup, 68, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.livery, 72, MetaStructureEntryDataType.SignedByte, 0, 0, 0) - ); - case MetaName.rage__spdAABB: - return new MetaStructureInfo(MetaName.rage__spdAABB, 1158138379, 1024, 32, - new MetaStructureEntryInfo_s(MetaName.min, 0, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.max, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) - ); - case MetaName.rage__fwGrassInstanceListDef: - return new MetaStructureInfo(MetaName.rage__fwGrassInstanceListDef, 941808164, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.BatchAABB, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdAABB), - new MetaStructureEntryInfo_s(MetaName.ScaleRange, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.archetypeName, 48, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.lodDist, 52, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.LodFadeStartDist, 56, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.LodInstFadeRange, 60, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.OrientToTerrain, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwGrassInstanceListDef__InstanceData), - new MetaStructureEntryInfo_s(MetaName.InstanceList, 72, MetaStructureEntryDataType.Array, 36, 7, 0) - ); - case MetaName.rage__fwGrassInstanceListDef__InstanceData: - return new MetaStructureInfo(MetaName.rage__fwGrassInstanceListDef__InstanceData, 2740378365, 256, 16, - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.ArrayOfBytes, 0, 0, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.NormalX, 6, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.NormalY, 7, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Color, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)3), - new MetaStructureEntryInfo_s(MetaName.Scale, 11, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Ao, 12, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Pad, 13, MetaStructureEntryDataType.ArrayOfBytes, 0, 8, (MetaName)3) - ); - case MetaName.CExtensionDefProcObject: - return new MetaStructureInfo(MetaName.CExtensionDefProcObject, 3965391891, 1024, 80, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.radiusInner, 32, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.radiusOuter, 36, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.spacing, 40, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.minScale, 44, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.maxScale, 48, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.minScaleZ, 52, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.maxScaleZ, 56, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.minZOffset, 60, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.maxZOffset, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.objectHash, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.flags, 72, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) - ); - case MetaName.rage__phVerletClothCustomBounds: - return new MetaStructureInfo(MetaName.rage__phVerletClothCustomBounds, 2075461750, 768, 32, - new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__phCapsuleBoundDef), - new MetaStructureEntryInfo_s(MetaName.CollisionData, 16, MetaStructureEntryDataType.Array, 0, 1, 0) - ); - case MetaName.rage__phCapsuleBoundDef: - return new MetaStructureInfo(MetaName.rage__phCapsuleBoundDef, 2859775340, 1024, 96, - new MetaStructureEntryInfo_s(MetaName.OwnerName, 0, MetaStructureEntryDataType.CharPointer, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Rotation, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Normal, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CapsuleRadius, 64, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CapsuleLen, 68, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CapsuleHalfHeight, 72, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.CapsuleHalfWidth, 76, MetaStructureEntryDataType.Float, 0, 0, 0), - new MetaStructureEntryInfo_s(MetaName.Flags, 80, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef) - ); - - default: - return null; - } + MetaName.CCreatureMetaData => new MetaStructureInfo(MetaName.CCreatureMetaData, 2181653572, 768, 56, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CShaderVariableComponent), + new MetaStructureEntryInfo_s(MetaName.shaderVariableComponents, 8, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropExpressionData), + new MetaStructureEntryInfo_s(MetaName.pedPropExpressions, 24, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedCompExpressionData), + new MetaStructureEntryInfo_s(MetaName.pedCompExpressions, 40, MetaStructureEntryDataType.Array, 0, 4, 0) + ), + MetaName.CShaderVariableComponent => new MetaStructureInfo(MetaName.CShaderVariableComponent, 3085831725, 768, 72, + new MetaStructureEntryInfo_s(MetaName.pedcompID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.maskID, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.shaderVariableHashString, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.components, 56, MetaStructureEntryDataType.Array, 0, 7, 0) + ), + MetaName.CPedPropExpressionData => new MetaStructureInfo(MetaName.CPedPropExpressionData, 1355135810, 768, 88, + new MetaStructureEntryInfo_s(MetaName.pedPropID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.pedPropVarIndex, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.pedPropExpressionIndex, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.types, 56, MetaStructureEntryDataType.Array, 0, 7, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.components, 72, MetaStructureEntryDataType.Array, 0, 9, 0) + ), + MetaName.CPedCompExpressionData => new MetaStructureInfo(MetaName.CPedCompExpressionData, 3458164745, 768, 88, + new MetaStructureEntryInfo_s(MetaName.pedCompID, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.pedCompVarIndex, 12, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.pedCompExpressionIndex, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tracks, 24, MetaStructureEntryDataType.Array, 0, 3, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ids, 40, MetaStructureEntryDataType.Array, 0, 5, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.types, 56, MetaStructureEntryDataType.Array, 0, 7, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.components, 72, MetaStructureEntryDataType.Array, 0, 9, 0) + ), + MetaName.rage__fwInstancedMapData => new MetaStructureInfo(MetaName.rage__fwInstancedMapData, 1836780118, 768, 48, + new MetaStructureEntryInfo_s(MetaName.ImapLink, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwPropInstanceListDef), + new MetaStructureEntryInfo_s(MetaName.PropInstanceList, 16, MetaStructureEntryDataType.Array, 0, 1, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwGrassInstanceListDef), + new MetaStructureEntryInfo_s(MetaName.GrassInstanceList, 32, MetaStructureEntryDataType.Array, 0, 3, 0) + ), + MetaName.CLODLight => new MetaStructureInfo(MetaName.CLODLight, 2325189228, 768, 136, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.FloatXYZ), + new MetaStructureEntryInfo_s(MetaName.direction, 8, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.falloff, 24, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.falloffExponent, 40, MetaStructureEntryDataType.Array, 0, 4, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.timeAndStateFlags, 56, MetaStructureEntryDataType.Array, 0, 6, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.hash, 72, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coneInnerAngle, 88, MetaStructureEntryDataType.Array, 0, 10, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coneOuterAngleOrCapExt, 104, MetaStructureEntryDataType.Array, 0, 12, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coronaIntensity, 120, MetaStructureEntryDataType.Array, 0, 14, 0) + ), + MetaName.CDistantLODLight => new MetaStructureInfo(MetaName.CDistantLODLight, 2820908419, 768, 48, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.FloatXYZ), + new MetaStructureEntryInfo_s(MetaName.position, 8, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.RGBI, 24, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.numStreetLights, 40, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.category, 42, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0) + ), + MetaName.CBlockDesc => new MetaStructureInfo(MetaName.CBlockDesc, 2015795449, 768, 72, + new MetaStructureEntryInfo_s(MetaName.version, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 4, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.exportedBy, 24, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.owner, 40, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.time, 56, MetaStructureEntryDataType.CharPointer, 0, 0, 0) + ), + MetaName.CMapData => new MetaStructureInfo(MetaName.CMapData, 3448101671, 1024, 512, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.parent, 12, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.contentFlags, 20, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.streamingExtentsMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.streamingExtentsMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.entitiesExtentsMin, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.entitiesExtentsMax, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.entities, 96, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwContainerLodDef), + new MetaStructureEntryInfo_s(MetaName.containerLods, 112, MetaStructureEntryDataType.Array, 0, 10, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.BoxOccluder), + new MetaStructureEntryInfo_s(MetaName.boxOccluders, 128, MetaStructureEntryDataType.Array, 4, 12, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.OccludeModel), + new MetaStructureEntryInfo_s(MetaName.occludeModels, 144, MetaStructureEntryDataType.Array, 4, 14, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.physicsDictionaries, 160, MetaStructureEntryDataType.Array, 0, 16, 0), + new MetaStructureEntryInfo_s(MetaName.instancedData, 176, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwInstancedMapData), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CTimeCycleModifier), + new MetaStructureEntryInfo_s(MetaName.timeCycleModifiers, 224, MetaStructureEntryDataType.Array, 0, 19, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCarGen), + new MetaStructureEntryInfo_s(MetaName.carGenerators, 240, MetaStructureEntryDataType.Array, 0, 21, 0), + new MetaStructureEntryInfo_s(MetaName.LODLightsSOA, 256, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CLODLight), + new MetaStructureEntryInfo_s(MetaName.DistantLODLightsSOA, 392, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CDistantLODLight), + new MetaStructureEntryInfo_s(MetaName.block, 440, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CBlockDesc) + ), + MetaName.CEntityDef => new MetaStructureInfo(MetaName.CEntityDef, 1825799514, 1024, 128, + new MetaStructureEntryInfo_s(MetaName.archetypeName, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.guid, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.rotation, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scaleXY, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scaleZ, 68, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.parentIndex, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lodDist, 76, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.childLodDist, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lodLevel, 84, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__eLodType), + new MetaStructureEntryInfo_s(MetaName.numChildren, 88, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.priorityLevel, 92, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__ePriorityLevel), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 96, MetaStructureEntryDataType.Array, 0, 13, 0), + new MetaStructureEntryInfo_s(MetaName.ambientOcclusionMultiplier, 112, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.artificialAmbientOcclusion, 116, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tintValue, 120, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CTimeCycleModifier => new MetaStructureInfo(MetaName.CTimeCycleModifier, 2683420777, 1024, 64, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.minExtents, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.maxExtents, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.percentage, 48, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.range, 52, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.startHour, 56, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.endHour, 60, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CTimeArchetypeDef => new MetaStructureInfo(MetaName.CTimeArchetypeDef, 2520619910, 1024, 160, + new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), + new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0), + new MetaStructureEntryInfo_s(MetaName.timeFlags, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CExtensionDefLightEffect => new MetaStructureInfo(MetaName.CExtensionDefLightEffect, 2436199897, 1024, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CLightAttrDef), + new MetaStructureEntryInfo_s(MetaName.instances, 32, MetaStructureEntryDataType.Array, 0, 2, 0) + ), + MetaName.CLightAttrDef => new MetaStructureInfo(MetaName.CLightAttrDef, 2363260268, 768, 160, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.posn, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 0, (MetaName)3), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.colour, 20, MetaStructureEntryDataType.ArrayOfBytes, 0, 2, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.flashiness, 23, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.intensity, 24, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.boneTag, 32, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lightType, 34, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.groupId, 35, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.timeFlags, 36, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.falloff, 40, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.falloffExponent, 44, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.cullingPlane, 48, MetaStructureEntryDataType.ArrayOfBytes, 0, 13, (MetaName)4), + new MetaStructureEntryInfo_s(MetaName.shadowBlur, 64, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.padding1, 65, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.padding2, 66, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.padding3, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volIntensity, 72, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volSizeScale, 76, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volOuterColour, 80, MetaStructureEntryDataType.ArrayOfBytes, 0, 21, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.lightHash, 83, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volOuterIntensity, 84, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coronaSize, 88, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volOuterExponent, 92, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lightFadeDistance, 96, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.shadowFadeDistance, 97, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.specularFadeDistance, 98, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.volumetricFadeDistance, 99, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.shadowNearClip, 100, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coronaIntensity, 104, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coronaZBias, 108, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.direction, 112, MetaStructureEntryDataType.ArrayOfBytes, 0, 34, (MetaName)3), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tangent, 124, MetaStructureEntryDataType.ArrayOfBytes, 0, 36, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.coneInnerAngle, 136, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.coneOuterAngle, 140, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extents, 144, MetaStructureEntryDataType.ArrayOfBytes, 0, 40, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.projectedTextureKey, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CMloInstanceDef => new MetaStructureInfo(MetaName.CMloInstanceDef, 2151576752, 1024, 160, + new MetaStructureEntryInfo_s(MetaName.archetypeName, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.guid, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.rotation, 48, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scaleXY, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scaleZ, 68, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.parentIndex, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lodDist, 76, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.childLodDist, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lodLevel, 84, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__eLodType), + new MetaStructureEntryInfo_s(MetaName.numChildren, 88, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.priorityLevel, 92, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__ePriorityLevel), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 96, MetaStructureEntryDataType.Array, 0, 13, 0), + new MetaStructureEntryInfo_s(MetaName.ambientOcclusionMultiplier, 112, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.artificialAmbientOcclusion, 116, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.tintValue, 120, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.groupId, 128, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.floorId, 132, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.defaultEntitySets, 136, MetaStructureEntryDataType.Array, 0, 20, 0), + new MetaStructureEntryInfo_s(MetaName.numExitPortals, 152, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.MLOInstflags, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.BoxOccluder => new MetaStructureInfo(MetaName.BoxOccluder, 1831736438, 256, 16, + new MetaStructureEntryInfo_s(MetaName.iCenterX, 0, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iCenterY, 2, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iCenterZ, 4, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iCosZ, 6, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iLength, 8, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iWidth, 10, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iHeight, 12, MetaStructureEntryDataType.SignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iSinZ, 14, MetaStructureEntryDataType.SignedShort, 0, 0, 0) + ), + MetaName.OccludeModel => new MetaStructureInfo(MetaName.OccludeModel, 1172796107, 1024, 64, + new MetaStructureEntryInfo_s(MetaName.bmin, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bmax, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.dataSize, 32, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.verts, 40, MetaStructureEntryDataType.DataBlockPointer, 4, 3, (MetaName)2), + new MetaStructureEntryInfo_s(MetaName.numVertsInBytes, 48, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.numTris, 50, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 52, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CMloArchetypeDef => new MetaStructureInfo(MetaName.CMloArchetypeDef, 937664754, 1024, 240, + new MetaStructureEntryInfo_s(MetaName.lodDist, 8, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.specialAttribute, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsCentre, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsRadius, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.hdTextureDist, 84, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.name, 88, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.textureDictionary, 92, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.clipDictionary, 96, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.drawableDictionary, 100, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.physicsDictionary, 104, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.assetType, 108, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.rage__fwArchetypeDef__eAssetType), + new MetaStructureEntryInfo_s(MetaName.assetName, 112, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.extensions, 120, MetaStructureEntryDataType.Array, 0, 15, 0), + new MetaStructureEntryInfo_s(MetaName.mloFlags, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.entities, 152, MetaStructureEntryDataType.Array, 0, 18, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloRoomDef), + new MetaStructureEntryInfo_s(MetaName.rooms, 168, MetaStructureEntryDataType.Array, 0, 20, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloPortalDef), + new MetaStructureEntryInfo_s(MetaName.portals, 184, MetaStructureEntryDataType.Array, 0, 22, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloEntitySet), + new MetaStructureEntryInfo_s(MetaName.entitySets, 200, MetaStructureEntryDataType.Array, 0, 24, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CMloTimeCycleModifier), + new MetaStructureEntryInfo_s(MetaName.timeCycleModifiers, 216, MetaStructureEntryDataType.Array, 0, 26, 0) + ), + MetaName.CMloRoomDef => new MetaStructureInfo(MetaName.CMloRoomDef, 3885428245, 1024, 112, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMin, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMax, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.blend, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.timecycleName, 68, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.secondaryTimecycleName, 72, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 76, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.portalCount, 80, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.floorId, 84, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.exteriorVisibiltyDepth, 88, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.attachedObjects, 96, MetaStructureEntryDataType.Array, 0, 10, 0) + ), + MetaName.CMloPortalDef => new MetaStructureInfo(MetaName.CMloPortalDef, 1110221513, 768, 64, + new MetaStructureEntryInfo_s(MetaName.roomFrom, 8, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.roomTo, 12, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 16, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.mirrorPriority, 20, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.opacity, 24, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.audioOcclusion, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.corners, 32, MetaStructureEntryDataType.Array, 0, 6, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.attachedObjects, 48, MetaStructureEntryDataType.Array, 0, 8, 0) + ), + MetaName.CMloTimeCycleModifier => new MetaStructureInfo(MetaName.CMloTimeCycleModifier, 838874674, 1024, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.sphere, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.percentage, 32, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.range, 36, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.startHour, 40, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.endHour, 44, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CExtensionDefParticleEffect => new MetaStructureInfo(MetaName.CExtensionDefParticleEffect, 466596385, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fxName, 48, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fxType, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.boneTag, 68, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scale, 72, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.probability, 76, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 80, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.color, 84, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CCompositeEntityType => new MetaStructureInfo(MetaName.CCompositeEntityType, 659539004, 1024, 304, + new MetaStructureEntryInfo_s(MetaName.Name, 0, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.lodDist, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.specialAttribute, 72, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMin, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bbMax, 96, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsCentre, 112, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bsRadius, 128, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.StartModel, 136, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.EndModel, 200, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.StartImapFile, 264, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.EndImapFile, 268, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.PtFxAssetName, 272, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompEntityAnims), + new MetaStructureEntryInfo_s(MetaName.Animations, 280, MetaStructureEntryDataType.Array, 0, 13, 0) + ), + MetaName.CCompEntityAnims => new MetaStructureInfo(MetaName.CCompEntityAnims, 4110496011, 768, 216, + new MetaStructureEntryInfo_s(MetaName.AnimDict, 0, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.AnimName, 64, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.AnimatedModel, 128, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.punchInPhase, 192, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.punchOutPhase, 196, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CCompEntityEffectsData), + new MetaStructureEntryInfo_s(MetaName.effectsData, 200, MetaStructureEntryDataType.Array, 0, 5, 0) + ), + MetaName.CCompEntityEffectsData => new MetaStructureInfo(MetaName.CCompEntityEffectsData, 1724963966, 1024, 160, + new MetaStructureEntryInfo_s(MetaName.fxType, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fxOffsetPos, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fxOffsetRot, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.boneTag, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.startPhase, 52, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.endPhase, 56, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxIsTriggered, 60, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxTag, 61, MetaStructureEntryDataType.ArrayOfChars, 0, 0, (MetaName)64), + new MetaStructureEntryInfo_s(MetaName.ptFxScale, 128, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxProbability, 132, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxHasTint, 136, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxTintR, 137, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxTintG, 138, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxTintB, 139, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ptFxSize, 144, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0) + ), + MetaName.CExtensionDefAudioCollisionSettings => new MetaStructureInfo(MetaName.CExtensionDefAudioCollisionSettings, 2701897500, 1024, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.settings, 32, MetaStructureEntryDataType.Hash, 0, 0, 0) + ), + MetaName.CExtensionDefAudioEmitter => new MetaStructureInfo(MetaName.CExtensionDefAudioEmitter, 15929839, 1024, 64, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.effectHash, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CExtensionDefExplosionEffect => new MetaStructureInfo(MetaName.CExtensionDefExplosionEffect, 2840366784, 1024, 80, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.explosionName, 48, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.boneTag, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.explosionTag, 68, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.explosionType, 72, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 76, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.CExtensionDefLadder => new MetaStructureInfo(MetaName.CExtensionDefLadder, 1978210597, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bottom, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.top, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.normal, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.materialType, 80, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLadderMaterialType), + new MetaStructureEntryInfo_s(MetaName.template, 84, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.canGetOffAtTop, 88, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.canGetOffAtBottom, 89, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CExtensionDefBuoyancy => new MetaStructureInfo(MetaName.CExtensionDefBuoyancy, 2383039928, 1024, 32, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0) + ), + MetaName.CExtensionDefExpression => new MetaStructureInfo(MetaName.CExtensionDefExpression, 24441706, 1024, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.expressionDictionaryName, 32, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.expressionName, 36, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.creatureMetadataName, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.initialiseOnCollision, 44, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CExtensionDefLightShaft => new MetaStructureInfo(MetaName.CExtensionDefLightShaft, 2526429398, 1024, 176, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.cornerA, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.cornerB, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.cornerC, 64, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.cornerD, 80, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.direction, 96, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.directionAmount, 112, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.length, 116, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeInTimeStart, 120, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeInTimeEnd, 124, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeOutTimeStart, 128, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeOutTimeEnd, 132, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeDistanceStart, 136, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.fadeDistanceEnd, 140, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.color, 144, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.intensity, 148, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flashiness, 152, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 156, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.densityType, 160, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftDensityType), + new MetaStructureEntryInfo_s(MetaName.volumeType, 164, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CExtensionDefLightShaftVolumeType), + new MetaStructureEntryInfo_s(MetaName.softness, 168, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.scaleBySunIntensity, 172, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.FloatXYZ => new MetaStructureInfo(MetaName.FloatXYZ, 2751397072, 512, 12, + new MetaStructureEntryInfo_s(MetaName.x, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.y, 4, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.z, 8, MetaStructureEntryDataType.Float, 0, 0, 0) + ), + MetaName.CPedPropInfo => new MetaStructureInfo(MetaName.CPedPropInfo, 1792487819, 768, 40, + new MetaStructureEntryInfo_s(MetaName.numAvailProps, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropMetaData), + new MetaStructureEntryInfo_s(MetaName.aPropMetaData, 8, MetaStructureEntryDataType.Array, 0, 1, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CAnchorProps), + new MetaStructureEntryInfo_s(MetaName.aAnchors, 24, MetaStructureEntryDataType.Array, 0, 3, 0) + ), + MetaName.CPedVariationInfo => new MetaStructureInfo(MetaName.CPedVariationInfo, 4030871161, 768, 112, + new MetaStructureEntryInfo_s(MetaName.bHasTexVariations, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bHasDrawblVariations, 1, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bHasLowLODs, 2, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bIsSuperLOD, 3, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.availComp, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVComponentData), + new MetaStructureEntryInfo_s(MetaName.aComponentData3, 16, MetaStructureEntryDataType.Array, 0, 6, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedSelectionSet), + new MetaStructureEntryInfo_s(MetaName.aSelectionSets, 32, MetaStructureEntryDataType.Array, 0, 8, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CComponentInfo), + new MetaStructureEntryInfo_s(MetaName.compInfos, 48, MetaStructureEntryDataType.Array, 0, 10, 0), + new MetaStructureEntryInfo_s(MetaName.propInfo, 64, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropInfo), + new MetaStructureEntryInfo_s(MetaName.dlcName, 104, MetaStructureEntryDataType.Hash, 0, 0, 0) + ), + MetaName.CPVComponentData => new MetaStructureInfo(MetaName.CPVComponentData, 2024084511, 768, 24, + new MetaStructureEntryInfo_s(MetaName.numAvailTex, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData), + new MetaStructureEntryInfo_s(MetaName.aDrawblData3, 8, MetaStructureEntryDataType.Array, 0, 1, 0) + ), + MetaName.CPVDrawblData__CPVClothComponentData => new MetaStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 508935687, 0, 24, + new MetaStructureEntryInfo_s(MetaName.ownsCloth, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0) + ), + MetaName.CPVDrawblData => new MetaStructureInfo(MetaName.CPVDrawblData, 124073662, 768, 48, + new MetaStructureEntryInfo_s(MetaName.propMask, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.numAlternatives, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVTextureData), + new MetaStructureEntryInfo_s(MetaName.aTexData, 8, MetaStructureEntryDataType.Array, 0, 2, 0), + new MetaStructureEntryInfo_s(MetaName.clothData, 24, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData__CPVClothComponentData) + ), + MetaName.CPVTextureData => new MetaStructureInfo(MetaName.CPVTextureData, 4272717794, 0, 3, + new MetaStructureEntryInfo_s(MetaName.texId, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.distribution, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) + ), + MetaName.CComponentInfo => new MetaStructureInfo(MetaName.CComponentInfo, 3693847250, 512, 48, + new MetaStructureEntryInfo_s((MetaName)802196719, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)4233133352, 4, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)128864925, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 2, (MetaName)5), + new MetaStructureEntryInfo_s(MetaName.flags, 28, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.inclusions, 32, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), + new MetaStructureEntryInfo_s(MetaName.exclusions, 36, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), + new MetaStructureEntryInfo_s((MetaName)1613922652, 40, MetaStructureEntryDataType.ShortFlags, 0, 16, MetaName.ePedVarComp), + new MetaStructureEntryInfo_s((MetaName)2114993291, 42, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)3509540765, 44, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)4196345791, 45, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) + ), + MetaName.CPedPropMetaData => new MetaStructureInfo(MetaName.CPedPropMetaData, 2029738350, 768, 56, + new MetaStructureEntryInfo_s(MetaName.audioId, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.expressionMods, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)5), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropTexData), + new MetaStructureEntryInfo_s(MetaName.texData, 24, MetaStructureEntryDataType.Array, 0, 3, 0), + new MetaStructureEntryInfo_s(MetaName.renderFlags, 40, MetaStructureEntryDataType.IntFlags1, 0, 3, MetaName.ePropRenderFlags), + new MetaStructureEntryInfo_s(MetaName.propFlags, 44, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 48, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.anchorId, 50, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.propId, 51, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)2894625425, 52, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) + ), + MetaName.CPedPropTexData => new MetaStructureInfo(MetaName.CPedPropTexData, 2767296137, 512, 12, + new MetaStructureEntryInfo_s(MetaName.inclusions, 0, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), + new MetaStructureEntryInfo_s(MetaName.exclusions, 4, MetaStructureEntryDataType.IntFlags2, 0, 32, 0), + new MetaStructureEntryInfo_s(MetaName.texId, 8, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.inclusionId, 9, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.exclusionId, 10, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.distribution, 11, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) + ), + MetaName.CAnchorProps => new MetaStructureInfo(MetaName.CAnchorProps, 403574180, 768, 24, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.props, 0, MetaStructureEntryDataType.Array, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.anchor, 16, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.eAnchorPoints) + ), + MetaName.CPedSelectionSet => new MetaStructureInfo(MetaName.CPedSelectionSet, 3120284999, 512, 48, + new MetaStructureEntryInfo_s(MetaName.name, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.compDrawableId, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.compTexId, 16, MetaStructureEntryDataType.ArrayOfBytes, 0, 3, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.propAnchorId, 28, MetaStructureEntryDataType.ArrayOfBytes, 0, 5, (MetaName)6), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.propDrawableId, 34, MetaStructureEntryDataType.ArrayOfBytes, 0, 7, (MetaName)6), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.propTexId, 40, MetaStructureEntryDataType.ArrayOfBytes, 0, 9, (MetaName)6) + ), + MetaName.CExtensionDefDoor => new MetaStructureInfo(MetaName.CExtensionDefDoor, 2671601385, 1024, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.enableLimitAngle, 32, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.startsLocked, 33, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.canBreak, 34, MetaStructureEntryDataType.Boolean, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.limitAngle, 36, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.doorTargetRatio, 40, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.audioHash, 44, MetaStructureEntryDataType.Hash, 0, 0, 0) + ), + MetaName.CMloEntitySet => new MetaStructureInfo(MetaName.CMloEntitySet, 4180211587, 768, 48, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.locations, 16, MetaStructureEntryDataType.Array, 0, 1, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.StructurePointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.entities, 32, MetaStructureEntryDataType.Array, 0, 3, 0) + ), + MetaName.CExtensionDefSpawnPointOverride => new MetaStructureInfo(MetaName.CExtensionDefSpawnPointOverride, 2551875873, 1024, 64, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ScenarioType, 32, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iTimeStartOverride, 36, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.iTimeEndOverride, 37, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Group, 40, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.ModelSet, 44, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.AvailabilityInMpSp, 48, MetaStructureEntryDataType.IntEnum, 0, 0, MetaName.CSpawnPoint__AvailabilityMpSp), + new MetaStructureEntryInfo_s(MetaName.Flags, 52, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.CScenarioPointFlags__Flags), + new MetaStructureEntryInfo_s(MetaName.Radius, 56, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.TimeTillPedLeaves, 60, MetaStructureEntryDataType.Float, 0, 0, 0) + ), + MetaName.CExtensionDefWindDisturbance => new MetaStructureInfo(MetaName.CExtensionDefWindDisturbance, 3971538917, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetRotation, 32, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.disturbanceType, 48, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.boneTag, 52, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.size, 64, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.strength, 80, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 84, MetaStructureEntryDataType.SignedInt, 0, 0, 0) + ), + MetaName.CCarGen => new MetaStructureInfo(MetaName.CCarGen, 2345238261, 1024, 80, + new MetaStructureEntryInfo_s(MetaName.position, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.orientX, 32, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.orientY, 36, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.perpendicularLength, 40, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.carModel, 44, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 48, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bodyColorRemap1, 52, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bodyColorRemap2, 56, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bodyColorRemap3, 60, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.bodyColorRemap4, 64, MetaStructureEntryDataType.SignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.popGroup, 68, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.livery, 72, MetaStructureEntryDataType.SignedByte, 0, 0, 0) + ), + MetaName.rage__spdAABB => new MetaStructureInfo(MetaName.rage__spdAABB, 1158138379, 1024, 32, + new MetaStructureEntryInfo_s(MetaName.min, 0, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.max, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0) + ), + MetaName.rage__fwGrassInstanceListDef => new MetaStructureInfo(MetaName.rage__fwGrassInstanceListDef, 941808164, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.BatchAABB, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__spdAABB), + new MetaStructureEntryInfo_s(MetaName.ScaleRange, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.archetypeName, 48, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.lodDist, 52, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.LodFadeStartDist, 56, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.LodInstFadeRange, 60, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.OrientToTerrain, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__fwGrassInstanceListDef__InstanceData), + new MetaStructureEntryInfo_s(MetaName.InstanceList, 72, MetaStructureEntryDataType.Array, 36, 7, 0) + ), + MetaName.rage__fwGrassInstanceListDef__InstanceData => new MetaStructureInfo(MetaName.rage__fwGrassInstanceListDef__InstanceData, 2740378365, 256, 16, + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedShort, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.ArrayOfBytes, 0, 0, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.NormalX, 6, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.NormalY, 7, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Color, 8, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)3), + new MetaStructureEntryInfo_s(MetaName.Scale, 11, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Ao, 12, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Pad, 13, MetaStructureEntryDataType.ArrayOfBytes, 0, 8, (MetaName)3) + ), + MetaName.CExtensionDefProcObject => new MetaStructureInfo(MetaName.CExtensionDefProcObject, 3965391891, 1024, 80, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.offsetPosition, 16, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.radiusInner, 32, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.radiusOuter, 36, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.spacing, 40, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.minScale, 44, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.maxScale, 48, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.minScaleZ, 52, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.maxScaleZ, 56, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.minZOffset, 60, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.maxZOffset, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.objectHash, 68, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.flags, 72, MetaStructureEntryDataType.UnsignedInt, 0, 0, 0) + ), + MetaName.rage__phVerletClothCustomBounds => new MetaStructureInfo(MetaName.rage__phVerletClothCustomBounds, 2075461750, 768, 32, + new MetaStructureEntryInfo_s(MetaName.name, 8, MetaStructureEntryDataType.Hash, 0, 0, 0), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.rage__phCapsuleBoundDef), + new MetaStructureEntryInfo_s(MetaName.CollisionData, 16, MetaStructureEntryDataType.Array, 0, 1, 0) + ), + MetaName.rage__phCapsuleBoundDef => new MetaStructureInfo(MetaName.rage__phCapsuleBoundDef, 2859775340, 1024, 96, + new MetaStructureEntryInfo_s(MetaName.OwnerName, 0, MetaStructureEntryDataType.CharPointer, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Rotation, 16, MetaStructureEntryDataType.Float_XYZW, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Position, 32, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Normal, 48, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CapsuleRadius, 64, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CapsuleLen, 68, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CapsuleHalfHeight, 72, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.CapsuleHalfWidth, 76, MetaStructureEntryDataType.Float, 0, 0, 0), + new MetaStructureEntryInfo_s(MetaName.Flags, 80, MetaStructureEntryDataType.IntFlags2, 0, 32, MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef) + ), + _ => null, + }; } - public static MetaEnumInfo GetEnumInfo(MetaName name) + public static MetaEnumInfo? GetEnumInfo(MetaName name) { //to generate enuminfos - switch (name) + return name switch { - case MetaName.CScenarioPointFlags__Flags: - return new MetaEnumInfo(MetaName.CScenarioPointFlags__Flags, 2814596095, - new MetaEnumEntryInfo_s(MetaName.IgnoreMaxInRange, 0), - new MetaEnumEntryInfo_s(MetaName.NoSpawn, 1), - new MetaEnumEntryInfo_s(MetaName.StationaryReactions, 2), - new MetaEnumEntryInfo_s(MetaName.OnlySpawnInSameInterior, 3), - new MetaEnumEntryInfo_s(MetaName.SpawnedPedIsArrestable, 4), - new MetaEnumEntryInfo_s(MetaName.ActivateVehicleSiren, 5), - new MetaEnumEntryInfo_s(MetaName.AggressiveVehicleDriving, 6), - new MetaEnumEntryInfo_s(MetaName.LandVehicleOnArrival, 7), - new MetaEnumEntryInfo_s(MetaName.IgnoreThreatsIfLosNotClear, 8), - new MetaEnumEntryInfo_s(MetaName.EventsInRadiusTriggerDisputes, 9), - new MetaEnumEntryInfo_s(MetaName.AerialVehiclePoint, 10), - new MetaEnumEntryInfo_s(MetaName.TerritorialScenario, 11), - new MetaEnumEntryInfo_s(MetaName.EndScenarioIfPlayerWithinRadius, 12), - new MetaEnumEntryInfo_s(MetaName.EventsInRadiusTriggerThreatResponse, 13), - new MetaEnumEntryInfo_s(MetaName.TaxiPlaneOnGround, 14), - new MetaEnumEntryInfo_s(MetaName.FlyOffToOblivion, 15), - new MetaEnumEntryInfo_s(MetaName.InWater, 16), - new MetaEnumEntryInfo_s(MetaName.AllowInvestigation, 17), - new MetaEnumEntryInfo_s(MetaName.OpenDoor, 18), - new MetaEnumEntryInfo_s(MetaName.PreciseUseTime, 19), - new MetaEnumEntryInfo_s(MetaName.NoRespawnUntilStreamedOut, 20), - new MetaEnumEntryInfo_s(MetaName.NoVehicleSpawnMaxDistance, 21), - new MetaEnumEntryInfo_s(MetaName.ExtendedRange, 22), - new MetaEnumEntryInfo_s(MetaName.ShortRange, 23), - new MetaEnumEntryInfo_s(MetaName.HighPriority, 24), - new MetaEnumEntryInfo_s(MetaName.IgnoreLoitering, 25), - new MetaEnumEntryInfo_s(MetaName.UseSearchlight, 26), - new MetaEnumEntryInfo_s(MetaName.ResetNoCollisionOnCleanUp, 27), - new MetaEnumEntryInfo_s(MetaName.CheckCrossedArrivalPlane, 28), - new MetaEnumEntryInfo_s(MetaName.UseVehicleFrontForArrival, 29), - new MetaEnumEntryInfo_s(MetaName.IgnoreWeatherRestrictions, 30) - ); - case MetaName.CSpawnPoint__AvailabilityMpSp: - return new MetaEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp, 671739257, - new MetaEnumEntryInfo_s(MetaName.kBoth, 0), - new MetaEnumEntryInfo_s(MetaName.kOnlySp, 1), - new MetaEnumEntryInfo_s(MetaName.kOnlyMp, 2) - ); - case MetaName.CScenarioChainingEdge__eAction: - return new MetaEnumInfo(MetaName.CScenarioChainingEdge__eAction, 3326075799, - new MetaEnumEntryInfo_s(MetaName.Move, 0), - new MetaEnumEntryInfo_s((MetaName)7865678, 1), - new MetaEnumEntryInfo_s(MetaName.MoveFollowMaster, 2) - ); - case MetaName.CScenarioChainingEdge__eNavMode: - return new MetaEnumInfo(MetaName.CScenarioChainingEdge__eNavMode, 3016128742, - new MetaEnumEntryInfo_s(MetaName.Direct, 0), - new MetaEnumEntryInfo_s(MetaName.NavMesh, 1), - new MetaEnumEntryInfo_s(MetaName.Roads, 2) - ); - case MetaName.CScenarioChainingEdge__eNavSpeed: - return new MetaEnumInfo(MetaName.CScenarioChainingEdge__eNavSpeed, 1112851290, - new MetaEnumEntryInfo_s((MetaName)3279574318, 0), - new MetaEnumEntryInfo_s((MetaName)2212923970, 1), - new MetaEnumEntryInfo_s((MetaName)4022799658, 2), - new MetaEnumEntryInfo_s((MetaName)1425672334, 3), - new MetaEnumEntryInfo_s((MetaName)957720931, 4), - new MetaEnumEntryInfo_s((MetaName)3795195414, 5), - new MetaEnumEntryInfo_s((MetaName)2834622009, 6), - new MetaEnumEntryInfo_s((MetaName)1876554076, 7), - new MetaEnumEntryInfo_s((MetaName)698543797, 8), - new MetaEnumEntryInfo_s((MetaName)1544199634, 9), - new MetaEnumEntryInfo_s((MetaName)2725613303, 10), - new MetaEnumEntryInfo_s((MetaName)4033265820, 11), - new MetaEnumEntryInfo_s((MetaName)3054809929, 12), - new MetaEnumEntryInfo_s((MetaName)3911005380, 13), - new MetaEnumEntryInfo_s((MetaName)3717649022, 14), - new MetaEnumEntryInfo_s((MetaName)3356026130, 15) - ); - case MetaName.rage__fwArchetypeDef__eAssetType: - return new MetaEnumInfo(MetaName.rage__fwArchetypeDef__eAssetType, 1866031916, - new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_UNINITIALIZED, 0), - new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_FRAGMENT, 1), - new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_DRAWABLE, 2), - new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_DRAWABLEDICTIONARY, 3), - new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_ASSETLESS, 4) - ); - case MetaName.rage__eLodType: - return new MetaEnumInfo(MetaName.rage__eLodType, 1856311430, - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_HD, 0), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_LOD, 1), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD1, 2), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD2, 3), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD3, 4), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_ORPHANHD, 5), - new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD4, 6) - ); - case MetaName.rage__ePriorityLevel: - return new MetaEnumInfo(MetaName.rage__ePriorityLevel, 2200357711, - new MetaEnumEntryInfo_s(MetaName.PRI_REQUIRED, 0), - new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_HIGH, 1), - new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_MEDIUM, 2), - new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_LOW, 3) - ); - case MetaName.CExtensionDefLadderMaterialType: - return new MetaEnumInfo(MetaName.CExtensionDefLadderMaterialType, 3514570158, - new MetaEnumEntryInfo_s(MetaName.METAL_SOLID_LADDER, 0), - new MetaEnumEntryInfo_s(MetaName.METAL_LIGHT_LADDER, 1), - new MetaEnumEntryInfo_s(MetaName.WOODEN_LADDER, 2) - ); - case MetaName.CExtensionDefLightShaftDensityType: - return new MetaEnumInfo(MetaName.CExtensionDefLightShaftDensityType, 3539601182, - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_CONSTANT, 0), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT, 1), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT_SHADOW, 2), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT_SHADOW_HD, 3), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_LINEAR, 4), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_LINEAR_GRADIENT, 5), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC, 6), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC_GRADIENT, 7) - ); - case MetaName.CExtensionDefLightShaftVolumeType: - return new MetaEnumInfo(MetaName.CExtensionDefLightShaftVolumeType, 4287472345, - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_SHAFT, 0), - new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_CYLINDER, 1) - ); - case MetaName.ePedVarComp: - return new MetaEnumInfo(MetaName.ePedVarComp, 3472084374, - new MetaEnumEntryInfo_s(MetaName.PV_COMP_INVALID, -1), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_HEAD, 0), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_BERD, 1), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_HAIR, 2), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_UPPR, 3), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_LOWR, 4), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_HAND, 5), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_FEET, 6), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_TEEF, 7), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_ACCS, 8), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_TASK, 9), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_DECL, 10), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_JBIB, 11), - new MetaEnumEntryInfo_s(MetaName.PV_COMP_MAX, 12) - ); - case MetaName.ePropRenderFlags: - return new MetaEnumInfo(MetaName.ePropRenderFlags, 1551913633, - new MetaEnumEntryInfo_s(MetaName.PRF_ALPHA, 0), - new MetaEnumEntryInfo_s(MetaName.PRF_DECAL, 1), - new MetaEnumEntryInfo_s(MetaName.PRF_CUTOUT, 2) - ); - case MetaName.eAnchorPoints: - return new MetaEnumInfo(MetaName.eAnchorPoints, 1309372691, - new MetaEnumEntryInfo_s(MetaName.ANCHOR_HEAD, 0), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_EYES, 1), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_EARS, 2), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_MOUTH, 3), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_HAND, 4), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_HAND, 5), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_WRIST, 6), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_WRIST, 7), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_HIP, 8), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_FOOT, 9), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_FOOT, 10), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_PH_L_HAND, 11), - new MetaEnumEntryInfo_s(MetaName.ANCHOR_PH_R_HAND, 12), - new MetaEnumEntryInfo_s(MetaName.NUM_ANCHORS, 13) - ); - case MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef: - return new MetaEnumInfo(MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef, 1585854303, - new MetaEnumEntryInfo_s(MetaName.BOUND_DEF_IS_PLANE, 0) - ); - - default: - return null; - } + MetaName.CScenarioPointFlags__Flags => new MetaEnumInfo(MetaName.CScenarioPointFlags__Flags, 2814596095, + new MetaEnumEntryInfo_s(MetaName.IgnoreMaxInRange, 0), + new MetaEnumEntryInfo_s(MetaName.NoSpawn, 1), + new MetaEnumEntryInfo_s(MetaName.StationaryReactions, 2), + new MetaEnumEntryInfo_s(MetaName.OnlySpawnInSameInterior, 3), + new MetaEnumEntryInfo_s(MetaName.SpawnedPedIsArrestable, 4), + new MetaEnumEntryInfo_s(MetaName.ActivateVehicleSiren, 5), + new MetaEnumEntryInfo_s(MetaName.AggressiveVehicleDriving, 6), + new MetaEnumEntryInfo_s(MetaName.LandVehicleOnArrival, 7), + new MetaEnumEntryInfo_s(MetaName.IgnoreThreatsIfLosNotClear, 8), + new MetaEnumEntryInfo_s(MetaName.EventsInRadiusTriggerDisputes, 9), + new MetaEnumEntryInfo_s(MetaName.AerialVehiclePoint, 10), + new MetaEnumEntryInfo_s(MetaName.TerritorialScenario, 11), + new MetaEnumEntryInfo_s(MetaName.EndScenarioIfPlayerWithinRadius, 12), + new MetaEnumEntryInfo_s(MetaName.EventsInRadiusTriggerThreatResponse, 13), + new MetaEnumEntryInfo_s(MetaName.TaxiPlaneOnGround, 14), + new MetaEnumEntryInfo_s(MetaName.FlyOffToOblivion, 15), + new MetaEnumEntryInfo_s(MetaName.InWater, 16), + new MetaEnumEntryInfo_s(MetaName.AllowInvestigation, 17), + new MetaEnumEntryInfo_s(MetaName.OpenDoor, 18), + new MetaEnumEntryInfo_s(MetaName.PreciseUseTime, 19), + new MetaEnumEntryInfo_s(MetaName.NoRespawnUntilStreamedOut, 20), + new MetaEnumEntryInfo_s(MetaName.NoVehicleSpawnMaxDistance, 21), + new MetaEnumEntryInfo_s(MetaName.ExtendedRange, 22), + new MetaEnumEntryInfo_s(MetaName.ShortRange, 23), + new MetaEnumEntryInfo_s(MetaName.HighPriority, 24), + new MetaEnumEntryInfo_s(MetaName.IgnoreLoitering, 25), + new MetaEnumEntryInfo_s(MetaName.UseSearchlight, 26), + new MetaEnumEntryInfo_s(MetaName.ResetNoCollisionOnCleanUp, 27), + new MetaEnumEntryInfo_s(MetaName.CheckCrossedArrivalPlane, 28), + new MetaEnumEntryInfo_s(MetaName.UseVehicleFrontForArrival, 29), + new MetaEnumEntryInfo_s(MetaName.IgnoreWeatherRestrictions, 30) + ), + MetaName.CSpawnPoint__AvailabilityMpSp => new MetaEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp, 671739257, + new MetaEnumEntryInfo_s(MetaName.kBoth, 0), + new MetaEnumEntryInfo_s(MetaName.kOnlySp, 1), + new MetaEnumEntryInfo_s(MetaName.kOnlyMp, 2) + ), + MetaName.CScenarioChainingEdge__eAction => new MetaEnumInfo(MetaName.CScenarioChainingEdge__eAction, 3326075799, + new MetaEnumEntryInfo_s(MetaName.Move, 0), + new MetaEnumEntryInfo_s((MetaName)7865678, 1), + new MetaEnumEntryInfo_s(MetaName.MoveFollowMaster, 2) + ), + MetaName.CScenarioChainingEdge__eNavMode => new MetaEnumInfo(MetaName.CScenarioChainingEdge__eNavMode, 3016128742, + new MetaEnumEntryInfo_s(MetaName.Direct, 0), + new MetaEnumEntryInfo_s(MetaName.NavMesh, 1), + new MetaEnumEntryInfo_s(MetaName.Roads, 2) + ), + MetaName.CScenarioChainingEdge__eNavSpeed => new MetaEnumInfo(MetaName.CScenarioChainingEdge__eNavSpeed, 1112851290, + new MetaEnumEntryInfo_s((MetaName)3279574318, 0), + new MetaEnumEntryInfo_s((MetaName)2212923970, 1), + new MetaEnumEntryInfo_s((MetaName)4022799658, 2), + new MetaEnumEntryInfo_s((MetaName)1425672334, 3), + new MetaEnumEntryInfo_s((MetaName)957720931, 4), + new MetaEnumEntryInfo_s((MetaName)3795195414, 5), + new MetaEnumEntryInfo_s((MetaName)2834622009, 6), + new MetaEnumEntryInfo_s((MetaName)1876554076, 7), + new MetaEnumEntryInfo_s((MetaName)698543797, 8), + new MetaEnumEntryInfo_s((MetaName)1544199634, 9), + new MetaEnumEntryInfo_s((MetaName)2725613303, 10), + new MetaEnumEntryInfo_s((MetaName)4033265820, 11), + new MetaEnumEntryInfo_s((MetaName)3054809929, 12), + new MetaEnumEntryInfo_s((MetaName)3911005380, 13), + new MetaEnumEntryInfo_s((MetaName)3717649022, 14), + new MetaEnumEntryInfo_s((MetaName)3356026130, 15) + ), + MetaName.rage__fwArchetypeDef__eAssetType => new MetaEnumInfo(MetaName.rage__fwArchetypeDef__eAssetType, 1866031916, + new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_UNINITIALIZED, 0), + new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_FRAGMENT, 1), + new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_DRAWABLE, 2), + new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_DRAWABLEDICTIONARY, 3), + new MetaEnumEntryInfo_s(MetaName.ASSET_TYPE_ASSETLESS, 4) + ), + MetaName.rage__eLodType => new MetaEnumInfo(MetaName.rage__eLodType, 1856311430, + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_HD, 0), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_LOD, 1), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD1, 2), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD2, 3), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD3, 4), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_ORPHANHD, 5), + new MetaEnumEntryInfo_s(MetaName.LODTYPES_DEPTH_SLOD4, 6) + ), + MetaName.rage__ePriorityLevel => new MetaEnumInfo(MetaName.rage__ePriorityLevel, 2200357711, + new MetaEnumEntryInfo_s(MetaName.PRI_REQUIRED, 0), + new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_HIGH, 1), + new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_MEDIUM, 2), + new MetaEnumEntryInfo_s(MetaName.PRI_OPTIONAL_LOW, 3) + ), + MetaName.CExtensionDefLadderMaterialType => new MetaEnumInfo(MetaName.CExtensionDefLadderMaterialType, 3514570158, + new MetaEnumEntryInfo_s(MetaName.METAL_SOLID_LADDER, 0), + new MetaEnumEntryInfo_s(MetaName.METAL_LIGHT_LADDER, 1), + new MetaEnumEntryInfo_s(MetaName.WOODEN_LADDER, 2) + ), + MetaName.CExtensionDefLightShaftDensityType => new MetaEnumInfo(MetaName.CExtensionDefLightShaftDensityType, 3539601182, + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_CONSTANT, 0), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT, 1), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT_SHADOW, 2), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_SOFT_SHADOW_HD, 3), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_LINEAR, 4), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_LINEAR_GRADIENT, 5), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC, 6), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_DENSITYTYPE_QUADRATIC_GRADIENT, 7) + ), + MetaName.CExtensionDefLightShaftVolumeType => new MetaEnumInfo(MetaName.CExtensionDefLightShaftVolumeType, 4287472345, + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_SHAFT, 0), + new MetaEnumEntryInfo_s(MetaName.LIGHTSHAFT_VOLUMETYPE_CYLINDER, 1) + ), + MetaName.ePedVarComp => new MetaEnumInfo(MetaName.ePedVarComp, 3472084374, + new MetaEnumEntryInfo_s(MetaName.PV_COMP_INVALID, -1), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_HEAD, 0), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_BERD, 1), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_HAIR, 2), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_UPPR, 3), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_LOWR, 4), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_HAND, 5), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_FEET, 6), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_TEEF, 7), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_ACCS, 8), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_TASK, 9), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_DECL, 10), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_JBIB, 11), + new MetaEnumEntryInfo_s(MetaName.PV_COMP_MAX, 12) + ), + MetaName.ePropRenderFlags => new MetaEnumInfo(MetaName.ePropRenderFlags, 1551913633, + new MetaEnumEntryInfo_s(MetaName.PRF_ALPHA, 0), + new MetaEnumEntryInfo_s(MetaName.PRF_DECAL, 1), + new MetaEnumEntryInfo_s(MetaName.PRF_CUTOUT, 2) + ), + MetaName.eAnchorPoints => new MetaEnumInfo(MetaName.eAnchorPoints, 1309372691, + new MetaEnumEntryInfo_s(MetaName.ANCHOR_HEAD, 0), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_EYES, 1), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_EARS, 2), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_MOUTH, 3), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_HAND, 4), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_HAND, 5), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_WRIST, 6), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_WRIST, 7), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_HIP, 8), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_LEFT_FOOT, 9), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_RIGHT_FOOT, 10), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_PH_L_HAND, 11), + new MetaEnumEntryInfo_s(MetaName.ANCHOR_PH_R_HAND, 12), + new MetaEnumEntryInfo_s(MetaName.NUM_ANCHORS, 13) + ), + MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef => new MetaEnumInfo(MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef, 1585854303, + new MetaEnumEntryInfo_s(MetaName.BOUND_DEF_IS_PLANE, 0) + ), + _ => null, + }; } @@ -1423,11 +1347,11 @@ namespace CodeWalker.GameFiles string name = namehash.ToString(); if (string.IsNullOrEmpty(name)) { - name = "Unk_" + key; + name = $"Unk_{key}"; } if (!char.IsLetter(name[0])) { - name = "Unk_" + name; + name = $"Unk_{name}"; } return name; } @@ -1436,12 +1360,12 @@ namespace CodeWalker.GameFiles - public static byte[] ConvertToBytes(T item) where T : struct + public static byte[] ConvertToBytes(in T item) where T : struct { int size = Marshal.SizeOf(typeof(T)); //int offset = 0; byte[] arr = new byte[size]; - MemoryMarshal.TryWrite(arr.AsSpan(), ref item); + MemoryMarshal.TryWrite(arr.AsSpan(), in item); return arr; //IntPtr ptr = Marshal.AllocHGlobal(size); //Marshal.StructureToPtr(item, ptr, true); @@ -1450,35 +1374,46 @@ namespace CodeWalker.GameFiles //offset += size; //return arr; } - public static byte[] ConvertArrayToBytes(params T[] items) where T : struct + + [return: NotNullIfNotNull(nameof(items))] + public static byte[]? ConvertArrayToBytes(params T[]? items) where T : struct { - if (items == null) return null; + if (items is null) + return null; return MemoryMarshal.AsBytes(items.AsSpan()).ToArray(); } public static Span ConvertArrayToBytes(Span items) where T : struct { - if (items == null) return null; - return MemoryMarshal.AsBytes(items); } - public static T ConvertData(byte[] data) where T : struct + //public static T ConvertData(byte[] data) where T : struct + //{ + // MemoryMarshal.TryRead(data.AsSpan(), out T value); + + // return value; + // //GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); + // //var h = handle.AddrOfPinnedObject(); + // //var r = Marshal.PtrToStructure(h); + // //handle.Free(); + // //return r; + //} + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ConvertData(Span data) where T : struct { - MemoryMarshal.TryRead(data.AsSpan(), out T value); + TryConvertData(data, out T value); return value; - //GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); - //var h = handle.AddrOfPinnedObject(); - //var r = Marshal.PtrToStructure(h); - //handle.Free(); - //return r; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ConvertData(byte[] data, int offset) where T : struct { - MemoryMarshal.TryRead(data.AsSpan(offset), out T value); + TryConvertData(data.AsSpan(offset), out T value); return value; //GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); @@ -1487,6 +1422,23 @@ namespace CodeWalker.GameFiles //handle.Free(); //return r; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryConvertData(Span data, out T value) where T : struct + { + return MemoryMarshal.TryRead(data, out value); + } + + public static bool TryConvertData(byte[] data, int offset, out T value) where T : struct + { + return TryConvertData(data.AsSpan(offset), out value); + } + + public static Span ConvertDataArray(Span data, int count) where T : struct + { + return MemoryMarshal.Cast(data.Slice(0, count * Marshal.SizeOf(typeof(T)))); + } + public static Span ConvertDataArray(byte[] data, int offset, int count) where T : struct { //T[] items = new T[count]; @@ -1517,64 +1469,136 @@ namespace CodeWalker.GameFiles //return items; } - public static T[] ConvertDataArray(Meta meta, MetaName name, Array_StructurePointer array) where T : struct + + public static T[]? ConvertDataArray(Meta meta, MetaName name, in Array_StructurePointer array, T[]? buffer = null) where T : struct { //return ConvertDataArray(meta, name, array.Pointer, array.Count1); - uint count = array.Count1; - if (count == 0) return null; - MetaPOINTER[] ptrs = GetPointerArray(meta, array); - if (ptrs == null) return null; - if (ptrs.Length < count) - { return null; } - - T[] items = new T[count]; - - //MetaName blocktype = 0; - for (int i = 0; i < count; i++) - { - var ptr = ptrs[i]; - var offset = ptr.Offset; - var block = meta.GetBlock(ptr.BlockID); - if (block == null) - { - continue; - } - - //if (blocktype == 0) - //{ blocktype = block.StructureNameHash; } - //else if (block.StructureNameHash != blocktype) - //{ } //not all the same type..! - - if (block.StructureNameHash != name) - { - return null; - } //type mismatch - don't return anything... - if ((offset < 0) || (block.Data == null) || (offset >= block.Data.Length)) - { - continue; - } - items[i] = ConvertData(block.Data, offset); - } - - return items; - } - public static T[] ConvertDataArray(Meta meta, MetaName name, Array_Structure array) where T : struct - { - return ConvertDataArray(meta, name, array.Pointer, array.Count1); - } - public static T[] ConvertDataArray(Meta meta, MetaName name, ulong pointer, uint count) where T : struct - { + var count = (int)array.Count1; if (count == 0) return null; - T[] items = new T[count]; + var ptrsArr = ArrayPool.Shared.Rent(count); + try + { + Span ptrs = GetPointerArray(meta, in array, ptrsArr).AsSpan(0, count); + if (ptrs.IsEmpty) + return null; + if (ptrs.Length < count) + { + return null; + } + + T[] items = buffer ?? new T[count]; + + //MetaName blocktype = 0; + for (int i = 0; i < count; i++) + { + var ptr = ptrs[i]; + var offset = ptr.Offset; + var block = meta.GetBlock(ptr.BlockID); + if (block is null) + { + continue; + } + + if (block.StructureNameHash != name) + { + return null; + } //type mismatch - don't return anything... + if (offset < 0 || block.Data is null || offset >= block.Data.Length) + { + continue; + } + TryConvertData(block.Data.AsSpan(offset), out items[i]); + } + + return items; + } + finally + { + ArrayPool.Shared.Return(ptrsArr); + } + } + + public delegate void DataArrayAction(Span span, ref TArg arg); + + public static void ConvertDataArrayAction(Meta meta, MetaName name, in Array_Structure array, ref TState state, DataArrayAction action) where T : struct + { + ConvertDataArrayAction(meta, name, array.Pointer, array.Count1, ref state, action); + } + + public static T[]? ConvertDataArray(Meta meta, MetaName name, in Array_Structure array, T[]? buffer = null) where T : struct + { + return ConvertDataArray(meta, name, array.Pointer, array.Count1, buffer); + } + + public static void ConvertDataArrayAction(Meta meta, MetaName name, ulong pointer, uint count, ref TState state, DataArrayAction action) where T : struct + { + if (count == 0) + return; + int itemsize = Marshal.SizeOf(typeof(T)); int itemsleft = (int)count; //large arrays get split into chunks... uint ptrindex = (uint)(pointer & 0xFFF) - 1; uint ptroffset = (uint)((pointer >> 12) & 0xFFFFF); var ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; - if ((ptrblock == null) || (ptrblock.Data == null) || (ptrblock.StructureNameHash != name)) + if (ptrblock?.Data is null || ptrblock.StructureNameHash != name) + { + return; + } //no block or wrong block? shouldn't happen! + + int byteoffset = (int)ptroffset;// (ptroffset * 16 + ptrunkval); + int itemoffset = byteoffset / itemsize; + + int curi = 0; + while (itemsleft > 0) + { + int blockcount = ptrblock.DataLength / itemsize; + int itemcount = blockcount - itemoffset; + if (itemcount > itemsleft) + { + itemcount = itemsleft; + } //don't try to read too many items.. + + action(ConvertDataArray(ptrblock.Data, itemoffset * Marshal.SizeOf(typeof(T)), itemcount), ref state); + //for (int i = 0; i < itemcount; i++) + //{ + // int offset = (itemoffset + i) * itemsize; + // int index = curi + i; + // items[index] = ConvertData(ptrblock.Data, offset); + //} + itemoffset = 0; //start at beginning of next block.. + curi += itemcount; + itemsleft -= itemcount; + if (itemsleft <= 0) + { + return; + }//all done! + ptrindex++; + ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; + if (ptrblock?.Data is null || ptrblock.StructureNameHash != name) + { + break; + } //not enough items..? + } + + return; + } + + public static T[]? ConvertDataArray(Meta meta, MetaName name, ulong pointer, uint count, T[]? buffer = null) where T : struct + { + if (count == 0) + return null; + + T[] items = buffer ?? GC.AllocateUninitializedArray((int)count); + int itemsize = Marshal.SizeOf(typeof(T)); + int itemsleft = (int)count; //large arrays get split into chunks... + + uint ptrindex = (uint)(pointer & 0xFFF) - 1; + uint ptroffset = (uint)((pointer >> 12) & 0xFFFFF); + var ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; + if (ptrblock?.Data is null || ptrblock.StructureNameHash != name) { return null; } //no block or wrong block? shouldn't happen! @@ -1608,14 +1632,10 @@ namespace CodeWalker.GameFiles }//all done! ptrindex++; ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; - if ((ptrblock == null) || (ptrblock.Data == null)) + if (ptrblock?.Data is null || ptrblock.StructureNameHash != name) { break; } //not enough items..? - if (ptrblock.StructureNameHash != name) - { - break; - } //type mismatch.. } return null; @@ -1707,91 +1727,111 @@ namespace CodeWalker.GameFiles #endregion } - public static MetaPOINTER[] GetPointerArray(Meta meta, Array_StructurePointer array) + public static MetaPOINTER[] GetPointerArray(this Meta meta, in Array_StructurePointer array, MetaPOINTER[]? buffer = null) { uint count = array.Count1; - if (count == 0) return null; + if (count == 0) + return []; - MetaPOINTER[] ptrs = new MetaPOINTER[count]; int ptrsize = Marshal.SizeOf(typeof(MetaPOINTER)); int ptroffset = (int)array.PointerDataOffset; var ptrblock = meta.GetBlock((int)array.PointerDataId); - if ((ptrblock == null) || (ptrblock.Data == null) || (ptrblock.StructureNameHash != (MetaName)MetaTypeName.POINTER)) - { return null; } + if (ptrblock?.Data == null || ptrblock.StructureNameHash != (MetaName)MetaTypeName.POINTER) + { + return []; + } + MetaPOINTER[] ptrs = buffer ?? GC.AllocateUninitializedArray((int)count); for (int i = 0; i < count; i++) { int offset = ptroffset + (i * ptrsize); if (offset >= ptrblock.Data.Length) - { break; } - ptrs[i] = ConvertData(ptrblock.Data, offset); + { + break; + } + TryConvertData(ptrblock.Data.AsSpan(offset), out ptrs[i]); } return ptrs; } - public static MetaHash[] GetHashArray(Meta meta, Array_uint array) + //public static MetaPOINTER[]? GetPointerArray(this Meta meta, Array_StructurePointer array, MetaPOINTER[]? buffer = null) + //{ + // return GetPointerArray(meta, in array, buffer); + //} + + public static MetaHash[]? GetHashArray(this Meta meta, in Array_uint array) { return ConvertDataArray(meta, (MetaName)MetaTypeName.HASH, array.Pointer, array.Count1); } - public static Vector4[] GetPaddedVector3Array(Meta meta, Array_Vector3 array) + public static Vector4[]? GetPaddedVector3Array(Meta meta, in Array_Vector3 array) { return ConvertDataArray(meta, (MetaName)MetaTypeName.VECTOR4, array.Pointer, array.Count1); } - public static uint[] GetUintArray(Meta meta, Array_uint array) + public static uint[]? GetUintArray(Meta meta, in Array_uint array) { return ConvertDataArray(meta, (MetaName)MetaTypeName.UINT, array.Pointer, array.Count1); } - public static ushort[] GetUshortArray(Meta meta, Array_ushort array) + public static ushort[]? GetUshortArray(Meta meta, in Array_ushort array) { return ConvertDataArray(meta, (MetaName)MetaTypeName.USHORT, array.Pointer, array.Count1); } - public static short[] GetShortArray(Meta meta, Array_ushort array) - { - return ConvertDataArray(meta, (MetaName)MetaTypeName.USHORT, array.Pointer, array.Count1); - } - public static float[] GetFloatArray(Meta meta, Array_float array) + public static float[]? GetFloatArray(this Meta meta, in Array_float array) { return ConvertDataArray(meta, (MetaName)MetaTypeName.FLOAT, array.Pointer, array.Count1); } - public static byte[] GetByteArray(Meta meta, Array_byte array) + + public static byte[]? GetByteArray(this Meta meta, in Array_byte array) { uint ptrindex = array.PointerDataIndex; uint ptroffset = array.PointerDataOffset; - var ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; - if ((ptrblock == null) || (ptrblock.Data == null))// || (ptrblock.StructureNameHash != name)) - { return null; } //no block or wrong block? shouldn't happen! + + if (meta.DataBlocks is null || ptrindex >= meta.DataBlocks.Count) + return null; + + var ptrblock = meta.DataBlocks[(int)ptrindex]; + if (ptrblock?.Data is null)// || (ptrblock.StructureNameHash != name)) + return null; //no block or wrong block? shouldn't happen! + var count = array.Count1; - if ((ptroffset + count) > ptrblock.Data.Length) - { return null; } - byte[] data = new byte[count]; + if (ptroffset + count > ptrblock.Data.Length) + return null; + + byte[] data = GC.AllocateUninitializedArray(count); Buffer.BlockCopy(ptrblock.Data, (int)ptroffset, data, 0, count); return data; } - public static byte[] GetByteArray(Meta meta, DataBlockPointer ptr, uint count) + + public static byte[]? GetByteArray(Meta meta, in DataBlockPointer ptr, uint count) { //var pointer = array.Pointer; uint ptrindex = ptr.PointerDataIndex;// (pointer & 0xFFF) - 1; uint ptroffset = ptr.PointerDataOffset;// ((pointer >> 12) & 0xFFFFF); - var ptrblock = (ptrindex < meta.DataBlocks.Count) ? meta.DataBlocks[(int)ptrindex] : null; - if ((ptrblock == null) || (ptrblock.Data == null))// || (ptrblock.StructureNameHash != name)) - { return null; } //no block or wrong block? shouldn't happen! - //var count = array.Count1; - if ((ptroffset + count) > ptrblock.Data.Length) - { return null; } - byte[] data = new byte[count]; + + if (meta.DataBlocks is null || ptrindex >= meta.DataBlocks.Count) + return null; + + var ptrblock = meta.DataBlocks[(int)ptrindex]; + if (ptrblock?.Data is null) // || (ptrblock.StructureNameHash != name)) + return null; //no block or wrong block? shouldn't happen! + + if (ptroffset + count > ptrblock.Data.Length) + return null; + + byte[] data = GC.AllocateUninitializedArray((int)count); Buffer.BlockCopy(ptrblock.Data, (int)ptroffset, data, 0, (int)count); return data; } - public static T[] GetTypedDataArray(Meta meta, MetaName name) where T : struct + public static T[]? GetTypedDataArray(Meta meta, MetaName name) where T : struct { - if ((meta == null) || (meta.DataBlocks == null)) return null; + if (meta?.DataBlocks is null) + return null; var datablocks = meta.DataBlocks.Data; - MetaDataBlock startblock = null; + MetaDataBlock? startblock = null; int startblockind = -1; for (int i = 0; i < datablocks.Count; i++) { @@ -1803,7 +1843,7 @@ namespace CodeWalker.GameFiles break; } } - if (startblock == null) + if (startblock is null) { return null; //couldn't find the data. } @@ -1812,14 +1852,17 @@ namespace CodeWalker.GameFiles int itemsize = Marshal.SizeOf(typeof(T)); var currentblock = startblock; int currentblockind = startblockind; - while (currentblock != null) + while (currentblock is not null) { int blockitems = currentblock.DataLength / itemsize; count += blockitems; currentblockind++; - if (currentblockind >= datablocks.Count) break; //last block, can't go any further + if (currentblockind >= datablocks.Count) + break; //last block, can't go any further + currentblock = datablocks[currentblockind]; - if (currentblock.StructureNameHash != name) break; //not the right block type, can't go further + if (currentblock.StructureNameHash != name) + break; //not the right block type, can't go further } if (count <= 0) @@ -1829,26 +1872,49 @@ namespace CodeWalker.GameFiles return ConvertDataArray(meta, name, (uint)startblockind + 1, (uint)count); } + + [DoesNotReturn] + private static void ThrowBlockNotFoundException(MetaName name) + { + throw new Exception($"Couldn't find {name} block."); + } + public static T GetTypedData(Meta meta, MetaName name) where T : struct { - foreach (var block in meta.DataBlocks) + ArgumentNullException.ThrowIfNull(meta, nameof(meta)); + if (meta?.DataBlocks is null) + { + ThrowHelper.ThrowInvalidOperationException($"meta.DataBlocks is null!"); + } + + foreach (var block in meta.DataBlocks.Span) { if (block.StructureNameHash == name) { - return MetaTypes.ConvertData(block.Data); + return ConvertData(block.Data); } } - throw new Exception("Couldn't find " + name.ToString() + " block."); + //foreach (var block in meta.DataBlocks) + //{ + // if (block.StructureNameHash == name) + // { + // return MetaTypes.ConvertData(block.Data); + // } + //} + + ThrowBlockNotFoundException(name); + return default; } - public static string[] GetStrings(Meta meta) + public static string[]? GetStrings(this Meta? meta) { //look for strings in the sectionSTRINGS data block(s) - if ((meta == null) || (meta.DataBlocks == null)) return null; + if (meta?.DataBlocks is null) + return null; var datablocks = meta.DataBlocks.Data; - MetaDataBlock startblock = null; + MetaDataBlock? startblock = null; int startblockind = -1; for (int i = 0; i < datablocks.Count; i++) { @@ -1860,52 +1926,61 @@ namespace CodeWalker.GameFiles break; } } - if (startblock == null) + if (startblock is null) { return null; //couldn't find the strings data section. } - List strings = new List(); - StringBuilder sb = new StringBuilder(); + using PooledList strings = new PooledList(); var currentblock = startblock; int currentblockind = startblockind; while (currentblock != null) { //read strings from the block. - - sb.Clear(); int startindex = 0; int endindex = 0; var data = currentblock.Data; - for (int b = 0; b < data.Length; b++) + foreach(var span in data.AsSpan().EnumerateSplit((byte)0)) { - if (data[b] == 0) + if (!span.IsEmpty) { - startindex = endindex; - endindex = b; - if (endindex > startindex) - { - string str = Encoding.ASCII.GetString(data, startindex, endindex - startindex); - strings.Add(str); - endindex++; //start next string after the 0. - } - } - } - if (endindex != data.Length - 1) - { - startindex = endindex; - endindex = data.Length - 1; - if (endindex > startindex) - { - string str = Encoding.ASCII.GetString(data, startindex, endindex - startindex); + string str = Encoding.ASCII.GetStringPooled(span); strings.Add(str); } } + //for (int b = 0; b < data.Length; b++) + //{ + // if (data[b] == 0) + // { + // startindex = endindex; + // endindex = b; + // if (endindex > startindex) + // { + // string str = Encoding.ASCII.GetString(data.AsSpan(startindex, endindex - startindex)); + // strings.Add(str); + // endindex++; //start next string after the 0. + // } + // } + //} + //if (endindex != data.Length - 1) + //{ + // startindex = endindex; + // endindex = data.Length - 1; + // if (endindex > startindex) + // { + // string str = Encoding.ASCII.GetString(data.AsSpan(startindex, endindex - startindex)); + // strings.Add(str); + // strings2.Add(str); + // } + //} currentblockind++; - if (currentblockind >= datablocks.Count) break; //last block, can't go any further + if (currentblockind >= datablocks.Count) + break; //last block, can't go any further + currentblock = datablocks[currentblockind]; - if (currentblock.StructureNameHash != (MetaName)MetaTypeName.STRING) break; //not the right block type, can't go further + if (currentblock.StructureNameHash != (MetaName)MetaTypeName.STRING) + break; //not the right block type, can't go further } @@ -1915,186 +1990,181 @@ namespace CodeWalker.GameFiles } return strings.ToArray(); } - public static string GetString(Meta meta, CharPointer ptr) + + [SkipLocalsInit] + public static string? GetString(this Meta meta, in CharPointer ptr) { var blocki = (int)ptr.PointerDataIndex;// (ptr.Pointer & 0xFFF) - 1; var offset = (int)ptr.PointerDataOffset;// (ptr.Pointer >> 12) & 0xFFFFF; if ((blocki < 0) || (blocki >= meta.DataBlocks.BlockLength)) - { return null; } + { + return null; + } var block = meta.DataBlocks[blocki]; if (block.StructureNameHash != (MetaName)MetaTypeName.STRING) - { return null; } + { + return null; + } //var byteoffset = offset * 16 + offset2; var length = ptr.Count1; var lastbyte = offset + length; if (lastbyte >= block.DataLength) - { return null; } - string s = Encoding.ASCII.GetString(block.Data, offset, length); + { + return null; + } + + //string s = Encoding.ASCII.GetString(block.Data.AsSpan(offset, length)); //if (meta.Strings == null) return null; //if (offset < 0) return null; //if (offset >= meta.Strings.Length) return null; //string s = meta.Strings[offset]; - return s; + return Encoding.ASCII.GetStringPooled(block.Data.AsSpan(offset, length)); } - public static MetaWrapper[] GetExtensions(Meta meta, Array_StructurePointer ptr) + public static string? GetString(this Meta meta, CharPointer ptr) { - if (ptr.Count1 == 0) return null; + return GetString(meta, in ptr); + } + + public static MetaWrapper[]? GetExtensions(Meta meta, in Array_StructurePointer ptr) + { + if (ptr.Count1 == 0) + return null; var result = new MetaWrapper[ptr.Count1]; - var extptrs = GetPointerArray(meta, ptr); - if (extptrs != null) + var ptrs = ArrayPool.Shared.Rent(ptr.Count1); + try { - for (int i = 0; i < extptrs.Length; i++) + GetPointerArray(meta, in ptr, ptrs); + var extptrs = ptrs.AsSpan(0, ptr.Count1); + if (!extptrs.IsEmpty) { - var extptr = extptrs[i]; - MetaWrapper ext = null; - var block = meta.GetBlock(extptr.BlockID); - var h = block.StructureNameHash; - switch (h) + for (int i = 0; i < extptrs.Length; i++) { - //archetype extension types - case MetaName.CExtensionDefParticleEffect: - ext = new MCExtensionDefParticleEffect();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefAudioCollisionSettings: - ext = new MCExtensionDefAudioCollisionSettings();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefAudioEmitter: - ext = new MCExtensionDefAudioEmitter();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefSpawnPoint: - ext = new MCExtensionDefSpawnPoint();// new MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefExplosionEffect: - ext = new MCExtensionDefExplosionEffect();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefLadder: - ext = new MCExtensionDefLadder();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefBuoyancy: - ext = new MCExtensionDefBuoyancy();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefExpression: - ext = new MCExtensionDefExpression();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefLightShaft: - ext = new MCExtensionDefLightShaft();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefWindDisturbance: - ext = new MCExtensionDefWindDisturbance();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefProcObject: - ext = new MCExtensionDefProcObject();// MetaExtension(h, GetData(block, extptr)); - break; + ref var extptr = ref extptrs[i]; + var block = meta.GetBlock(extptr.BlockID); + var h = block?.StructureNameHash ?? 0; - //entity extension types - case MetaName.CExtensionDefLightEffect: - ext = new MCExtensionDefLightEffect();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefSpawnPointOverride: - ext = new MCExtensionDefSpawnPointOverride();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.CExtensionDefDoor: - ext = new MCExtensionDefDoor();// MetaExtension(h, GetData(block, extptr)); - break; - case MetaName.rage__phVerletClothCustomBounds: //rage__phVerletClothCustomBounds - ext = new Mrage__phVerletClothCustomBounds();// MetaExtension(h, GetData(block, extptr)); - break; + //var extptr = extptrs[i]; + MetaWrapper? ext = h switch + { + //archetype extension types + MetaName.CExtensionDefParticleEffect => new MCExtensionDefParticleEffect(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefAudioCollisionSettings => new MCExtensionDefAudioCollisionSettings(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefAudioEmitter => new MCExtensionDefAudioEmitter(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefSpawnPoint => new MCExtensionDefSpawnPoint(),// new MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefExplosionEffect => new MCExtensionDefExplosionEffect(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefLadder => new MCExtensionDefLadder(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefBuoyancy => new MCExtensionDefBuoyancy(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefExpression => new MCExtensionDefExpression(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefLightShaft => new MCExtensionDefLightShaft(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefWindDisturbance => new MCExtensionDefWindDisturbance(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefProcObject => new MCExtensionDefProcObject(),// MetaExtension(h, GetData(block, extptr)); + //entity extension types + MetaName.CExtensionDefLightEffect => new MCExtensionDefLightEffect(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefSpawnPointOverride => new MCExtensionDefSpawnPointOverride(),// MetaExtension(h, GetData(block, extptr)); + MetaName.CExtensionDefDoor => new MCExtensionDefDoor(),// MetaExtension(h, GetData(block, extptr)); + //rage__phVerletClothCustomBounds + MetaName.rage__phVerletClothCustomBounds => new Mrage__phVerletClothCustomBounds(),// MetaExtension(h, GetData(block, extptr)); + _ => null, + }; - default: - break; - } + //string ts = GetTypesInitString(meta); - //string ts = GetTypesInitString(meta); - - if (ext != null) - { - ext.Load(meta, extptr); - } - if (i < result.Length) - { - result[i] = ext; + ext?.Load(meta, in extptr); + if (i < result.Length) + { + result[i] = ext; + } } } } + finally + { + ArrayPool.Shared.Return(ptrs); + } return result; } - public static int GetDataOffset(MetaDataBlock block, MetaPOINTER ptr) + public static int GetDataOffset(MetaDataBlock? block, in MetaPOINTER ptr) { - if (block == null) return -1; + if (block is null || block.Data is null) + return -1; + var offset = ptr.Offset; - if ((offset < 0) || (block.Data == null) || (offset >= block.Data.Length)) - { return -1; } + if (offset < 0 || offset >= block.Data.Length) + return -1; + return offset; } - public static T GetData(Meta meta, MetaPOINTER ptr) where T : struct + + public static T GetData(Meta meta, in MetaPOINTER ptr) where T : struct { - var block = meta.GetBlock(ptr.BlockID); - var offset = GetDataOffset(block, ptr); - if (offset < 0) return new T(); - return ConvertData(block.Data, offset); + _ = TryGetData(meta, in ptr, out var result); + + return result; } + public static bool TryGetData(Meta meta, in MetaPOINTER ptr, out T result) where T : struct + { + var block = meta.GetBlock(ptr.BlockID); + var offset = GetDataOffset(block, in ptr); + if (offset < 0 || block is null) + { + result = default; + return false; + } + + return TryConvertData(block.Data, out result); + } public static ushort SwapBytes(ushort x) { - return (ushort)(((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)); + return BinaryPrimitives.ReverseEndianness(x); } public static short SwapBytes(short x) { - return (short)SwapBytes((ushort)x); + return BinaryPrimitives.ReverseEndianness(x); } public static uint SwapBytes(uint x) { - // swap adjacent 16-bit blocks - x = (x >> 16) | (x << 16); - // swap adjacent 8-bit blocks - return ((x & 0xFF00FF00) >> 8) | ((x & 0x00FF00FF) << 8); + return BinaryPrimitives.ReverseEndianness(x); } public static int SwapBytes(int x) { - return (int)SwapBytes((uint)x); + return BinaryPrimitives.ReverseEndianness(x); } public static ulong SwapBytes(ulong x) { - //////// [not swapping 32bit blocks! careful!] - ////// swap adjacent 32-bit blocks - ////x = (x >> 32) | (x << 32); - // swap adjacent 16-bit blocks + ////////// [not swapping 32bit blocks! careful!] + //////// swap adjacent 32-bit blocks + //////x = (x >> 32) | (x << 32); + //// swap adjacent 16-bit blocks x = ((x & 0xFFFF0000FFFF0000) >> 16) | ((x & 0x0000FFFF0000FFFF) << 16); - // swap adjacent 8-bit blocks + //// swap adjacent 8-bit blocks return ((x & 0xFF00FF00FF00FF00) >> 8) | ((x & 0x00FF00FF00FF00FF) << 8); + + //return (ulong)((ulong)(BinaryPrimitives.ReverseEndianness((uint)(x >> 32)) << 32) | (ulong)BinaryPrimitives.ReverseEndianness((uint)(x & 0xFFFFFFFF))); } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float SwapBytes(float f) { - var a = BitConverter.GetBytes(f); - Array.Reverse(a); - return BitConverter.ToSingle(a, 0); + return BitConverter.Int32BitsToSingle(BinaryPrimitives.ReverseEndianness(BitConverter.SingleToInt32Bits(f))); } - public static Vector2 SwapBytes(Vector2 v) + public static Vector2 SwapBytes(in Vector2 v) { - var x = SwapBytes(v.X); - var y = SwapBytes(v.Y); - return new Vector2(x, y); + return new Vector2(SwapBytes(v.X), SwapBytes(v.Y)); } - public static Vector3 SwapBytes(Vector3 v) + public static Vector3 SwapBytes(in Vector3 v) { - var x = SwapBytes(v.X); - var y = SwapBytes(v.Y); - var z = SwapBytes(v.Z); - return new Vector3(x, y, z); + return new Vector3(SwapBytes(v.X), SwapBytes(v.Y), SwapBytes(v.Z)); } - public static Vector4 SwapBytes(Vector4 v) + public static Vector4 SwapBytes(in Vector4 v) { - var x = SwapBytes(v.X); - var y = SwapBytes(v.Y); - var z = SwapBytes(v.Z); - var w = SwapBytes(v.W); - return new Vector4(x, y, z, w); + return new Vector4(SwapBytes(v.X), SwapBytes(v.Y), SwapBytes(v.Z), SwapBytes(v.W)); } } @@ -2122,10 +2192,11 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public abstract class MetaWrapper + [TC(typeof(EXP))] + public abstract class MetaWrapper { - public virtual string Name { get { return ToString(); } } - public abstract void Load(Meta meta, MetaPOINTER ptr); + public virtual string Name => ToString(); + public abstract void Load(Meta meta, in MetaPOINTER ptr); public abstract MetaPOINTER Save(MetaBuilder mb); } @@ -2333,24 +2404,23 @@ namespace CodeWalker.GameFiles //generated + adjusted structs code (UnusedX padding vars manually added) from here down, + meta wrapper classes - [TC(typeof(EXP))] public struct CMapTypes //80 bytes, Key:2608875220 + [TC(typeof(EXP))] + public struct CMapTypes //80 bytes, Key:2608875220 { - public uint Unused0 { get; set; }//0 - public uint Unused1 { get; set; }//4 - public Array_StructurePointer extensions { get; set; } //8 8: Array: 0: extensions {0: StructurePointer: 0: 256} - public Array_StructurePointer archetypes { get; set; } //24 24: Array: 0: archetypes {0: StructurePointer: 0: 256} - public MetaHash name { get; set; } //40 40: Hash: 0: name - public uint Unused2 { get; set; }//44 - public Array_uint dependencies { get; set; } //48 48: Array: 0: dependencies//1013942340 {0: Hash: 0: 256} - public Array_Structure compositeEntityTypes { get; set; } //64 64: Array: 0: compositeEntityTypes {0: Structure: SectionUNKNOWN2: 256} + public uint Unused0;//0 + public uint Unused1;//4 + public Array_StructurePointer extensions; //8 8: Array: 0: extensions {0: StructurePointer: 0: 256} + public Array_StructurePointer archetypes; //24 24: Array: 0: archetypes {0: StructurePointer: 0: 256} + public MetaHash name; //40 40: Hash: 0: name + public uint Unused2;//44 + public Array_uint dependencies; //48 48: Array: 0: dependencies//1013942340 {0: Hash: 0: 256} + public Array_Structure compositeEntityTypes; //64 64: Array: 0: compositeEntityTypes {0: Structure: SectionUNKNOWN2: 256} - public override string ToString() - { - return name.ToString(); - } + public override readonly string ToString() => name.ToString(); } - [TC(typeof(EXP))] public struct CBaseArchetypeDef //144 bytes, Key:2411387556 + [TC(typeof(EXP))] + public struct CBaseArchetypeDef //144 bytes, Key:2411387556 { public uint Unused00 { get; set; }//0 public uint Unused01 { get; set; }//4 @@ -2360,11 +2430,11 @@ namespace CodeWalker.GameFiles public uint Unused02 { get; set; }//20 public uint Unused03 { get; set; }//24 public uint Unused04 { get; set; }//28 - public Vector3 bbMin { get; set; } //32 32: Float_XYZ: 0: bbMin + public Vector3 bbMin; //32 32: Float_XYZ: 0: bbMin public float Unused05 { get; set; }//44 - public Vector3 bbMax { get; set; } //48 48: Float_XYZ: 0: bbMax + public Vector3 bbMax; //48 48: Float_XYZ: 0: bbMax public float Unused06 { get; set; }//60 - public Vector3 bsCentre { get; set; } //64 64: Float_XYZ: 0: bsCentre + public Vector3 bsCentre; //64 64: Float_XYZ: 0: bsCentre public float Unused07 { get; set; }//76 public float bsRadius { get; set; } //80 80: Float: 0: bsRadius public float hdTextureDist { get; set; } //84 84: Float: 0: hdTextureDist//2908576588 @@ -2376,21 +2446,16 @@ namespace CodeWalker.GameFiles public rage__fwArchetypeDef__eAssetType assetType { get; set; } //108 108: IntEnum: 1991964615: assetType public MetaHash assetName { get; set; } //112 112: Hash: 0: assetName public uint Unused08 { get; set; }//116 - public Array_StructurePointer extensions { get; set; } //120 120: Array: 0: extensions {0: StructurePointer: 0: 256} + public Array_StructurePointer extensions; //120 120: Array: 0: extensions {0: StructurePointer: 0: 256} public uint Unused09 { get; set; }//136 public uint Unused10 { get; set; }//140 - public override string ToString() - { - return name.ToString() + ", " + - assetName.ToString() + ", " + - drawableDictionary.ToString() + ", " + - textureDictionary.ToString(); - } + public override readonly string ToString() => $"{name}, {assetName}, {drawableDictionary}, {textureDictionary}"; } - [TC(typeof(EXP))] public struct CBaseArchetypeDef_v2 //128 bytes, Key:2352343492 //old version... + [TC(typeof(EXP))] + public struct CBaseArchetypeDef_v2 //128 bytes, Key:2352343492 //old version... { public uint Unused00 { get; set; }//0 public uint Unused01 { get; set; }//4 @@ -2417,66 +2482,68 @@ namespace CodeWalker.GameFiles public Array_StructurePointer extensions { get; set; } //112 112: Array: 0: extensions {0: StructurePointer: 0: 256} } - [TC(typeof(EXP))] public struct CTimeArchetypeDefData + [TC(typeof(EXP))] + public struct CTimeArchetypeDefData { public uint timeFlags { get; set; } //144 144: UnsignedInt: 0: timeFlags//2248791340 public uint Unused11 { get; set; }//148 public uint Unused12 { get; set; }//152 public uint Unused13 { get; set; }//156 } - [TC(typeof(EXP))] public struct CTimeArchetypeDef //160 bytes, Key:2520619910 + + [TC(typeof(EXP))] + public struct CTimeArchetypeDef //160 bytes, Key:2520619910 { public CBaseArchetypeDef _BaseArchetypeDef; public CTimeArchetypeDefData _TimeArchetypeDef; - public CBaseArchetypeDef BaseArchetypeDef { get { return _BaseArchetypeDef; } set { _BaseArchetypeDef = value; } } - public CTimeArchetypeDefData TimeArchetypeDef { get { return _TimeArchetypeDef; } set { _TimeArchetypeDef = value; } } + public readonly CBaseArchetypeDef BaseArchetypeDef => _BaseArchetypeDef; + public readonly CTimeArchetypeDefData TimeArchetypeDef => _TimeArchetypeDef; - public override string ToString() - { - return _BaseArchetypeDef.ToString(); - } + public override readonly string ToString() => _BaseArchetypeDef.ToString(); } - [TC(typeof(EXP))] public struct CMloArchetypeDefData + [TC(typeof(EXP))] + public struct CMloArchetypeDefData { public uint mloFlags { get; set; } //144 144: UnsignedInt: 0: mloFlags//3590839912 public uint Unused11 { get; set; }//148 - public Array_StructurePointer entities { get; set; } //152 152: Array: 0: entities {0: StructurePointer: 0: 256} - public Array_Structure rooms { get; set; } //168 168: Array: 0: rooms {0: Structure: CMloRoomDef: 256} - public Array_Structure portals { get; set; } //184 184: Array: 0: portals//2314725778 {0: Structure: CMloPortalDef: 256} - public Array_Structure entitySets { get; set; } //200 200: Array: 0: entitySets//1169996080 {0: Structure: CMloEntitySet: 256} - public Array_Structure timeCycleModifiers { get; set; } //216 216: Array: 0: timeCycleModifiers {0: Structure: CMloTimeCycleModifier: 256} + public Array_StructurePointer entities; //152 152: Array: 0: entities {0: StructurePointer: 0: 256} + public Array_Structure rooms; //168 168: Array: 0: rooms {0: Structure: CMloRoomDef: 256} + public Array_Structure portals; //184 184: Array: 0: portals//2314725778 {0: Structure: CMloPortalDef: 256} + public Array_Structure entitySets; //200 200: Array: 0: entitySets//1169996080 {0: Structure: CMloEntitySet: 256} + public Array_Structure timeCycleModifiers; //216 216: Array: 0: timeCycleModifiers {0: Structure: CMloTimeCycleModifier: 256} public uint Unused12 { get; set; }//232 public uint Unused13 { get; set; }//236 } - [TC(typeof(EXP))] public struct CMloArchetypeDef //240 bytes, Key:937664754 + + [TC(typeof(EXP))] + public struct CMloArchetypeDef //240 bytes, Key:937664754 { public CBaseArchetypeDef _BaseArchetypeDef; public CMloArchetypeDefData _MloArchetypeDef; - public CBaseArchetypeDef BaseArchetypeDef { get { return _BaseArchetypeDef; } set { _BaseArchetypeDef = value; } } - public CMloArchetypeDefData MloArchetypeDef { get { return _MloArchetypeDef; } set { _MloArchetypeDef = value; } } + public readonly CBaseArchetypeDef BaseArchetypeDef => _BaseArchetypeDef; + public readonly CMloArchetypeDefData MloArchetypeDef => _MloArchetypeDef; - public override string ToString() - { - return _BaseArchetypeDef.ToString(); - } + public override readonly string ToString() => _BaseArchetypeDef.ToString(); } - [TC(typeof(EXP))] public struct CMloInstanceDef //160 bytes, Key:2151576752 + [TC(typeof(EXP))] + public struct CMloInstanceDef //160 bytes, Key:2151576752 { - public CEntityDef CEntityDef { get; set; } + public CEntityDef CEntityDef; public uint groupId { get; set; } //128 128: UnsignedInt: 0: 2501631252 public uint floorId { get; set; } //132 132: UnsignedInt: 0: floorId//2187650609 - public Array_uint defaultEntitySets { get; set; } //136 136: Array: 0: defaultEntitySets//1407157833 {0: Hash: 0: 256} + public Array_uint defaultEntitySets; //136 136: Array: 0: defaultEntitySets//1407157833 {0: Hash: 0: 256} public uint numExitPortals { get; set; } //152 152: UnsignedInt: 0: numExitPortals//528711607 public uint MLOInstflags { get; set; } //156 156: UnsignedInt: 0: MLOInstflags//3761966250 } - [TC(typeof(EXP))] public struct CMloRoomDef //112 bytes, Key:3885428245 + [TC(typeof(EXP))] + public struct CMloRoomDef //112 bytes, Key:3885428245 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 - public CharPointer name { get; set; } //8 8: CharPointer: 0: name + public CharPointer name; //8 8: CharPointer: 0: name public uint Unused2 { get; set; }//24 public uint Unused3 { get; set; }//28 public Vector3 bbMin { get; set; } //32 32: Float_XYZ: 0: bbMin @@ -2491,9 +2558,11 @@ namespace CodeWalker.GameFiles public int floorId { get; set; } //84 84: SignedInt: 0: floorId//2187650609 public int exteriorVisibiltyDepth { get; set; } //88 88: SignedInt: 0: exteriorVisibiltyDepth//552849982 public uint Unused6 { get; set; }//92 - public Array_uint attachedObjects { get; set; } //96 96: Array: 0: attachedObjects//2382704940 {0: UnsignedInt: 0: 256} + public Array_uint attachedObjects; //96 96: Array: 0: attachedObjects//2382704940 {0: UnsignedInt: 0: 256} } - [TC(typeof(EXP))] public class MCMloRoomDef : MetaWrapper + + [TC(typeof(EXP))] + public class MCMloRoomDef : MetaWrapper { public CMloRoomDef _Data; public CMloRoomDef Data { get { return _Data; } } @@ -2514,15 +2583,15 @@ namespace CodeWalker.GameFiles public MCMloRoomDef(Meta meta, CMloRoomDef data) { _Data = data; - RoomName = MetaTypes.GetString(meta, _Data.name); - AttachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects) ?? Array.Empty(); + RoomName = MetaTypes.GetString(meta, in _Data.name); + AttachedObjects = MetaTypes.GetUintArray(meta, in _Data.attachedObjects) ?? Array.Empty(); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - RoomName = MetaTypes.GetString(meta, _Data.name); - AttachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects); + MetaTypes.TryGetData(meta, in ptr, out _Data); + RoomName = MetaTypes.GetString(meta, in _Data.name); + AttachedObjects = MetaTypes.GetUintArray(meta, in _Data.attachedObjects) ?? Array.Empty(); } public override MetaPOINTER Save(MetaBuilder mb) @@ -2539,24 +2608,16 @@ namespace CodeWalker.GameFiles _Data.attachedObjects = mb.AddUintArrayPtr(AttachedObjects); mb.AddStructureInfo(MetaName.CMloRoomDef); - return mb.AddItemPtr(MetaName.CMloRoomDef, _Data); + return mb.AddItemPtr(MetaName.CMloRoomDef, in _Data); } - public override string Name - { - get - { - return RoomName; - } - } + public override string Name => RoomName; - public override string ToString() - { - return RoomName; - } + public override string ToString() => RoomName; } - [TC(typeof(EXP))] public struct CMloPortalDef //64 bytes, Key:1110221513 + [TC(typeof(EXP))] + public struct CMloPortalDef //64 bytes, Key:1110221513 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -2566,13 +2627,15 @@ namespace CodeWalker.GameFiles public uint mirrorPriority { get; set; } //20 20: UnsignedInt: 0: 1185490713 public uint opacity { get; set; } //24 24: UnsignedInt: 0: opacity public uint audioOcclusion { get; set; } //28 28: UnsignedInt: 0: 1093790004 - public Array_Vector3 corners { get; set; } //32 32: Array: 0: corners {0: Float_XYZ: 0: 256} - public Array_uint attachedObjects { get; set; } //48 48: Array: 0: attachedObjects//2382704940 {0: UnsignedInt: 0: 256} + public Array_Vector3 corners; //32 32: Array: 0: corners {0: Float_XYZ: 0: 256} + public Array_uint attachedObjects; //48 48: Array: 0: attachedObjects//2382704940 {0: UnsignedInt: 0: 256} } - [TC(typeof(EXP))] public class MCMloPortalDef : MetaWrapper + + [TC(typeof(EXP))] + public class MCMloPortalDef : MetaWrapper { public CMloPortalDef _Data; - public CMloPortalDef Data { get { return _Data; } } + public CMloPortalDef Data => _Data; public Vector4[] Corners { get; set; } public uint[] AttachedObjects { get; set; } @@ -2580,7 +2643,8 @@ namespace CodeWalker.GameFiles { get { - if ((Corners == null)||(Corners.Length==0)) return Vector3.Zero; + if (Corners == null || Corners.Length == 0) + return Vector3.Zero; var v = Vector3.Zero; for (int i = 0; i < Corners.Length; i++) { @@ -2598,20 +2662,20 @@ namespace CodeWalker.GameFiles public MCMloPortalDef(Meta meta, CMloPortalDef data) { _Data = data; - Corners = MetaTypes.GetPaddedVector3Array(meta, _Data.corners); - AttachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects); + Corners = MetaTypes.GetPaddedVector3Array(meta, in _Data.corners); + AttachedObjects = MetaTypes.GetUintArray(meta, in _Data.attachedObjects); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - Corners = MetaTypes.GetPaddedVector3Array(meta, _Data.corners); - AttachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects); + MetaTypes.TryGetData(meta, in ptr, out _Data); + Corners = MetaTypes.GetPaddedVector3Array(meta, in _Data.corners); + AttachedObjects = MetaTypes.GetUintArray(meta, in _Data.attachedObjects); } public override MetaPOINTER Save(MetaBuilder mb) { - if (Corners!=null) + if (Corners is not null) { _Data.corners = mb.AddPaddedVector3ArrayPtr(Corners); } @@ -2620,7 +2684,7 @@ namespace CodeWalker.GameFiles _Data.corners = new Array_Vector3(); } - if (AttachedObjects != null) + if (AttachedObjects is not null) { _Data.attachedObjects = mb.AddUintArrayPtr(AttachedObjects); } @@ -2630,45 +2694,42 @@ namespace CodeWalker.GameFiles } mb.AddStructureInfo(MetaName.CMloPortalDef); - return mb.AddItemPtr(MetaName.CMloPortalDef, _Data); + return mb.AddItemPtr(MetaName.CMloPortalDef, in _Data); } - public override string Name - { - get - { - return Index.ToString() + ": " + _Data.roomFrom.ToString() + " to " + _Data.roomTo.ToString(); - } - } + public override string Name => $"{Index}: {_Data.roomFrom} to {_Data.roomTo}"; - public override string ToString() - { - return Name; - } + public override string ToString() => Name; } - [TC(typeof(EXP))] public struct CMloEntitySet //48 bytes, Key:4180211587 + [TC(typeof(EXP))] + public struct CMloEntitySet //48 bytes, Key:4180211587 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 public MetaHash name { get; set; } //8 8: Hash: 0: name public uint Unused2 { get; set; }//12 - public Array_uint locations { get; set; } //16 16: Array: 0: locations {0: UnsignedInt: 0: 256} - public Array_StructurePointer entities { get; set; } //32 32: Array: 0: entities {0: StructurePointer: 0: 256} + public Array_uint locations; //16 16: Array: 0: locations {0: UnsignedInt: 0: 256} + public Array_StructurePointer entities; //32 32: Array: 0: entities {0: StructurePointer: 0: 256} } - [TC(typeof(EXP))] public class MCMloEntitySet : MetaWrapper + + [TC(typeof(EXP))] + public class MCMloEntitySet : MetaWrapper { public CMloEntitySet _Data; - public CMloEntitySet Data { get { return _Data; } } + public CMloEntitySet Data => _Data; public uint[] Locations { get; set; } public MCEntityDef[] Entities { get; set; } - public MloArchetype OwnerMlo { get; set; } // for browsing/reference purposes + public MloArchetype? OwnerMlo { get; set; } // for browsing/reference purposes public int Index { get; set; } public bool ForceVisible { get; set; } = false; //forces this entity set visible from the project window, for rendering purpose - public MCMloEntitySet() { } + public MCMloEntitySet() { + Entities = []; + Locations = []; + } public MCMloEntitySet(Meta meta, CMloEntitySet data, MloArchetype owner) { _Data = data; @@ -2676,23 +2737,24 @@ namespace CodeWalker.GameFiles Load(meta); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Load(meta); } + [MemberNotNull(nameof(Entities), nameof(Locations))] private void Load(Meta meta) { - Locations = MetaTypes.GetUintArray(meta, _Data.locations); + Locations = MetaTypes.GetUintArray(meta, in _Data.locations) ?? Array.Empty(); - var ents = MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, _Data.entities); + var ents = MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, in _Data.entities); if (ents != null) { Entities = new MCEntityDef[ents.Length]; for (int i = 0; i < ents.Length; i++) { - Entities[i] = new MCEntityDef(meta, ref ents[i]) { OwnerMlo = OwnerMlo }; + Entities[i] = new MCEntityDef(meta, ents[i]) { OwnerMlo = OwnerMlo }; } } } @@ -2700,7 +2762,7 @@ namespace CodeWalker.GameFiles public override MetaPOINTER Save(MetaBuilder mb) { - if (Locations != null) + if (Locations.Length > 0) { _Data.locations = mb.AddUintArrayPtr(Locations); } @@ -2709,7 +2771,7 @@ namespace CodeWalker.GameFiles _Data.locations = new Array_uint(); } - if (Entities!=null) + if (Entities.Length > 0) { _Data.entities = mb.AddWrapperArrayPtr(Entities); } @@ -2719,21 +2781,11 @@ namespace CodeWalker.GameFiles } mb.AddStructureInfo(MetaName.CMloEntitySet); - return mb.AddItemPtr(MetaName.CMloEntitySet, _Data); + return mb.AddItemPtr(MetaName.CMloEntitySet, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } - - public override string ToString() - { - return Name + ": " + (Entities?.Length ?? 0).ToString() + " entities"; - } + public override string Name => _Data.name.ToString(); + public override string ToString() => $"{Name}: {Entities?.Length ?? 0} entities"; } [TC(typeof(EXP))] public struct CMloTimeCycleModifier //48 bytes, Key:838874674 @@ -2771,17 +2823,17 @@ namespace CodeWalker.GameFiles public float Unused6 { get; set; }//76 public Vector3 entitiesExtentsMax { get; set; } //80 80: Float_XYZ: 0: entitiesExtentsMax//1829192759 public float Unused7 { get; set; }//92 - public Array_StructurePointer entities { get; set; } //96 96: Array: 0: entities {0: StructurePointer: 0: 256} - public Array_Structure containerLods { get; set; } //112 112: Array: 0: containerLods//2935983381 {0: Structure: 372253349: 256} - public Array_Structure boxOccluders { get; set; } //128 128: Array: 0: boxOccluders//3983590932 {0: Structure: SectionUNKNOWN7: 256} - public Array_Structure occludeModels { get; set; } //144 144: Array: 0: occludeModels//2132383965 {0: Structure: SectionUNKNOWN5: 256} - public Array_uint physicsDictionaries { get; set; } //160 160: Array: 0: physicsDictionaries//949589348 {0: Hash: 0: 256} - public rage__fwInstancedMapData instancedData { get; set; } //176 176: Structure: rage__fwInstancedMapData: instancedData//2569067561 - public Array_Structure timeCycleModifiers { get; set; } //224 224: Array: 0: timeCycleModifiers {0: Structure: CTimeCycleModifier: 256} - public Array_Structure carGenerators { get; set; } //240 240: Array: 0: carGenerators//3254823756 {0: Structure: CCarGen: 256} - public CLODLight LODLightsSOA { get; set; } //256 256: Structure: CLODLight: LODLightsSOA//1774371066 - public CDistantLODLight DistantLODLightsSOA { get; set; } //392 392: Structure: CDistantLODLight: DistantLODLightsSOA//2954466641 - public CBlockDesc block { get; set; } //440 440: Structure: CBlockDesc//3072355914: block + public Array_StructurePointer entities; //96 96: Array: 0: entities {0: StructurePointer: 0: 256} + public Array_Structure containerLods; //112 112: Array: 0: containerLods//2935983381 {0: Structure: 372253349: 256} + public Array_Structure boxOccluders; //128 128: Array: 0: boxOccluders//3983590932 {0: Structure: SectionUNKNOWN7: 256} + public Array_Structure occludeModels; //144 144: Array: 0: occludeModels//2132383965 {0: Structure: SectionUNKNOWN5: 256} + public Array_uint physicsDictionaries; //160 160: Array: 0: physicsDictionaries//949589348 {0: Hash: 0: 256} + public rage__fwInstancedMapData instancedData; //176 176: Structure: rage__fwInstancedMapData: instancedData//2569067561 + public Array_Structure timeCycleModifiers; //224 224: Array: 0: timeCycleModifiers {0: Structure: CTimeCycleModifier: 256} + public Array_Structure carGenerators; //240 240: Array: 0: carGenerators//3254823756 {0: Structure: CCarGen: 256} + public CLODLight LODLightsSOA; //256 256: Structure: CLODLight: LODLightsSOA//1774371066 + public CDistantLODLight DistantLODLightsSOA; //392 392: Structure: CDistantLODLight: DistantLODLightsSOA//2954466641 + public CBlockDesc block; //440 440: Structure: CBlockDesc//3072355914: block //notes: @@ -2790,13 +2842,11 @@ namespace CodeWalker.GameFiles // flag 2 = LOD flag? reflection proxy flag? - public override string ToString() - { - return name.ToString() + ": " + parent.ToString(); - } + public override readonly string ToString() => $"{name}: {parent}"; } - [TC(typeof(EXP))] public struct CEntityDef //128 bytes, Key:1825799514 + [TC(typeof(EXP))] + public struct CEntityDef //128 bytes, Key:1825799514 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -2817,52 +2867,53 @@ namespace CodeWalker.GameFiles public rage__eLodType lodLevel { get; set; } //84 84: IntEnum: 1264241711: lodLevel //LODTYPES_DEPTH_ public uint numChildren { get; set; } //88 88: UnsignedInt: 0: numChildren//2793909385 public rage__ePriorityLevel priorityLevel { get; set; } //92 92: IntEnum: 648413703: priorityLevel//647098393 - public Array_StructurePointer extensions { get; set; } //96 96: Array: 0: extensions {0: StructurePointer: 0: 256} + public Array_StructurePointer extensions; //96 96: Array: 0: extensions {0: StructurePointer: 0: 256} public int ambientOcclusionMultiplier { get; set; } //112 112: SignedInt: 0: ambientOcclusionMultiplier//415356295 public int artificialAmbientOcclusion { get; set; } //116 116: SignedInt: 0: artificialAmbientOcclusion//599844163 public uint tintValue { get; set; } //120 120: UnsignedInt: 0: tintValue//1015358759 public uint Unused6 { get; set; }//124 - public override string ToString() - { - return JenkIndex.GetString(archetypeName) + ": " + JenkIndex.GetString(guid) + ": " + position.ToString(); - } + public override readonly string ToString() => $"{JenkIndex.GetString(archetypeName)}: {JenkIndex.GetString(guid)}: {position}"; } [TC(typeof(EXP))] public class MCEntityDef : MetaWrapper { public CEntityDef _Data; - public CEntityDef Data { get { return _Data; } set { _Data = value; } } + public ref CEntityDef Data => ref _Data; public MetaWrapper[] Extensions { get; set; } - public MloArchetype OwnerMlo { get; set; } // for browsing/reference purposes + public MloArchetype? OwnerMlo { get; set; } // for browsing/reference purposes public int Index { get; set; } public MCEntityDef(MCEntityDef copy) { - if (copy != null) _Data = copy.Data; + if (copy != null) + _Data = copy._Data; + + Extensions = []; } - public MCEntityDef(Meta meta, ref CEntityDef d) + public MCEntityDef(Meta meta, CEntityDef d) { _Data = d; - Extensions = MetaTypes.GetExtensions(meta, _Data.extensions); + Extensions = MetaTypes.GetExtensions(meta, in _Data.extensions) ?? []; } - public MCEntityDef(ref CEntityDef d, MloArchetype arch) + public MCEntityDef(in CEntityDef d, MloArchetype arch) { _Data = d; OwnerMlo = arch; + Extensions = []; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - Extensions = MetaTypes.GetExtensions(meta, _Data.extensions); + MetaTypes.TryGetData(meta, in ptr, out _Data); + Extensions = MetaTypes.GetExtensions(meta, in _Data.extensions) ?? []; } public override MetaPOINTER Save(MetaBuilder mb) { - if (Extensions != null) + if (Extensions.Length > 0) { _Data.extensions = mb.AddWrapperArrayPtr(Extensions); } @@ -2872,24 +2923,16 @@ namespace CodeWalker.GameFiles } mb.AddStructureInfo(MetaName.CEntityDef); - return mb.AddItemPtr(MetaName.CEntityDef, _Data); + return mb.AddItemPtr(MetaName.CEntityDef, in _Data); } - public override string Name - { - get - { - return _Data.archetypeName.ToString(); - } - } + public override string Name => _Data.archetypeName.ToString(); - public override string ToString() - { - return Name; - } + public override string ToString() => Name; } - [TC(typeof(EXP))] public struct BoxOccluder //16 bytes, Key:1831736438 //boxOccluders + [TC(typeof(EXP))] + public struct BoxOccluder //16 bytes, Key:1831736438 //boxOccluders { public short iCenterX { get; set; } //0 0: SignedShort: 0: 48026296 public short iCenterY { get; set; } //2 2: SignedShort: 0: 896907229 @@ -2901,38 +2944,40 @@ namespace CodeWalker.GameFiles public short iSinZ { get; set; } //14 14: SignedShort: 0: iSinZ } - [TC(typeof(EXP))] public struct OccludeModel //64 bytes, Key:1172796107 //occludeModels + [TC(typeof(EXP))] + public struct OccludeModel //64 bytes, Key:1172796107 //occludeModels { - public Vector3 bmin { get; set; } //0 0: Float_XYZ: 0: bmin + public Vector3 bmin; //0 0: Float_XYZ: 0: bmin public float Unused0 { get; set; }//12 - public Vector3 bmax { get; set; } //16 16: Float_XYZ: 0: bmax + public Vector3 bmax; //16 16: Float_XYZ: 0: bmax public float Unused1 { get; set; }//28 public uint dataSize { get; set; } //32 32: UnsignedInt: 0: dataSize//2442753371 public uint Unused2 { get; set; }//36 - public DataBlockPointer verts { get; set; } //40 40: DataBlockPointer: 2: verts + public DataBlockPointer verts; //40 40: DataBlockPointer: 2: verts public ushort numVertsInBytes { get; set; } //48 48: UnsignedShort: 0: numVertsInBytes public ushort numTris { get; set; } //50 50: UnsignedShort: 0: numTris public uint flags { get; set; } //52 52: UnsignedInt: 0: flags public uint Unused3 { get; set; }//56 public uint Unused4 { get; set; }//60 + + public readonly BoundingBox BoundingBox => new BoundingBox(bmin, bmax); } - [TC(typeof(EXP))] public struct rage__fwInstancedMapData //48 bytes, Key:1836780118 + [TC(typeof(EXP))] + public struct rage__fwInstancedMapData //48 bytes, Key:1836780118 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 public MetaHash ImapLink { get; set; } //8 8: Hash: 0: ImapLink//2142127586 public uint Unused2 { get; set; }//12 - public Array_Structure PropInstanceList { get; set; } //16 16: Array: 0: PropInstanceList//3551474528 {0: Structure: rage__fwPropInstanceListDef: 256} - public Array_Structure GrassInstanceList { get; set; } //32 32: Array: 0: GrassInstanceList//255292381 {0: Structure: rage__fwGrassInstanceListDef: 256} + public Array_Structure PropInstanceList; //16 16: Array: 0: PropInstanceList//3551474528 {0: Structure: rage__fwPropInstanceListDef: 256} + public Array_Structure GrassInstanceList; //32 32: Array: 0: GrassInstanceList//255292381 {0: Structure: rage__fwGrassInstanceListDef: 256} - public override string ToString() - { - return ImapLink.ToString() + ", " + PropInstanceList.Count1.ToString() + " props, " + GrassInstanceList.Count1.ToString() + " grasses"; - } + public override readonly string ToString() => $"{ImapLink}, {PropInstanceList.Count1} props, {GrassInstanceList.Count1} grasses"; } - [TC(typeof(EXP))] public struct rage__fwGrassInstanceListDef //96 bytes, Key:941808164 rage__fwGrassInstanceListDef//2085051229 + [TC(typeof(EXP))] + public struct rage__fwGrassInstanceListDef //96 bytes, Key:941808164 rage__fwGrassInstanceListDef//2085051229 { public rage__spdAABB BatchAABB { get; set; } //0 0: Structure: 4084721864: BatchAABB//1859041902 public Vector3 ScaleRange { get; set; } //32 32: Float_XYZ: 0: ScaleRange @@ -2943,33 +2988,29 @@ namespace CodeWalker.GameFiles public float LodInstFadeRange { get; set; } //60 60: Float: 0: LodInstFadeRange//1405992723 public float OrientToTerrain { get; set; } //64 64: Float: 0: OrientToTerrain//3341475578 public uint Unused1 { get; set; }//68 - public Array_Structure InstanceList { get; set; } //72 72: Array: 0: InstanceList//470289337 {0: Structure: rage__fwGrassInstanceListDef__InstanceData: 256} + public Array_Structure InstanceList; //72 72: Array: 0: InstanceList//470289337 {0: Structure: rage__fwGrassInstanceListDef__InstanceData: 256} public uint Unused2 { get; set; }//88 public uint Unused3 { get; set; }//92 - public override string ToString() - { - return archetypeName.ToString() + " (" + InstanceList.Count1.ToString() + " instances)"; - } + public override readonly string ToString() => $"{archetypeName} ({InstanceList.Count1} instances)"; } - [TC(typeof(EXP))] public struct rage__fwGrassInstanceListDef__InstanceData //16 bytes, Key:2740378365 rage__fwGrassInstanceListDef__InstanceData//3985044770 // Tom: Something to do with placing foliage + [TC(typeof(EXP))] + public struct rage__fwGrassInstanceListDef__InstanceData //16 bytes, Key:2740378365 rage__fwGrassInstanceListDef__InstanceData//3985044770 // Tom: Something to do with placing foliage { - public ArrayOfUshorts3 Position { get; set; } //0 0: ArrayOfBytes: 3: Position - Ushorts + public ArrayOfUshorts3 Position; //0 0: ArrayOfBytes: 3: Position - Ushorts public byte NormalX { get; set; } //6 6: UnsignedByte: 0: NormalX//3138065392 public byte NormalY { get; set; } //7 7: UnsignedByte: 0: NormalY//273792636 - public ArrayOfBytes3 Color { get; set; } //8 8: ArrayOfBytes: 3: Color + public ArrayOfBytes3 Color; //8 8: ArrayOfBytes: 3: Color public byte Scale { get; set; } //11 11: UnsignedByte: 0: Scale public byte Ao { get; set; } //12 12: UnsignedByte: 0: Ao//2996378564 - public ArrayOfBytes3 Pad { get; set; } //13 13: ArrayOfBytes: 3: Pad + public ArrayOfBytes3 Pad; //13 13: ArrayOfBytes: 3: Pad - public override string ToString() - { - return Position.ToString() + " : " + Color.ToString() + " : " + Scale.ToString(); - } + public override readonly string ToString() => $"{Position} : {Color} : {Scale}"; } - [TC(typeof(EXP))] public struct CTimeCycleModifier //64 bytes, Key:2683420777 + [TC(typeof(EXP))] + public struct CTimeCycleModifier //64 bytes, Key:2683420777 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -2989,15 +3030,11 @@ namespace CodeWalker.GameFiles //2633803310 = NoAmbientmult //2003616884 = INT_NoAmbientMult - - - public override string ToString() - { - return name.ToString() + ": startHour " + startHour.ToString() + ", endHour " + endHour.ToString() + ", range " + range.ToString() + ", percentage " + percentage.ToString(); - } + public override readonly string ToString() => $"{name}: startHour {startHour}, endHour {endHour}, range {range}, percentage {percentage}"; } - [TC(typeof(EXP))] public struct CCarGen //80 bytes, Key:2345238261 + [TC(typeof(EXP))] + public struct CCarGen //80 bytes, Key:2345238261 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3020,45 +3057,45 @@ namespace CodeWalker.GameFiles public ushort Unused6 { get; set; }//74 public uint Unused7 { get; set; }//76 - public override string ToString() - { - return carModel.ToString() + ", " + position.ToString() + ", " + popGroup.ToString() + ", " + livery.ToString(); - } + public override readonly string ToString() => $"{carModel}, {position}, {popGroup}, {livery}"; } - [TC(typeof(EXP))] public struct CLODLight //136 bytes, Key:2325189228 + [TC(typeof(EXP))] + public struct CLODLight //136 bytes, Key:2325189228 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 - public Array_Structure direction { get; set; } //8 8: Array: 0: direction {0: Structure: VECTOR3: 256} - public Array_float falloff { get; set; } //24 24: Array: 0: falloff {0: Float: 0: 256} - public Array_float falloffExponent { get; set; } //40 40: Array: 0: falloffExponent {0: Float: 0: 256} - public Array_uint timeAndStateFlags { get; set; } //56 56: Array: 0: timeAndStateFlags=3112418278 {0: UnsignedInt: 0: 256} - public Array_uint hash { get; set; } //72 72: Array: 0: hash {0: UnsignedInt: 0: 256} - public Array_byte coneInnerAngle { get; set; } //88 88: Array: 0: coneInnerAngle//1163671864 {0: UnsignedByte: 0: 256} - public Array_byte coneOuterAngleOrCapExt { get; set; } //104 104: Array: 0: coneOuterAngleOrCapExt=3161894080 {0: UnsignedByte: 0: 256} - public Array_byte coronaIntensity { get; set; } //120 120: Array: 0: coronaIntensity//2292363771 {0: UnsignedByte: 0: 256} + public Array_Structure direction; //8 8: Array: 0: direction {0: Structure: VECTOR3: 256} + public Array_float falloff; //24 24: Array: 0: falloff {0: Float: 0: 256} + public Array_float falloffExponent; //40 40: Array: 0: falloffExponent {0: Float: 0: 256} + public Array_uint timeAndStateFlags; //56 56: Array: 0: timeAndStateFlags=3112418278 {0: UnsignedInt: 0: 256} + public Array_uint hash; //72 72: Array: 0: hash {0: UnsignedInt: 0: 256} + public Array_byte coneInnerAngle; //88 88: Array: 0: coneInnerAngle//1163671864 {0: UnsignedByte: 0: 256} + public Array_byte coneOuterAngleOrCapExt; //104 104: Array: 0: coneOuterAngleOrCapExt=3161894080 {0: UnsignedByte: 0: 256} + public Array_byte coronaIntensity; //120 120: Array: 0: coronaIntensity//2292363771 {0: UnsignedByte: 0: 256} } - [TC(typeof(EXP))] public struct CDistantLODLight //48 bytes, Key:2820908419 + [TC(typeof(EXP))] + public struct CDistantLODLight //48 bytes, Key:2820908419 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 - public Array_Structure position { get; set; } //8 8: Array: 0: position {0: Structure: VECTOR3: 256} - public Array_uint RGBI { get; set; } //24 24: Array: 0: RGBI {0: UnsignedInt: 0: 256} + public Array_Structure position; //8 8: Array: 0: position {0: Structure: VECTOR3: 256} + public Array_uint RGBI; //24 24: Array: 0: RGBI {0: UnsignedInt: 0: 256} public ushort numStreetLights { get; set; } //40 40: UnsignedShort: 0: numStreetLights//3708891211 public ushort category { get; set; } //42 42: UnsignedShort: 0: category//2052871693 public uint Unused2 { get; set; }//44 } - [TC(typeof(EXP))] public struct CBlockDesc //72 bytes, Key:2015795449 + [TC(typeof(EXP))] + public struct CBlockDesc //72 bytes, Key:2015795449 { public uint version { get; set; } //0 0: UnsignedInt: 0: version public uint flags { get; set; } //4 4: UnsignedInt: 0: flags - public CharPointer name { get; set; } //8 8: CharPointer: 0: name - public CharPointer exportedBy { get; set; } //24 24: CharPointer: 0: exportedBy//1983184981 - public CharPointer owner { get; set; } //40 40: CharPointer: 0: owner - public CharPointer time { get; set; } //56 56: CharPointer: 0: time + public CharPointer name; //8 8: CharPointer: 0: name + public CharPointer exportedBy; //24 24: CharPointer: 0: exportedBy//1983184981 + public CharPointer owner; //40 40: CharPointer: 0: owner + public CharPointer time; //56 56: CharPointer: 0: time } @@ -3070,7 +3107,8 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public struct CExtensionDefParticleEffect //96 bytes, Key:466596385 + [TC(typeof(EXP))] + public struct CExtensionDefParticleEffect //96 bytes, Key:466596385 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3079,7 +3117,7 @@ namespace CodeWalker.GameFiles public Vector3 offsetPosition { get; set; } //16 16: Float_XYZ: 0: offsetPosition public uint Unused3 { get; set; }//28 public Vector4 offsetRotation { get; set; } //32 32: Float_XYZW: 0: offsetRotation - public CharPointer fxName { get; set; } //48 48: CharPointer: 0: fxName + public CharPointer fxName; //48 48: CharPointer: 0: fxName public int fxType { get; set; } //64 64: SignedInt: 0: fxType public int boneTag { get; set; } //68 68: SignedInt: 0: boneTag public float scale { get; set; } //72 72: Float: 0: scale @@ -3089,22 +3127,21 @@ namespace CodeWalker.GameFiles public uint Unused4 { get; set; }//88 public uint Unused5 { get; set; }//92 - public override string ToString() - { - return "CExtensionDefParticleEffect - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefParticleEffect - {name}"; } - [TC(typeof(EXP))] public class MCExtensionDefParticleEffect : MetaWrapper + + [TC(typeof(EXP))] + public class MCExtensionDefParticleEffect : MetaWrapper { public CExtensionDefParticleEffect _Data; - public CExtensionDefParticleEffect Data { get { return _Data; } } + public CExtensionDefParticleEffect Data => _Data; public string fxName { get; set; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - fxName = MetaTypes.GetString(meta, _Data.fxName); + MetaTypes.TryGetData(meta, in ptr, out _Data); + fxName = MetaTypes.GetString(meta, in _Data.fxName); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3115,37 +3152,26 @@ namespace CodeWalker.GameFiles } mb.AddStructureInfo(MetaName.CExtensionDefParticleEffect); - return mb.AddItemPtr(MetaName.CExtensionDefParticleEffect, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefParticleEffect, in _Data); } - public override string Name - { - get - { - return fxName; - } - } + public override string Name => fxName; - public override string ToString() - { - return _Data.ToString() + " - " + fxName; - } + public override string ToString() => $"{_Data} - {fxName}"; } - [TC(typeof(EXP))] public struct CExtensionDefLightEffect //48 bytes, Key:2436199897 + [TC(typeof(EXP))] + public struct CExtensionDefLightEffect //48 bytes, Key:2436199897 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 public MetaHash name { get; set; } //8 8: Hash: 0: name public uint Unused2 { get; set; }//12 - public Vector3 offsetPosition { get; set; } //16 16: Float_XYZ: 0: offsetPosition + public Vector3 offsetPosition; //16 16: Float_XYZ: 0: offsetPosition public float Unused3 { get; set; }//28 - public Array_Structure instances { get; set; } //32 32: Array: 0: 274177522 {0: Structure: CLightAttrDef: 256} + public Array_Structure instances; //32 32: Array: 0: 274177522 {0: Structure: CLightAttrDef: 256} - public override string ToString() - { - return "CExtensionDefLightEffect - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefLightEffect - {name}"; } [TC(typeof(EXP))] public class MCExtensionDefLightEffect : MetaWrapper { @@ -3154,10 +3180,10 @@ namespace CodeWalker.GameFiles public CLightAttrDef[] instances { get; set; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - instances = MetaTypes.ConvertDataArray(meta, MetaName.CLightAttrDef, _Data.instances); + MetaTypes.TryGetData(meta, in ptr, out _Data); + instances = MetaTypes.ConvertDataArray(meta, MetaName.CLightAttrDef, in _Data.instances); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3169,24 +3195,16 @@ namespace CodeWalker.GameFiles mb.AddStructureInfo(MetaName.CLightAttrDef); mb.AddStructureInfo(MetaName.CExtensionDefLightEffect); - return mb.AddItemPtr(MetaName.CExtensionDefLightEffect, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefLightEffect, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString() + " (" + (instances?.Length ?? 0).ToString() + " Attributes)"; - } + public override string ToString() => $"{_Data} ({instances?.Length ?? 0} Attributes)"; } - [TC(typeof(EXP))] public struct CLightAttrDef //160 bytes, Key:2363260268 + [TC(typeof(EXP))] + public struct CLightAttrDef //160 bytes, Key:2363260268 { public uint Unused00 { get; set; }//0 public uint Unused01 { get; set; }//4 @@ -3241,42 +3259,31 @@ namespace CodeWalker.GameFiles public uint Unused5 { get; set; }//40 public uint Unused6 { get; set; }//44 - public override string ToString() - { - return "CExtensionDefAudioCollisionSettings - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefAudioCollisionSettings - {name}"; } [TC(typeof(EXP))] public class MCExtensionDefAudioCollisionSettings : MetaWrapper { public CExtensionDefAudioCollisionSettings _Data; - public CExtensionDefAudioCollisionSettings Data { get { return _Data; } } + public CExtensionDefAudioCollisionSettings Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefAudioCollisionSettings); - return mb.AddItemPtr(MetaName.CExtensionDefAudioCollisionSettings, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefAudioCollisionSettings, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefAudioEmitter //64 bytes, Key:15929839 + [TC(typeof(EXP))] + public struct CExtensionDefAudioEmitter //64 bytes, Key:15929839 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3290,42 +3297,33 @@ namespace CodeWalker.GameFiles public uint Unused5 { get; set; }//56 public uint Unused6 { get; set; }//60 - public override string ToString() - { - return "CExtensionDefAudioEmitter - " + name.ToString() + ": " + effectHash.ToString() + ": " + offsetPosition.ToString(); - } + public override readonly string ToString() => $"CExtensionDefAudioEmitter - {name}: {effectHash}: {offsetPosition}"; } - [TC(typeof(EXP))] public class MCExtensionDefAudioEmitter : MetaWrapper + + [TC(typeof(EXP))] + public class MCExtensionDefAudioEmitter : MetaWrapper { public CExtensionDefAudioEmitter _Data; - public CExtensionDefAudioEmitter Data { get { return _Data; } } + public CExtensionDefAudioEmitter Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefAudioEmitter); - return mb.AddItemPtr(MetaName.CExtensionDefAudioEmitter, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefAudioEmitter, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefExplosionEffect //80 bytes, Key:2840366784 + [TC(typeof(EXP))] + public struct CExtensionDefExplosionEffect //80 bytes, Key:2840366784 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3334,28 +3332,25 @@ namespace CodeWalker.GameFiles public Vector3 offsetPosition { get; set; } //16 16: Float_XYZ: 0: offsetPosition public float Unused3 { get; set; }//28 public Vector4 offsetRotation { get; set; } //32 32: Float_XYZW: 0: offsetRotation - public CharPointer explosionName { get; set; } //48 48: CharPointer: 0: explosionName//3301388915 + public CharPointer explosionName; //48 48: CharPointer: 0: explosionName//3301388915 public int boneTag { get; set; } //64 64: SignedInt: 0: boneTag public int explosionTag { get; set; } //68 68: SignedInt: 0: explosionTag//2653034051 public int explosionType { get; set; } //72 72: SignedInt: 0: explosionType//3379115010 public uint flags { get; set; } //76 76: UnsignedInt: 0: flags - public override string ToString() - { - return "CExtensionDefExplosionEffect - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefExplosionEffect - {name}"; } [TC(typeof(EXP))] public class MCExtensionDefExplosionEffect : MetaWrapper { public CExtensionDefExplosionEffect _Data; - public CExtensionDefExplosionEffect Data { get { return _Data; } } + public CExtensionDefExplosionEffect Data => _Data; public string explosionName { get; set; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - explosionName = MetaTypes.GetString(meta, _Data.explosionName); + MetaTypes.TryGetData(meta, in ptr, out _Data); + explosionName = MetaTypes.GetString(meta, in _Data.explosionName); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3365,24 +3360,16 @@ namespace CodeWalker.GameFiles _Data.explosionName = mb.AddStringPtr(explosionName); } mb.AddStructureInfo(MetaName.CExtensionDefExplosionEffect); - return mb.AddItemPtr(MetaName.CExtensionDefExplosionEffect, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefExplosionEffect, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString() + " - " + explosionName; - } + public override string ToString() => $"{_Data} - {explosionName}"; } - [TC(typeof(EXP))] public struct CExtensionDefLadder //96 bytes, Key:1978210597 + [TC(typeof(EXP))] + public struct CExtensionDefLadder //96 bytes, Key:1978210597 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3403,43 +3390,33 @@ namespace CodeWalker.GameFiles public ushort Unused7 { get; set; }//90 public uint Unused8 { get; set; }//92 - public override string ToString() - { - return "CExtensionDefLadder - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefLadder - {name}"; } - [TC(typeof(EXP))] public class MCExtensionDefLadder : MetaWrapper + + [TC(typeof(EXP))] + public class MCExtensionDefLadder : MetaWrapper { public CExtensionDefLadder _Data; - public CExtensionDefLadder Data { get { return _Data; } } + public CExtensionDefLadder Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddEnumInfo(MetaName.CExtensionDefLadderMaterialType); mb.AddStructureInfo(MetaName.CExtensionDefLadder); - return mb.AddItemPtr(MetaName.CExtensionDefLadder, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefLadder, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } - - public override string ToString() - { - return _Data.ToString(); - } + public override string Name => _Data.name.ToString(); + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefBuoyancy //32 bytes, Key:2383039928 + [TC(typeof(EXP))] + public struct CExtensionDefBuoyancy //32 bytes, Key:2383039928 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3450,40 +3427,31 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "CExtensionDefBuoyancy - " + name.ToString(); + return $"CExtensionDefBuoyancy - {name}"; } } [TC(typeof(EXP))] public class MCExtensionDefBuoyancy : MetaWrapper { public CExtensionDefBuoyancy _Data; - public CExtensionDefBuoyancy Data { get { return _Data; } } + public CExtensionDefBuoyancy Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefBuoyancy); - return mb.AddItemPtr(MetaName.CExtensionDefBuoyancy, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefBuoyancy, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } - - public override string ToString() - { - return _Data.ToString(); - } + public override string Name => _Data.name.ToString(); + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefExpression //48 bytes, Key:24441706 + [TC(typeof(EXP))] + public struct CExtensionDefExpression //48 bytes, Key:24441706 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3498,42 +3466,33 @@ namespace CodeWalker.GameFiles public byte Unused4 { get; set; }//45 public ushort Unused5 { get; set; }//46 - public override string ToString() - { - return "CExtensionDefExpression - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefExpression - {name}"; } - [TC(typeof(EXP))] public class MCExtensionDefExpression : MetaWrapper + + [TC(typeof(EXP))] + public class MCExtensionDefExpression : MetaWrapper { public CExtensionDefExpression _Data; public CExtensionDefExpression Data { get { return _Data; } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefExpression); - return mb.AddItemPtr(MetaName.CExtensionDefExpression, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefExpression, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefLightShaft //176 bytes, Key:2526429398 + [TC(typeof(EXP))] + public struct CExtensionDefLightShaft //176 bytes, Key:2526429398 { public uint Unused00 { get; set; }//0 public uint Unused01 { get; set; }//4 @@ -3572,19 +3531,20 @@ namespace CodeWalker.GameFiles public byte Unused11 { get; set; }//173 public ushort Unused12 { get; set; }//174 - public override string ToString() + public override readonly string ToString() { - return "CExtensionDefLightShaft - " + name.ToString(); + return $"CExtensionDefLightShaft - {name}"; } } - [TC(typeof(EXP))] public class MCExtensionDefLightShaft : MetaWrapper + [TC(typeof(EXP))] + public class MCExtensionDefLightShaft : MetaWrapper { public CExtensionDefLightShaft _Data; - public CExtensionDefLightShaft Data { get { return _Data; } } + public CExtensionDefLightShaft Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3592,24 +3552,15 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(MetaName.CExtensionDefLightShaftDensityType); mb.AddEnumInfo(MetaName.CExtensionDefLightShaftVolumeType); mb.AddStructureInfo(MetaName.CExtensionDefLightShaft); - return mb.AddItemPtr(MetaName.CExtensionDefLightShaft, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefLightShaft, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } - - public override string ToString() - { - return _Data.ToString(); - } + public override string Name => _Data.name.ToString(); + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefDoor //48 bytes, Key:2671601385 + [TC(typeof(EXP))] + public struct CExtensionDefDoor //48 bytes, Key:2671601385 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3625,42 +3576,35 @@ namespace CodeWalker.GameFiles public float doorTargetRatio { get; set; } //40 40: Float: 0: doorTargetRatio=770433283 public MetaHash audioHash { get; set; } //44 44: Hash: 0: audioHash=224069936 - public override string ToString() + public override readonly string ToString() { - return "CExtensionDefDoor - " + name.ToString() + ", " + audioHash.ToString() + ", " + offsetPosition.ToString() + ", " + limitAngle.ToString(); + return $"CExtensionDefDoor - {name}, {audioHash}, {offsetPosition}, {limitAngle}"; } } - [TC(typeof(EXP))] public class MCExtensionDefDoor : MetaWrapper + [TC(typeof(EXP))] + public class MCExtensionDefDoor : MetaWrapper { public CExtensionDefDoor _Data; - public CExtensionDefDoor Data { get { return _Data; } } + public CExtensionDefDoor Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefDoor); - return mb.AddItemPtr(MetaName.CExtensionDefDoor, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefDoor, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefSpawnPoint //96 bytes, Key:3077340721 + [TC(typeof(EXP))] + public struct CExtensionDefSpawnPoint //96 bytes, Key:3077340721 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3687,12 +3631,13 @@ namespace CodeWalker.GameFiles public byte shortRange { get; set; } //94 94: Boolean: 0: shortRange public byte Unused5 { get; set; }//95 - public override string ToString() + public override readonly string ToString() { - return spawnType.ToString() + ": " + name.ToString() + ", " + pedType.ToString();// + ", " + flags.ToString() + ", " + offsetPosition.ToString(); + return $"{spawnType}: {name}, {pedType}";// + ", " + flags.ToString() + ", " + offsetPosition.ToString(); } } - [TC(typeof(EXP))] public class MCExtensionDefSpawnPoint : MetaWrapper + [TC(typeof(EXP))] + public class MCExtensionDefSpawnPoint : MetaWrapper { [TC(typeof(EXP))] public object Parent { get; set; } public MCScenarioPointRegion ScenarioRegion { get; private set; } @@ -3724,7 +3669,7 @@ namespace CodeWalker.GameFiles public Quaternion Orientation { get { return new Quaternion(_Data.offsetRotation); } set { _Data.offsetRotation = value.ToVector4(); } } public MCExtensionDefSpawnPoint() { } - public MCExtensionDefSpawnPoint(MCScenarioPointRegion region, Meta meta, CExtensionDefSpawnPoint data, object parent) + public MCExtensionDefSpawnPoint(MCScenarioPointRegion region, Meta meta, in CExtensionDefSpawnPoint data, object parent) { ScenarioRegion = region; Parent = parent; @@ -3741,9 +3686,9 @@ namespace CodeWalker.GameFiles } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3751,24 +3696,15 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp); mb.AddEnumInfo(MetaName.CScenarioPointFlags__Flags); mb.AddStructureInfo(MetaName.CExtensionDefSpawnPoint); - return mb.AddItemPtr(MetaName.CExtensionDefSpawnPoint, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefSpawnPoint, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } - - public override string ToString() - { - return _Data.ToString(); - } + public override string Name => _Data.name.ToString(); + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefSpawnPointOverride //64 bytes, Key:2551875873 + [TC(typeof(EXP))] + public struct CExtensionDefSpawnPointOverride //64 bytes, Key:2551875873 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3787,19 +3723,18 @@ namespace CodeWalker.GameFiles public float Radius { get; set; } //56 56: Float: 0: Radius public float TimeTillPedLeaves { get; set; } //60 60: Float: 0: TimeTillPedLeaves//4073598194 - public override string ToString() - { - return "CExtensionDefSpawnPointOverride - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefSpawnPointOverride - {name}"; } - [TC(typeof(EXP))] public class MCExtensionDefSpawnPointOverride : MetaWrapper + + [TC(typeof(EXP))] + public class MCExtensionDefSpawnPointOverride : MetaWrapper { public CExtensionDefSpawnPointOverride _Data; - public CExtensionDefSpawnPointOverride Data { get { return _Data; } } + public CExtensionDefSpawnPointOverride Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) @@ -3807,24 +3742,16 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp); mb.AddEnumInfo(MetaName.CScenarioPointFlags__Flags); mb.AddStructureInfo(MetaName.CExtensionDefSpawnPointOverride); - return mb.AddItemPtr(MetaName.CExtensionDefSpawnPointOverride, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefSpawnPointOverride, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefWindDisturbance //96 bytes, Key:3971538917 + [TC(typeof(EXP))] + public struct CExtensionDefWindDisturbance //96 bytes, Key:3971538917 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3843,42 +3770,32 @@ namespace CodeWalker.GameFiles public uint Unused6 { get; set; }//88 public uint Unused7 { get; set; }//92 - public override string ToString() - { - return "CExtensionDefWindDisturbance - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefWindDisturbance - {name}"; } - [TC(typeof(EXP))] public class MCExtensionDefWindDisturbance : MetaWrapper + [TC(typeof(EXP))] + public class MCExtensionDefWindDisturbance : MetaWrapper { public CExtensionDefWindDisturbance _Data; - public CExtensionDefWindDisturbance Data { get { return _Data; } } + public CExtensionDefWindDisturbance Data => _Data; - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefWindDisturbance); - return mb.AddItemPtr(MetaName.CExtensionDefWindDisturbance, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefWindDisturbance, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CExtensionDefProcObject //80 bytes, Key:3965391891 + [TC(typeof(EXP))] + public struct CExtensionDefProcObject //80 bytes, Key:3965391891 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -3899,39 +3816,28 @@ namespace CodeWalker.GameFiles public uint flags { get; set; } //72 72: UnsignedInt: 0: flags public uint Unused4 { get; set; }//76 - public override string ToString() - { - return "CExtensionDefProcObject - " + name.ToString(); - } + public override readonly string ToString() => $"CExtensionDefProcObject - {name}"; } + [TC(typeof(EXP))] public class MCExtensionDefProcObject : MetaWrapper { public CExtensionDefProcObject _Data; public CExtensionDefProcObject Data { get { return _Data; } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CExtensionDefProcObject); - return mb.AddItemPtr(MetaName.CExtensionDefProcObject, _Data); + return mb.AddItemPtr(MetaName.CExtensionDefProcObject, in _Data); } - public override string Name - { - get - { - return _Data.name.ToString(); - } - } + public override string Name => _Data.name.ToString(); - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } [TC(typeof(EXP))] public struct rage__phVerletClothCustomBounds //32 bytes, Key:2075461750 @@ -3940,8 +3846,9 @@ namespace CodeWalker.GameFiles public uint Unused1 { get; set; }//4 public MetaHash name { get; set; } //8 8: Hash: 0: name public uint Unused2 { get; set; }//12 - public Array_Structure CollisionData { get; set; } //16 16: Array: 0: CollisionData {0: Structure: SectionUNKNOWN1: 256} + public Array_Structure CollisionData; //16 16: Array: 0: CollisionData {0: Structure: SectionUNKNOWN1: 256} } + [TC(typeof(EXP))] public class Mrage__phVerletClothCustomBounds : MetaWrapper { public rage__phVerletClothCustomBounds _Data; @@ -3949,17 +3856,17 @@ namespace CodeWalker.GameFiles public Mrage__phCapsuleBoundDef[] CollisionData { get; set; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); - var cdata = MetaTypes.ConvertDataArray(meta, MetaName.rage__phCapsuleBoundDef, _Data.CollisionData); + var cdata = MetaTypes.ConvertDataArray(meta, MetaName.rage__phCapsuleBoundDef, in _Data.CollisionData); if (cdata != null) { CollisionData = new Mrage__phCapsuleBoundDef[cdata.Length]; for (int i = 0; i < cdata.Length; i++) { - CollisionData[i] = new Mrage__phCapsuleBoundDef(meta, cdata[i]); + CollisionData[i] = new Mrage__phCapsuleBoundDef(meta, in cdata[i]); } } } @@ -3972,18 +3879,15 @@ namespace CodeWalker.GameFiles } mb.AddStructureInfo(MetaName.rage__phVerletClothCustomBounds); - return mb.AddItemPtr(MetaName.rage__phVerletClothCustomBounds, _Data); + return mb.AddItemPtr(MetaName.rage__phVerletClothCustomBounds, in _Data); } - public override string ToString() - { - return "rage__phVerletClothCustomBounds - " + _Data.name.ToString() + " (" + (CollisionData?.Length ?? 0).ToString() + " CollisionData)"; - } + public override string ToString() => $"rage__phVerletClothCustomBounds - {_Data.name} ({CollisionData?.Length ?? 0} CollisionData)"; } [TC(typeof(EXP))] public struct rage__phCapsuleBoundDef //96 bytes, Key:2859775340 //dexy: cloth CollisionData (child of rage__phVerletClothCustomBounds) ... eg josh house // Tom: explosions? { - public CharPointer OwnerName { get; set; } //0 0: CharPointer: 0: OwnerName + public CharPointer OwnerName; //0 0: CharPointer: 0: OwnerName public Vector4 Rotation { get; set; } //16 16: Float_XYZW: 0: Rotation public Vector3 Position { get; set; } //32 32: Float_XYZ: 0: Position public float Unused0 { get; set; }//44 @@ -3998,23 +3902,25 @@ namespace CodeWalker.GameFiles public uint Unused3 { get; set; }//88 public uint Unused4 { get; set; }//92 } - [TC(typeof(EXP))] public class Mrage__phCapsuleBoundDef : MetaWrapper + + [TC(typeof(EXP))] + public class Mrage__phCapsuleBoundDef : MetaWrapper { public rage__phCapsuleBoundDef _Data; - public rage__phCapsuleBoundDef Data { get { return _Data; } } + public rage__phCapsuleBoundDef Data => _Data; public string OwnerName { get; set; } public Mrage__phCapsuleBoundDef() { } - public Mrage__phCapsuleBoundDef(Meta meta, rage__phCapsuleBoundDef s) + public Mrage__phCapsuleBoundDef(Meta meta, in rage__phCapsuleBoundDef s) { _Data = s; - OwnerName = MetaTypes.GetString(meta, _Data.OwnerName); + OwnerName = MetaTypes.GetString(meta, in _Data.OwnerName); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - OwnerName = MetaTypes.GetString(meta, _Data.OwnerName); + MetaTypes.TryGetData(meta, in ptr, out _Data); + OwnerName = MetaTypes.GetString(meta, in _Data.OwnerName); } public override MetaPOINTER Save(MetaBuilder mb) @@ -4026,12 +3932,12 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(MetaName.rage__phCapsuleBoundDef__enCollisionBoundDef); mb.AddStructureInfo(MetaName.rage__phCapsuleBoundDef); - return mb.AddItemPtr(MetaName.rage__phCapsuleBoundDef, _Data); + return mb.AddItemPtr(MetaName.rage__phCapsuleBoundDef, in _Data); } public override string ToString() { - return "rage__phCapsuleBoundDef - " + OwnerName; + return $"rage__phCapsuleBoundDef - {OwnerName}"; } } @@ -4064,19 +3970,10 @@ namespace CodeWalker.GameFiles public uint Unused9 { get; set; }//60 - public Vector2I Dimensions - { - get - { - return new Vector2I((MaxCellX - MinCellX)+1, (MaxCellY - MinCellY)+1); - } - } + public readonly Vector2I Dimensions => new Vector2I((MaxCellX - MinCellX) + 1, (MaxCellY - MinCellY) + 1); public Vector2 Scale { - get - { - return new Vector2(CellDimX, CellDimY); - } + get => new Vector2(CellDimX, CellDimY); set { CellDimX = value.X; @@ -4085,10 +3982,7 @@ namespace CodeWalker.GameFiles } public Vector2 Min { - get - { - return new Vector2(MinCellX, MinCellY) * Scale; - } + get => new Vector2(MinCellX, MinCellY) * Scale; set { var gv = value / Scale; @@ -4098,10 +3992,7 @@ namespace CodeWalker.GameFiles } public Vector2 Max { - get - { - return new Vector2(MaxCellX, MaxCellY) * Scale; - } + get => new Vector2(MaxCellX, MaxCellY) * Scale; set { var gv = value / Scale; @@ -4120,12 +4011,10 @@ namespace CodeWalker.GameFiles return x.Equals(y); } - public override bool Equals(object obj) + public override readonly bool Equals(object obj) { - if (obj is null || obj is not rage__spdGrid2D arrObj) - return false; - - return arrObj.MaxCellX == this.MaxCellX + return obj is rage__spdGrid2D arrObj + && arrObj.MaxCellX == this.MaxCellX && arrObj.MaxCellY == this.MaxCellY && arrObj.MinCellX == this.MinCellX && arrObj.MinCellY == this.MinCellY @@ -4143,7 +4032,7 @@ namespace CodeWalker.GameFiles && arrObj.Unused9 == this.Unused9; } - public override int GetHashCode() + public override readonly int GetHashCode() { int hashCode = 418850833; hashCode = hashCode * -1521134295 + Unused0.GetHashCode(); @@ -4166,19 +4055,30 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct rage__spdAABB //32 bytes, Key:1158138379 + [TC(typeof(EXP))] + public struct rage__spdAABB //32 bytes, Key:1158138379 { public Vector4 min { get; set; } //0 0: Float_XYZW: 0: min public Vector4 max { get; set; } //16 16: Float_XYZW: 0: max - public override string ToString() + public rage__spdAABB(in Vector3 _min, in Vector3 _max) { - return "min: " + min.ToString() + ", max: " + max.ToString(); + min = new Vector4(_min.X, _min.Y, _min.Z, 0); + max = new Vector4(_max.X, _max.Y, _max.Z, 0); } - public void SwapEnd() + + public readonly override string ToString() { - min = MetaTypes.SwapBytes(min); - max = MetaTypes.SwapBytes(max); + return $"min: {min}, max: {max}"; + } + public readonly rage__spdAABB SwapEnd() + { + return this with + { + min = MetaTypes.SwapBytes(min), + max = MetaTypes.SwapBytes(max), + }; + } } @@ -4196,76 +4096,28 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public struct CScenarioPointRegion //SCENARIO YMT ROOT - in /scenario/ folder //376 bytes, Key:3501351821 + [TC(typeof(EXP))] + public struct CScenarioPointRegion //SCENARIO YMT ROOT - in /scenario/ folder //376 bytes, Key:3501351821 { public int VersionNumber { get; set; } //0 0: SignedInt: 0: VersionNumber public uint Unused0 { get; set; }//4 - public CScenarioPointContainer Points { get; set; } //8 8: Structure: CScenarioPointContainer//2380938603: Points//702683191 + public CScenarioPointContainer Points; //8 8: Structure: CScenarioPointContainer//2380938603: Points//702683191 public uint Unused1 { get; set; }//56 public uint Unused2 { get; set; }//60 public uint Unused3 { get; set; }//64 public uint Unused4 { get; set; }//68 - public Array_Structure EntityOverrides { get; set; } //72 72: Array: 0: EntityOverrides//697469539 {0: Structure: CScenarioEntityOverride//4213733800: 256} + public Array_Structure EntityOverrides; //72 72: Array: 0: EntityOverrides//697469539 {0: Structure: CScenarioEntityOverride//4213733800: 256} public uint Unused5 { get; set; }//88 public uint Unused6 { get; set; }//92 - public CScenarioChainingGraph ChainingGraph { get; set; } //[PATHS] 96 96: Structure: CScenarioChainingGraph: ChainingGraph - public rage__spdGrid2D AccelGrid { get; set; } //184 184: Structure: rage__spdGrid2D: AccelGrid//3053155275 - public Array_ushort Unk_3844724227 { get; set; } //248 248: Array: 0: 3844724227 {0: UnsignedShort: 0: 256} - public Array_Structure Clusters { get; set; } //264 264: Array: 0: Clusters//3587988394 {0: Structure: CScenarioPointCluster//750308016: 256} - public CScenarioPointLookUps LookUps { get; set; } //280 280: Structure: CScenarioPointLookUps//3019621867: LookUps//1097626284 - - public override bool Equals(object obj) - { - return obj is CScenarioPointRegion region && - VersionNumber == region.VersionNumber && - Unused0 == region.Unused0 && - EqualityComparer.Default.Equals(Points, region.Points) && - Unused1 == region.Unused1 && - Unused2 == region.Unused2 && - Unused3 == region.Unused3 && - Unused4 == region.Unused4 && - EqualityComparer.Default.Equals(EntityOverrides, region.EntityOverrides) && - Unused5 == region.Unused5 && - Unused6 == region.Unused6 && - EqualityComparer.Default.Equals(ChainingGraph, region.ChainingGraph) && - EqualityComparer.Default.Equals(AccelGrid, region.AccelGrid) && - EqualityComparer.Default.Equals(Unk_3844724227, region.Unk_3844724227) && - EqualityComparer.Default.Equals(Clusters, region.Clusters) && - EqualityComparer.Default.Equals(LookUps, region.LookUps); - } - - public override int GetHashCode() - { - int hashCode = 1436693857; - hashCode = hashCode * -1521134295 + VersionNumber.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused0.GetHashCode(); - hashCode = hashCode * -1521134295 + Points.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused1.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused3.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused4.GetHashCode(); - hashCode = hashCode * -1521134295 + EntityOverrides.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused5.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused6.GetHashCode(); - hashCode = hashCode * -1521134295 + ChainingGraph.GetHashCode(); - hashCode = hashCode * -1521134295 + AccelGrid.GetHashCode(); - hashCode = hashCode * -1521134295 + Unk_3844724227.GetHashCode(); - hashCode = hashCode * -1521134295 + Clusters.GetHashCode(); - hashCode = hashCode * -1521134295 + LookUps.GetHashCode(); - return hashCode; - } - - public static bool operator ==(CScenarioPointRegion left, CScenarioPointRegion right) - { - return left.Equals(right); - } - - public static bool operator !=(CScenarioPointRegion left, CScenarioPointRegion right) - { - return !(left == right); - } + public CScenarioChainingGraph ChainingGraph; //[PATHS] 96 96: Structure: CScenarioChainingGraph: ChainingGraph + public rage__spdGrid2D AccelGrid; //184 184: Structure: rage__spdGrid2D: AccelGrid//3053155275 + public Array_ushort Unk_3844724227; //248 248: Array: 0: 3844724227 {0: UnsignedShort: 0: 256} + public Array_Structure Clusters; //264 264: Array: 0: Clusters//3587988394 {0: Structure: CScenarioPointCluster//750308016: 256} + public CScenarioPointLookUps LookUps; //280 280: Structure: CScenarioPointLookUps//3019621867: LookUps//1097626284 } - [TC(typeof(EXP))] public class MCScenarioPointRegion : MetaWrapper + + [TC(typeof(EXP))] + public class MCScenarioPointRegion : MetaWrapper { public YmtFile Ymt { get; set; } @@ -4281,26 +4133,26 @@ namespace CodeWalker.GameFiles public int VersionNumber { get { return _Data.VersionNumber; } set { _Data.VersionNumber = value; } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - var data = MetaTypes.GetData(meta, ptr); - Load(meta, data); + MetaTypes.TryGetData(meta, in ptr, out var data); + Load(meta, in data); } - public void Load(Meta meta, CScenarioPointRegion data) + public void Load(Meta meta, in CScenarioPointRegion data) { _Data = data; - Points = new MCScenarioPointContainer(this, meta, _Data.Points); + Points = new MCScenarioPointContainer(this, meta, in _Data.Points); - var entOverrides = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioEntityOverride, _Data.EntityOverrides); + var entOverrides = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioEntityOverride, in _Data.EntityOverrides); if (entOverrides != null) { EntityOverrides = new MCScenarioEntityOverride[entOverrides.Length]; for (int i = 0; i < entOverrides.Length; i++) { - EntityOverrides[i] = new MCScenarioEntityOverride(this, meta, entOverrides[i]); + EntityOverrides[i] = new MCScenarioEntityOverride(this, meta, in entOverrides[i]); } } @@ -4308,7 +4160,7 @@ namespace CodeWalker.GameFiles Paths = new MCScenarioChainingGraph(this, meta, _Data.ChainingGraph); - var clusters = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioPointCluster, _Data.Clusters); + var clusters = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioPointCluster, in _Data.Clusters); if (clusters != null) { Clusters = new MCScenarioPointCluster[clusters.Length]; @@ -4318,9 +4170,9 @@ namespace CodeWalker.GameFiles } } - Unk_3844724227 = MetaTypes.GetUshortArray(meta, _Data.Unk_3844724227); + Unk_3844724227 = MetaTypes.GetUshortArray(meta, in _Data.Unk_3844724227); - LookUps = new MCScenarioPointLookUps(this, meta, _Data.LookUps); + LookUps = new MCScenarioPointLookUps(this, meta, in _Data.LookUps); #region data analysis @@ -4412,7 +4264,7 @@ namespace CodeWalker.GameFiles for (int i = 0; i < EntityOverrides.Length; i++) { var mcent = EntityOverrides[i]; - var cent = mcent.Data; + var cent = mcent._Data; var scps = mcent.GetCScenarioPoints(); if (scps != null) { @@ -4432,18 +4284,18 @@ namespace CodeWalker.GameFiles } - if (Paths != null) + if (Paths is not null) { var pd = new CScenarioChainingGraph(); var nodes = Paths.GetCNodes(); - if (nodes != null) + if (nodes is not null && nodes.Length > 0) { mb.AddStructureInfo(MetaName.CScenarioChainingNode); pd.Nodes = mb.AddItemArrayPtr(MetaName.CScenarioChainingNode, nodes); } var edges = Paths.GetCEdges(); - if (edges != null) + if (edges is not null && edges.Length > 0) { mb.AddStructureInfo(MetaName.CScenarioChainingEdge); mb.AddEnumInfo(MetaName.CScenarioChainingEdge__eAction); @@ -4451,11 +4303,11 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(MetaName.CScenarioChainingEdge__eNavSpeed); pd.Edges = mb.AddItemArrayPtr(MetaName.CScenarioChainingEdge, edges); } - if (Paths.Chains != null) + if (Paths.Chains is not null) { foreach (var chain in Paths.Chains) { - if (chain.EdgeIds != null) + if (chain.EdgeIds is not null) { chain._Data.EdgeIds = mb.AddUshortArrayPtr(chain.EdgeIds); } @@ -4466,7 +4318,7 @@ namespace CodeWalker.GameFiles } } var chains = Paths.GetCChains(); - if (chains != null) + if (chains is not null && chains.Length > 0) { mb.AddStructureInfo(MetaName.CScenarioChain); pd.Chains = mb.AddItemArrayPtr(MetaName.CScenarioChain, chains); @@ -4538,7 +4390,7 @@ namespace CodeWalker.GameFiles mb.AddString("Made with CodeWalker by dexyfex. " + DateTime.Now.ToString()); - return mb.AddItemPtr(MetaName.CScenarioPointRegion, _Data); + return mb.AddItemPtr(MetaName.CScenarioPointRegion, in _Data); } @@ -4621,31 +4473,21 @@ namespace CodeWalker.GameFiles - public override string Name - { - get - { - return Ymt?.ToString() ?? "CScenarioPointRegion"; - } - } - - public override string ToString() - { - return Name; - } + public override string Name => Ymt?.ToString() ?? "CScenarioPointRegion"; + public override string ToString() => Name; } [TC(typeof(EXP))] public struct CScenarioPointContainer //SCENARIO Region Points arrays // 48 bytes, Key:2489654897 { - public Array_Structure LoadSavePoints { get; set; } //0 0: Array: 0: LoadSavePoints//3016741991 {0: Structure: CExtensionDefSpawnPoint: 256} - public Array_Structure MyPoints { get; set; } //16 16: Array: 0: MyPoints//1170781136 {0: Structure: CScenarioPoint//4103049490: 256} + public Array_Structure LoadSavePoints; //0 0: Array: 0: LoadSavePoints//3016741991 {0: Structure: CExtensionDefSpawnPoint: 256} + public Array_Structure MyPoints; //16 16: Array: 0: MyPoints//1170781136 {0: Structure: CScenarioPoint//4103049490: 256} public uint Unused0 { get; set; }//32 public uint Unused1 { get; set; }//36 public uint Unused2 { get; set; }//40 public uint Unused3 { get; set; }//44 - public override bool Equals(object obj) + public override readonly bool Equals(object obj) { return obj is CScenarioPointContainer container && EqualityComparer.Default.Equals(LoadSavePoints, container.LoadSavePoints) && @@ -4656,7 +4498,7 @@ namespace CodeWalker.GameFiles Unused3 == container.Unused3; } - public override int GetHashCode() + public override readonly int GetHashCode() { int hashCode = 746587205; hashCode = hashCode * -1521134295 + LoadSavePoints.GetHashCode(); @@ -4668,9 +4510,9 @@ namespace CodeWalker.GameFiles return hashCode; } - public override string ToString() + public override readonly string ToString() { - return LoadSavePoints.Count1.ToString() + " LoadSavePoints, " + MyPoints.Count1.ToString() + " MyPoints"; + return $"{LoadSavePoints.Count1} LoadSavePoints, {MyPoints.Count1} MyPoints"; } public static bool operator ==(CScenarioPointContainer left, CScenarioPointContainer right) @@ -4683,13 +4525,14 @@ namespace CodeWalker.GameFiles return !(left == right); } } - [TC(typeof(EXP))] public class MCScenarioPointContainer : MetaWrapper + [TC(typeof(EXP))] + public class MCScenarioPointContainer : MetaWrapper { [TC(typeof(EXP))] public object Parent { get; set; } public MCScenarioPointRegion Region { get; private set; } public CScenarioPointContainer _Data; - public CScenarioPointContainer Data { get { return _Data; } set { _Data = value; } } + public ref CScenarioPointContainer Data => ref _Data; public MCExtensionDefSpawnPoint[] LoadSavePoints { get; set; } public MCScenarioPoint[] MyPoints { get; set; } @@ -4701,7 +4544,7 @@ namespace CodeWalker.GameFiles { Region = region; } - public MCScenarioPointContainer(MCScenarioPointRegion region, Meta meta, CScenarioPointContainer d) + public MCScenarioPointContainer(MCScenarioPointRegion region, Meta meta, in CScenarioPointContainer d) { Region = region; _Data = d; @@ -4710,17 +4553,17 @@ namespace CodeWalker.GameFiles public void Init(Meta meta) { - var vLoadSavePoints = MetaTypes.ConvertDataArray(meta, MetaName.CExtensionDefSpawnPoint, _Data.LoadSavePoints); + var vLoadSavePoints = MetaTypes.ConvertDataArray(meta, MetaName.CExtensionDefSpawnPoint, in _Data.LoadSavePoints); if (vLoadSavePoints != null) { LoadSavePoints = new MCExtensionDefSpawnPoint[vLoadSavePoints.Length]; for (int i = 0; i < vLoadSavePoints.Length; i++) { - LoadSavePoints[i] = new MCExtensionDefSpawnPoint(Region, meta, vLoadSavePoints[i], this); + LoadSavePoints[i] = new MCExtensionDefSpawnPoint(Region, meta, in vLoadSavePoints[i], this); } } - var vMyPoints = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioPoint, _Data.MyPoints); + var vMyPoints = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioPoint, in _Data.MyPoints); if (vMyPoints != null) { MyPoints = new MCScenarioPoint[vMyPoints.Length]; @@ -4732,16 +4575,16 @@ namespace CodeWalker.GameFiles } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Init(meta); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioPointContainer); - return mb.AddItemPtr(MetaName.CScenarioPointContainer, _Data); + return mb.AddItemPtr(MetaName.CScenarioPointContainer, in _Data); } @@ -4845,23 +4688,12 @@ namespace CodeWalker.GameFiles } - - public override string Name - { - get - { - return "CScenarioPointContainer"; - } - } - - public override string ToString() - { - return _Data.ToString(); - } - + public override string Name => "CScenarioPointContainer"; + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CScenarioPoint //SCENARIO Point, similar to CExtensionDefSpawnPointOverride //64 bytes, Key:402442150 + [TC(typeof(EXP))] + public struct CScenarioPoint //SCENARIO Point, similar to CExtensionDefSpawnPointOverride //64 bytes, Key:402442150 { public uint Unused0 { get; set; }//0 public uint Unused1 { get; set; }//4 @@ -4887,12 +4719,13 @@ namespace CodeWalker.GameFiles public uint Unused9 { get; set; }//44 public Vector4 vPositionAndDirection { get; set; } //48 48: Float_XYZW: 0: vPositionAndDirection//4685037 - public override string ToString() + public override readonly string ToString() { return FloatUtil.GetVector4String(vPositionAndDirection); //iTimeStartOverride.ToString() + "-" + iTimeEndOverride.ToString();// + ", " + Flags.ToString(); } } - [TC(typeof(EXP))] public class MCScenarioPoint : MetaWrapper + [TC(typeof(EXP))] + public class MCScenarioPoint : MetaWrapper { [TC(typeof(EXP))] public MCScenarioPointContainer Container { get; set; } public MCScenarioPointRegion Region { get; set; } @@ -4907,7 +4740,7 @@ namespace CodeWalker.GameFiles get { return Quaternion.RotationAxis(Vector3.UnitZ, Direction); } set { - Vector3 dir = value.Multiply(Vector3.UnitX); + Vector3 dir = value.Multiply(in Vector3.UnitX); float dira = (float)Math.Atan2(dir.Y, dir.X); Direction = dira; } @@ -4929,7 +4762,7 @@ namespace CodeWalker.GameFiles public byte IMapId { get { return _Data.iRequiredIMapId; } set { _Data.iRequiredIMapId = value; } } public MetaHash IMapName { get; set; } - public string TimeRange { get { return _Data.iTimeStartOverride.ToString().PadLeft(2, '0') + ":00 - " + _Data.iTimeEndOverride.ToString().PadLeft(2, '0') + ":00"; } } + public string TimeRange => $"{_Data.iTimeStartOverride.ToString().PadLeft(2, '0')}:00 - {_Data.iTimeEndOverride.ToString().PadLeft(2, '0')}:00"; public byte TimeStart { get { return _Data.iTimeStartOverride; } set { _Data.iTimeStartOverride = value; } } public byte TimeEnd { get { return _Data.iTimeEndOverride; } set { _Data.iTimeEndOverride = value; } } public byte Probability { get { return _Data.iProbability; } set { _Data.iProbability = value; } } @@ -4973,39 +4806,30 @@ namespace CodeWalker.GameFiles } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioPoint); - return mb.AddItemPtr(MetaName.CScenarioPoint, _Data); + return mb.AddItemPtr(MetaName.CScenarioPoint, in _Data); } - public override string Name - { - get - { - return (Type?.ToString() ?? "") + ": " + (ModelSet?.ToString() ?? ""); - } - } - - public override string ToString() - { - return Name + ": " + TimeRange; - } + public override string Name => $"{Type?.ToString() ?? string.Empty} : {ModelSet?.ToString() ?? string.Empty}"; + public override string ToString() => $"{Name}: {TimeRange}"; } - [TC(typeof(EXP))] public struct CScenarioEntityOverride //SCENARIO Entity Override //80 bytes, Key:1271200492 + [TC(typeof(EXP))] + public struct CScenarioEntityOverride //SCENARIO Entity Override //80 bytes, Key:1271200492 { - public Vector3 EntityPosition { get; set; } //0 0: Float_XYZ: 0: EntityPosition//642078041 + public Vector3 EntityPosition; //0 0: Float_XYZ: 0: EntityPosition//642078041 public float Unused00 { get; set; }//12 public MetaHash EntityType { get; set; } //16 16: Hash: 0: EntityType//1374199246 public uint Unused01 { get; set; }//20 - public Array_Structure ScenarioPoints { get; set; } //24 24: Array: 0: ScenarioPoints {0: Structure: CExtensionDefSpawnPoint: 256} + public Array_Structure ScenarioPoints; //24 24: Array: 0: ScenarioPoints {0: Structure: CExtensionDefSpawnPoint: 256} public uint Unused02 { get; set; }//40 public uint Unused03 { get; set; }//44 public uint Unused04 { get; set; }//48 @@ -5019,12 +4843,11 @@ namespace CodeWalker.GameFiles public uint Unused10 { get; set; }//72 public uint Unused11 { get; set; }//76 - public override string ToString() - { - return EntityType.ToString() + ", " + ScenarioPoints.Count1.ToString() + " ScenarioPoints"; - } + public override readonly string ToString() => $"{EntityType}, {ScenarioPoints.Count1} ScenarioPoints"; } - [TC(typeof(EXP))] public class MCScenarioEntityOverride : MetaWrapper + + [TC(typeof(EXP))] + public class MCScenarioEntityOverride : MetaWrapper { [TC(typeof(EXP))] public object Parent { get; set; } public MCScenarioPointRegion Region { get; set; } @@ -5050,7 +4873,7 @@ namespace CodeWalker.GameFiles _Data = copy.Data; } } - public MCScenarioEntityOverride(MCScenarioPointRegion region, Meta meta, CScenarioEntityOverride d) + public MCScenarioEntityOverride(MCScenarioPointRegion region, Meta meta, in CScenarioEntityOverride d) { Region = region; _Data = d; @@ -5060,22 +4883,22 @@ namespace CodeWalker.GameFiles public void Init(Meta meta) { - var scenarioPoints = MetaTypes.ConvertDataArray(meta, MetaName.CExtensionDefSpawnPoint, _Data.ScenarioPoints); + var scenarioPoints = MetaTypes.ConvertDataArray(meta, MetaName.CExtensionDefSpawnPoint, in _Data.ScenarioPoints); if (scenarioPoints != null) { ScenarioPoints = new MCExtensionDefSpawnPoint[scenarioPoints.Length]; for (int i = 0; i < scenarioPoints.Length; i++) { - ScenarioPoints[i] = new MCExtensionDefSpawnPoint(Region, meta, scenarioPoints[i], this); + ScenarioPoints[i] = new MCExtensionDefSpawnPoint(Region, meta, in scenarioPoints[i], this); ScenarioPoints[i].ParentPosition = Position; } } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Init(meta); } @@ -5091,7 +4914,7 @@ namespace CodeWalker.GameFiles _Data.ScenarioPoints = mb.AddWrapperArray(ScenarioPoints); } - return mb.AddItemPtr(MetaName.CScenarioEntityOverride, _Data); + return mb.AddItemPtr(MetaName.CScenarioEntityOverride, in _Data); } @@ -5145,25 +4968,16 @@ namespace CodeWalker.GameFiles - public override string Name - { - get - { - return "CScenarioEntityOverride " + _Data.EntityType.ToString(); - } - } - - public override string ToString() - { - return _Data.ToString(); - } + public override string Name => $"CScenarioEntityOverride {_Data.EntityType}"; + public override string ToString() => _Data.ToString(); } - [TC(typeof(EXP))] public struct CScenarioChainingGraph //SCENARIO PATH ARRAYS //88 bytes, Key:88255871 + [TC(typeof(EXP))] + public record struct CScenarioChainingGraph //SCENARIO PATH ARRAYS //88 bytes, Key:88255871 { - public Array_Structure Nodes { get; set; } //0 0: Array: 0: Nodes {0: Structure: CScenarioChainingNode//3340683255: 256} - public Array_Structure Edges { get; set; } //16 16: Array: 0: Edges {0: Structure: CScenarioChainingEdge//4255409560: 256} - public Array_Structure Chains { get; set; } //32 32: Array: 0: Chains {0: Structure: CScenarioChain: 256} + public Array_Structure Nodes; //0 0: Array: 0: Nodes {0: Structure: CScenarioChainingNode//3340683255: 256} + public Array_Structure Edges; //16 16: Array: 0: Edges {0: Structure: CScenarioChainingEdge//4255409560: 256} + public Array_Structure Chains; //32 32: Array: 0: Chains {0: Structure: CScenarioChain: 256} public uint Unused0 { get; set; }//48 public uint Unused1 { get; set; }//52 public uint Unused2 { get; set; }//56 @@ -5175,51 +4989,14 @@ namespace CodeWalker.GameFiles public uint Unused8 { get; set; }//80 public uint Unused9 { get; set; }//84 - public override string ToString() + public override readonly string ToString() { - return Nodes.Count1.ToString() + " Nodes, " + Edges.Count1.ToString() + " Edges, " + Chains.Count1.ToString() + " Chains"; - } - - public static bool operator !=(CScenarioChainingGraph x, CScenarioChainingGraph y) - { - return !x.Equals(y); - } - - public static bool operator ==(CScenarioChainingGraph x, CScenarioChainingGraph y) - { - return x.Equals(y); - } - - public override bool Equals(object obj) - { - if (obj is null || obj is not CScenarioChainingGraph arrObj) - return false; - - return arrObj.Nodes == this.Nodes - && arrObj.Edges == this.Edges - && arrObj.Chains == this.Chains; - } - - public override int GetHashCode() - { - int hashCode = -1851298727; - hashCode = hashCode * -1521134295 + Nodes.GetHashCode(); - hashCode = hashCode * -1521134295 + Edges.GetHashCode(); - hashCode = hashCode * -1521134295 + Chains.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused0.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused1.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused2.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused3.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused4.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused5.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused6.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused7.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused8.GetHashCode(); - hashCode = hashCode * -1521134295 + Unused9.GetHashCode(); - return hashCode; + return $"{Nodes.Count1} Nodes, {Edges.Count1} Edges, {Chains.Count1} Chains"; } } - [TC(typeof(EXP))] public class MCScenarioChainingGraph : MetaWrapper + + [TC(typeof(EXP))] + public class MCScenarioChainingGraph : MetaWrapper { public MCScenarioPointRegion Region { get; private set; } @@ -5241,7 +5018,7 @@ namespace CodeWalker.GameFiles public void Init(Meta meta) { - var pathnodes = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChainingNode, _Data.Nodes); + var pathnodes = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChainingNode, in _Data.Nodes); if (pathnodes != null) { Nodes = new MCScenarioChainingNode[pathnodes.Length]; @@ -5251,7 +5028,7 @@ namespace CodeWalker.GameFiles } } - var pathedges = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChainingEdge, _Data.Edges); + var pathedges = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChainingEdge, in _Data.Edges); if (pathedges != null) { Edges = new MCScenarioChainingEdge[pathedges.Length]; @@ -5261,7 +5038,7 @@ namespace CodeWalker.GameFiles } } - var pathchains = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChain, _Data.Chains); + var pathchains = MetaTypes.ConvertDataArray(meta, MetaName.CScenarioChain, in _Data.Chains); if (pathchains != null) { Chains = new MCScenarioChain[pathchains.Length]; @@ -5272,9 +5049,9 @@ namespace CodeWalker.GameFiles } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Init(meta); } @@ -5283,7 +5060,7 @@ namespace CodeWalker.GameFiles public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioChainingGraph); - return mb.AddItemPtr(MetaName.CScenarioChainingGraph, _Data); + return mb.AddItemPtr(MetaName.CScenarioChainingGraph, in _Data); } @@ -5294,11 +5071,12 @@ namespace CodeWalker.GameFiles public CScenarioChainingNode[] GetCNodes() { - if ((Nodes == null) || (Nodes.Length == 0)) return null; + if (Nodes == null || Nodes.Length == 0) + return null; CScenarioChainingNode[] r = new CScenarioChainingNode[Nodes.Length]; for (int i = 0; i < Nodes.Length; i++) { - r[i] = Nodes[i].Data; + r[i] = Nodes[i]._Data; } return r; } @@ -5495,7 +5273,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct CScenarioChainingNode //SCENARIO PATH NODE //32 bytes, Key:1811784424 + [TC(typeof(EXP))] + public struct CScenarioChainingNode //SCENARIO PATH NODE //32 bytes, Key:1811784424 { public Vector3 Position { get; set; } //0 0: Float_XYZ: 0: Position public float Unused0 { get; set; }//12 @@ -5508,8 +5287,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return - ScenarioType.ToString() + ", " + Unk_2602393771.ToString(); + return $"{ScenarioType}, {Unk_2602393771}"; } } [TC(typeof(EXP))] public class MCScenarioChainingNode : MetaWrapper @@ -5553,30 +5331,21 @@ namespace CodeWalker.GameFiles Type = copy.Type; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioChainingNode); - return mb.AddItemPtr(MetaName.CScenarioChainingNode, _Data); + return mb.AddItemPtr(MetaName.CScenarioChainingNode, in _Data); } - public override string Name - { - get - { - return "CScenarioChainingNode";// + _Data.Unk_2602393771.ToString(); - } - } + public override string Name => "CScenarioChainingNode"; - public override string ToString() - { - return _Data.ToString(); - } + public override string ToString() => _Data.ToString(); } @@ -5591,7 +5360,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return NodeIndexFrom.ToString() + ", " + NodeIndexTo.ToString() + ", " + Action.ToString() + ", " + NavMode.ToString() + ", " + NavSpeed.ToString(); + return $"{NodeIndexFrom}, {NodeIndexTo}, {Action}, {NavMode}, {NavSpeed}"; } } [TC(typeof(EXP))] public class MCScenarioChainingEdge : MetaWrapper @@ -5627,28 +5396,22 @@ namespace CodeWalker.GameFiles NodeTo = copy.NodeTo;//these should be updated later... } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioChainingEdge); - return mb.AddItemPtr(MetaName.CScenarioChainingEdge, _Data); + return mb.AddItemPtr(MetaName.CScenarioChainingEdge, in _Data); } - public override string Name - { - get - { - return "CScenarioChainingEdge"; - } - } + public override string Name => "CScenarioChainingEdge"; public override string ToString() { - return Action.ToString() + ", " + NavMode.ToString() + ", " + NavSpeed.ToString(); + return $"{Action}, {NavMode}, {NavSpeed}"; } } @@ -5659,15 +5422,15 @@ namespace CodeWalker.GameFiles public byte Unused0 { get; set; }//1 public ushort Unused1 { get; set; }//2 public uint Unused2 { get; set; }//4 - public Array_ushort EdgeIds { get; set; } //8 8: Array: 0: EdgeIds {0: UnsignedShort: 0: 256} + public Array_ushort EdgeIds; //8 8: Array: 0: EdgeIds {0: UnsignedShort: 0: 256} public uint Unused3 { get; set; }//24 public uint Unused4 { get; set; }//28 public uint Unused5 { get; set; }//32 public uint Unused6 { get; set; }//36 - public override string ToString() + public override readonly string ToString() { - return Unk_1156691834.ToString() + ": " + EdgeIds.Count1.ToString() + " EdgeIds"; + return $"{Unk_1156691834}: {EdgeIds.Count1} EdgeIds"; } } [TC(typeof(EXP))] public class MCScenarioChain : MetaWrapper @@ -5689,13 +5452,13 @@ namespace CodeWalker.GameFiles { Region = region; _Data = d; - EdgeIds = MetaTypes.GetUshortArray(meta, _Data.EdgeIds); + EdgeIds = MetaTypes.GetUshortArray(meta, in _Data.EdgeIds); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - EdgeIds = MetaTypes.GetUshortArray(meta, _Data.EdgeIds); + MetaTypes.TryGetData(meta, in ptr, out _Data); + EdgeIds = MetaTypes.GetUshortArray(meta, in _Data.EdgeIds); } @@ -5756,7 +5519,7 @@ namespace CodeWalker.GameFiles //} mb.AddStructureInfo(MetaName.CScenarioChain); - return mb.AddItemPtr(MetaName.CScenarioChain, _Data); + return mb.AddItemPtr(MetaName.CScenarioChain, in _Data); } public override string Name @@ -5776,14 +5539,14 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public struct CScenarioPointCluster //SCENARIO spawn cluster - all things spawn together //80 bytes, Key:3622480419 { - public CScenarioPointContainer Points { get; set; } //0 0: Structure: CScenarioPointContainer//2380938603: Points//702683191 - public rage__spdSphere ClusterSphere { get; set; } //48 48: Structure: 1062159465: ClusterSphere//352461053 + public CScenarioPointContainer Points; //0 0: Structure: CScenarioPointContainer//2380938603: Points//702683191 + public rage__spdSphere ClusterSphere; //48 48: Structure: 1062159465: ClusterSphere//352461053 public float Unk_1095875445 { get; set; } //64 64: Float: 0: 1095875445 //spawn chance? eg 5, 30 public byte Unk_3129415068 { get; set; } //68 68: Boolean: 0: 3129415068 public uint Unused0 { get; set; }//72 public uint Unused1 { get; set; }//76 - public override string ToString() + public override readonly string ToString() { return Points.ToString();// + ", Sphere: " + ClusterSphere.ToString(); } @@ -5830,18 +5593,18 @@ namespace CodeWalker.GameFiles Points = new MCScenarioPointContainer(region); Points.Parent = this; } - public MCScenarioPointCluster(MCScenarioPointRegion region, Meta meta, CScenarioPointCluster d) + public MCScenarioPointCluster(MCScenarioPointRegion region, Meta meta, in CScenarioPointCluster d) { Region = region; _Data = d; - Points = new MCScenarioPointContainer(region, meta, d.Points); + Points = new MCScenarioPointContainer(region, meta, in d.Points); Points.Parent = this; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); - Points = new MCScenarioPointContainer(Region, meta, _Data.Points); + MetaTypes.TryGetData(meta, in ptr, out _Data); + Points = new MCScenarioPointContainer(Region, meta, in _Data.Points); Points.Parent = this; } @@ -5889,7 +5652,7 @@ namespace CodeWalker.GameFiles _Data.Points = new CScenarioPointContainer(); } - return mb.AddItemPtr(MetaName.CScenarioPointCluster, _Data); + return mb.AddItemPtr(MetaName.CScenarioPointCluster, in _Data); } public override string Name @@ -5913,12 +5676,12 @@ namespace CodeWalker.GameFiles public Array_uint InteriorNames { get; set; } //64 64: Array: 0: InteriorNames {0: Hash: 0: 256} public Array_uint RequiredIMapNames { get; set; } //[ymap names] //80 80: Array: 0: RequiredIMapNames//1767860162 {0: Hash: 0: 256} - public override string ToString() + public override readonly string ToString() { return "CScenarioPointLookUps"; } - public override bool Equals(object obj) + public override readonly bool Equals(object obj) { return obj is CScenarioPointLookUps ups && EqualityComparer.Default.Equals(TypeNames, ups.TypeNames) && @@ -5929,7 +5692,7 @@ namespace CodeWalker.GameFiles EqualityComparer.Default.Equals(RequiredIMapNames, ups.RequiredIMapNames); } - public override int GetHashCode() + public override readonly int GetHashCode() { int hashCode = -153113894; hashCode = hashCode * -1521134295 + TypeNames.GetHashCode(); @@ -5956,7 +5719,7 @@ namespace CodeWalker.GameFiles public MCScenarioPointRegion Region { get; set; } public CScenarioPointLookUps _Data; - public CScenarioPointLookUps Data { get { return _Data; } set { _Data = value; } } + public CScenarioPointLookUps Data => _Data; public MetaHash[] TypeNames { get; set; } //scenario type hashes used by points public MetaHash[] PedModelSetNames { get; set; } //ped names @@ -5971,7 +5734,7 @@ namespace CodeWalker.GameFiles { Region = region; } - public MCScenarioPointLookUps(MCScenarioPointRegion region, Meta meta, CScenarioPointLookUps d) + public MCScenarioPointLookUps(MCScenarioPointRegion region, Meta meta, in CScenarioPointLookUps d) { Region = region; _Data = d; @@ -5988,16 +5751,16 @@ namespace CodeWalker.GameFiles RequiredIMapNames = MetaTypes.GetHashArray(meta, _Data.RequiredIMapNames); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Init(meta); } public override MetaPOINTER Save(MetaBuilder mb) { mb.AddStructureInfo(MetaName.CScenarioPointLookUps); - return mb.AddItemPtr(MetaName.CScenarioPointLookUps, _Data); + return mb.AddItemPtr(MetaName.CScenarioPointLookUps, in _Data); } public override string Name @@ -6015,69 +5778,51 @@ namespace CodeWalker.GameFiles } - - - - - - - - - - - - - - - - - - - - - [TC(typeof(EXP))] public struct CCompositeEntityType //304 bytes, Key:659539004 dex: composite entity type - ytyp // Tom: des_ destruction + [TC(typeof(EXP))] + public readonly struct CCompositeEntityType //304 bytes, Key:659539004 dex: composite entity type - ytyp // Tom: des_ destruction { - public ArrayOfChars64 Name { get; set; } //0 0: ArrayOfChars: 64: Name - public float lodDist { get; set; } //64 64: Float: 0: lodDist - public uint flags { get; set; } //68 68: UnsignedInt: 0: flags - public uint specialAttribute { get; set; } //72 72: UnsignedInt: 0: specialAttribute - public uint Unused0 { get; set; }//76 - public Vector3 bbMin { get; set; } //80 80: Float_XYZ: 0: bbMin - public float Unused1 { get; set; }//92 - public Vector3 bbMax { get; set; } //96 96: Float_XYZ: 0: bbMax - public float Unused2 { get; set; }//108 - public Vector3 bsCentre { get; set; } //112 112: Float_XYZ: 0: bsCentre - public float Unused3 { get; set; }//124 - public float bsRadius { get; set; } //128 128: Float: 0: bsRadius - public uint Unused4 { get; set; }//132 - public ArrayOfChars64 StartModel { get; set; } //136 136: ArrayOfChars: 64: StartModel - public ArrayOfChars64 EndModel { get; set; } //200 200: ArrayOfChars: 64: EndModel - public MetaHash StartImapFile { get; set; } //264 264: Hash: 0: StartImapFile//2462971690 - public MetaHash EndImapFile { get; set; } //268 268: Hash: 0: EndImapFile//2059586669 - public MetaHash PtFxAssetName { get; set; } //272 272: Hash: 0: PtFxAssetName//2497993358 - public uint Unused5 { get; set; }//276 - public Array_Structure Animations { get; set; } //280 280: Array: 0: Animations {0: Structure: 1980345114: 256} - public uint Unused6 { get; set; }//296 - public uint Unused7 { get; set; }//300 + public ArrayOfChars64 Name { get; init; } //0 0: ArrayOfChars: 64: Name + public float lodDist { get; init; } //64 64: Float: 0: lodDist + public uint flags { get; init; } //68 68: UnsignedInt: 0: flags + public uint specialAttribute { get; init; } //72 72: UnsignedInt: 0: specialAttribute + public uint Unused0 { get; init; }//76 + public Vector3 bbMin { get; init; } //80 80: Float_XYZ: 0: bbMin + public float Unused1 { get; init; }//92 + public Vector3 bbMax { get; init; } //96 96: Float_XYZ: 0: bbMax + public float Unused2 { get; init; }//108 + public Vector3 bsCentre { get; init; } //112 112: Float_XYZ: 0: bsCentre + public float Unused3 { get; init; }//124 + public float bsRadius { get; init; } //128 128: Float: 0: bsRadius + public uint Unused4 { get; init; }//132 + public ArrayOfChars64 StartModel { get; init; } //136 136: ArrayOfChars: 64: StartModel + public ArrayOfChars64 EndModel { get; init; } //200 200: ArrayOfChars: 64: EndModel + public MetaHash StartImapFile { get; init; } //264 264: Hash: 0: StartImapFile//2462971690 + public MetaHash EndImapFile { get; init; } //268 268: Hash: 0: EndImapFile//2059586669 + public MetaHash PtFxAssetName { get; init; } //272 272: Hash: 0: PtFxAssetName//2497993358 + public uint Unused5 { get; init; }//276 + public Array_Structure Animations { get; init; } //280 280: Array: 0: Animations {0: Structure: 1980345114: 256} + public uint Unused6 { get; init; }//296 + public uint Unused7 { get; init; }//300 public override string ToString() { - return Name.ToString() + ", " + StartModel.ToString() + ", " + EndModel.ToString() + ", " + - StartImapFile.ToString() + ", " + EndImapFile.ToString() + ", " + PtFxAssetName.ToString(); + return $"{Name}, {StartModel}, {EndModel}, {StartImapFile}, {EndImapFile}, {PtFxAssetName}"; } } - [TC(typeof(EXP))] public struct CCompEntityAnims //216 bytes, Key:4110496011 //destruction animations? + [TC(typeof(EXP))] + public readonly struct CCompEntityAnims //216 bytes, Key:4110496011 //destruction animations? { - public ArrayOfChars64 AnimDict { get; set; } //0 0: ArrayOfChars: 64: AnimDict - public ArrayOfChars64 AnimName { get; set; } //64 64: ArrayOfChars: 64: AnimName - public ArrayOfChars64 AnimatedModel { get; set; } //128 128: ArrayOfChars: 64: AnimatedModel - public float punchInPhase { get; set; } //192 192: Float: 0: punchInPhase//3142377407 - public float punchOutPhase { get; set; } //196 196: Float: 0: punchOutPhase//2164219370 - public Array_Structure effectsData { get; set; } //200 200: Array: 0: effectsData {0: Structure: 3430328684: 256} + public ArrayOfChars64 AnimDict { get; init; } //0 0: ArrayOfChars: 64: AnimDict + public ArrayOfChars64 AnimName { get; init; } //64 64: ArrayOfChars: 64: AnimName + public ArrayOfChars64 AnimatedModel { get; init; } //128 128: ArrayOfChars: 64: AnimatedModel + public float punchInPhase { get; init; } //192 192: Float: 0: punchInPhase//3142377407 + public float punchOutPhase { get; init; } //196 196: Float: 0: punchOutPhase//2164219370 + public Array_Structure effectsData { get; init; } //200 200: Array: 0: effectsData {0: Structure: 3430328684: 256} } - [TC(typeof(EXP))] public struct CCompEntityEffectsData //160 bytes, Key:1724963966 //destruction animation effects data + [TC(typeof(EXP))] + public struct CCompEntityEffectsData //160 bytes, Key:1724963966 //destruction animation effects data { public uint fxType { get; set; } //0 0: UnsignedInt: 0: fxType public uint Unused0 { get; set; }//4 @@ -6104,18 +5849,8 @@ namespace CodeWalker.GameFiles public uint Unused7 { get; set; }//156 } - - - - - - - - - - - - [TC(typeof(EXP))] public struct CStreamingRequestRecord //40 bytes, Key:3825587854 //SRL YMT ROOT - in /streaming/ folder + [TC(typeof(EXP))] + public struct CStreamingRequestRecord //40 bytes, Key:3825587854 //SRL YMT ROOT - in /streaming/ folder { public Array_Structure Frames { get; set; } //0 0: Array: 0: Frames {0: Structure: CStreamingRequestFrame: 256} public Array_Structure CommonSets { get; set; } //16 16: Array: 0: CommonSets {0: Structure: CStreamingRequestCommonSet: 256} @@ -6125,7 +5860,8 @@ namespace CodeWalker.GameFiles public uint Unused2 { get; set; }//36 } - [TC(typeof(EXP))] public struct CStreamingRequestFrame //112 bytes, Key:1112444512 //SRL frame... + [TC(typeof(EXP))] + public struct CStreamingRequestFrame //112 bytes, Key:1112444512 //SRL frame... { public Array_uint AddList { get; set; } //0 0: Array: 0: AddList//327274266 {0: Hash: 0: 256} public Array_uint RemoveList { get; set; } //16 16: Array: 0: RemoveList//3372321331 {0: Hash: 0: 256} @@ -6141,7 +5877,8 @@ namespace CodeWalker.GameFiles public uint Unused4 { get; set; }//108 } - [TC(typeof(EXP))] public struct CStreamingRequestFrame_v2 //96 bytes, Key:3672937465 //SRL frame... + [TC(typeof(EXP))] + public struct CStreamingRequestFrame_v2 //96 bytes, Key:3672937465 //SRL frame... { public Array_uint AddList { get; set; } //0 0: Array: 0: AddList//327274266 {0: Hash: 0: 256} public Array_uint RemoveList { get; set; } //16 16: Array: 0: RemoveList//3372321331 {0: Hash: 0: 256} @@ -6227,33 +5964,36 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public struct CPedVariationInfo : IPsoSwapEnd //112 bytes, Key:4030871161 //COMPONENT PEDS YMT ROOT - in componentpeds .rpf's + [TC(typeof(EXP))] public struct CPedVariationInfo : IPsoSwapEnd //112 bytes, Key:4030871161 //COMPONENT PEDS YMT ROOT - in componentpeds .rpf's { public byte bHasTexVariations { get; set; } //0 0: Boolean: 0: bHasTexVariations public byte bHasDrawblVariations { get; set; } //1 1: Boolean: 0: bHasDrawblVariations public byte bHasLowLODs { get; set; } //2 2: Boolean: 0: bHasLowLODs public byte bIsSuperLOD { get; set; } //3 3: Boolean: 0: bIsSuperLOD - public ArrayOfBytes12 availComp { get; set; } //4 4: ArrayOfBytes: 12: availComp - public Array_Structure aComponentData3 { get; set; } //16 16: Array: 0: aComponentData3 {0: Structure: CPVComponentData: 256} - public Array_Structure aSelectionSets { get; set; } //32 32: Array: 0: aSelectionSets {0: Structure: CPedSelectionSet: 256} - public Array_Structure compInfos { get; set; } //48 48: Array: 0: compInfos {0: Structure: CComponentInfo: 256} - public CPedPropInfo propInfo { get; set; } //64 64: Structure: CPedPropInfo: propInfo + public ArrayOfBytes12 availComp; //4 4: ArrayOfBytes: 12: availComp + public Array_Structure aComponentData3; //16 16: Array: 0: aComponentData3 {0: Structure: CPVComponentData: 256} + public Array_Structure aSelectionSets; //32 32: Array: 0: aSelectionSets {0: Structure: CPedSelectionSet: 256} + public Array_Structure compInfos; //48 48: Array: 0: compInfos {0: Structure: CComponentInfo: 256} + public CPedPropInfo propInfo; //64 64: Structure: CPedPropInfo: propInfo public MetaHash dlcName { get; set; } //104 104: Hash: 0: dlcName public uint Unused0 { get; set; }//108 - public void SwapEnd() + public CPedVariationInfo SwapEnd() { - aComponentData3 = aComponentData3.SwapEnd(); - aSelectionSets = aSelectionSets.SwapEnd(); - compInfos = compInfos.SwapEnd(); - propInfo = propInfo.SwapEnd(); - dlcName = MetaTypes.SwapBytes(dlcName); + return this with + { + aComponentData3 = aComponentData3.SwapEnd(), + aSelectionSets = aSelectionSets.SwapEnd(), + compInfos = compInfos.SwapEnd(), + propInfo = propInfo.SwapEnd(), + dlcName = MetaTypes.SwapBytes(dlcName), + }; } } [TC(typeof(EXP))] public class MCPedVariationInfo : MetaWrapper { public CPedVariationInfo _Data; - public CPedVariationInfo Data { get { return _Data; } } + public CPedVariationInfo Data => _Data; public byte[] ComponentIndices { get; set; } public MCPVComponentData[] ComponentData3 { get; set; } @@ -6262,12 +6002,12 @@ namespace CodeWalker.GameFiles public MCPedPropInfo PropInfo { get; set; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - var data = MetaTypes.GetData(meta, ptr); - Load(meta, data); + MetaTypes.TryGetData(meta, in ptr, out var data); + Load(meta, in data); } - public void Load(Meta meta, CPedVariationInfo data) + public void Load(Meta meta, in CPedVariationInfo data) { //maybe see https://github.com/emcifuntik/altv-cloth-tool/blob/master/AltTool/ResourceBuilder.cs @@ -6277,17 +6017,17 @@ namespace CodeWalker.GameFiles ComponentIndices = data.availComp.GetArray(); - var aComponentData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVComponentData, _Data.aComponentData3); + var aComponentData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVComponentData, in _Data.aComponentData3); if (aComponentData3 != null) { ComponentData3 = new MCPVComponentData[aComponentData3.Length]; for (int i = 0; i < aComponentData3.Length; i++) { - ComponentData3[i] = new MCPVComponentData(meta, aComponentData3[i], this); + ComponentData3[i] = new MCPVComponentData(meta, in aComponentData3[i], this); } } - var vSelectionSets = MetaTypes.ConvertDataArray(meta, MetaName.CPedSelectionSet, _Data.aSelectionSets); + var vSelectionSets = MetaTypes.ConvertDataArray(meta, MetaName.CPedSelectionSet, in _Data.aSelectionSets); if (vSelectionSets != null) { SelectionSets = new MCPedSelectionSet[vSelectionSets.Length]; @@ -6297,24 +6037,24 @@ namespace CodeWalker.GameFiles } } - var vCompInfos = MetaTypes.ConvertDataArray(meta, MetaName.CComponentInfo, _Data.compInfos); + var vCompInfos = MetaTypes.ConvertDataArray(meta, MetaName.CComponentInfo, in _Data.compInfos); if (vCompInfos != null) { CompInfos = new MCComponentInfo[vCompInfos.Length]; for (int i = 0; i < vCompInfos.Length; i++) { - CompInfos[i] = new MCComponentInfo(meta, vCompInfos[i], this); + CompInfos[i] = new MCComponentInfo(meta, in vCompInfos[i], this); } } - PropInfo = new MCPedPropInfo(meta, data.propInfo, this); + PropInfo = new MCPedPropInfo(meta, in data.propInfo, this); for (int i = 0; i < 12; i++) //set the component type indices on all the component variants, for them to use { var compInd = ComponentIndices[i]; - if ((compInd > 0) && (compInd < ComponentData3?.Length)) + if ((compInd >= 0) && (compInd < ComponentData3?.Length)) { var compvar = ComponentData3[compInd]; compvar.ComponentType = i; @@ -6331,10 +6071,16 @@ namespace CodeWalker.GameFiles } - + foreach(var component in ComponentData3) + { + if (component.ComponentType == -1) + { + Console.WriteLine($"No component type found for {component.Name} {component.Owner.Name}"); + } + } } - public void Load(PsoFile pso, CPedVariationInfo data) + public void Load(PsoFile pso, in CPedVariationInfo data) { //TODO! } @@ -6345,37 +6091,44 @@ namespace CodeWalker.GameFiles } - public MCPVComponentData GetComponentData(int componentType) + public MCPVComponentData? GetComponentData(int componentType) { - if ((componentType < 0) || (componentType > 11)) return null; - if (ComponentIndices == null) return null; + if ((componentType < 0) || (componentType > 11)) + throw new ArgumentOutOfRangeException(nameof(componentType), componentType, "Value should fall in range 0-11"); + if (ComponentIndices is null || ComponentData3 is null) + return null; + var index = ComponentIndices[componentType]; - if (index > ComponentData3?.Length) return null; + // Apparantly some files (like mp_f_stunt_01) have more datas than indices for some reason? + // I don't know if this is a mistake made by them or that this data is used for something else, but for now just discard it + if (index > ComponentData3?.Length || ComponentData3[index].ComponentType == -1) + return null; return ComponentData3[index]; } } - [TC(typeof(EXP))] public struct CPVComponentData //24 bytes, Key:2024084511 //COMPONENT PEDS component variations item + [TC(typeof(EXP))] + public readonly struct CPVComponentData //24 bytes, Key:2024084511 //COMPONENT PEDS component variations item { - public byte numAvailTex { get; set; } //0 0: UnsignedByte: 0: numAvailTex - public byte Unused0 { get; set; }//1 - public ushort Unused1 { get; set; }//2 - public uint Unused2 { get; set; }//4 - public Array_Structure aDrawblData3 { get; set; } //8 8: Array: 0: aDrawblData3 {0: Structure: CPVDrawblData: 256} + public byte numAvailTex { get; init; } //0 0: UnsignedByte: 0: numAvailTex + public byte Unused0 { get; init; }//1 + public ushort Unused1 { get; init; }//2 + public uint Unused2 { get; init; }//4 + public readonly Array_Structure aDrawblData3; //8 8: Array: 0: aDrawblData3 {0: Structure: CPVDrawblData: 256} } [TC(typeof(EXP))] public class MCPVComponentData : MetaWrapper { public MCPedVariationInfo Owner { get; set; } public CPVComponentData _Data; - public CPVComponentData Data { get { return _Data; } } + public CPVComponentData Data => _Data; - public byte numAvailTex { get { return _Data.numAvailTex; } set { _Data.numAvailTex = value; } } + public byte numAvailTex => _Data.numAvailTex; public MCPVDrawblData[] DrawblData3 { get; set; } - public int ComponentType { get; set; } = 0; + public int ComponentType { get; set; } = -1; public static string[] ComponentTypeNames { get; } = { "head",//0 @@ -6394,7 +6147,7 @@ namespace CodeWalker.GameFiles public MCPVComponentData() { } - public MCPVComponentData(Meta meta, CPVComponentData data, MCPedVariationInfo owner) + public MCPVComponentData(Meta meta, in CPVComponentData data, MCPedVariationInfo owner) { _Data = data; Owner = owner; @@ -6404,21 +6157,21 @@ namespace CodeWalker.GameFiles private void Init(Meta meta) { - var aDrawblData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVDrawblData, _Data.aDrawblData3); + var aDrawblData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVDrawblData, in _Data.aDrawblData3); if (aDrawblData3 != null) { DrawblData3 = new MCPVDrawblData[aDrawblData3.Length]; for (int i = 0; i < aDrawblData3.Length; i++) { - DrawblData3[i] = new MCPVDrawblData(meta, aDrawblData3[i], this, i); + DrawblData3[i] = new MCPVDrawblData(meta, in aDrawblData3[i], this, i); } } } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + MetaTypes.TryGetData(meta, in ptr, out _Data); Init(meta); } @@ -6429,35 +6182,36 @@ namespace CodeWalker.GameFiles public override string ToString() { - string r = (ComponentType < 12) ? ComponentTypeNames[ComponentType] : "error"; - return r + " : " + DrawblData3?.Length.ToString() ?? base.ToString(); + string r = (ComponentType < 12 && ComponentType >= 0) ? ComponentTypeNames[ComponentType] : "error"; + return r + " : " + (DrawblData3?.Length.ToString() ?? base.ToString()); } } - [TC(typeof(EXP))] public struct CPVDrawblData //48 bytes, Key:124073662 //COMPONENT PEDS drawable info + [TC(typeof(EXP))] + public readonly struct CPVDrawblData //48 bytes, Key:124073662 //COMPONENT PEDS drawable info { - public byte propMask { get; set; } //0 0: UnsignedByte: 0: propMask - public byte numAlternatives { get; set; } //1 1: UnsignedByte: 0: 2806194106 - public ushort Unused0 { get; set; }//2 - public uint Unused1 { get; set; }//4 - public Array_Structure aTexData { get; set; } //8 8: Array: 0: aTexData {0: Structure: CPVTextureData: 256} - public CPVDrawblData__CPVClothComponentData clothData { get; set; } //24 24: Structure: CPVDrawblData__CPVClothComponentData: clothData + public byte propMask { get; init; } //0 0: UnsignedByte: 0: propMask + public byte numAlternatives { get; init; } //1 1: UnsignedByte: 0: 2806194106 + public ushort Unused0 { get; init; }//2 + public uint Unused1 { get; init; }//4 + public readonly Array_Structure aTexData; //8 8: Array: 0: aTexData {0: Structure: CPVTextureData: 256} + public readonly CPVDrawblData__CPVClothComponentData clothData; //24 24: Structure: CPVDrawblData__CPVClothComponentData: clothData } [TC(typeof(EXP))] public class MCPVDrawblData : MetaWrapper { public MCPVComponentData Owner { get; set; } public CPVDrawblData _Data; - public CPVDrawblData Data { get { return _Data; } } + public CPVDrawblData Data => _Data; public CPVTextureData[] TexData { get; set; } public int ComponentType { get; set; } = 0; public int DrawableIndex { get; set; } = 0; - public int PropMask { get { return _Data.propMask; } } - public int NumAlternatives { get { return _Data.numAlternatives; } } + public int PropMask => _Data.propMask; + public int NumAlternatives => _Data.numAlternatives; - public int PropType { get { return (PropMask >> 4) & 3; } } + public int PropType => (PropMask >> 4) & 3; public string GetDrawableName(int altnum = 0) { @@ -6539,17 +6293,17 @@ namespace CodeWalker.GameFiles public MCPVDrawblData() { } - public MCPVDrawblData(Meta meta, CPVDrawblData data, MCPVComponentData owner, int index) + public MCPVDrawblData(Meta meta, in CPVDrawblData data, MCPVComponentData owner, int index) { _Data = data; Owner = owner; DrawableIndex = index; - TexData = MetaTypes.ConvertDataArray(meta, MetaName.CPVTextureData, _Data.aTexData); + TexData = MetaTypes.ConvertDataArray(meta, MetaName.CPVTextureData, in _Data.aTexData); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } @@ -6565,41 +6319,44 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct CPVTextureData //3 bytes, Key:4272717794 //COMPONENT PEDS (cloth?) aTexData + [TC(typeof(EXP))] + public struct CPVTextureData //3 bytes, Key:4272717794 //COMPONENT PEDS (cloth?) aTexData { public byte texId { get; set; } //0 0: UnsignedByte: 0: texId public byte distribution { get; set; } //1 1: UnsignedByte: 0: distribution//914976023 public byte Unused0 { get; set; }//2 } - [TC(typeof(EXP))] public struct CPVDrawblData__CPVClothComponentData //24 bytes, Key:508935687 //COMPONENT PEDS clothData + [TC(typeof(EXP))] + public readonly struct CPVDrawblData__CPVClothComponentData //24 bytes, Key:508935687 //COMPONENT PEDS clothData { - public byte ownsCloth { get; set; } //0 0: Boolean: 0: ownsCloth - public byte Unused0 { get; set; }//1 - public ushort Unused1 { get; set; }//2 - public uint Unused2 { get; set; }//4 - public uint Unused3 { get; set; }//8 - public uint Unused4 { get; set; }//12 - public uint Unused5 { get; set; }//16 - public uint Unused6 { get; set; }//20 + public byte ownsCloth { get; init; } //0 0: Boolean: 0: ownsCloth + public byte Unused0 { get; init; }//1 + public ushort Unused1 { get; init; }//2 + public uint Unused2 { get; init; }//4 + public uint Unused3 { get; init; }//8 + public uint Unused4 { get; init; }//12 + public uint Unused5 { get; init; }//16 + public uint Unused6 { get; init; }//20 } - [TC(typeof(EXP))] public struct CPedSelectionSet //48 bytes, Key:3120284999 //COMPONENT PEDS + [TC(typeof(EXP))] + public readonly struct CPedSelectionSet //48 bytes, Key:3120284999 //COMPONENT PEDS { - public MetaHash name { get; set; } //0 0: Hash: 0: name - public ArrayOfBytes12 compDrawableId { get; set; } //4 4: ArrayOfBytes: 12: compDrawableId - public ArrayOfBytes12 compTexId { get; set; } //16 16: ArrayOfBytes: 12: compTexId - public ArrayOfBytes6 propAnchorId { get; set; } //28 28: ArrayOfBytes: 6: propAnchorId - public ArrayOfBytes6 propDrawableId { get; set; } //34 34: ArrayOfBytes: 6: propDrawableId - public ArrayOfBytes6 propTexId { get; set; } //40 40: ArrayOfBytes: 6: propTexId - public ushort Unused0 { get; set; }//46 + public MetaHash name { get; init; } //0 0: Hash: 0: name + public ArrayOfBytes12 compDrawableId { get; init; } //4 4: ArrayOfBytes: 12: compDrawableId + public ArrayOfBytes12 compTexId { get; init; } //16 16: ArrayOfBytes: 12: compTexId + public ArrayOfBytes6 propAnchorId { get; init; } //28 28: ArrayOfBytes: 6: propAnchorId + public ArrayOfBytes6 propDrawableId { get; init; } //34 34: ArrayOfBytes: 6: propDrawableId + public ArrayOfBytes6 propTexId { get; init; } //40 40: ArrayOfBytes: 6: propTexId + public ushort Unused0 { get; init; }//46 } [TC(typeof(EXP))] public class MCPedSelectionSet : MetaWrapper { public MCPedVariationInfo Owner { get; set; } public CPedSelectionSet _Data; - public CPedSelectionSet Data { get { return _Data; } } + public CPedSelectionSet Data => _Data; public MCPedSelectionSet() { } public MCPedSelectionSet(Meta meta, CPedSelectionSet data, MCPedVariationInfo owner) @@ -6608,7 +6365,7 @@ namespace CodeWalker.GameFiles Owner = owner; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } @@ -6619,45 +6376,47 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct CComponentInfo //48 bytes, Key:3693847250 //COMPONENT PEDS + [TC(typeof(EXP))] + public readonly struct CComponentInfo //48 bytes, Key:3693847250 //COMPONENT PEDS { - public MetaHash Unk_802196719 { get; set; } //0 0: Hash: 0: 802196719 - public MetaHash Unk_4233133352 { get; set; } //4 4: Hash: 0: 4233133352 - public ArrayOfBytes5 Unk_128864925 { get; set; } //8 8: ArrayOfBytes: 5: 128864925 - public byte Unused0 { get; set; }//13 - public ushort Unused1 { get; set; }//14 - public uint Unused2 { get; set; }//16 - public uint Unused3 { get; set; }//20 - public uint Unused4 { get; set; }//24 - public uint flags { get; set; } //28 28: UnsignedInt: 0: flags - public int inclusions { get; set; } //32 32: IntFlags2: 0: inclusions//2172318933 - public int exclusions { get; set; } //36 36: IntFlags2: 0: exclusions - public ePedVarComp Unk_1613922652 { get; set; } //40 40: ShortFlags: ePedVarComp: 1613922652 - public ushort Unk_2114993291 { get; set; } //42 42: UnsignedShort: 0: 2114993291 - public byte Unk_3509540765 { get; set; } //44 44: UnsignedByte: 0: 3509540765 - public byte Unk_4196345791 { get; set; } //45 45: UnsignedByte: 0: 4196345791 - public ushort Unused5 { get; set; }//46 + public MetaHash Unk_802196719 { get; init; } //0 0: Hash: 0: 802196719 + public MetaHash Unk_4233133352 { get; init; } //4 4: Hash: 0: 4233133352 + public ArrayOfBytes5 Unk_128864925 { get; init; } //8 8: ArrayOfBytes: 5: 128864925 + public byte Unused0 { get; init; }//13 + public ushort Unused1 { get; init; }//14 + public uint Unused2 { get; init; }//16 + public uint Unused3 { get; init; }//20 + public uint Unused4 { get; init; }//24 + public uint flags { get; init; } //28 28: UnsignedInt: 0: flags + public int inclusions { get; init; } //32 32: IntFlags2: 0: inclusions//2172318933 + public int exclusions { get; init; } //36 36: IntFlags2: 0: exclusions + public ePedVarComp Unk_1613922652 { get; init; } //40 40: ShortFlags: ePedVarComp: 1613922652 + public ushort Unk_2114993291 { get; init; } //42 42: UnsignedShort: 0: 2114993291 + public byte Unk_3509540765 { get; init; } //44 44: UnsignedByte: 0: 3509540765 + public byte Unk_4196345791 { get; init; } //45 45: UnsignedByte: 0: 4196345791 + public ushort Unused5 { get; init; }//46 } - [TC(typeof(EXP))] public class MCComponentInfo : MetaWrapper + [TC(typeof(EXP))] + public class MCComponentInfo : MetaWrapper { public MCPedVariationInfo Owner { get; set; } public CComponentInfo _Data; - public CComponentInfo Data { get { return _Data; } } + public CComponentInfo Data => _Data; - public int ComponentType { get { return _Data.Unk_3509540765; } } - public int ComponentIndex { get { return _Data.Unk_4196345791; } } + public int ComponentType => _Data.Unk_3509540765; + public int ComponentIndex => _Data.Unk_4196345791; public MCComponentInfo() { } - public MCComponentInfo(Meta meta, CComponentInfo data, MCPedVariationInfo owner) + public MCComponentInfo(Meta meta, in CComponentInfo data, MCPedVariationInfo owner) { _Data = data; Owner = owner; } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } @@ -6679,8 +6438,8 @@ namespace CodeWalker.GameFiles public byte Unused0 { get; set; }//1 public ushort Unused1 { get; set; }//2 public uint Unused2 { get; set; }//4 - public Array_Structure aPropMetaData { get; set; } //8 8: Array: 0: aPropMetaData {0: Structure: CPedPropMetaData: 256} - public Array_Structure aAnchors { get; set; } //24 24: Array: 0: aAnchors {0: Structure: CAnchorProps: 256} + public Array_Structure aPropMetaData; //8 8: Array: 0: aPropMetaData {0: Structure: CPedPropMetaData: 256} + public Array_Structure aAnchors; //24 24: Array: 0: aAnchors {0: Structure: CAnchorProps: 256} public CPedPropInfo SwapEnd() { aPropMetaData = aPropMetaData.SwapEnd(); @@ -6693,28 +6452,28 @@ namespace CodeWalker.GameFiles public MCPedVariationInfo Owner { get; set; } public CPedPropInfo _Data; - public CPedPropInfo Data { get { return _Data; } } + public CPedPropInfo Data => _Data; public MCPedPropMetaData[] PropMetaData { get; set; } public MCAnchorProps[] Anchors { get; set; } public MCPedPropInfo() { } - public MCPedPropInfo(Meta meta, CPedPropInfo data, MCPedVariationInfo owner) + public MCPedPropInfo(Meta meta, in CPedPropInfo data, MCPedVariationInfo owner) { _Data = data; Owner = owner; - var vPropMetaData = MetaTypes.ConvertDataArray(meta, MetaName.CPedPropMetaData, _Data.aPropMetaData); + var vPropMetaData = MetaTypes.ConvertDataArray(meta, MetaName.CPedPropMetaData, in _Data.aPropMetaData); if (vPropMetaData != null) { PropMetaData = new MCPedPropMetaData[vPropMetaData.Length]; for (int i = 0; i < vPropMetaData.Length; i++) { - PropMetaData[i] = new MCPedPropMetaData(meta, vPropMetaData[i], this); + PropMetaData[i] = new MCPedPropMetaData(meta, in vPropMetaData[i], this); } } - var vAnchors = MetaTypes.ConvertDataArray(meta, MetaName.CAnchorProps, _Data.aAnchors); + var vAnchors = MetaTypes.ConvertDataArray(meta, MetaName.CAnchorProps, in _Data.aAnchors); if (vAnchors != null) { Anchors = new MCAnchorProps[vAnchors.Length]; @@ -6728,7 +6487,7 @@ namespace CodeWalker.GameFiles - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } @@ -6739,43 +6498,44 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct CPedPropMetaData //56 bytes, Key:2029738350 //COMPONENT PEDS + [TC(typeof(EXP))] + public struct CPedPropMetaData //56 bytes, Key:2029738350 //COMPONENT PEDS { - public MetaHash audioId { get; set; } //0 0: Hash: 0: audioId - public ArrayOfBytes5 expressionMods { get; set; } //4 4: ArrayOfBytes: 5: expressionMods//942761829 - public byte Unused0 { get; set; }//9 - public ushort Unused1 { get; set; }//10 - public uint Unused2 { get; set; }//12 - public uint Unused3 { get; set; }//16 - public uint Unused4 { get; set; }//20 - public Array_Structure texData { get; set; } //24 24: Array: 0: texData {0: Structure: CPedPropTexData: 256} - public ePropRenderFlags renderFlags { get; set; } //40 40: IntFlags1: ePropRenderFlags: renderFlags - public uint propFlags { get; set; } //44 44: UnsignedInt: 0: propFlags - public ushort flags { get; set; } //48 48: UnsignedShort: 0: flags - public byte anchorId { get; set; } //50 50: UnsignedByte: 0: anchorId - public byte propId { get; set; } //51 51: UnsignedByte: 0: propId - public byte Unk_2894625425 { get; set; } //52 52: UnsignedByte: 0: 2894625425 - public byte Unused5 { get; set; }//53 - public ushort Unused6 { get; set; }//54 + public MetaHash audioId { get; init; } //0 0: Hash: 0: audioId + public readonly ArrayOfBytes5 expressionMods; //4 4: ArrayOfBytes: 5: expressionMods//942761829 + public byte Unused0 { get; init; }//9 + public ushort Unused1 { get; init; }//10 + public uint Unused2 { get; init; }//12 + public uint Unused3 { get; init; }//16 + public uint Unused4 { get; init; }//20 + public readonly Array_Structure texData;//24 24: Array: 0: texData {0: Structure: CPedPropTexData: 256} + public ePropRenderFlags renderFlags { get; init; } //40 40: IntFlags1: ePropRenderFlags: renderFlags + public uint propFlags { get; init; } //44 44: UnsignedInt: 0: propFlags + public ushort flags { get; init; } //48 48: UnsignedShort: 0: flags + public byte anchorId { get; init; } //50 50: UnsignedByte: 0: anchorId + public byte propId { get; init; } //51 51: UnsignedByte: 0: propId + public byte Unk_2894625425 { get; init; } //52 52: UnsignedByte: 0: 2894625425 + public byte Unused5 { get; init; }//53 + public ushort Unused6 { get; init; }//54 } [TC(typeof(EXP))] public class MCPedPropMetaData : MetaWrapper { public MCPedPropInfo Owner { get; set; } public CPedPropMetaData _Data; - public CPedPropMetaData Data { get { return _Data; } } + public CPedPropMetaData Data => _Data; public CPedPropTexData[] TexData { get; set; } - public MCPedPropMetaData(Meta meta, CPedPropMetaData data, MCPedPropInfo owner) + public MCPedPropMetaData(Meta meta, in CPedPropMetaData data, MCPedPropInfo owner) { _Data = data; Owner = owner; - TexData = MetaTypes.ConvertDataArray(meta, MetaName.CPedPropTexData, _Data.texData); + TexData = MetaTypes.ConvertDataArray(meta, MetaName.CPedPropTexData, in _Data.texData); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } @@ -6786,7 +6546,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct CPedPropTexData //12 bytes, Key:2767296137 //COMPONENT PEDS + [TC(typeof(EXP))] + public struct CPedPropTexData //12 bytes, Key:2767296137 //COMPONENT PEDS { public int inclusions { get; set; } //0 0: IntFlags2: 0: inclusions public int exclusions { get; set; } //4 4: IntFlags2: 0: exclusions @@ -6796,18 +6557,20 @@ namespace CodeWalker.GameFiles public byte distribution { get; set; } //11 11: UnsignedByte: 0: distribution } - [TC(typeof(EXP))] public struct CAnchorProps //24 bytes, Key:403574180 //COMPONENT PEDS CAnchorProps + [TC(typeof(EXP))] + public struct CAnchorProps //24 bytes, Key:403574180 //COMPONENT PEDS CAnchorProps { - public Array_byte props { get; set; } //0 0: Array: 0: props {0: UnsignedByte: 0: 256} + public readonly Array_byte props; //0 0: Array: 0: props {0: UnsignedByte: 0: 256} public eAnchorPoints anchor { get; set; } //16 16: IntEnum: eAnchorPoints: anchor public uint Unused0 { get; set; }//20 } - [TC(typeof(EXP))] public class MCAnchorProps : MetaWrapper + [TC(typeof(EXP))] + public class MCAnchorProps : MetaWrapper { public MCPedPropInfo Owner { get; set; } public CAnchorProps _Data; - public CAnchorProps Data { get { return _Data; } } + public CAnchorProps Data => _Data; public byte[] Props { get; set; } @@ -6816,11 +6579,11 @@ namespace CodeWalker.GameFiles _Data = data; Owner = owner; - Props = MetaTypes.GetByteArray(meta, _Data.props); + Props = MetaTypes.GetByteArray(meta, in _Data.props); } - public override void Load(Meta meta, MetaPOINTER ptr) + public override void Load(Meta meta, in MetaPOINTER ptr) { throw new NotImplementedException(); } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs index fdd3e23..68f8f08 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs @@ -1,13 +1,18 @@  +using CodeWalker.Core.Utils; +using CommunityToolkit.HighPerformance; +using Microsoft.Extensions.ObjectPool; using SharpDX; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.GameFiles.MetaXmlBase; namespace CodeWalker.GameFiles { @@ -20,7 +25,7 @@ namespace CodeWalker.GameFiles if (!string.IsNullOrEmpty(outputfolder)) { - outputfolder = Path.Combine(outputfolder, e.ShortName); + outputfolder = Path.Join(outputfolder, e.ShortName); } if (fn.EndsWith(".ymt", StringComparison.OrdinalIgnoreCase)) @@ -179,21 +184,47 @@ namespace CodeWalker.GameFiles filename = string.Empty; return string.Empty; } - public static string GetXml(YmapFile ymap, out string filename) + public static string GetXml(YmapFile? ymap, out string filename) { var fn = (ymap?.RpfFileEntry?.Name) ?? ""; - if (ymap.Meta != null) { filename = fn + ".xml"; return GetXml(ymap.Meta); } - else if (ymap.Pso != null) { filename = fn + ".pso.xml"; return PsoXml.GetXml(ymap.Pso); } - else if (ymap.Rbf != null) { filename = fn + ".rbf.xml"; return RbfXml.GetXml(ymap.Rbf); } + if (ymap.Meta is not null) { + filename = fn + ".xml"; + return GetXml(ymap.Meta); + } + else if (ymap.Pso is not null) { + filename = fn + ".pso.xml"; + return PsoXml.GetXml(ymap.Pso); + } + else if (ymap.Rbf is not null) { + filename = fn + ".rbf.xml"; + return RbfXml.GetXml(ymap.Rbf); + } filename = string.Empty; return string.Empty; } public static string GetXml(YtypFile ytyp, out string filename) { - var fn = (ytyp?.RpfFileEntry?.Name) ?? ""; - if (ytyp.Meta != null) { filename = fn + ".xml"; return GetXml(ytyp.Meta); } - else if (ytyp.Pso != null) { filename = fn + ".pso.xml"; return PsoXml.GetXml(ytyp.Pso); } - else if (ytyp.Rbf != null) { filename = fn + ".rbf.xml"; return RbfXml.GetXml(ytyp.Rbf); } + if (ytyp is null) + { + filename = string.Empty; + return string.Empty; + } + + var fn = (ytyp.RpfFileEntry?.Name) ?? ""; + if (ytyp.Meta is not null) + { + filename = fn + ".xml"; + return GetXml(ytyp.Meta); + } + else if (ytyp.Pso is not null) + { + filename = fn + ".pso.xml"; + return PsoXml.GetXml(ytyp.Pso); + } + else if (ytyp.Rbf is not null) { + filename = fn + ".rbf.xml"; + return RbfXml.GetXml(ytyp.Rbf); + } filename = string.Empty; return string.Empty; } @@ -348,17 +379,24 @@ namespace CodeWalker.GameFiles public static string GetXml(Meta meta) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if (meta != null) + StringBuilder sb = StringBuilderPool.Get(); + try { - var cont = new MetaCont(meta); + sb.AppendLine(XmlHeader); - WriteNode(sb, 0, cont, meta.RootBlockIndex, 0, XmlTagMode.Structure, 0, (string)meta.Name); + if (meta != null) + { + var cont = new MetaCont(meta); + + WriteNode(sb, 0, cont, meta.RootBlockIndex, 0, XmlTagMode.Structure, 0, (string)meta.Name); + } + + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - - return sb.ToString(); } private static void WriteNode(StringBuilder sb, int indent, MetaCont cont, int blockId, int offset, XmlTagMode tagMode = XmlTagMode.None, MetaName structName = 0, string metaName = "") @@ -395,13 +433,13 @@ namespace CodeWalker.GameFiles switch (tagMode) { case XmlTagMode.Structure: - OpenTag(sb, indent, name, true, metaName); + OpenTag(sb, indent, name, metaName, true); break; case XmlTagMode.Item: - OpenTag(sb, indent, "Item", true, metaName); + OpenTag(sb, indent, "Item", metaName, true); break; case XmlTagMode.ItemAndType: - OpenTag(sb, indent, "Item type=\"" + name + "\"", true, metaName); + OpenTag(sb, indent, $"Item type=\"{name}\"", metaName, true); break; } @@ -420,7 +458,7 @@ namespace CodeWalker.GameFiles switch (entry.DataType) { default: - ErrorXml(sb, cind, ename + ": Unexpected entry DataType: " + entry.DataType.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected entry DataType: {entry.DataType}"); break; case MetaStructureEntryDataType.Array: @@ -456,12 +494,12 @@ namespace CodeWalker.GameFiles ValueTag(sb, cind, ename, byteEnumVal.ToString()); break; case MetaStructureEntryDataType.CharPointer: - var charPtr = MetaTypes.ConvertData(data, eoffset); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var charPtr); string charStr = MetaTypes.GetString(cont.Meta, charPtr); OneLineTag(sb, cind, ename, charStr); break; case MetaStructureEntryDataType.DataBlockPointer: - var dataPtr = MetaTypes.ConvertData(data, eoffset); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var dataPtr); //need to just get all the data from that block, since this pointer is referring to the whole block! it should be of type BYTE! var dblock = cont.Meta.GetBlock((int)dataPtr.PointerDataId); WriteRawArray(sb, dblock.Data, cind, ename, "ByteArray", FormatHexByte, 32); @@ -471,15 +509,15 @@ namespace CodeWalker.GameFiles ValueTag(sb, cind, ename, FloatUtil.ToString(floatVal)); break; case MetaStructureEntryDataType.Float_XYZ: - var v3 = MetaTypes.ConvertData(data, eoffset); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v3.X) + "\" y=\"" + FloatUtil.ToString(v3.Y) + "\" z=\"" + FloatUtil.ToString(v3.Z) + "\""); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var v3); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v3.X)}\" y=\"{FloatUtil.ToString(v3.Y)}\" z=\"{FloatUtil.ToString(v3.Z)}\""); break; case MetaStructureEntryDataType.Float_XYZW: - var v4 = MetaTypes.ConvertData(data, eoffset); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v4.X) + "\" y=\"" + FloatUtil.ToString(v4.Y) + "\" z=\"" + FloatUtil.ToString(v4.Z) + "\" w=\"" + FloatUtil.ToString(v4.W) + "\""); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var v4); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v4.X)}\" y=\"{FloatUtil.ToString(v4.Y)}\" z=\"{FloatUtil.ToString(v4.Z)}\" w=\"{FloatUtil.ToString(v4.W)}\""); break; case MetaStructureEntryDataType.Hash: - var hashVal = MetaTypes.ConvertData(data, eoffset); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var hashVal); var hashStr = HashString(hashVal); StringTag(sb, cind, ename, hashStr); break; @@ -538,7 +576,7 @@ namespace CodeWalker.GameFiles ValueTag(sb, cind, ename, uintVal.ToString()); break; case MetaName.color: - ValueTag(sb, cind, ename, "0x" + uintVal.ToString("X").PadLeft(8, '0')); + ValueTag(sb, cind, ename, $"0x{uintVal:X8}"); break; } @@ -571,14 +609,14 @@ namespace CodeWalker.GameFiles switch (arrEntry.DataType) { default: - ErrorXml(sb, indent, ename + ": Unexpected array entry DataType: " + arrEntry.DataType.ToString()); + ErrorXml(sb, indent, $"{ename}: Unexpected array entry DataType: {arrEntry.DataType}"); break; case MetaStructureEntryDataType.Structure: - var arrStruc = MetaTypes.ConvertData(data, eoffset); + MetaTypes.TryConvertData(data, eoffset, out var arrStruc); var aBlockId = (int)arrStruc.PointerDataId; var aOffset = (int)arrStruc.PointerDataOffset; aCount = arrStruc.Count1; - arrTag += " itemType=\"" + HashString(arrEntry.ReferenceKey) + "\""; + arrTag += $" itemType=\"{HashString(arrEntry.ReferenceKey)}\""; if (aCount > 0) { OpenTag(sb, indent, arrTag); @@ -604,15 +642,15 @@ namespace CodeWalker.GameFiles } break; case MetaStructureEntryDataType.StructurePointer: - var arrStrucP = MetaTypes.ConvertData(data, eoffset); - var ptrArr = MetaTypes.GetPointerArray(cont.Meta, arrStrucP); - aCount = ptrArr?.Length ?? 0; + MetaTypes.TryConvertData(data, eoffset, out var arrStrucP); + var ptrArr = MetaTypes.GetPointerArray(cont.Meta, in arrStrucP); + aCount = ptrArr.Length; if (aCount > 0) { OpenTag(sb, indent, arrTag); for (int n = 0; n < aCount; n++) { - var ptr = ptrArr[n]; + ref var ptr = ref ptrArr[n]; var offset = ptr.Offset; WriteNode(sb, aind, cont, ptr.BlockID, offset, XmlTagMode.ItemAndType); } @@ -624,27 +662,27 @@ namespace CodeWalker.GameFiles } break; case MetaStructureEntryDataType.UnsignedInt: - var arrUint = MetaTypes.ConvertData(data, eoffset); - var uintArr = MetaTypes.GetUintArray(cont.Meta, arrUint); + MetaTypes.TryConvertData(data, eoffset, out var arrUint); + var uintArr = MetaTypes.GetUintArray(cont.Meta, in arrUint); WriteRawArray(sb, uintArr, indent, ename, "uint"); break; case MetaStructureEntryDataType.UnsignedShort: - var arrUshort = MetaTypes.ConvertData(data, eoffset); - var ushortArr = MetaTypes.GetUshortArray(cont.Meta, arrUshort); + MetaTypes.TryConvertData(data, eoffset, out var arrUshort); + var ushortArr = MetaTypes.GetUshortArray(cont.Meta, in arrUshort); WriteRawArray(sb, ushortArr, indent, ename, "ushort"); break; case MetaStructureEntryDataType.UnsignedByte: - var arrUbyte = MetaTypes.ConvertData(data, eoffset); - var byteArr = MetaTypes.GetByteArray(cont.Meta, arrUbyte); + MetaTypes.TryConvertData(data, eoffset, out var arrUbyte); + var byteArr = MetaTypes.GetByteArray(cont.Meta, in arrUbyte); WriteRawArray(sb, byteArr, indent, ename, "byte"); break; case MetaStructureEntryDataType.Float: - var arrFloat = MetaTypes.ConvertData(data, eoffset); - var floatArr = MetaTypes.GetFloatArray(cont.Meta, arrFloat); + MetaTypes.TryConvertData(data, eoffset, out var arrFloat); + var floatArr = MetaTypes.GetFloatArray(cont.Meta, in arrFloat); WriteRawArray(sb, floatArr, indent, ename, "float"); break; case MetaStructureEntryDataType.Float_XYZ: - var arrV3 = MetaTypes.ConvertData(data, eoffset); + MetaTypes.TryConvertData(data, eoffset, out var arrV3); var v4Arr = MetaTypes.ConvertDataArray(cont.Meta, (MetaName)MetaTypeName.VECTOR4, arrV3.Pointer, arrV3.Count1); WriteItemArray(sb, v4Arr, indent, ename, "Vector3/4", FormatVector4); break; @@ -655,8 +693,8 @@ namespace CodeWalker.GameFiles ErrorXml(sb, indent, "DataBlockPointer ARRAY not supported here! Tell dexy!"); break; case MetaStructureEntryDataType.Hash: - var arrHash = MetaTypes.ConvertData(data, eoffset); - var hashArr = MetaTypes.GetHashArray(cont.Meta, arrHash); + MetaTypes.TryConvertData(data, eoffset, out var arrHash); + var hashArr = MetaTypes.GetHashArray(cont.Meta, in arrHash); WriteItemArray(sb, hashArr, indent, ename, "Hash", FormatHash); break; } @@ -675,7 +713,7 @@ namespace CodeWalker.GameFiles { var bidx = eoffset + n; byte b = ((bidx >= 0) && (bidx < data.Length)) ? data[bidx] : (byte)0; - sb.Append(b.ToString("X").PadLeft(2, '0')); + sb.Append(b.ToString("X2")); } break; case MetaStructureEntryDataType.SignedByte: @@ -684,7 +722,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n; sbyte b = ((bidx >= 0) && (bidx < data.Length)) ? (sbyte)data[bidx] : (sbyte)0; sb.Append(b.ToString()); //sb.Append(b.ToString("X").PadLeft(2, '0')); to show HEX values - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; @@ -694,7 +732,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n; byte b = ((bidx >= 0) && (bidx < data.Length)) ? data[bidx] : (byte)0; sb.Append(b.ToString()); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; case MetaStructureEntryDataType.SignedShort: @@ -703,7 +741,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n * 2; short b = ((bidx >= 0) && (bidx < data.Length)) ? BitConverter.ToInt16(data, bidx) : (short)0; sb.Append(b.ToString()); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; case MetaStructureEntryDataType.UnsignedShort: @@ -712,7 +750,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n * 2; ushort b = ((bidx >= 0) && (bidx < data.Length)) ? BitConverter.ToUInt16(data, bidx) : (ushort)0; sb.Append(b.ToString()); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; case MetaStructureEntryDataType.SignedInt: @@ -721,7 +759,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n * 4; int b = ((bidx >= 0) && (bidx < data.Length)) ? BitConverter.ToInt32(data, bidx) : (int)0; sb.Append(b.ToString()); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; case MetaStructureEntryDataType.UnsignedInt: @@ -730,7 +768,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n * 4; uint b = ((bidx >= 0) && (bidx < data.Length)) ? BitConverter.ToUInt32(data, bidx) : (uint)0; sb.Append(b.ToString()); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; case MetaStructureEntryDataType.Float: @@ -739,7 +777,7 @@ namespace CodeWalker.GameFiles var bidx = eoffset + n * 4; float b = ((bidx >= 0) && (bidx < data.Length)) ? BitConverter.ToSingle(data, bidx) : (float)0; sb.Append(FloatUtil.ToString(b)); - if (n < byteArrLen - 1) sb.Append(" "); + if (n < byteArrLen - 1) sb.Append(' '); } break; } @@ -764,18 +802,25 @@ namespace CodeWalker.GameFiles if (isFlags) { - StringBuilder sb = new StringBuilder(); - foreach (var ev in eInfo.Entries) + StringBuilder sb = StringBuilderPool.Get(); + try { - var v = ev.EntryValue; - var m = 1 << v; - if ((value & m) > 0) + foreach (var ev in eInfo.Entries) { - if (sb.Length > 0) sb.Append(", "); - sb.Append(HashString(ev.EntryNameHash)); + var v = ev.EntryValue; + var m = 1 << v; + if ((value & m) > 0) + { + if (sb.Length > 0) sb.Append(", "); + sb.Append(HashString(ev.EntryNameHash)); + } } + return sb.ToString(); + } + finally + { + StringBuilderPool.Return(sb); } - return sb.ToString(); } else { @@ -839,36 +884,41 @@ namespace CodeWalker.GameFiles public class PsoXml : MetaXmlBase { - public static string GetXml(PsoFile pso) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); - - if ((pso != null) && (pso.DataSection != null) && (pso.DataMapSection != null)) + StringBuilder sb = StringBuilderPool.Get(); + try { - var cont = new PsoCont(pso); + sb.AppendLine(XmlHeader); - WriteNode(sb, 0, cont, pso.DataMapSection.RootId, 0, XmlTagMode.Structure); + if (pso?.DataSection is not null && pso.DataMapSection is not null) + { + var cont = new PsoCont(pso); + + WriteNode(sb, 0, cont, pso.DataMapSection.RootId, 0, XmlTagMode.Structure); + } + + return sb.ToString(); + } + finally + { + Console.WriteLine($"StringBuilder Capacity: {sb.Capacity}"); + StringBuilderPool.Return(sb); } - - return sb.ToString(); } private static void WriteNode(StringBuilder sb, int indent, PsoCont cont, int blockId, int offset, XmlTagMode tagMode = XmlTagMode.None, MetaName structName = 0) { - - var block = cont.Pso.GetBlock(blockId); - if (block == null) + if (!cont.Pso.TryGetBlock(blockId, out var block)) { - ErrorXml(sb, indent, "Couldn't find block " + blockId + "!"); + ErrorXml(sb, indent, $"Couldn't find block {blockId}!"); return; } if (offset >= block.Length) { - offset = offset >> 8; //how to tell when to do this?? + offset >>= 8; //how to tell when to do this?? } var boffset = offset + block.Offset; @@ -884,16 +934,16 @@ namespace CodeWalker.GameFiles var structInfo = cont.GetStructureInfo(structName); if (structInfo == null) { - structInfo = PsoTypes.GetStructureInfo(structName);//fallback to builtin... + structInfo = PsoTypesStructureInfo.GetStructureInfo(structName);//fallback to builtin... } if (structInfo == null) { - ErrorXml(sb, indent, "Couldn't find structure info " + name + "!"); + ErrorXml(sb, indent, $"Couldn't find structure info {name}!"); return; } if (structInfo.Entries == null) { - ErrorXml(sb, indent, "Couldn't find structure info entries for " + name + "!"); + ErrorXml(sb, indent, $"Couldn't find structure info entries for {name}!"); return; } @@ -906,15 +956,14 @@ namespace CodeWalker.GameFiles OpenTag(sb, indent, "Item"); break; case XmlTagMode.ItemAndType: - OpenTag(sb, indent, "Item type=\"" + name + "\""); + OpenTag(sb, indent, $"Item type=\"{name}\""); break; } var cind = indent + 1; - for (int i = 0; i < structInfo.Entries.Length; i++) + foreach(ref var entry in structInfo.Entries.AsSpan()) { - var entry = structInfo.Entries[i]; if (entry.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO) { continue; @@ -924,7 +973,7 @@ namespace CodeWalker.GameFiles switch (entry.Type) { default: - ErrorXml(sb, cind, ename + ": Unexpected entry DataType: " + entry.Type.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected entry DataType: {entry.Type}"); break; case PsoDataType.Array: @@ -950,20 +999,27 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, cind, ename + ": Unexpected Enum subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected Enum subtype: {entry.Unk_5h}"); break; case 0: //int enum var intEVal = MetaTypes.SwapBytes(BitConverter.ToInt32(data, eoffset)); - var intE = enumInfo.FindEntry(intEVal); - var intH = HashString(intE?.EntryNameHash ?? 0); - if (string.IsNullOrEmpty(intH)) - { } + var intH = string.Empty; + if (enumInfo.TryFindEntry(intEVal, out var intE)) + { + intH = HashString(intE.EntryNameHash); + } + StringTag(sb, cind, ename, intH); + break; case 2: //byte enum var byteEVal = data[eoffset]; - var byteE = enumInfo.FindEntry(byteEVal); - StringTag(sb, cind, ename, HashString(byteE?.EntryNameHash ?? 0)); + var byteH = string.Empty; + if (enumInfo.TryFindEntry(byteEVal, out var byteE)) + { + byteH = HashString(byteE.EntryNameHash); + } + StringTag(sb, cind, ename, byteH); break; } break; @@ -972,9 +1028,9 @@ namespace CodeWalker.GameFiles uint fEntry = (entry.ReferenceKey & 0xFFF); var fEnt = (fEntry != 0xFFF) ? structInfo.GetEntry((int)fEntry) : null; PsoEnumInfo flagsInfo = null; - if ((fEnt != null) && (fEnt.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) + if ((fEnt != null) && (fEnt.Value.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) { - flagsInfo = cont.GetEnumInfo((MetaName)fEnt.ReferenceKey); + flagsInfo = cont.GetEnumInfo((MetaName)fEnt.Value.ReferenceKey); } if (flagsInfo == null) { @@ -986,7 +1042,7 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, cind, ename + ": Unexpected Flags subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected Flags subtype: {entry.Unk_5h}"); break; case 0: //int flags flagsVal = MetaTypes.SwapBytes(BitConverter.ToUInt32(data, eoffset)); @@ -1028,24 +1084,29 @@ namespace CodeWalker.GameFiles ValueTag(sb, cind, ename, FloatUtil.ToString(floatVal)); break; case PsoDataType.Float2: - var v2 = MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v2.X) + "\" y=\"" + FloatUtil.ToString(v2.Y) + "\""); + MetaTypes.TryConvertData(data, eoffset, out var v2); + v2 = MetaTypes.SwapBytes(in v2); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v2.X)}\" y=\"{FloatUtil.ToString(v2.Y)}\""); break; case PsoDataType.Float3: - var v3 = MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v3.X) + "\" y=\"" + FloatUtil.ToString(v3.Y) + "\" z=\"" + FloatUtil.ToString(v3.Z) + "\""); + MetaTypes.TryConvertData(data, eoffset, out var v3); + v3 = MetaTypes.SwapBytes(in v3); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v3.X)}\" y=\"{FloatUtil.ToString(v3.Y)}\" z=\"{FloatUtil.ToString(v3.Z)}\""); break; case PsoDataType.Float3a: //TODO: check this! - var v3a = MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v3a.X) + "\" y=\"" + FloatUtil.ToString(v3a.Y) + "\" z=\"" + FloatUtil.ToString(v3a.Z) + "\""); + MetaTypes.TryConvertData(data, eoffset, out var v3a); + v3a = MetaTypes.SwapBytes(in v3a); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v3a.X)}\" y=\"{FloatUtil.ToString(v3a.Y)}\" z=\"{FloatUtil.ToString(v3a.Z)}\""); break; case PsoDataType.Float4a: //TODO: check this! //...why are there 3 different types of float3? - var v3b = MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v3b.X) + "\" y=\"" + FloatUtil.ToString(v3b.Y) + "\" z=\"" + FloatUtil.ToString(v3b.Z) + "\""); + MetaTypes.TryConvertData(data, eoffset, out var v3b); + v3b = MetaTypes.SwapBytes(in v3b); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v3b.X)}\" y=\"{FloatUtil.ToString(v3b.Y)}\" z=\"{FloatUtil.ToString(v3b.Z)}\""); break; case PsoDataType.Float4: - var v4 = MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); - SelfClosingTag(sb, cind, ename + " x=\"" + FloatUtil.ToString(v4.X) + "\" y=\"" + FloatUtil.ToString(v4.Y) + "\" z=\"" + FloatUtil.ToString(v4.Z) + "\" w=\"" + FloatUtil.ToString(v4.W) + "\""); + MetaTypes.TryConvertData(data, eoffset, out var v4); + v4 = MetaTypes.SwapBytes(in v4); + SelfClosingTag(sb, cind, $"{ename} x=\"{FloatUtil.ToString(v4.X)}\" y=\"{FloatUtil.ToString(v4.Y)}\" z=\"{FloatUtil.ToString(v4.Z)}\" w=\"{FloatUtil.ToString(v4.W)}\""); break; case PsoDataType.SInt: //TODO: convert hashes? var int5Val = MetaTypes.SwapBytes(BitConverter.ToInt32(data, eoffset)); @@ -1055,7 +1116,7 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, cind, ename + ": Unexpected Integer subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected Integer subtype: {entry.Unk_5h}"); break; case 0: //signed int (? flags?) var int6aVal = MetaTypes.SwapBytes(BitConverter.ToInt32(data, eoffset)); @@ -1064,7 +1125,7 @@ namespace CodeWalker.GameFiles case 1: //unsigned int var int6bVal = MetaTypes.SwapBytes(BitConverter.ToUInt32(data, eoffset)); //ValueTag(sb, cind, ename, int6bVal.ToString()); - ValueTag(sb, cind, ename, "0x" + int6bVal.ToString("X").PadLeft(8, '0')); + ValueTag(sb, cind, ename, $"0x{int6bVal:X8}"); break; } break; @@ -1104,7 +1165,7 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, cind, ename + ": Unexpected Structure subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, cind, $"{ename}: Unexpected Structure subtype: {entry.Unk_5h}"); break; case 0: //default structure OpenTag(sb, cind, ename); @@ -1113,8 +1174,8 @@ namespace CodeWalker.GameFiles break; case 3: //structure pointer... case 4: //also pointer? what's the difference? - var ptrVal = MetaTypes.ConvertData(data, eoffset); - ptrVal.SwapEnd(); + MetaTypes.TryConvertData(data.AsSpan(eoffset), out var ptrVal); + ptrVal = ptrVal.SwapEnd(); var pbid = ptrVal.BlockID; bool pbok = true; if (pbid <= 0) @@ -1127,8 +1188,12 @@ namespace CodeWalker.GameFiles } if (pbok) { - var typename = HashString(cont.Pso.GetBlock(pbid).NameHash); - OpenTag(sb, cind, ename + " type=\"" + typename + "\""); + var typename = string.Empty; + if (cont.Pso.TryGetBlock(pbid, out var _block)) + { + typename = HashString(_block.NameHash); + } + OpenTag(sb, cind, $"{ename} type=\"{typename}\""); WriteNode(sb, cind, cont, ptrVal.BlockID, (int)ptrVal.ItemOffset, XmlTagMode.None, (MetaName)entry.ReferenceKey); CloseTag(sb, cind, ename); } @@ -1159,19 +1224,25 @@ namespace CodeWalker.GameFiles private static void WriteArrayNode(StringBuilder sb, int indent, PsoCont cont, int blockId, int offset, PsoStructureEntryInfo entry, PsoStructureInfo estruct, string ename) { + if (!cont.Pso.TryGetBlock(blockId, out var block)) + { + Console.WriteLine("Couldn't get blockId"); + return; + } - - var block = cont.Pso.GetBlock(blockId); var boffset = offset + block.Offset; var eoffset = boffset + entry.DataOffset; var aOffset = offset + entry.DataOffset; var abOffset = aOffset + block.Offset; var aBlockId = blockId; uint aCount = (entry.ReferenceKey >> 16) & 0x0000FFFF; - Array_Structure arrStruc = new Array_Structure(); - arrStruc.PointerDataId = (uint)aBlockId; - arrStruc.PointerDataOffset = (uint)aOffset; - arrStruc.Count1 = arrStruc.Count2 = (ushort)aCount; + Array_Structure arrStruc = new Array_Structure + { + PointerDataId = (uint)aBlockId, + PointerDataOffset = (uint)aOffset, + Count1 = (ushort)aCount, + Count2 = (ushort)aCount, + }; var aind = indent + 1; string arrTag = ename; var arrEntInd = (entry.ReferenceKey & 0xFFFF); @@ -1179,10 +1250,9 @@ namespace CodeWalker.GameFiles { arrEntInd = (entry.ReferenceKey & 0xFFF); } - PsoStructureEntryInfo arrEntry = estruct.GetEntry((int)arrEntInd); - if (arrEntry == null) + if (!estruct.TryGetEntry((int)arrEntInd, out var arrEntry)) { - ErrorXml(sb, indent, "ARRAYINFO not found for " + ename + "!"); + ErrorXml(sb, indent, $"ARRAYINFO not found for {ename}!"); return; } @@ -1192,16 +1262,15 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, indent, ename + ": WIP! Unsupported Array subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, indent, $"{ename}: WIP! Unsupported Array subtype: {entry.Unk_5h}"); break; case 0: //Array_Structure - arrStruc = MetaTypes.ConvertData(data, eoffset); - arrStruc.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset, out arrStruc); + arrStruc = arrStruc.SwapEnd(); aBlockId = (int)arrStruc.PointerDataId; aOffset = (int)arrStruc.PointerDataOffset; aCount = arrStruc.Count1; - var aBlock = cont.Pso.GetBlock(aBlockId); - if (aBlock != null) + if (cont.Pso.TryGetBlock(aBlockId, out var aBlock)) { abOffset = aOffset + aBlock.Offset; } @@ -1214,13 +1283,12 @@ namespace CodeWalker.GameFiles case 4: //pointer array? default array? if (arrEntry.Unk_5h == 3) //pointers... { - arrStruc = MetaTypes.ConvertData(data, eoffset); - arrStruc.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset, out arrStruc); + arrStruc = arrStruc.SwapEnd(); aBlockId = (int)arrStruc.PointerDataId; aOffset = (int)arrStruc.PointerDataOffset; aCount = arrStruc.Count1; - var aBlock2 = cont.Pso.GetBlock(aBlockId); - if (aBlock2 != null) + if (cont.Pso.TryGetBlock(aBlockId, out var aBlock2)) { abOffset = aOffset + aBlock2.Offset; } @@ -1268,16 +1336,16 @@ namespace CodeWalker.GameFiles case 0: break; case 3://structure pointer array - var arrStrucPtr = MetaTypes.ConvertData(data, eoffset); - arrStrucPtr.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset, out var arrStrucPtr); + arrStrucPtr = arrStrucPtr.SwapEnd(); aBlockId = (int)arrStrucPtr.PointerDataId; aOffset = (int)arrStrucPtr.PointerDataOffset; aCount = arrStrucPtr.Count1; if (aCount > 0) { - var ptrArr = PsoTypes.GetPointerArray(cont.Pso, arrStrucPtr); + var ptrArr = PsoTypes.GetPointerArray(cont.Pso, in arrStrucPtr); OpenTag(sb, indent, arrTag); - for (int n = 0; n < aCount; n++) + for (int n = 0; n < ptrArr.Length; n++) { var ptrVal = ptrArr[n]; if (ptrVal.Pointer == 0) @@ -1298,9 +1366,8 @@ namespace CodeWalker.GameFiles arrTag += " itemType=\"" + HashString((MetaName)arrEntry.ReferenceKey) + "\""; if (aCount > 0) { - var aBlock = cont.Pso.GetBlock(aBlockId); var atyp = cont.GetStructureInfo((MetaName)arrEntry.ReferenceKey); - if (aBlock == null) + if (!cont.Pso.TryGetBlock(aBlockId, out var aBlock)) { ErrorXml(sb, indent, ename + ": Array block not found: " + aBlockId.ToString()); } @@ -1317,7 +1384,7 @@ namespace CodeWalker.GameFiles { WriteNode(sb, aind, cont, aBlockId, aOffset, XmlTagMode.Item, (MetaName)arrEntry.ReferenceKey); aOffset += atyp.StructureLength; - if ((n < (aCount - 1)) && (aBlock != null) && (aOffset >= aBlock.Length)) + if ((n < (aCount - 1)) && (aOffset >= aBlock.Length)) { break; } @@ -1337,13 +1404,13 @@ namespace CodeWalker.GameFiles switch (entry.Unk_5h) { default: - ErrorXml(sb, indent, ename + ": Unexpected String array subtype: " + entry.Unk_5h.ToString()); + ErrorXml(sb, indent, $"{ename}: Unexpected String array subtype: {entry.Unk_5h}"); break; case 0: //hash array... if (embedded) { } - var arrHash = MetaTypes.ConvertData(data, eoffset); - arrHash.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset, out var arrHash); + arrHash = arrHash.SwapEnd(); var hashArr = PsoTypes.GetHashArray(cont.Pso, arrHash); WriteItemArray(sb, hashArr, indent, ename, "Hash", HashString); break; @@ -1394,13 +1461,13 @@ namespace CodeWalker.GameFiles if (embedded) { } var arrFloat = new Array_float(arrStruc.Pointer, arrStruc.Count1); //block type 7 - var floatArr = PsoTypes.GetFloatArray(cont.Pso, arrFloat); + var floatArr = PsoTypes.GetFloatArray(cont.Pso, in arrFloat); WriteRawArray(sb, floatArr, indent, ename, "float", FloatUtil.ToString); break; case PsoDataType.UShort: if (embedded) { } - var shortArr = PsoTypes.GetUShortArray(cont.Pso, arrStruc); //block type 4 + var shortArr = PsoTypes.GetUShortArray(cont.Pso, in arrStruc); //block type 4 WriteRawArray(sb, shortArr, indent, ename, "ushort"); break; case PsoDataType.UInt: @@ -1418,10 +1485,8 @@ namespace CodeWalker.GameFiles WriteRawArray(sb, intArr2, indent, ename, "int"); break; case PsoDataType.Enum: - if (embedded) - { } - var arrEnum = MetaTypes.ConvertData(data, eoffset); - arrEnum.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset, out var arrEnum); + arrEnum = arrEnum.SwapEnd(); var enumArr = PsoTypes.GetUintArray(cont.Pso, arrEnum); var enumDef = cont.GetEnumInfo((MetaName)arrEntry.ReferenceKey); WriteItemArray(sb, enumArr, indent, ename, "enum", (ie)=> { @@ -1449,8 +1514,8 @@ namespace CodeWalker.GameFiles var mapreftype2 = structInfo.Entries[mapidx1]; var x1 = MetaTypes.SwapBytes(BitConverter.ToInt32(data, eoffset)); var x2 = MetaTypes.SwapBytes(BitConverter.ToInt32(data, eoffset + 4)); - var sptr = MetaTypes.ConvertData(data, eoffset + 8); - sptr.SwapEnd(); + MetaTypes.TryConvertData(data, eoffset + 8, out var sptr); + sptr = sptr.SwapEnd(); if (x1 != 0x1000000) @@ -1468,134 +1533,124 @@ namespace CodeWalker.GameFiles if (c1 != c2) { } } - if (x2 != 0) - { } - if (mapreftype2.ReferenceKey != 0) - { } var xBlockId = (int)sptr.PointerDataId;// x3 & 0xFFF; var xOffset = sptr.PointerDataOffset;// (x3 >> 12) & 0xFFFFF; var xCount1 = sptr.Count1;// x5 & 0xFFFF; + + if (xCount1 == 0) + { + SelfClosingTag(sb, cind, ename); + break; + } + var xCount2 = sptr.Count2;// (x5 >> 16) & 0xFFFF; - var xBlock = cont.Pso.GetBlock(xBlockId); - if ((xBlock == null) && (xCount1 > 0)) + if (!cont.Pso.TryGetBlock(xBlockId, out var xBlock)) { ErrorXml(sb, cind, ename + ": Couldn't find Map xBlock: " + xBlockId.ToString()); } else { - if (xCount1 != xCount2) - { } - if (xCount1 > 0) + var xStruct = cont.GetStructureInfo(xBlock.NameHash); + var xind = indent + 1; + var aind = indent + 2; + + if (xOffset >= xBlock.Length) { - var xStruct = cont.GetStructureInfo(xBlock.NameHash); - var xind = indent + 1; - var aind = indent + 2; - var kEntry = xStruct?.FindEntry(MetaName.Key); - var iEntry = xStruct?.FindEntry(MetaName.Item); + xOffset = xOffset >> 8; //how to tell when to do this?? + } - if (xOffset >= xBlock.Length) - { - xOffset = xOffset >> 8; //how to tell when to do this?? - } + if (xStruct == null && xBlock.NameHash == 0) + { + SelfClosingTag(sb, cind, ename); + } + else if (xStruct == null) + { + ErrorXml(sb, aind, ename + ": Map struct type not found: " + HashString(xBlock.NameHash)); + } + else if (xStruct.IndexInfo.NameHash == 0 && xStruct.IndexInfo.Offset == 0)// || (xStruct.IndexInfo.NameHash != (MetaName)MetaTypeName.ARRAYINFO)) + { + ErrorXml(sb, aind, ename + ": Map struct was missing IndexInfo! " + (xStruct == null ? "" : xStruct.ToString())); + } + else if (!xStruct.TryFindEntry(MetaName.Key, out var kEntry) || !xStruct.TryFindEntry(MetaName.Item, out var iEntry)) + { + ErrorXml(sb, aind, ename + ": Map Key/Item entries not found!"); + } + else if (kEntry.Type != PsoDataType.String) + { + ErrorXml(sb, aind, ename + ": Map Key was not a string!"); + } + else if ((iEntry.Type != PsoDataType.Structure) && (iEntry.Type != PsoDataType.String)) + { + ErrorXml(sb, aind, ename + ": Map Item was not a structure or string!"); + } + //else if (iEntry.Unk_5h != 3) + //{ + // ErrorXml(sb, aind, ename + ": Map Item was not a structure pointer - TODO!"); + //} + else + { + OpenTag(sb, xind, ename); - if ((xStruct == null) && (xBlock.NameHash == 0)) + for (int n = 0; n < xCount1; n++) { - SelfClosingTag(sb, cind, ename); - } - else if (xStruct == null) - { - ErrorXml(sb, aind, ename + ": Map struct type not found: " + HashString(xBlock.NameHash)); - } - else if ((xStruct.IndexInfo == null))// || (xStruct.IndexInfo.NameHash != (MetaName)MetaTypeName.ARRAYINFO)) - { - ErrorXml(sb, aind, ename + ": Map struct was missing IndexInfo! " + (xStruct == null ? "" : xStruct.ToString())); - } - else if ((kEntry == null) || (iEntry == null)) - { - ErrorXml(sb, aind, ename + ": Map Key/Item entries not found!"); - } - else if (kEntry.Type != PsoDataType.String) - { - ErrorXml(sb, aind, ename + ": Map Key was not a string!"); - } - else if ((iEntry.Type != PsoDataType.Structure) && (iEntry.Type != PsoDataType.String)) - { - ErrorXml(sb, aind, ename + ": Map Item was not a structure or string!"); - } - //else if (iEntry.Unk_5h != 3) - //{ - // ErrorXml(sb, aind, ename + ": Map Item was not a structure pointer - TODO!"); - //} - else - { - OpenTag(sb, xind, ename); - - for (int n = 0; n < xCount1; n++) + if (xOffset >= xBlock.Length) { - if (xOffset >= xBlock.Length) - { - ErrorXml(sb, aind, "Offset out of range! Count is " + xCount1.ToString()); - break; //out of range... - } - //WriteNode(sb, aind, cont, xBlockId, xOffset, XmlTagMode.Item, xStruct.IndexInfo.NameHash); + ErrorXml(sb, aind, "Offset out of range! Count is " + xCount1.ToString()); + break; //out of range... + } + //WriteNode(sb, aind, cont, xBlockId, xOffset, XmlTagMode.Item, xStruct.IndexInfo.NameHash); - int sOffset = (int)xOffset + xBlock.Offset; - var kOffset = sOffset + kEntry.DataOffset; - var iOffset = sOffset + iEntry.DataOffset; - var kStr = GetStringValue(cont.Pso, kEntry, data, kOffset); - if (iEntry.Type == PsoDataType.String) + int sOffset = (int)xOffset + xBlock.Offset; + var kOffset = sOffset + kEntry.DataOffset; + var iOffset = sOffset + iEntry.DataOffset; + var kStr = GetStringValue(cont.Pso, kEntry, data, kOffset); + if (iEntry.Type == PsoDataType.String) + { + var iStr = GetStringValue(cont.Pso, iEntry, data, iOffset); + OpenTag(sb, aind, $"Item type=\"String\" key=\"{kStr}\"", false); + sb.Append(XmlEscape(iStr)); + CloseTag(sb, 0, "Item"); + } + else if (iEntry.ReferenceKey != 0)//(xBlock.NameHash != (MetaName)MetaTypeName.ARRAYINFO)//257,258,259 + { + //embedded map values + var vOffset = (int)xOffset + iEntry.DataOffset; + OpenTag(sb, aind, $"Item type=\"{HashString((MetaName)iEntry.ReferenceKey)}\" key=\"{kStr}\""); + WriteNode(sb, aind, cont, xBlockId, vOffset, XmlTagMode.None, (MetaName)iEntry.ReferenceKey); + CloseTag(sb, aind, "Item"); + } + else + { + MetaTypes.TryConvertData(data, iOffset, out var iPtr); + iPtr = iPtr.SwapEnd(); + if (!cont.Pso.TryGetBlock(iPtr.BlockID, out var iBlock)) { - var iStr = GetStringValue(cont.Pso, iEntry, data, iOffset); - OpenTag(sb, aind, "Item type=\"String\" key=\"" + kStr + "\"", false); - sb.Append(XmlEscape(iStr)); - CloseTag(sb, 0, "Item"); - } - else if (iEntry.ReferenceKey != 0)//(xBlock.NameHash != (MetaName)MetaTypeName.ARRAYINFO)//257,258,259 - { - //embedded map values - var vOffset = (int)xOffset + iEntry.DataOffset; - OpenTag(sb, aind, "Item type=\"" + HashString((MetaName)iEntry.ReferenceKey) + "\" key=\"" + kStr + "\""); - WriteNode(sb, aind, cont, xBlockId, vOffset, XmlTagMode.None, (MetaName)iEntry.ReferenceKey); - CloseTag(sb, aind, "Item"); + ErrorXml(sb, aind, ename + ": Could not find iBlock for Map entry!"); } else { - var iPtr = MetaTypes.ConvertData(data, iOffset); - iPtr.SwapEnd(); - var iBlock = cont.Pso.GetBlock(iPtr.BlockID); - if (iBlock == null) + var iStr = $"Item type=\"{HashString(iBlock.NameHash)}\" key=\"{kStr}\""; + var iStruc = cont.GetStructureInfo(iBlock.NameHash); + if (iStruc?.EntriesCount == 0) { - ErrorXml(sb, aind, ename + ": Could not find iBlock for Map entry!"); + //SelfClosingTag(sb, aind, iStr); + OpenTag(sb, aind, iStr); + CloseTag(sb, aind, "Item"); } else { - var iStr = "Item type=\"" + HashString(iBlock.NameHash) + "\" key=\"" + kStr + "\""; - var iStruc = cont.GetStructureInfo(iBlock.NameHash); - if (iStruc?.EntriesCount == 0) - { - //SelfClosingTag(sb, aind, iStr); - OpenTag(sb, aind, iStr); - CloseTag(sb, aind, "Item"); - } - else - { - var iOff = (int)iPtr.ItemOffset; - OpenTag(sb, aind, iStr); - WriteNode(sb, aind, cont, iPtr.BlockID, iOff, XmlTagMode.None);//, (MetaName)entry.ReferenceKey); - CloseTag(sb, aind, "Item"); - } + var iOff = (int)iPtr.ItemOffset; + OpenTag(sb, aind, iStr); + WriteNode(sb, aind, cont, iPtr.BlockID, iOff, XmlTagMode.None);//, (MetaName)entry.ReferenceKey); + CloseTag(sb, aind, "Item"); } } - xOffset += (uint)xStruct.StructureLength; } - CloseTag(sb, xind, ename); + xOffset += (uint)xStruct.StructureLength; } - } - else - { - SelfClosingTag(sb, cind, ename); + CloseTag(sb, xind, ename); } } break; @@ -1605,7 +1660,7 @@ namespace CodeWalker.GameFiles - private static string GetStringValue(PsoFile pso, PsoStructureEntryInfo entry, byte[] data, int eoffset) + private static string? GetStringValue(PsoFile pso, PsoStructureEntryInfo entry, byte[] data, int eoffset) { switch (entry.Unk_5h) { @@ -1616,17 +1671,17 @@ namespace CodeWalker.GameFiles return Encoding.ASCII.GetString(data, eoffset, str0len).Replace("\0", ""); case 1: case 2: - var dataPtr2 = MetaTypes.ConvertData(data, eoffset); - dataPtr2.SwapEnd(); - return PsoTypes.GetString(pso, dataPtr2); + MetaTypes.TryConvertData(data, eoffset, out var dataPtr2); + dataPtr2 = dataPtr2.SwapEnd(); + return PsoTypes.GetString(pso, in dataPtr2); case 3: - var charPtr3 = MetaTypes.ConvertData(data, eoffset); - charPtr3.SwapEnd(); - var strval = PsoTypes.GetString(pso, charPtr3); - return strval ?? ""; + MetaTypes.TryConvertData(data, eoffset, out var charPtr3); + charPtr3 = charPtr3.SwapEnd(); + return PsoTypes.GetString(pso, in charPtr3); case 7: case 8: - var hashVal = (MetaHash)MetaTypes.SwapBytes(MetaTypes.ConvertData(data, eoffset)); + MetaTypes.TryConvertData(data, eoffset, out var rawVal); + var hashVal = (MetaHash)MetaTypes.SwapBytes(rawVal); return HashString(hashVal); } @@ -1708,45 +1763,57 @@ namespace CodeWalker.GameFiles public static string GetXml(RbfFile rbf) { - StringBuilder sb = new StringBuilder(); - sb.AppendLine(XmlHeader); + StringBuilder sb = StringBuilderPool.Get(); + try + { + sb.AppendLine(XmlHeader); - WriteNode(sb, 0, rbf.current); + WriteNode(sb, 0, rbf.current); + + return sb.ToString(); + } finally + { + StringBuilderPool.Return(sb); + } - return sb.ToString(); } private static void WriteNode(StringBuilder sb, int indent, RbfStructure rs) { var attStr = ""; - if (rs.Attributes.Count > 0) + if (rs.Attributes is not null && rs.Attributes.Count > 0) { - var asb = new StringBuilder(); - foreach (var attr in rs.Attributes) + var asb = StringBuilderPool.Get(); + try { - if (attr is RbfString str) + foreach (var attr in rs.Attributes) { - asb.Append($" {attr.Name}=\"{str.Value}\""); + if (attr is RbfString str) + { + asb.Append($" {attr.Name}=\"{str.Value}\""); + } + else if (attr is RbfFloat flt) + { + asb.Append($" {attr.Name}=\"{FloatUtil.ToString(flt.Value)}\""); + } + else if (attr is RbfUint32 unt) + { + asb.Append($" {attr.Name}=\"{unt.Value}\""); + } + else if (attr is RbfBoolean bln) + { + asb.Append($" {attr.Name}=\"{bln.Value}\""); + } } - else if (attr is RbfFloat flt) - { - asb.Append($" {attr.Name}=\"{FloatUtil.ToString(flt.Value)}\""); - } - else if (attr is RbfUint32 unt) - { - asb.Append($" {attr.Name}=\"{unt.Value.ToString()}\""); - } - else if (attr is RbfBoolean bln) - { - asb.Append($" {attr.Name}=\"{bln.Value.ToString()}\""); - } - else - { } + attStr = $"{asb}"; + } + finally + { + StringBuilderPool.Return(asb); } - attStr = $"{asb.ToString()}"; } - if (rs.Children.Count == 0) + if (rs.Children is null || rs.Children.Count == 0) { SelfClosingTag(sb, indent, rs.Name + attStr); return; @@ -1764,8 +1831,8 @@ namespace CodeWalker.GameFiles if (child is RbfBytes) { var bytesChild = (RbfBytes)child; - var contentField = rs.FindAttribute("content") as RbfString;//TODO: fix this to output nicer XML! - if (contentField != null) + //TODO: fix this to output nicer XML! + if (rs.FindAttribute("content") is RbfString contentField) { if (contentField.Value == "char_array") { @@ -1787,7 +1854,7 @@ namespace CodeWalker.GameFiles } else { - ErrorXml(sb, cind, "Unexpected content type: " + contentField.Value); + ErrorXml(sb, cind, $"Unexpected content type: {contentField.Value}"); } } else @@ -1813,24 +1880,21 @@ namespace CodeWalker.GameFiles //else if (stringChild.Name.Equals("type")) //else throw new Exception("Unexpected string content"); } - if (child is RbfStructure) + if (child is RbfStructure rbfStructure) { - WriteNode(sb, cind, child as RbfStructure); + WriteNode(sb, cind, rbfStructure); } - if (child is RbfUint32) + if (child is RbfUint32 intChild) { - var intChild = (RbfUint32)child; ValueTag(sb, cind, intChild.Name, UintString(intChild.Value)); } - if (child is RbfBoolean) + if (child is RbfBoolean booleanChild) { - var booleanChild = (RbfBoolean)child; ValueTag(sb, cind, booleanChild.Name, booleanChild.Value.ToString()); } - if (child is RbfFloat3) + if (child is RbfFloat3 v3) { - var v3 = child as RbfFloat3; - SelfClosingTag(sb, cind, v3.Name + " x=\"" + FloatUtil.ToString(v3.X) + "\" y=\"" + FloatUtil.ToString(v3.Y) + "\" z=\"" + FloatUtil.ToString(v3.Z) + "\""); + SelfClosingTag(sb, cind, $"{v3.Name} x=\"{FloatUtil.ToString(v3.X)}\" y=\"{FloatUtil.ToString(v3.Y)}\" z=\"{FloatUtil.ToString(v3.Z)}\""); } @@ -1843,83 +1907,94 @@ namespace CodeWalker.GameFiles } + public class StringBuilderPooledObjectPolicyLogged : StringBuilderPooledObjectPolicy + { + public override bool Return(StringBuilder obj) + { + Console.WriteLine($"StringBuilder returned with capacity: {obj.Capacity} {obj.Length}"); + return base.Return(obj); + } + } public class MetaXmlBase { - + public static ObjectPool StringBuilderPool = ObjectPool.Create(new StringBuilderPooledObjectPolicyLogged { MaximumRetainedCapacity = 4 * 1024 * 1024, InitialCapacity = 1024 * 32 }); public const string XmlHeader = ""; public static void Indent(StringBuilder sb, int indent) { - for (int i = 0; i < indent; i++) - { - sb.Append(" "); - } + sb.Append(' ', indent); } + public static void ErrorXml(StringBuilder sb, int indent, string msg) { Indent(sb, indent); - sb.Append(""); - sb.Append(msg); - sb.Append(""); - sb.AppendLine(); + sb.AppendLine($"{msg}"); } - public static void OpenTag(StringBuilder sb, int indent, string name, bool appendLine = true, string metaName = "") + + public static void OpenTag(StringBuilder sb, int indent, string name, bool appendLine = true) { Indent(sb, indent); - sb.Append("<"); + sb.Append('<'); + sb.Append(name); + sb.Append('>'); + if (appendLine) + sb.AppendLine(); + } + + public static void OpenTag(StringBuilder sb, int indent, string name, string metaName, bool appendLine = true) + { + Indent(sb, indent); + sb.Append('<'); sb.Append(name); if (string.IsNullOrWhiteSpace(metaName)) { - sb.Append(">"); + sb.Append('>'); } else { - sb.Append(" name=\"" + metaName + "\">"); + sb.Append($" name=\"{metaName}\">"); } if (appendLine) sb.AppendLine(); } + + //public static void OpenTag(StringBuilder sb, int indent, string name, bool appendLine = true, string metaName = "") + //{ + // Indent(sb, indent); + // sb.Append('<'); + // sb.Append(name); + // if (string.IsNullOrWhiteSpace(metaName)) + // { + // sb.Append('>'); + // } + // else + // { + // sb.Append($" name=\"{metaName}\">"); + // } + // if (appendLine) sb.AppendLine(); + //} public static void CloseTag(StringBuilder sb, int indent, string name, bool appendLine = true) { Indent(sb, indent); - sb.Append(""); + sb.Append($""); if (appendLine) sb.AppendLine(); } public static void ValueTag(StringBuilder sb, int indent, string name, string val, string attr = "value") { Indent(sb, indent); - sb.Append("<"); - sb.Append(name); - sb.Append(" "); - sb.Append(attr); - sb.Append("=\""); - sb.Append(val); - sb.Append("\" />"); - sb.AppendLine(); + sb.AppendLine($"<{name} {attr}=\"{val}\" />"); } public static void OneLineTag(StringBuilder sb, int indent, string name, string text) { Indent(sb, indent); - sb.Append("<"); - sb.Append(name); - sb.Append(">"); - sb.Append(text); - sb.Append(""); - sb.AppendLine(); + sb.AppendLine($"<{name}>{text}"); } public static void SelfClosingTag(StringBuilder sb, int indent, string val) { Indent(sb, indent); - sb.Append("<"); - sb.Append(val); - sb.Append(" />"); - sb.AppendLine(); + sb.AppendLine($"<{val} />"); } public static void StringTag(StringBuilder sb, int indent, string name, string text) { @@ -1927,15 +2002,19 @@ namespace CodeWalker.GameFiles else SelfClosingTag(sb, indent, name); } - public static void WriteRawArrayContent(StringBuilder sb, T[] arr, int ind, Func formatter = null, int arrRowSize = 10) where T : struct + public static void WriteRawArrayContent(StringBuilder sb, T[]? arr, int ind, Func formatter = null, int arrRowSize = 10) where T : struct { - var aCount = arr?.Length ?? 0; + if (arr is null || arr.Length == 0) + return; + + var aCount = arr.Length; for (int n = 0; n < aCount; n++) { + ref var value = ref arr[n]; var col = n % arrRowSize; if (col == 0) Indent(sb, ind); - if (col > 0) sb.Append(" "); - string str = (formatter != null) ? formatter(arr[n]) : arr[n].ToString(); + if (col > 0) sb.Append(' '); + string? str = formatter?.Invoke(value) ?? value.ToString(); sb.Append(str); bool lastcol = (col == (arrRowSize - 1)); bool lastn = (n == (aCount - 1)); @@ -1943,7 +2022,7 @@ namespace CodeWalker.GameFiles } } - public static void WriteRawArray(StringBuilder sb, Span arr, int ind, string name, string typeName, Func formatter = null, int arrRowSize = 10) where T : struct + public static void WriteRawArray(StringBuilder sb, Span arr, int ind, string name, string typeName, FormatterRef? formatter = null, int arrRowSize = 10) where T : struct { var aCount = arr.Length; //var arrRowSize = 10; @@ -1956,8 +2035,8 @@ namespace CodeWalker.GameFiles OpenTag(sb, ind, arrTag, false); for (int n = 0; n < aCount; n++) { - if (n > 0) sb.Append(" "); - string str = (formatter != null) ? formatter(arr[n]) : arr[n].ToString(); + if (n > 0) sb.Append(' '); + string? str = formatter?.Invoke(in arr[n]) ?? arr[n].ToString(); sb.Append(str); } CloseTag(sb, 0, name); @@ -1969,8 +2048,8 @@ namespace CodeWalker.GameFiles { var col = n % arrRowSize; if (col == 0) Indent(sb, aind); - if (col > 0) sb.Append(" "); - string str = (formatter != null) ? formatter(arr[n]) : arr[n].ToString(); + if (col > 0) sb.Append(' '); + string? str = formatter?.Invoke(in arr[n]) ?? arr[n].ToString(); sb.Append(str); bool lastcol = (col == (arrRowSize - 1)); bool lastn = (n == (aCount - 1)); @@ -1985,29 +2064,47 @@ namespace CodeWalker.GameFiles } } - public static void WriteRawArray(StringBuilder sb, T[] arr, int ind, string name, string typeName, Func formatter = null, int arrRowSize = 10) where T : struct + public delegate string FormatterRef(in T y); + + public delegate string Formatter(T y); + + public static void WriteRawArray(StringBuilder sb, T[] arr, int ind, string name, string typeName, FormatterRef? formatter = null, int arrRowSize = 10) where T : struct { WriteRawArray(sb, arr.AsSpan(), ind, name, typeName, formatter, arrRowSize); } - public static void WriteItemArray(StringBuilder sb, T[] arr, int ind, string name, string typeName, Func formatter) where T : struct + + public static void WriteRawArray(StringBuilder sb, T[] arr, int ind, string name, string typeName, Func formatter, int arrRowSize = 10) where T : struct + { + WriteRawArray(sb, arr.AsSpan(), ind, name, typeName, (in T value) => formatter(value), arrRowSize); + } + + public static void WriteRawArray(StringBuilder sb, Span arr, int ind, string name, string typeName) where T : struct + { + WriteRawArray(sb, arr, ind, name, typeName); + } + + public static void WriteItemArray(StringBuilder sb, T[]? arr, int ind, string name, string typeName, FormatterRef formatter) where T : struct { WriteItemArray(sb, arr.AsSpan(), ind, name, typeName, formatter); } - public static void WriteItemArray(StringBuilder sb, Span arr, int ind, string name, string typeName, Func formatter) where T : struct + public static void WriteItemArray(StringBuilder sb, T[]? arr, int ind, string name, string typeName, Func formatter) where T : struct + { + WriteItemArray(sb, arr.AsSpan(), ind, name, typeName, (in T value) => formatter(value)); + } + + public static void WriteItemArray(StringBuilder sb, Span arr, int ind, string name, string typeName, FormatterRef formatter) where T : struct { var itemCount = arr.Length; var arrTag = name;// + " itemType=\"Hash\""; var aind = ind + 1; if (itemCount > 0) { - OpenTag(sb, ind, arrTag, metaName: typeName); + OpenTag(sb, ind, arrTag, typeName); for (int n = 0; n < itemCount; n++) { Indent(sb, aind); - sb.Append(""); - sb.Append(formatter(arr[n])); - sb.AppendLine(""); + sb.AppendLine($"{formatter(arr[n])}"); } CloseTag(sb, ind, name); } @@ -2016,118 +2113,111 @@ namespace CodeWalker.GameFiles SelfClosingTag(sb, ind, arrTag); } } - public static void WriteItemArray(StringBuilder sb, T[] arr, int ind, string name) where T : IMetaXmlItem + public static void WriteItemArray(StringBuilder sb, T[]? arr, int ind, string name) where T : IMetaXmlItem { - var itemCount = arr?.Length ?? 0; - if (itemCount > 0) - { - OpenTag(sb, ind, name); - var cind = ind + 1; - var cind2 = ind + 2; - for (int i = 0; i < itemCount; i++) - { - if (arr[i] != null) - { - OpenTag(sb, cind, "Item"); - arr[i].WriteXml(sb, cind2); - CloseTag(sb, cind, "Item"); - } - else - { - SelfClosingTag(sb, cind, "Item"); - } - } - CloseTag(sb, ind, name); - } - else + if (arr is null || arr.Length == 0) { SelfClosingTag(sb, ind, name); + return; } + + OpenTag(sb, ind, name); + var cind = ind + 1; + var cind2 = ind + 2; + foreach(var item in arr) + { + if (item is null) + { + SelfClosingTag(sb, cind, "Item"); + continue; + } + + OpenTag(sb, cind, "Item"); + item.WriteXml(sb, cind2); + CloseTag(sb, cind, "Item"); + } + CloseTag(sb, ind, name); } - public static void WriteCustomItemArray(StringBuilder sb, T[] arr, int ind, string name) where T : IMetaXmlItem + public static void WriteCustomItemArray(StringBuilder sb, T[]? arr, int ind, string name) where T : IMetaXmlItem { - var itemCount = arr?.Length ?? 0; - if (itemCount > 0) - { - OpenTag(sb, ind, name); - var cind = ind + 1; - for (int i = 0; i < itemCount; i++) - { - if (arr[i] != null) - { - arr[i].WriteXml(sb, cind); - } - } - CloseTag(sb, ind, name); - } - else + if (arr is null || arr.Length == 0) { SelfClosingTag(sb, ind, name); + return; } + + OpenTag(sb, ind, name); + var cind = ind + 1; + foreach(var item in arr) + { + item?.WriteXml(sb, cind); + } + CloseTag(sb, ind, name); } - public static void WriteHashItemArray(StringBuilder sb, MetaHash[] arr, int ind, string name) + public static void WriteHashItemArray(StringBuilder sb, MetaHash[]? arr, int ind, string name) { - var itemCount = arr?.Length ?? 0; - if (itemCount > 0) - { - OpenTag(sb, ind, name); - var cind = ind + 1; - for (int i = 0; i < itemCount; i++) - { - var iname = HashString(arr[i]); - StringTag(sb, cind, "Item", iname); - } - CloseTag(sb, ind, name); - } - else + if (arr is null || arr.Length == 0) { SelfClosingTag(sb, ind, name); + return; } + + OpenTag(sb, ind, name); + var cind = ind + 1; + foreach(var item in arr) + { + var iname = HashString(item); + StringTag(sb, cind, "Item", iname); + } + CloseTag(sb, ind, name); } public static string FormatHash(MetaHash h) //for use with WriteItemArray { - var str = JenkIndex.TryGetString(h); - if (!string.IsNullOrEmpty(str)) return str; - str = GlobalText.TryGetString(h); - if (!string.IsNullOrEmpty(str)) return str; + + if (JenkIndex.TryGetString(h, out var str)) + return str; + + if (GlobalText.TryGetString(h, out str)) + return str; + return HashString(h);// "hash_" + h.Hex; //return h.ToString(); } - public static string FormatVector2(Vector2 v) //for use with WriteItemArray + public static string FormatVector2(in Vector2 v) //for use with WriteItemArray { return FloatUtil.GetVector2String(v); } - public static string FormatVector3(Vector3 v) //for use with WriteItemArray + public static string FormatVector3(in Vector3 v) //for use with WriteItemArray { - return FloatUtil.GetVector3String(v); + return FloatUtil.GetVector3String(in v); } - public static string FormatVector4(Vector4 v) //for use with WriteItemArray + public static string FormatVector4(in Vector4 v) //for use with WriteItemArray { - return FloatUtil.GetVector4String(v); + return FloatUtil.GetVector4String(in v); } public static string FormatHexByte(byte b) { - return Convert.ToString(b, 16).ToUpperInvariant().PadLeft(2, '0'); //hex byte array + return b.ToString("X2"); } public static string FormatHashSwap(MetaHash h) //for use with WriteItemArray, swaps endianness { return MetaTypes.SwapBytes(h).ToString(); } - public static string FormatVector2Swap(Vector2 v) //for use with WriteItemArray, swaps endianness + public static string FormatVector2Swap(in Vector2 v) //for use with WriteItemArray, swaps endianness { - return FloatUtil.GetVector2String(MetaTypes.SwapBytes(v)); + return FloatUtil.GetVector2String(MetaTypes.SwapBytes(in v)); } public static string FormatVector3Swap(Vector3 v) //for use with WriteItemArray, swaps endianness { - return FloatUtil.GetVector3String(MetaTypes.SwapBytes(v)); + return FloatUtil.GetVector3String(MetaTypes.SwapBytes(in v)); } public static string FormatVector4Swap(Vector4 v) //for use with WriteItemArray, swaps endianness { - return FloatUtil.GetVector4String(MetaTypes.SwapBytes(v)); + return FloatUtil.GetVector4String(MetaTypes.SwapBytes(in v)); } - public static string FormatVector4SwapXYZOnly(Vector4 v) //for use with WriteItemArray, swaps endianness, and outputs only XYZ components + public static string FormatVector4SwapXYZOnly(in Vector4 v) //for use with WriteItemArray, swaps endianness, and outputs only XYZ components { return FloatUtil.GetVector3String(MetaTypes.SwapBytes(v.XYZ())); } @@ -2137,50 +2227,56 @@ namespace CodeWalker.GameFiles public static string HashString(MetaName h) { uint uh = (uint)h; - if (uh == 0) return ""; + if (uh == 0) + return string.Empty; - string str; - if (MetaNames.TryGetString(uh, out str)) return str; + string? str; + if (MetaNames.TryGetString(uh, out str)) + return str; str = JenkIndex.TryGetString(uh); - if (!string.IsNullOrEmpty(str)) return str; + if (!string.IsNullOrEmpty(str)) + return str; //TODO: do extra hash lookup here //if(Lookup.TryGetValue(uh, out str)) ... - return "hash_" + uh.ToString("X").PadLeft(8, '0'); + return $"hash_{uh:X8}"; } public static string HashString(MetaHash h) { - if (h == 0) return ""; + if (h == 0) + return string.Empty; - var str = JenkIndex.TryGetString(h); + if (JenkIndex.TryGetString(h, out var str)) + return str; - if (string.IsNullOrEmpty(str)) - { - if (MetaNames.TryGetString(h, out str)) return str; - } + if (MetaNames.TryGetString(h, out str)) + return str; //todo: make sure JenkIndex is built! //todo: do extra hash lookup here - if (!string.IsNullOrEmpty(str)) return str; - return "hash_" + h.Hex; + if (!string.IsNullOrEmpty(str)) + return str; + + return $"hash_{h.Hex}"; } public static string HashString(TextHash h) { uint uh = h.Hash; - if (uh == 0) return ""; + if (uh == 0) + return string.Empty; - var str = GlobalText.TryGetString(uh); - if (!string.IsNullOrEmpty(str)) return str; + if (GlobalText.TryGetString(uh, out var str)) + return str; //TODO: do extra hash lookup here //if(Lookup.TryGetValue(uh, out str)) ... - return "hash_" + uh.ToString("X").PadLeft(8, '0'); + return $"hash_{uh:X8}"; } @@ -2197,16 +2293,17 @@ namespace CodeWalker.GameFiles //if (h == 0) return ""; - return "0x" + h.ToString("X"); + return $"0x{h:X}"; } - - public static string XmlEscape(string unescaped) + [return: NotNullIfNotNull(nameof(unescaped))] + public static string? XmlEscape(string? unescaped) { - if (unescaped == null) return null; + if (unescaped is null) + return null; var escaped = System.Web.HttpUtility.HtmlEncode(unescaped).Replace("\"", """); return escaped; } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs b/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs index 132be99..fe5c0ee 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs @@ -112,11 +112,18 @@ This is a table i made a while ago for the pso types btw +using CodeWalker.Core.Utils; +using CommunityToolkit.Diagnostics; +using SharpDX.Win32; using System; +using System.Buffers; +using System.Buffers.Binary; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; @@ -209,8 +216,10 @@ namespace CodeWalker.GameFiles public void Load(byte[] data) { - using (var ms = new MemoryStream(data)) - Load(ms); + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); + + Load(ref reader); } public void Load(string fileName) @@ -221,7 +230,10 @@ namespace CodeWalker.GameFiles public virtual void Load(Stream stream) { - stream.Position = 0; + if (stream.Position != 0) + { + stream.Position = 0; + } var reader = new DataReader(stream, Endianess.BigEndian); while (reader.Position < reader.Length) @@ -276,6 +288,63 @@ namespace CodeWalker.GameFiles } } + public virtual void Load(ref SequenceReader reader) + { + if (reader.Consumed != 0) + { + reader.SetPosition(0); + } + while (reader.Consumed < reader.Length) + { + var identInt = reader.ReadUInt32BigEndian(); + var ident = (PsoSection)identInt; + var length = reader.ReadInt32BigEndian(); + + reader.Rewind(8); + + var sectionData = reader.ReadSubSequence(length); + var sectionReader = new SequenceReader(sectionData); + + switch (ident) + { + case PsoSection.PSIN: //0x5053494E "PSIN" - ID / data section + DataSection = new PsoDataSection(); + DataSection.Read(ref sectionReader, identInt, length); + break; + case PsoSection.PMAP: //0x504D4150 "PMAP" //data mapping + DataMapSection = new PsoDataMapSection(); + DataMapSection.Read(ref sectionReader); + break; + case PsoSection.PSCH: //0x50534348 "PSCH" //schema + SchemaSection = new PsoSchemaSection(); + SchemaSection.Read(ref sectionReader); + break; + case PsoSection.STRF: //0x53545246 "STRF" //paths/STRINGS (folder strings?) + STRFSection = new PsoSTRFSection(); + STRFSection.Read(ref sectionReader); + break; + case PsoSection.STRS: //0x53545253 "STRS" //names/strings (DES_) + STRSSection = new PsoSTRSSection(); + STRSSection.Read(ref sectionReader); + break; + case PsoSection.STRE: //0x53545245 "STRE" //probably encrypted strings..... + STRESection = new PsoSTRESection(); + STRESection.Read(ref sectionReader); + break; + case PsoSection.PSIG: //0x50534947 "PSIG" //signature? + PSIGSection = new PsoPSIGSection(); + PSIGSection.Read(ref sectionReader); + break; + case PsoSection.CHKS: //0x43484B53 "CHKS" //checksum? + CHKSSection = new PsoCHKSSection(); + CHKSSection.Read(ref sectionReader); + break; + default: + break; + } + } + } + public byte[] Save() { @@ -312,11 +381,30 @@ namespace CodeWalker.GameFiles - public PsoDataMappingEntry GetBlock(int id) + public bool TryGetBlock(int id, out PsoDataMappingEntry block) { - if (DataMapSection == null) return null; - if (DataMapSection.Entries == null) return null; - PsoDataMappingEntry block = null; + if (DataMapSection?.Entries is null) + { + block = default; + return false; + } + var ind = id - 1; + var blocks = DataMapSection.Entries; + if ((ind >= 0) && (ind < blocks.Length)) + { + block = blocks[ind]; + return true; + } + + block = default; + return false; + } + + public PsoDataMappingEntry? GetBlock(int id) + { + if (DataMapSection?.Entries == null) + return null; + PsoDataMappingEntry? block = null; var ind = id - 1; var blocks = DataMapSection.Entries; if ((ind >= 0) && (ind < blocks.Length)) @@ -326,8 +414,8 @@ namespace CodeWalker.GameFiles return block; } - - + public const uint PSO_IDENT_LITTLE_ENDIAN = 0x4e495350; + public static readonly uint PSO_IDENT_BIG_ENDIAN = BinaryPrimitives.ReverseEndianness(PSO_IDENT_LITTLE_ENDIAN); public static bool IsPSO(Stream stream) @@ -335,29 +423,31 @@ namespace CodeWalker.GameFiles //return !IsRBF(stream); //1347635534 - var reader = new DataReader(stream, Endianess.BigEndian); - var identInt = reader.ReadUInt32(); - stream.Position = 0; - return IsPSO(identInt); //"PSIN" + Span buffer = stackalloc byte[4]; + stream.Read(buffer); + stream.Position = 0; + return IsPSO(buffer); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsPSO(Span data) + { + var identInt = BinaryPrimitives.ReadUInt32LittleEndian(data); + + return IsPsoLittleEndian(identInt); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsPSO(uint identInt) { - return identInt == 1347635534; + return identInt == PSO_IDENT_BIG_ENDIAN; } - public static bool IsRBF(Stream stream) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsPsoLittleEndian(uint identInt) { - var reader = new DataReader(stream, Endianess.BigEndian); - var identInt = reader.ReadUInt32(); - stream.Position = 0; - return IsRBF(identInt); - } - - public static bool IsRBF(uint identInt) - { - return (identInt & 0xFFFFFF00) == 0x52424600; + return identInt == PSO_IDENT_LITTLE_ENDIAN; } } @@ -376,6 +466,21 @@ namespace CodeWalker.GameFiles Data = reader.ReadBytes(Length); } + public void Read(ref SequenceReader reader, uint ident, int length) + { + Ident = ident; + Length = length; + Data = reader.ReadBytes(Length).ToArray(); + } + + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadUInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + reader.Rewind(8); + Data = reader.ReadBytes(Length).ToArray(); + } + public void Write(DataWriter writer) { Length = Data.Length; @@ -389,12 +494,13 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoDataMapSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoDataMapSection { public int Ident { get; set; } = 0x504D4150; public int Length { get; private set; } @@ -422,9 +528,31 @@ namespace CodeWalker.GameFiles Entries = new PsoDataMappingEntry[EntriesCount]; for (int i = 0; i < EntriesCount; i++) { - var entry = new PsoDataMappingEntry(); - entry.Read(reader); - Entries[i] = entry; + Entries[i] = new PsoDataMappingEntry(reader); + } + } + + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + RootId = reader.ReadInt32BigEndian(); + EntriesCount = reader.ReadInt16BigEndian(); + Unknown_Eh = reader.ReadInt16BigEndian(); + + if (EntriesCount <= 0) //any other way to know which version? + { + EntriesCount = reader.ReadInt16BigEndian(); + reader.Advance(6); + //var unk1 = reader.ReadInt16BigEndian(); + //var unk2 = reader.ReadInt16BigEndian(); + //var unk3 = reader.ReadInt16BigEndian(); + } + + Entries = new PsoDataMappingEntry[EntriesCount]; + for (int i = 0; i < EntriesCount; i++) + { + Entries[i] = new PsoDataMappingEntry(ref reader); } } @@ -447,18 +575,19 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + EntriesCount.ToString(); + return $"{Ident}: {EntriesCount}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoDataMappingEntry + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct PsoDataMappingEntry { - public MetaName NameHash { get; set; } - public int Offset { get; set; } - public int Unknown_8h { get; set; } = 0x00000000; - public int Length { get; set; } + public MetaName NameHash { get; init; } + public int Offset { get; init; } + public int Unknown_8h { get; init; } + public int Length { get; init; } - public void Read(DataReader reader) + public PsoDataMappingEntry(DataReader reader) { NameHash = (MetaName)reader.ReadUInt32(); Offset = reader.ReadInt32(); @@ -466,6 +595,14 @@ namespace CodeWalker.GameFiles Length = reader.ReadInt32(); } + public PsoDataMappingEntry(ref SequenceReader reader) + { + NameHash = (MetaName)reader.ReadUInt32BigEndian(); + Offset = reader.ReadInt32BigEndian(); + Unknown_8h = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + } + public void Write(DataWriter writer) { writer.Write((uint)NameHash); @@ -476,12 +613,13 @@ namespace CodeWalker.GameFiles public override string ToString() { - return NameHash.ToString() + ": " + Offset.ToString() + ": " + Length.ToString(); + return $"{NameHash}: {Offset}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoSchemaSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoSchemaSection { public int Ident { get; private set; } = 0x50534348; public int Length { get; set; } @@ -499,12 +637,10 @@ namespace CodeWalker.GameFiles EntriesIdx = new PsoElementIndexInfo[Count]; for (int i = 0; i < Count; i++) { - var entry = new PsoElementIndexInfo(); - entry.Read(reader); - EntriesIdx[i] = entry; + EntriesIdx[i] = new PsoElementIndexInfo(reader); } - Entries = new PsoElementInfo[Count]; + Entries = new PsoStructureInfo[Count]; for (int i = 0; i < Count; i++) { reader.Position = EntriesIdx[i].Offset; @@ -513,20 +649,46 @@ namespace CodeWalker.GameFiles reader.Position = EntriesIdx[i].Offset; if (type == 0) { - var entry = new PsoStructureInfo(); - entry.Read(reader); - entry.IndexInfo = EntriesIdx[i]; - Entries[i] = entry; + Entries[i] = new PsoStructureInfo(reader) { IndexInfo = EntriesIdx[i] }; } else if (type == 1) { - var entry = new PsoEnumInfo(); - entry.Read(reader); - entry.IndexInfo = EntriesIdx[i]; - Entries[i] = entry; + Entries[i] = new PsoEnumInfo(reader) { IndexInfo = EntriesIdx[i] }; } else - throw new Exception("unknown type!"); + ThrowHelper.ThrowNotSupportedException("Unknown type"); + } + } + + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + Count = reader.ReadUInt32BigEndian(); + + EntriesIdx = new PsoElementIndexInfo[Count]; + for (int i = 0; i < Count; i++) + { + EntriesIdx[i] = new PsoElementIndexInfo(ref reader); + } + + Entries = new PsoElementInfo[Count]; + for (int i = 0; i < Count; i++) + { + reader.SetPosition(EntriesIdx[i].Offset); + var type = reader.ReadByte(); + + reader.SetPosition(EntriesIdx[i].Offset); + if (type == 0) + { + Entries[i] = new PsoStructureInfo(ref reader) { IndexInfo = EntriesIdx[i] }; + } + else if (type == 1) + { + Entries[i] = new PsoEnumInfo(ref reader) { IndexInfo = EntriesIdx[i], }; + } + else + ThrowHelper.ThrowNotSupportedException("Unknown type"); } } @@ -537,7 +699,7 @@ namespace CodeWalker.GameFiles var entriesWriter = new DataWriter(entriesStream, Endianess.BigEndian); for (int i = 0; i < Entries.Length; i++) { - EntriesIdx[i].Offset = 12 + 8 * Entries.Length + (int)entriesWriter.Position; + EntriesIdx[i] = EntriesIdx[i] with { Offset = 12 + 8 * Entries.Length + (int)entriesWriter.Position, }; Entries[i].Write(entriesWriter); } @@ -572,20 +734,23 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Count.ToString(); + return $"{Ident}: {Count}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoElementIndexInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct PsoElementIndexInfo(MetaName nameHash, int offset) { - public MetaName NameHash { get; set; } - public int Offset { get; set; } + public MetaName NameHash { get; init; } = nameHash; + public int Offset { get; init; } = offset; - public void Read(DataReader reader) - { - NameHash = (MetaName)reader.ReadUInt32(); - Offset = reader.ReadInt32(); - } + public PsoElementIndexInfo(DataReader reader) + : this ((MetaName)reader.ReadUInt32(), reader.ReadInt32()) + { } + + public PsoElementIndexInfo(ref SequenceReader reader) + : this((MetaName)reader.ReadUInt32BigEndian(), reader.ReadInt32BigEndian()) + { } public void Write(DataWriter writer) { @@ -595,21 +760,22 @@ namespace CodeWalker.GameFiles public override string ToString() { - return NameHash.ToString() + ": " + Offset.ToString(); + return $"{NameHash}: {Offset}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public abstract class PsoElementInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public interface PsoElementInfo { public PsoElementIndexInfo IndexInfo { get; set; } - public abstract void Read(DataReader reader); - public abstract void Write(DataWriter writer); } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoStructureInfo : PsoElementInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoStructureInfo : PsoElementInfo { + public PsoElementIndexInfo IndexInfo { get; set; } public byte Type { get; set; } = 0; public short EntriesCount { get; private set; } public byte Unk { get; set; } @@ -617,14 +783,44 @@ namespace CodeWalker.GameFiles public uint Unk_Ch { get; set; } = 0x00000000; public PsoStructureEntryInfo[] Entries { get; set; } - public PsoStructureInfo() { } + + public PsoStructureInfo(DataReader reader) + { + uint x = reader.ReadUInt32(); + Type = (byte)((x & 0xFF000000) >> 24); + EntriesCount = (short)(x & 0xFFFF); + Unk = (byte)((x & 0x00FF0000) >> 16); + StructureLength = reader.ReadInt32(); + Unk_Ch = reader.ReadUInt32(); + + Entries = new PsoStructureEntryInfo[EntriesCount]; + for (int i = 0; i < EntriesCount; i++) + { + Entries[i] = new PsoStructureEntryInfo(reader); + } + } + + public PsoStructureInfo(ref SequenceReader reader) + { + uint x = reader.ReadUInt32BigEndian(); + Type = (byte)((x & 0xFF000000) >> 24); + EntriesCount = (short)(x & 0xFFFF); + Unk = (byte)((x & 0x00FF0000) >> 16); + StructureLength = reader.ReadInt32BigEndian(); + Unk_Ch = reader.ReadUInt32BigEndian(); + + Entries = new PsoStructureEntryInfo[EntriesCount]; + for (int i = 0; i < EntriesCount; i++) + { + Entries[i] = new PsoStructureEntryInfo(ref reader); + } + } + public PsoStructureInfo(MetaName nameHash, byte type, byte unk, int length, params PsoStructureEntryInfo[] entries) { - IndexInfo = new PsoElementIndexInfo(); - IndexInfo.NameHash = nameHash; - IndexInfo.Offset = 0; //todo: fix? + IndexInfo = new PsoElementIndexInfo(nameHash, 0); Type = type; EntriesCount = (short)(entries?.Length ?? 0); @@ -634,28 +830,7 @@ namespace CodeWalker.GameFiles Entries = entries; } - public override void Read(DataReader reader) - { - uint x = reader.ReadUInt32(); - Type = (byte)((x & 0xFF000000) >> 24); - EntriesCount = (short)(x & 0xFFFF); - Unk = (byte)((x & 0x00FF0000) >> 16); - StructureLength = reader.ReadInt32(); - Unk_Ch = reader.ReadUInt32(); - - if (Unk_Ch != 0) - { } - - Entries = new PsoStructureEntryInfo[EntriesCount]; - for (int i = 0; i < EntriesCount; i++) - { - var entry = new PsoStructureEntryInfo(); - entry.Read(reader); - Entries[i] = entry; - } - } - - public override void Write(DataWriter writer) + public void Write(DataWriter writer) { Type = 0; EntriesCount = (short)Entries.Length; @@ -673,21 +848,55 @@ namespace CodeWalker.GameFiles public override string ToString() { - return IndexInfo.ToString() + " - " + Type.ToString() + ": " + EntriesCount.ToString(); + return $"{IndexInfo} - {Type}: {EntriesCount}"; } - public PsoStructureEntryInfo FindEntry(MetaName name) + public bool TryFindEntry(MetaName name, [MaybeNullWhen(false)] out PsoStructureEntryInfo entryInfo) + { + if (Entries is null) + { + entryInfo = default; + return false; + } + + foreach (var entry in Entries.AsSpan()) + { + if (entry.EntryNameHash == name) + { + entryInfo = entry; + return true; + } + } + + entryInfo = default; + return false; + } + + public PsoStructureEntryInfo? FindEntry(MetaName name) { if (Entries != null) { foreach (var entry in Entries) { - if (entry.EntryNameHash == name) return entry; + if (entry.EntryNameHash == name) + return entry; } } return null; } - public PsoStructureEntryInfo GetEntry(int id) + + public bool TryGetEntry(int id, [MaybeNullWhen(false)] out PsoStructureEntryInfo entry) + { + if ((Entries != null) && (id >= 0) && (id < Entries.Length)) + { + entry = Entries[id]; + return true; + } + entry = default; + return false; + } + + public PsoStructureEntryInfo? GetEntry(int id) { if ((Entries != null) && (id >= 0) && (id < Entries.Length)) { @@ -698,17 +907,38 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoStructureEntryInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct PsoStructureEntryInfo { - public MetaName EntryNameHash { get; set; } - public PsoDataType Type { get; set; } - public byte Unk_5h { get; set; } //0 = default, 3 = pointer array? - public ushort DataOffset { get; set; } - public uint ReferenceKey { get; set; } // when array -> entry index with type + public MetaName EntryNameHash { get; init; } + public PsoDataType Type { get; init; } + public byte Unk_5h { get; init; } //0 = default, 3 = pointer array? + public ushort DataOffset { get; init; } + public uint ReferenceKey { get; init; } // when array -> entry index with type public PsoStructureEntryInfo() { } + + + public PsoStructureEntryInfo(DataReader reader) + { + EntryNameHash = (MetaName)reader.ReadUInt32(); + Type = (PsoDataType)reader.ReadByte(); + Unk_5h = reader.ReadByte(); + DataOffset = reader.ReadUInt16(); + ReferenceKey = reader.ReadUInt32(); + } + + public PsoStructureEntryInfo(ref SequenceReader reader) + { + EntryNameHash = (MetaName)reader.ReadUInt32BigEndian(); + Type = (PsoDataType)reader.ReadByte(); + Unk_5h = reader.ReadByte(); + DataOffset = reader.ReadUInt16BigEndian(); + ReferenceKey = reader.ReadUInt32BigEndian(); + } + public PsoStructureEntryInfo(MetaName nameHash, PsoDataType type, ushort offset, byte unk, MetaName refKey) { EntryNameHash = nameHash; @@ -718,15 +948,6 @@ namespace CodeWalker.GameFiles ReferenceKey = (uint)refKey; } - public void Read(DataReader reader) - { - EntryNameHash = (MetaName)reader.ReadUInt32(); - Type = (PsoDataType)reader.ReadByte(); - Unk_5h = reader.ReadByte(); - DataOffset = reader.ReadUInt16(); - ReferenceKey = reader.ReadUInt32(); - } - public void Write(DataWriter writer) { writer.Write((uint)EntryNameHash); @@ -740,14 +961,16 @@ namespace CodeWalker.GameFiles { if(ReferenceKey!=0) { - return EntryNameHash.ToString() + ": " + Type.ToString() + ": " + DataOffset.ToString() + ": " + ((MetaName)ReferenceKey).ToString(); + return $"{EntryNameHash}: {Type}: {DataOffset}: {(MetaName)ReferenceKey}"; } - return EntryNameHash.ToString() + ": " + Type.ToString() + ": " + DataOffset.ToString(); + return $"{EntryNameHash}: {Type}: {DataOffset}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoEnumInfo : PsoElementInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoEnumInfo : PsoElementInfo { + public PsoElementIndexInfo IndexInfo { get; set; } public byte Type { get; private set; } = 1; public int EntriesCount { get; private set; } public PsoEnumEntryInfo[] Entries { get; set; } @@ -757,15 +980,13 @@ namespace CodeWalker.GameFiles { } public PsoEnumInfo(MetaName nameHash, byte type, params PsoEnumEntryInfo[] entries) { - IndexInfo = new PsoElementIndexInfo(); - IndexInfo.NameHash = nameHash; - IndexInfo.Offset = 0; //todo: fix? + IndexInfo = new PsoElementIndexInfo(nameHash, 0); EntriesCount = entries?.Length ?? 0; Entries = entries; } - public override void Read(DataReader reader) + public PsoEnumInfo(DataReader reader) { uint x = reader.ReadUInt32(); Type = (byte)((x & 0xFF000000) >> 24); @@ -774,13 +995,24 @@ namespace CodeWalker.GameFiles Entries = new PsoEnumEntryInfo[EntriesCount]; for (int i = 0; i < EntriesCount; i++) { - var entry = new PsoEnumEntryInfo(); - entry.Read(reader); - Entries[i] = entry; + Entries[i] = new PsoEnumEntryInfo(reader); } } - public override void Write(DataWriter writer) + public PsoEnumInfo(ref SequenceReader reader) + { + uint x = reader.ReadUInt32BigEndian(); + Type = (byte)((x & 0xFF000000) >> 24); + EntriesCount = (int)(x & 0x00FFFFFF); + + Entries = new PsoEnumEntryInfo[EntriesCount]; + for (int i = 0; i < EntriesCount; i++) + { + Entries[i] = new PsoEnumEntryInfo(ref reader); + } + } + + public void Write(DataWriter writer) { // update... Type = 1; @@ -795,31 +1027,65 @@ namespace CodeWalker.GameFiles } } - public PsoEnumEntryInfo FindEntry(int val) + public bool TryFindEntry(int val, out PsoEnumEntryInfo entry) { - if (Entries == null) return null; + if (Entries == null) + { + entry = default; + return false; + } + for (int i = 0; i < Entries.Length; i++) { - var entry = Entries[i]; - if (entry.EntryKey == val) + var _entry = Entries[i]; + if (_entry.EntryKey == val) { - return entry; + entry = _entry; + return true; } } + + entry = default; + return false; + } + + public PsoEnumEntryInfo? FindEntry(int val) + { + if (TryFindEntry(val, out var entry)) + { + return entry; + } return null; } - public PsoEnumEntryInfo FindEntryByName(MetaName name) + public bool TryFindEntryByName(MetaName name, out PsoEnumEntryInfo entry) { - if (Entries == null) return null; + if (Entries == null) + { + entry = default; + return false; + } for (int i = 0; i < Entries.Length; i++) { - var entry = Entries[i]; - if (entry.EntryNameHash == name) + var _entry = Entries[i]; + if (_entry.EntryNameHash == name) { - return entry; + entry = _entry; + return true; } } + + entry = default; + return false; + } + + public PsoEnumEntryInfo? FindEntryByName(MetaName name) + { + if (!TryFindEntryByName(name, out var entry)) + { + return entry; + } + return null; } @@ -827,14 +1093,15 @@ namespace CodeWalker.GameFiles public override string ToString() { - return IndexInfo.ToString() + " - " + Type.ToString() + ": " + EntriesCount.ToString(); + return $"{IndexInfo} - {Type}: {EntriesCount}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoEnumEntryInfo + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct PsoEnumEntryInfo { - public MetaName EntryNameHash { get; set; } - public int EntryKey { get; set; } + public readonly MetaName EntryNameHash; + public readonly int EntryKey; public PsoEnumEntryInfo() @@ -845,12 +1112,18 @@ namespace CodeWalker.GameFiles EntryKey = key; } - public void Read(DataReader reader) + public PsoEnumEntryInfo(DataReader reader) { EntryNameHash = (MetaName)reader.ReadUInt32(); EntryKey = reader.ReadInt32(); } + public PsoEnumEntryInfo(ref SequenceReader reader) + { + EntryNameHash = (MetaName)reader.ReadUInt32BigEndian(); + EntryKey = reader.ReadInt32BigEndian(); + } + public void Write(DataWriter writer) { writer.Write((uint)EntryNameHash); @@ -859,12 +1132,13 @@ namespace CodeWalker.GameFiles public override string ToString() { - return EntryNameHash.ToString() + ": " + EntryKey.ToString(); + return $"{EntryNameHash}: {EntryKey}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoSTRFSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoSTRFSection { public int Ident { get; private set; } = 0x53545246; public int Length { get; set; } @@ -877,10 +1151,22 @@ namespace CodeWalker.GameFiles List strs = new List(); while (reader.Position < reader.Length) { - strs.Add(reader.ReadString()); + var str = reader.ReadString(); + strs.Add(str); + JenkIndex.EnsureBoth(str); } - foreach (var str in strs) + Strings = strs.ToArray(); + } + + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + List strs = new List(); + while (reader.Consumed < reader.Length) { + var str = reader.ReadString(); + strs.Add(str); JenkIndex.EnsureBoth(str); } Strings = strs.ToArray(); @@ -912,11 +1198,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoSTRSSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoSTRSSection { public int Ident { get; private set; } = 0x53545253; public int Length { get; set; } @@ -931,12 +1218,24 @@ namespace CodeWalker.GameFiles List strs = new List(); while (reader.Position < reader.Length) { - strs.Add(reader.ReadString()); + var str = reader.ReadString(); + strs.Add(str); + JenkIndex.EnsureBoth(str); } - foreach (var str in strs) + Strings = strs.ToArray(); + } + + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + + List strs = new List(); + while (reader.Consumed < reader.Length) { - JenkIndex.Ensure(str); - JenkIndex.EnsureLower(str); + var str = reader.ReadString(); + strs.Add(str); + JenkIndex.EnsureBoth(str); } Strings = strs.ToArray(); } @@ -967,11 +1266,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoSTRESection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoSTRESection { public int Ident { get; private set; } = 0x53545245; public int Length { get; set; } @@ -996,6 +1296,22 @@ namespace CodeWalker.GameFiles } } + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + + if (Length > 8) + { + Data = reader.ReadBytes(Length - 8).ToArray(); + + //Decr1 = GTACrypto.DecryptAES(Data); + //Decr2 = GTACrypto.DecryptNG(Data, ) + + //TODO: someone plz figure out that encryption + } + } + public void Write(DataWriter writer) { @@ -1013,11 +1329,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoPSIGSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoPSIGSection { public int Ident { get; private set; } = 0x50534947; public int Length { get; set; } @@ -1034,6 +1351,17 @@ namespace CodeWalker.GameFiles } } + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + + if (Length > 8) + { + Data = reader.ReadBytes(Length - 8).ToArray(); + } + } + public void Write(DataWriter writer) { Length = (Data?.Length ?? 0) + 8; @@ -1050,11 +1378,12 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class PsoCHKSSection + [TypeConverter(typeof(ExpandableObjectConverter))] + public class PsoCHKSSection { public int Ident { get; private set; } = 0x43484B53; public int Length { get; set; } @@ -1075,6 +1404,19 @@ namespace CodeWalker.GameFiles Unk0 = reader.ReadUInt32(); } + public void Read(ref SequenceReader reader) + { + Ident = reader.ReadInt32BigEndian(); + Length = reader.ReadInt32BigEndian(); + + if (Length != 20) + { return; } + + FileSize = reader.ReadUInt32BigEndian(); + Checksum = reader.ReadUInt32BigEndian(); + Unk0 = reader.ReadUInt32BigEndian(); + } + public void Write(DataWriter writer) { Length = 20; @@ -1088,7 +1430,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return Ident.ToString() + ": " + Length.ToString(); + return $"{Ident}: {Length}"; } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoBuilder.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoBuilder.cs index a956cf9..5fffe3f 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/PsoBuilder.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoBuilder.cs @@ -46,7 +46,7 @@ namespace CodeWalker.GameFiles public PsoBuilderPointer AddItem(MetaName type, T item) where T : struct { - byte[] data = MetaTypes.ConvertToBytes(item); + byte[] data = MetaTypes.ConvertToBytes(in item); return AddItem(type, data); } @@ -62,10 +62,12 @@ namespace CodeWalker.GameFiles // data = newdata; //make sure item size is multiple of 16... so pointers don't need sub offsets! //} int idx = block.AddItem(data); - PsoBuilderPointer r = new PsoBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = (idx * data.Length); - r.Length = data.Length; + PsoBuilderPointer r = new PsoBuilderPointer + { + BlockID = block.Index + 1, + Offset = (idx * data.Length), + Length = data.Length + }; return r; } @@ -89,10 +91,12 @@ namespace CodeWalker.GameFiles Buffer.BlockCopy(data, 0, newdata, 0, datalen); int offs = block.TotalSize; int idx = block.AddItem(newdata); - PsoBuilderPointer r = new PsoBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = offs; //(idx * data.Length);; - r.Length = length; + PsoBuilderPointer r = new PsoBuilderPointer + { + BlockID = block.Index + 1, + Offset = offs, //(idx * data.Length);; + Length = length + }; return r; } @@ -148,10 +152,12 @@ namespace CodeWalker.GameFiles { if ((arr == null) || (arr.Length == 0)) return new Array_StructurePointer(); var ptr = AddItemArray((MetaName)MetaTypeName.PsoPOINTER, arr); - Array_StructurePointer sp = new Array_StructurePointer(); - sp.Count1 = (ushort)arr.Length; - sp.Count2 = sp.Count1; - sp.Pointer = ptr.Pointer; + Array_StructurePointer sp = new Array_StructurePointer + { + Count1 = (ushort)arr.Length, + Count2 = (ushort)arr.Length, + Pointer = ptr.Pointer, + }; return sp; } @@ -172,10 +178,12 @@ namespace CodeWalker.GameFiles Buffer.BlockCopy(data, 0, newdata, 0, datalen); int offs = block.TotalSize; int idx = block.AddItem(newdata); - PsoBuilderPointer r = new PsoBuilderPointer(); - r.BlockID = block.Index + 1; - r.Offset = offs;// (idx * data.Length); - r.Length = datalen; //actual length of string. + PsoBuilderPointer r = new PsoBuilderPointer + { + BlockID = block.Index + 1, + Offset = offs,// (idx * data.Length); + Length = datalen //actual length of string. + }; return r; } @@ -248,7 +256,7 @@ namespace CodeWalker.GameFiles { if (!StructureInfos.ContainsKey(name)) { - PsoStructureInfo si = PsoTypes.GetStructureInfo(name); + PsoStructureInfo si = PsoTypesStructureInfo.GetStructureInfo(name); if (si != null) { StructureInfos[name] = si; @@ -259,7 +267,7 @@ namespace CodeWalker.GameFiles { if (!EnumInfos.ContainsKey(name)) { - PsoEnumInfo ei = PsoTypes.GetEnumInfo(name); + PsoEnumInfo ei = PsoTypesEnumInfo.GetEnumInfo(name); if (ei != null) { EnumInfos[name] = ei; @@ -274,7 +282,7 @@ namespace CodeWalker.GameFiles if (valType == 0) { - inf = PsoTypes.GetStructureInfo((MetaName)MetaTypeName.ARRAYINFO); //default ARRAYINFO with pointer + inf = PsoTypesStructureInfo.GetStructureInfo((MetaName)MetaTypeName.ARRAYINFO); //default ARRAYINFO with pointer if (!StructureInfos.ContainsKey(inf.IndexInfo.NameHash)) { StructureInfos[inf.IndexInfo.NameHash] = inf; @@ -282,7 +290,7 @@ namespace CodeWalker.GameFiles return inf; } - var structInfo = PsoTypes.GetStructureInfo(valType); + var structInfo = PsoTypesStructureInfo.GetStructureInfo(valType); if (structInfo == null) { }//error? @@ -396,8 +404,7 @@ namespace CodeWalker.GameFiles pso.SchemaSection.EntriesIdx = new PsoElementIndexInfo[schEntries.Count]; for (int i = 0; i < schEntries.Count; i++) { - pso.SchemaSection.EntriesIdx[i] = new PsoElementIndexInfo(); - pso.SchemaSection.EntriesIdx[i].NameHash = schEntries[i].IndexInfo.NameHash; + pso.SchemaSection.EntriesIdx[i] = new PsoElementIndexInfo(schEntries[i].IndexInfo.NameHash, 0); } if (STRFStrings.Count > 0) @@ -422,10 +429,12 @@ namespace CodeWalker.GameFiles for (int i = 0; i < Blocks.Count; i++) { var b = Blocks[i]; - var e = new PsoDataMappingEntry(); - e.NameHash = b.StructureNameHash; - e.Length = b.TotalSize; - e.Offset = offset; + var e = new PsoDataMappingEntry + { + NameHash = b.StructureNameHash, + Length = b.TotalSize, + Offset = offset + }; offset += b.TotalSize; pso.DataMapSection.Entries[i] = e; } @@ -454,13 +463,7 @@ namespace CodeWalker.GameFiles return idx; } - public uint BasePointer - { - get - { - return (((uint)Index + 1) & 0xFFF); - } - } + public uint BasePointer => (((uint)Index + 1) & 0xFFF); //public MetaDataBlock GetMetaDataBlock() @@ -484,16 +487,16 @@ namespace CodeWalker.GameFiles } - public struct PsoBuilderPointer + public readonly struct PsoBuilderPointer { - public int BlockID { get; set; } //1-based id - public int Offset { get; set; } //byte offset - public int Length { get; set; } //for temp use... + public int BlockID { get; init; } //1-based id + public int Offset { get; init; } //byte offset + public int Length { get; init; } //for temp use... public uint Pointer { get { - uint bidx = (((uint)BlockID) & 0xFFF); + uint bidx = ((uint)BlockID) & 0xFFF; uint offs = (((uint)Offset) & 0xFFFFF) << 12; return bidx + offs; } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs index b531f5e..532404c 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs @@ -9,16516 +9,1134 @@ using System.Threading.Tasks; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Buffers.Binary; +using System.Buffers; -namespace CodeWalker.GameFiles +namespace CodeWalker.GameFiles; + +public static class PsoTypes { - public static class PsoTypes + //for parsing schema info in PSO files to generate structs for PSO parsing. + //equivalent of MetaTypes but for PSO. + + public static Dictionary EnumDict = new Dictionary(); + public static Dictionary StructDict = new Dictionary(); + + + + public static void Clear() { - //for parsing schema info in PSO files to generate structs for PSO parsing. - //equivalent of MetaTypes but for PSO. + EnumDict.Clear(); + StructDict.Clear(); + } - public static Dictionary EnumDict = new Dictionary(); - public static Dictionary StructDict = new Dictionary(); + public static void EnsurePsoTypes(PsoFile pso) + { - - - public static void Clear() + if ((pso.SchemaSection == null) || (pso.SchemaSection.Entries == null) || (pso.SchemaSection.EntriesIdx == null)) { - EnumDict.Clear(); - StructDict.Clear(); + return; } - public static void EnsurePsoTypes(PsoFile pso) + + for (int i = 0; i < pso.SchemaSection.Entries.Length; i++) { + var entry = pso.SchemaSection.Entries[i]; - if ((pso.SchemaSection == null) || (pso.SchemaSection.Entries == null) || (pso.SchemaSection.EntriesIdx == null)) + if (entry is PsoEnumInfo enuminfo) { - return; - } - - - for (int i = 0; i < pso.SchemaSection.Entries.Length; i++) - { - var entry = pso.SchemaSection.Entries[i]; - var enuminfo = entry as PsoEnumInfo; - var structinfo = entry as PsoStructureInfo; - - if (enuminfo != null) + if (!EnumDict.ContainsKey(enuminfo.IndexInfo.NameHash)) { - if (!EnumDict.ContainsKey(enuminfo.IndexInfo.NameHash)) + EnumDict.Add(enuminfo.IndexInfo.NameHash, enuminfo); + } + else + { + PsoEnumInfo oldei = EnumDict[enuminfo.IndexInfo.NameHash]; + if (!ComparePsoEnumInfos(oldei, enuminfo)) { - EnumDict.Add(enuminfo.IndexInfo.NameHash, enuminfo); - } - else - { - PsoEnumInfo oldei = EnumDict[enuminfo.IndexInfo.NameHash]; - if (!ComparePsoEnumInfos(oldei, enuminfo)) + if (enuminfo.EntriesCount > oldei.EntriesCount)//assume this is newer... { - if (enuminfo.EntriesCount > oldei.EntriesCount)//assume this is newer... - { - EnumDict[enuminfo.IndexInfo.NameHash] = enuminfo; - } + EnumDict[enuminfo.IndexInfo.NameHash] = enuminfo; } } } - else if (structinfo != null) + } + else if (entry is PsoStructureInfo structinfo) + { + if (!StructDict.ContainsKey(structinfo.IndexInfo.NameHash)) { - if (!StructDict.ContainsKey(structinfo.IndexInfo.NameHash)) + StructDict.Add(structinfo.IndexInfo.NameHash, structinfo); + } + else + { + PsoStructureInfo oldsi = StructDict[structinfo.IndexInfo.NameHash]; + if (!ComparePsoStructureInfos(oldsi, structinfo)) { - StructDict.Add(structinfo.IndexInfo.NameHash, structinfo); - } - else - { - PsoStructureInfo oldsi = StructDict[structinfo.IndexInfo.NameHash]; - if (!ComparePsoStructureInfos(oldsi, structinfo)) + if (structinfo.EntriesCount > oldsi.EntriesCount) //assume more entries is newer.. maybe not correct { - if (structinfo.EntriesCount > oldsi.EntriesCount) //assume more entries is newer.. maybe not correct - { - StructDict[structinfo.IndexInfo.NameHash] = structinfo; - } + StructDict[structinfo.IndexInfo.NameHash] = structinfo; } } } - } } - public static bool ComparePsoEnumInfos(PsoEnumInfo a, PsoEnumInfo b) - { - //returns true if they are the same. + } - if (a.Entries.Length != b.Entries.Length) + public static bool ComparePsoEnumInfos(PsoEnumInfo a, PsoEnumInfo b) + { + //returns true if they are the same. + + if (a.Entries.Length != b.Entries.Length) + { + return false; + } + + for (int i = 0; i < a.Entries.Length; i++) + { + if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || + (a.Entries[i].EntryKey != b.Entries[i].EntryKey)) { return false; } - - for (int i = 0; i < a.Entries.Length; i++) - { - if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || - (a.Entries[i].EntryKey != b.Entries[i].EntryKey)) - { - return false; - } - } - - return true; } - public static bool ComparePsoStructureInfos(PsoStructureInfo a, PsoStructureInfo b) - { - //returns true if they are the same. - if (a.Entries.Length != b.Entries.Length) + return true; + } + public static bool ComparePsoStructureInfos(PsoStructureInfo a, PsoStructureInfo b) + { + //returns true if they are the same. + + if (a.Entries.Length != b.Entries.Length) + { + return false; + } + + for (int i = 0; i < a.Entries.Length; i++) + { + if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || + (a.Entries[i].DataOffset != b.Entries[i].DataOffset) || + (a.Entries[i].Type != b.Entries[i].Type)) { return false; } - - for (int i = 0; i < a.Entries.Length; i++) - { - if ((a.Entries[i].EntryNameHash != b.Entries[i].EntryNameHash) || - (a.Entries[i].DataOffset != b.Entries[i].DataOffset) || - (a.Entries[i].Type != b.Entries[i].Type)) - { - return false; - } - } - - return true; } + return true; + } - public static string GetTypesString() + + public static string GetTypesString() + { + StringBuilder sbe = new StringBuilder(); + StringBuilder sbs = new StringBuilder(); + + sbe.AppendLine("//Enum infos"); + sbs.AppendLine("//Struct infos"); + + + foreach (var kvp in EnumDict) { - StringBuilder sbe = new StringBuilder(); - StringBuilder sbs = new StringBuilder(); - - sbe.AppendLine("//Enum infos"); - sbs.AppendLine("//Struct infos"); - - - foreach (var kvp in EnumDict) + var ei = kvp.Value; + string name = GetSafeName(ei.IndexInfo.NameHash, ei.Type); + sbe.AppendLine("public enum " + name + " //Type:" + ei.Type.ToString()); + sbe.AppendLine("{"); + foreach (var entry in ei.Entries) { - var ei = kvp.Value; - string name = GetSafeName(ei.IndexInfo.NameHash, ei.Type); - sbe.AppendLine("public enum " + name + " //Type:" + ei.Type.ToString()); - sbe.AppendLine("{"); - foreach (var entry in ei.Entries) - { - string eename = GetSafeName(entry.EntryNameHash, (uint)entry.EntryKey); - sbe.AppendFormat(" {0} = {1},", eename, entry.EntryKey); - sbe.AppendLine(); - } - sbe.AppendLine("}"); + string eename = GetSafeName(entry.EntryNameHash, (uint)entry.EntryKey); + sbe.AppendFormat(" {0} = {1},", eename, entry.EntryKey); sbe.AppendLine(); } + sbe.AppendLine("}"); + sbe.AppendLine(); + } - foreach (var kvp in StructDict) + foreach (var kvp in StructDict) + { + var si = kvp.Value; + string name = GetSafeName(si.IndexInfo.NameHash, si.Type); + sbs.AppendLine("public struct " + name + " //" + si.StructureLength.ToString() + " bytes, Type:" + si.Type.ToString()); + sbs.AppendLine("{"); + for (int i = 0; i < si.Entries.Length; i++) { - var si = kvp.Value; - string name = GetSafeName(si.IndexInfo.NameHash, si.Type); - sbs.AppendLine("public struct " + name + " //" + si.StructureLength.ToString() + " bytes, Type:" + si.Type.ToString()); - sbs.AppendLine("{"); - for (int i = 0; i < si.Entries.Length; i++) + var entry = si.Entries[i]; + + if ((entry.DataOffset == 0) && (entry.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) //referred to by array { - var entry = si.Entries[i]; + } + else + { + string sename = GetSafeName(entry.EntryNameHash, entry.ReferenceKey); + string fmt = " public {0} {1}; //{2} {3}"; - if ((entry.DataOffset == 0) && (entry.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) //referred to by array + if (entry.Type == PsoDataType.Array) { - } - else - { - string sename = GetSafeName(entry.EntryNameHash, entry.ReferenceKey); - string fmt = " public {0} {1}; //{2} {3}"; - - if (entry.Type == PsoDataType.Array) + if (entry.ReferenceKey >= si.Entries.Length) { - if (entry.ReferenceKey >= si.Entries.Length) - { - sbs.AppendFormat(fmt, entry.Type.ToString(), sename, entry.DataOffset, entry.ToString() + " { unexpected key! " + entry.ReferenceKey.ToString() + "}"); - sbs.AppendLine(); - } - else - { - var structentry = si.Entries[(int)entry.ReferenceKey]; - var typename = "Array_" + PsoDataTypes.GetCSharpTypeName(structentry.Type); - sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry.ToString() + " {" + structentry.ToString() + "}"); - sbs.AppendLine(); - } - } - else if (entry.Type == PsoDataType.Structure) - { - var typename = GetSafeName((MetaName)entry.ReferenceKey, entry.ReferenceKey); - sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry.ToString()); + sbs.AppendFormat(fmt, entry.Type.ToString(), sename, entry.DataOffset, entry.ToString() + " { unexpected key! " + entry.ReferenceKey.ToString() + "}"); sbs.AppendLine(); } else { - var typename = PsoDataTypes.GetCSharpTypeName(entry.Type); - sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry); + var structentry = si.Entries[(int)entry.ReferenceKey]; + var typename = "Array_" + PsoDataTypes.GetCSharpTypeName(structentry.Type); + sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry.ToString() + " {" + structentry.ToString() + "}"); sbs.AppendLine(); } } - } - sbs.AppendLine("}"); - sbs.AppendLine(); - } - - - sbe.AppendLine(); - sbe.AppendLine(); - sbe.AppendLine(); - sbe.AppendLine(); - sbe.AppendLine(); - sbe.Append(sbs.ToString()); - - string result = sbe.ToString(); - - return result; - } - - - public static string GetTypesInitString() - { - StringBuilder sb = new StringBuilder(); - - foreach (var si in StructDict.Values) - { - AddStructureInfoString(si, sb); - } - - sb.AppendLine(); - - foreach (var ei in EnumDict.Values) - { - AddEnumInfoString(ei, sb); - } - - string str = sb.ToString(); - return str; - } - private static void AddStructureInfoString(PsoStructureInfo si, StringBuilder sb) - { - var ns = GetMetaNameString(si.IndexInfo.NameHash); - sb.AppendFormat("case " + ns + ":"); - sb.AppendLine(); - sb.AppendFormat("return new PsoStructureInfo({0}, {1}, {2}, {3},", ns, si.Type, si.Unk, si.StructureLength); - sb.AppendLine(); - for (int i = 0; i < si.Entries.Length; i++) - { - var e = si.Entries[i]; - string refkey = "0"; - if (e.ReferenceKey != 0) - { - refkey = GetMetaNameString((MetaName)e.ReferenceKey); - } - sb.AppendFormat(" new PsoStructureEntryInfo({0}, PsoDataType.{1}, {2}, {3}, {4})", GetMetaNameString(e.EntryNameHash), e.Type, e.DataOffset, e.Unk_5h, refkey); - if (i < si.Entries.Length - 1) sb.Append(","); - sb.AppendLine(); - } - sb.AppendFormat(");"); - sb.AppendLine(); - } - private static void AddEnumInfoString(PsoEnumInfo ei, StringBuilder sb) - { - var ns = GetMetaNameString(ei.IndexInfo.NameHash); - sb.AppendFormat("case " + ns + ":"); - sb.AppendLine(); - sb.AppendFormat("return new PsoEnumInfo({0}, {1},", ns, ei.Type); - sb.AppendLine(); - for (int i = 0; i < ei.Entries.Length; i++) - { - var e = ei.Entries[i]; - sb.AppendFormat(" new PsoEnumEntryInfo({0}, {1})", GetMetaNameString(e.EntryNameHash), e.EntryKey); - if (i < ei.Entries.Length - 1) sb.Append(","); - sb.AppendLine(); - } - sb.AppendFormat(");"); - sb.AppendLine(); - } - private static string GetMetaNameString(MetaName n) - { - if (Enum.IsDefined(typeof(MetaName), n)) - { - return "MetaName." + n.ToString(); - } - else - { - return "(MetaName)" + n.ToString(); - } - } - - - - public static PsoStructureInfo GetStructureInfo(MetaName name) - { - //to generate structinfos - switch (name) - { - case MetaName.CJunctionTemplateArray: - return new PsoStructureInfo(MetaName.CJunctionTemplateArray, 0, 0, 170688, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CJunctionTemplate), - new PsoStructureEntryInfo(MetaName.Entries, PsoDataType.Array, 0, 1, (MetaName)9830400), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2111264667), - new PsoStructureEntryInfo(MetaName.AutoJunctionAdjustments, PsoDataType.Array, 39344, 129, (MetaName)524290) - ); - case MetaName.CJunctionTemplate: - return new PsoStructureInfo(MetaName.CJunctionTemplate, 0, 0, 1136, - new PsoStructureEntryInfo(MetaName.iFlags, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iNumJunctionNodes, PsoDataType.SInt, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.iNumEntrances, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.iNumPhases, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.iNumTrafficLightLocations, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fSearchDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fPhaseOffset, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.vJunctionMin, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.vJunctionMax, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float3, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.vJunctionNodePositions, PsoDataType.Array, 64, 2, (MetaName)524297), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1057820426), - new PsoStructureEntryInfo(MetaName.Entrances, PsoDataType.Array, 192, 2, (MetaName)1048587), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)38018516), - new PsoStructureEntryInfo(MetaName.PhaseTimings, PsoDataType.Array, 960, 2, (MetaName)1048589), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2279781599), - new PsoStructureEntryInfo(MetaName.TrafficLightLocations, PsoDataType.Array, 1088, 2, (MetaName)524303) - ); - case (MetaName)1057820426: - return new PsoStructureInfo((MetaName)1057820426, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.vNodePosition, PsoDataType.Float3, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iPhase, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fStoppingDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fOrientation, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fAngleFromCenter, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.bCanTurnRightOnRedLight, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo(MetaName.bLeftLaneIsAheadOnly, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.bRightLaneIsRightOnly, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo(MetaName.iLeftFilterLanePhase, PsoDataType.SInt, 36, 0, 0) - ); - case (MetaName)38018516: - return new PsoStructureInfo((MetaName)38018516, 0, 0, 8, - new PsoStructureEntryInfo(MetaName.fStartTime, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fDuration, PsoDataType.Float, 4, 0, 0) - ); - case (MetaName)2279781599: - return new PsoStructureInfo((MetaName)2279781599, 0, 0, 6, - new PsoStructureEntryInfo(MetaName.iPosX, PsoDataType.SShort, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iPosY, PsoDataType.SShort, 2, 0, 0), - new PsoStructureEntryInfo(MetaName.iPosZ, PsoDataType.SShort, 4, 0, 0) - ); - case (MetaName)2111264667: - return new PsoStructureInfo((MetaName)2111264667, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.vLocation, PsoDataType.Float3a, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fCycleOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fCycleDuration, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CVehicleModelInfoVarGlobal: //carcols.ymt root - return new PsoStructureInfo(MetaName.CVehicleModelInfoVarGlobal, 0, 0, 392, - new PsoStructureEntryInfo(MetaName.VehiclePlates, PsoDataType.Structure, 8, 0, (MetaName)465922034), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModelColor), - new PsoStructureEntryInfo(MetaName.Colors, PsoDataType.Array, 48, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleMetallicSetting), - new PsoStructureEntryInfo(MetaName.MetallicSettings, PsoDataType.Array, 64, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWindowColor), - new PsoStructureEntryInfo(MetaName.WindowColors, PsoDataType.Array, 80, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.vehicleLightSettings), - new PsoStructureEntryInfo(MetaName.Lights, PsoDataType.Array, 96, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenSettings), - new PsoStructureEntryInfo(MetaName.Sirens, PsoDataType.Array, 112, 0, (MetaName)9), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleKit), - new PsoStructureEntryInfo(MetaName.Kits, PsoDataType.Array, 128, 0, (MetaName)11), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWheel), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Array, 0, 0, (MetaName)13), - new PsoStructureEntryInfo(MetaName.Wheels, PsoDataType.Array, 144, 4, (MetaName)851982), - new PsoStructureEntryInfo(MetaName.GlobalVariationData, PsoDataType.Structure, 352, 0, (MetaName)3062246906), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleXenonLightColor), - new PsoStructureEntryInfo(MetaName.XenonLightColors, PsoDataType.Array, 376, 0, (MetaName)MetaTypeName.BYTE) - ); - case (MetaName)465922034: //CVehicleModelInfoVarGlobal VehiclePlates - return new PsoStructureInfo((MetaName)465922034, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3027500557), - new PsoStructureEntryInfo(MetaName.Textures, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTexureIndex, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.NumericOffset, PsoDataType.UByte, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AlphabeticOffset, PsoDataType.UByte, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.SpaceOffset, PsoDataType.UByte, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.RandomCharOffset, PsoDataType.UByte, 31, 0, 0), - new PsoStructureEntryInfo(MetaName.NumRandomChar, PsoDataType.UByte, 32, 0, 0) - ); - case (MetaName)3027500557: //CVehicleModelInfoVarGlobal VehiclePlates Texture - return new PsoStructureInfo((MetaName)3027500557, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.TextureSetName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DiffuseMapName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.NormalMapName, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.FontExtents, PsoDataType.Float4, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLettersOnPlate, PsoDataType.Float2, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.FontColor, PsoDataType.UInt, 56, 1, 0), - new PsoStructureEntryInfo(MetaName.FontOutlineColor, PsoDataType.UInt, 60, 1, 0), - new PsoStructureEntryInfo(MetaName.IsFontOutlineEnabled, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.FontOutlineMinMaxDepth, PsoDataType.Float2, 68, 0, 0) - ); - case (MetaName)3062246906: //CVehicleModelInfoVarGlobal GlobalVariationData - return new PsoStructureInfo((MetaName)3062246906, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.xenonLightColor, PsoDataType.UInt, 8, 1, 0), - new PsoStructureEntryInfo(MetaName.xenonCoronaColor, PsoDataType.UInt, 12, 1, 0), - new PsoStructureEntryInfo(MetaName.xenonLightIntensityModifier, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.xenonCoronaIntensityModifier, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CVehicleXenonLightColor: //CVehicleModelInfoVarGlobal XenonLightColors - return new PsoStructureInfo(MetaName.CVehicleXenonLightColor, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.lightColor, PsoDataType.UInt, 8, 1, 0), - new PsoStructureEntryInfo(MetaName.coronaColor, PsoDataType.UInt, 12, 1, 0), - new PsoStructureEntryInfo(MetaName.lightIntensityModifier, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.coronaIntensityModifier, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CVehicleModelColor: //CVehicleModelInfoVarGlobal Colors - return new PsoStructureInfo(MetaName.CVehicleModelColor, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0), - new PsoStructureEntryInfo(MetaName.metallicID, PsoDataType.Enum, 12, 2, (MetaName)360458334), - new PsoStructureEntryInfo(MetaName.audioColor, PsoDataType.Enum, 13, 2, (MetaName)544262540), - new PsoStructureEntryInfo(MetaName.audioPrefix, PsoDataType.Enum, 14, 2, (MetaName)2065815796), - new PsoStructureEntryInfo(MetaName.audioColorHash, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.audioPrefixHash, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.colorName, PsoDataType.String, 24, 1, 0) - ); - case MetaName.CVehicleMetallicSetting: //CVehicleModelInfoVarGlobal MetallicSettings - return new PsoStructureInfo(MetaName.CVehicleMetallicSetting, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.specInt, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.specFalloff, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.specFresnel, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CVehicleWindowColor: //CVehicleModelInfoVarGlobal WindowColors - return new PsoStructureInfo(MetaName.CVehicleWindowColor, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 12, 7, 0) - ); - case MetaName.vehicleLightSettings: //CVehicleModelInfoVarGlobal Lights - return new PsoStructureInfo(MetaName.vehicleLightSettings, 0, 0, 552, - new PsoStructureEntryInfo(MetaName.id, PsoDataType.UByte, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.indicator, PsoDataType.Structure, 16, 0, MetaName.vehicleLight), - new PsoStructureEntryInfo(MetaName.rearIndicatorCorona, PsoDataType.Structure, 64, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.frontIndicatorCorona, PsoDataType.Structure, 120, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.tailLight, PsoDataType.Structure, 176, 0, MetaName.vehicleLight), - new PsoStructureEntryInfo(MetaName.tailLightCorona, PsoDataType.Structure, 224, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.tailLightMiddleCorona, PsoDataType.Structure, 280, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.headLight, PsoDataType.Structure, 336, 0, MetaName.vehicleLight), - new PsoStructureEntryInfo(MetaName.headLightCorona, PsoDataType.Structure, 384, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.reversingLight, PsoDataType.Structure, 440, 0, MetaName.vehicleLight), - new PsoStructureEntryInfo(MetaName.reversingLightCorona, PsoDataType.Structure, 488, 0, MetaName.vehicleCorona), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 544, 1, 0) - ); - case MetaName.vehicleLight: //CVehicleModelInfoVarGlobal Lights Light info - return new PsoStructureInfo(MetaName.vehicleLight, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.falloffMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.falloffExponent, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.innerConeAngle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.outerConeAngle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.emmissiveBoost, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 32, 1, 0), - new PsoStructureEntryInfo(MetaName.textureName, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.mirrorTexture, PsoDataType.Bool, 40, 0, 0) - ); - case MetaName.vehicleCorona: //CVehicleModelInfoVarGlobal Lights Corona info - return new PsoStructureInfo(MetaName.vehicleCorona, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.size, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.size_far, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.intensity_far, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 24, 1, 0), - new PsoStructureEntryInfo(MetaName.numCoronas, PsoDataType.UByte, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.distBetweenCoronas, PsoDataType.UByte, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.distBetweenCoronas_far, PsoDataType.UByte, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.xRotation, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.yRotation, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.zRotation, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.zBias, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.pullCoronaIn, PsoDataType.Bool, 48, 0, 0) - ); - case MetaName.sirenSettings: - return new PsoStructureInfo(MetaName.sirenSettings, 0, 0, 2376, - new PsoStructureEntryInfo(MetaName.id, PsoDataType.UByte, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 16, 1, 0), - new PsoStructureEntryInfo(MetaName.timeMultiplier, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.lightFalloffMax, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.lightFalloffExponent, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.lightInnerConeAngle, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.lightOuterConeAngle, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.lightOffset, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.textureName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.sequencerBpm, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.leftHeadLight, PsoDataType.Structure, 56, 0, (MetaName)188820339), - new PsoStructureEntryInfo(MetaName.rightHeadLight, PsoDataType.Structure, 72, 0, (MetaName)188820339), - new PsoStructureEntryInfo(MetaName.leftTailLight, PsoDataType.Structure, 88, 0, (MetaName)188820339), - new PsoStructureEntryInfo(MetaName.rightTailLight, PsoDataType.Structure, 104, 0, (MetaName)188820339), - new PsoStructureEntryInfo(MetaName.leftHeadLightMultiples, PsoDataType.UByte, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.rightHeadLightMultiples, PsoDataType.UByte, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.leftTailLightMultiples, PsoDataType.UByte, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.rightTailLightMultiples, PsoDataType.UByte, 123, 0, 0), - new PsoStructureEntryInfo(MetaName.useRealLights, PsoDataType.Bool, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenLight), - new PsoStructureEntryInfo(MetaName.sirens, PsoDataType.Array, 128, 1, (MetaName)1310739) - ); - case (MetaName)188820339: - return new PsoStructureInfo((MetaName)188820339, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.sequencer, PsoDataType.UInt, 8, 0, 0) - ); - case MetaName.sirenLight: - return new PsoStructureInfo(MetaName.sirenLight, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Structure, 8, 0, (MetaName)1356743507), - new PsoStructureEntryInfo(MetaName.flashiness, PsoDataType.Structure, 40, 0, (MetaName)1356743507), - new PsoStructureEntryInfo(MetaName.corona, PsoDataType.Structure, 72, 0, MetaName.sirenCorona), - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 96, 1, 0), - new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.lightGroup, PsoDataType.UByte, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.rotate, PsoDataType.Bool, 105, 0, 0), - new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Bool, 106, 0, 0), - new PsoStructureEntryInfo(MetaName.scaleFactor, PsoDataType.UByte, 107, 0, 0), - new PsoStructureEntryInfo(MetaName.flash, PsoDataType.Bool, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.light, PsoDataType.Bool, 109, 0, 0), - new PsoStructureEntryInfo(MetaName.spotLight, PsoDataType.Bool, 110, 0, 0), - new PsoStructureEntryInfo(MetaName.castShadows, PsoDataType.Bool, 111, 0, 0) - ); - case (MetaName)1356743507: - return new PsoStructureInfo((MetaName)1356743507, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.delta, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.start, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.speed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.sequencer, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.multiples, PsoDataType.UByte, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.syncToBpm, PsoDataType.Bool, 26, 0, 0) - ); - case MetaName.sirenCorona: - return new PsoStructureInfo(MetaName.sirenCorona, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.size, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.pull, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.faceCamera, PsoDataType.Bool, 20, 0, 0) - ); - case MetaName.CVehicleKit: - return new PsoStructureInfo(MetaName.CVehicleKit, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.kitName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.id, PsoDataType.UShort, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.kitType, PsoDataType.Enum, 16, 0, MetaName.eModKitType), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModVisible), - new PsoStructureEntryInfo(MetaName.visibleMods, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModLink), - new PsoStructureEntryInfo(MetaName.linkMods, PsoDataType.Array, 40, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModStat), - new PsoStructureEntryInfo(MetaName.statMods, PsoDataType.Array, 56, 0, (MetaName)7), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)427606548), - new PsoStructureEntryInfo(MetaName.slotNames, PsoDataType.Array, 72, 0, (MetaName)9), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.liveryNames, PsoDataType.Array, 88, 0, (MetaName)11), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.livery2Names, PsoDataType.Array, 104, 0, (MetaName)13) - ); - case MetaName.CVehicleModStat: - return new PsoStructureInfo(MetaName.CVehicleModStat, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.identifier, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.modifier, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.audioApply, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.weight, PsoDataType.UByte, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.type, PsoDataType.Enum, 24, 0, MetaName.eVehicleModType) - ); - case MetaName.CVehicleModVisible: - return new PsoStructureInfo(MetaName.CVehicleModVisible, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.modShopLabel, PsoDataType.String, 16, 2, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.linkedModels, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3635907608), - new PsoStructureEntryInfo(MetaName.turnOffBones, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo(MetaName.type, PsoDataType.Enum, 56, 0, MetaName.eVehicleModType), - new PsoStructureEntryInfo(MetaName.bone, PsoDataType.Enum, 60, 0, (MetaName)3635907608), - new PsoStructureEntryInfo(MetaName.collisionBone, PsoDataType.Enum, 64, 0, (MetaName)3635907608), - new PsoStructureEntryInfo(MetaName.cameraPos, PsoDataType.Enum, 68, 0, MetaName.eVehicleModCameraPos), - new PsoStructureEntryInfo(MetaName.audioApply, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.weight, PsoDataType.UByte, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.turnOffExtra, PsoDataType.Bool, 77, 0, 0), - new PsoStructureEntryInfo(MetaName.disableBonnetCamera, PsoDataType.Bool, 78, 0, 0), - new PsoStructureEntryInfo(MetaName.allowBonnetSlide, PsoDataType.Bool, 79, 0, 0), - new PsoStructureEntryInfo(MetaName.weaponSlot, PsoDataType.SByte, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.weaponSlotSecondary, PsoDataType.SByte, 81, 0, 0), - new PsoStructureEntryInfo(MetaName.disableProjectileDriveby, PsoDataType.Bool, 82, 0, 0), - new PsoStructureEntryInfo(MetaName.disableDriveby, PsoDataType.Bool, 83, 0, 0), - new PsoStructureEntryInfo(MetaName.disableDrivebySeat, PsoDataType.SInt, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.disableDrivebySeatSecondary, PsoDataType.SInt, 88, 0, 0) - ); - case (MetaName)427606548: - return new PsoStructureInfo((MetaName)427606548, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.slot, PsoDataType.Enum, 8, 0, MetaName.eVehicleModType), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 16, 2, 0) - ); - case MetaName.CVehicleModLink: - return new PsoStructureInfo(MetaName.CVehicleModLink, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.bone, PsoDataType.Enum, 12, 0, (MetaName)3635907608), - new PsoStructureEntryInfo(MetaName.turnOffExtra, PsoDataType.Bool, 16, 0, 0) - ); - case MetaName.CVehicleWheel: - return new PsoStructureInfo(MetaName.CVehicleWheel, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.wheelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.wheelVariation, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.modShopLabel, PsoDataType.String, 16, 2, 0), - new PsoStructureEntryInfo(MetaName.rimRadius, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.rear, PsoDataType.Bool, 28, 0, 0) - ); - case MetaName.CVehicleModColors: //carmodcols.ymt root - return new PsoStructureInfo(MetaName.CVehicleModColors, 0, 0, 128, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.metallic, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.classic, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.matte, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.metals, PsoDataType.Array, 56, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.chrome, PsoDataType.Array, 72, 0, (MetaName)8), - new PsoStructureEntryInfo(MetaName.pearlescent, PsoDataType.Structure, 88, 0, MetaName.CVehicleModPearlescentColors) - ); - case MetaName.CVehicleModPearlescentColors: - return new PsoStructureInfo(MetaName.CVehicleModPearlescentColors, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.baseCols, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), - new PsoStructureEntryInfo(MetaName.specCols, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case MetaName.CVehicleModColor: - return new PsoStructureInfo(MetaName.CVehicleModColor, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.col, PsoDataType.UByte, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.spec, PsoDataType.UByte, 17, 0, 0) - ); - case MetaName.CVehicleModelInfoVariation: //carvariations.ymt root - return new PsoStructureInfo(MetaName.CVehicleModelInfoVariation, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)418053801), - new PsoStructureEntryInfo(MetaName.variationData, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)418053801: //CVehicleModelInfoVariation variationData - return new PsoStructureInfo((MetaName)418053801, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 1, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2575850962), - new PsoStructureEntryInfo(MetaName.colors, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.kits, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.windowsWithExposedEdges, PsoDataType.Array, 48, 0, (MetaName)5), - new PsoStructureEntryInfo(MetaName.plateProbabilities, PsoDataType.Structure, 64, 0, MetaName.PlateProbabilities), - new PsoStructureEntryInfo(MetaName.lightSettings, PsoDataType.UByte, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.sirenSettings, PsoDataType.UByte, 89, 0, 0) - ); - case (MetaName)2575850962: //CVehicleModelInfoVariation variationData colors - return new PsoStructureInfo((MetaName)2575850962, 0, 0, 44 /*40*/, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.indices, PsoDataType.Array, 8, 4, (MetaName)393216 /*262144*/), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Bool, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.liveries, PsoDataType.Array, 14 /*12*/, 4, (MetaName)1966082 /*1638402*/) - ); - case MetaName.PlateProbabilities: - return new PsoStructureInfo(MetaName.PlateProbabilities, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)938618322), - new PsoStructureEntryInfo(MetaName.Probabilities, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)938618322: - return new PsoStructureInfo((MetaName)938618322, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.UInt, 12, 0, 0) - ); - case MetaName.CCreditArray: //credits.ymt root - return new PsoStructureInfo(MetaName.CCreditArray, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCreditItem), - new PsoStructureEntryInfo(MetaName.CreditItems, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.CCreditItem: - return new PsoStructureInfo(MetaName.CCreditItem, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.LineType, PsoDataType.Enum, 8, 0, (MetaName)1795685103), - new PsoStructureEntryInfo(MetaName.cTextId1, PsoDataType.String, 16, 3, 0), - new PsoStructureEntryInfo(MetaName.cTextId2, PsoDataType.String, 32, 3, 0) - ); - case MetaName.CDataFileMgr__ContentsOfDataFileXml: - return new PsoStructureInfo(MetaName.CDataFileMgr__ContentsOfDataFileXml, 0, 0, 120, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.disabledFiles, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__DataFileArray), - new PsoStructureEntryInfo(MetaName.includedXmlFiles, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.includedDataFiles, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__DataFile), - new PsoStructureEntryInfo(MetaName.dataFiles, PsoDataType.Array, 56, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ContentChangeSet), - new PsoStructureEntryInfo(MetaName.contentChangeSets, PsoDataType.Array, 72, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.patchFiles, PsoDataType.Array, 88, 0, (MetaName)10), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.allowedFolders, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER) - ); - case MetaName.CDataFileMgr__DataFile: - return new PsoStructureInfo(MetaName.CDataFileMgr__DataFile, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.filename, PsoDataType.String, 8, 0, (MetaName)8388608), - new PsoStructureEntryInfo(MetaName.fileType, PsoDataType.Enum, 136, 0, MetaName.DataFileType), - new PsoStructureEntryInfo(MetaName.registerAs, PsoDataType.String, 144, 3, 0), - new PsoStructureEntryInfo(MetaName.locked, PsoDataType.Bool, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.loadCompletely, PsoDataType.Bool, 161, 0, 0), - new PsoStructureEntryInfo(MetaName.overlay, PsoDataType.Bool, 162, 0, 0), - new PsoStructureEntryInfo(MetaName.patchFile, PsoDataType.Bool, 163, 0, 0), - new PsoStructureEntryInfo(MetaName.disabled, PsoDataType.Bool, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.persistent, PsoDataType.Bool, 165, 0, 0), - new PsoStructureEntryInfo(MetaName.enforceLsnSorting, PsoDataType.Bool, 166, 0, 0), - new PsoStructureEntryInfo(MetaName.contents, PsoDataType.Enum, 168, 0, MetaName.DataFileContents), - new PsoStructureEntryInfo(MetaName.installPartition, PsoDataType.Enum, 172, 0, MetaName.InstallPartition) - ); - case MetaName.CLevelData: //levels.ymt root - return new PsoStructureInfo(MetaName.CLevelData, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sLevelData), - new PsoStructureEntryInfo(MetaName.aLevelsData, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.sLevelData: - return new PsoStructureInfo(MetaName.sLevelData, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.cFriendlyName, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo(MetaName.cTitle, PsoDataType.String, 24, 3, 0), - new PsoStructureEntryInfo(MetaName.cFilename, PsoDataType.String, 40, 3, 0), - new PsoStructureEntryInfo(MetaName.cBugstarName, PsoDataType.String, 56, 3, 0) - ); - case (MetaName)1056751197: //mapdatacullboxes.ymt root - return new PsoStructureInfo((MetaName)1056751197, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)322201475), - new PsoStructureEntryInfo(MetaName.entries, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)322201475: - return new PsoStructureInfo((MetaName)322201475, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.aabb, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)4022397219, PsoDataType.Array, 48, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.bEnabled, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.rage__spdAABB: - return new PsoStructureInfo(MetaName.rage__spdAABB, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.min, PsoDataType.Float4a, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.max, PsoDataType.Float4a, 16, 0, 0) - ); - case MetaName.CPedModelInfo__InitDataList: - return new PsoStructureInfo(MetaName.CPedModelInfo__InitDataList, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.residentTxd, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.residentAnims, PsoDataType.Array, 24, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedModelInfo__InitData), - new PsoStructureEntryInfo(MetaName.InitDatas, PsoDataType.Array, 40, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTxdRelationship), - new PsoStructureEntryInfo(MetaName.txdRelationships, PsoDataType.Array, 56, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CMultiTxdRelationship), - new PsoStructureEntryInfo(MetaName.multiTxdRelationships, PsoDataType.Array, 72, 0, (MetaName)7) - ); - case MetaName.CPedModelInfo__InitData: - return new PsoStructureInfo(MetaName.CPedModelInfo__InitData, 0, 0, 296, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.PropsName, PsoDataType.String, 16, 2, 0), - new PsoStructureEntryInfo(MetaName.ClipDictionaryName, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.BlendShapeFileName, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo(MetaName.ExpressionSetName, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.ExpressionDictionaryName, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.ExpressionName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.Pedtype, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.MovementClipSet, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.MovementClipSets, PsoDataType.Array, 56, 0, (MetaName)9), - new PsoStructureEntryInfo(MetaName.StrafeClipSet, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.MovementToStrafeClipSet, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo(MetaName.InjuredStrafeClipSet, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo(MetaName.FullBodyDamageClipSet, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.AdditiveDamageClipSet, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultGestureClipSet, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo(MetaName.FacialClipsetGroupName, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultVisemeClipSet, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo(MetaName.SidestepClipSet, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo(MetaName.PoseMatcherName, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.PoseMatcherProneName, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo(MetaName.GetupSetHash, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.CreatureMetadataName, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo(MetaName.DecisionMakerName, PsoDataType.String, 124, 7, 0), - new PsoStructureEntryInfo(MetaName.MotionTaskDataSetName, PsoDataType.String, 128, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultTaskDataSetName, PsoDataType.String, 132, 7, 0), - new PsoStructureEntryInfo(MetaName.PedCapsuleName, PsoDataType.String, 136, 7, 0), - new PsoStructureEntryInfo(MetaName.PedLayoutName, PsoDataType.String, 140, 7, 0), - new PsoStructureEntryInfo(MetaName.PedComponentSetName, PsoDataType.String, 144, 7, 0), - new PsoStructureEntryInfo(MetaName.PedComponentClothName, PsoDataType.String, 148, 7, 0), - new PsoStructureEntryInfo(MetaName.PedIKSettingsName, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo(MetaName.TaskDataName, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo(MetaName.IsStreamedGfx, PsoDataType.Bool, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbulanceShouldRespondTo, PsoDataType.Bool, 161, 0, 0), - new PsoStructureEntryInfo(MetaName.CanRideBikeWithNoHelmet, PsoDataType.Bool, 162, 0, 0), - new PsoStructureEntryInfo(MetaName.CanSpawnInCar, PsoDataType.Bool, 163, 0, 0), - new PsoStructureEntryInfo(MetaName.IsHeadBlendPed, PsoDataType.Bool, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.bOnlyBulkyItemVariations, PsoDataType.Bool, 165, 0, 0), - new PsoStructureEntryInfo(MetaName.RelationshipGroup, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo(MetaName.NavCapabilitiesName, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo(MetaName.PerceptionInfo, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBrawlingStyle, PsoDataType.String, 180, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultUnarmedWeapon, PsoDataType.String, 184, 7, 0), - new PsoStructureEntryInfo(MetaName.Personality, PsoDataType.String, 188, 7, 0), - new PsoStructureEntryInfo(MetaName.CombatInfo, PsoDataType.String, 192, 7, 0), - new PsoStructureEntryInfo(MetaName.VfxInfoName, PsoDataType.String, 196, 7, 0), - new PsoStructureEntryInfo(MetaName.AmbientClipsForFlee, PsoDataType.String, 200, 7, 0), - new PsoStructureEntryInfo(MetaName.Radio1, PsoDataType.Enum, 204, 0, MetaName.ePedRadioGenre), - new PsoStructureEntryInfo(MetaName.Radio2, PsoDataType.Enum, 208, 0, MetaName.ePedRadioGenre), - new PsoStructureEntryInfo(MetaName.FUpOffset, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.RUpOffset, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.FFrontOffset, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.RFrontOffset, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.MinActivationImpulse, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.Stubble, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.HDDist, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetingThreatModifier, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.KilledPerceptionRangeModifer, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eSexinessFlags), - new PsoStructureEntryInfo(MetaName.Sexiness, PsoDataType.Flags, 248, 0, (MetaName)2097211), - new PsoStructureEntryInfo(MetaName.Age, PsoDataType.UByte, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPassengersInCar, PsoDataType.UByte, 253, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eExternallyDrivenDOFs), - new PsoStructureEntryInfo(MetaName.ExternallyDrivenDOFs, PsoDataType.Flags, 254, 2, (MetaName)327743), - new PsoStructureEntryInfo(MetaName.PedVoiceGroup, PsoDataType.String, 256, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimalAudioObject, PsoDataType.String, 260, 7, 0), - new PsoStructureEntryInfo(MetaName.AbilityType, PsoDataType.Enum, 264, 0, MetaName.SpecialAbilityType), - new PsoStructureEntryInfo(MetaName.ThermalBehaviour, PsoDataType.Enum, 268, 0, MetaName.ThermalBehaviour), - new PsoStructureEntryInfo(MetaName.SuperlodType, PsoDataType.Enum, 272, 0, MetaName.eSuperlodType), - new PsoStructureEntryInfo(MetaName.ScenarioPopStreamingSlot, PsoDataType.Enum, 276, 0, MetaName.eScenarioPopStreamingSlot), - new PsoStructureEntryInfo(MetaName.DefaultSpawningPreference, PsoDataType.Enum, 280, 0, MetaName.DefaultSpawnPreference), - new PsoStructureEntryInfo(MetaName.DefaultRemoveRangeMultiplier, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowCloseSpawning, PsoDataType.Bool, 288, 0, 0) - ); - case MetaName.CMultiTxdRelationship: - return new PsoStructureInfo(MetaName.CMultiTxdRelationship, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.children, PsoDataType.Array, 24, 0, (MetaName)1) - ); - case MetaName.CPlayerSpecialAbilityManager: - return new PsoStructureInfo(MetaName.CPlayerSpecialAbilityManager, 0, 0, 64, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4125685004), - new PsoStructureEntryInfo(MetaName.specialAbilities, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.smallCharge, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.mediumCharge, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.largeCharge, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.continuousCharge, PsoDataType.SInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fadeCurveType, PsoDataType.Enum, 40, 0, MetaName.eFadeCurveType), - new PsoStructureEntryInfo(MetaName.halfSigmoidConstant, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.sigmoidConstant, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fadeInTime, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fadeOutTime, PsoDataType.Float, 56, 0, 0) - ); - case (MetaName)4125685004: - return new PsoStructureInfo((MetaName)4125685004, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.duration, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.initialUnlockedCap, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.timeWarpScale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.damageMultiplier, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.defenseMultiplier, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.depletionMultiplier, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.chargeMultiplier, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fxName, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.outFxName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.activeAnimSet, PsoDataType.String, 44, 7, 0) - ); - case MetaName.CDataFileMgr__ContentChangeSet: - return new PsoStructureInfo(MetaName.CDataFileMgr__ContentChangeSet, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.changeSetName, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ChangeSetData), - new PsoStructureEntryInfo(MetaName.mapChangeSetData, PsoDataType.Array, 24, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.filesToInvalidate, PsoDataType.Array, 40, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.filesToDisable, PsoDataType.Array, 56, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.filesToEnable, PsoDataType.Array, 72, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.txdToLoad, PsoDataType.Array, 88, 0, (MetaName)9), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.txdToUnload, PsoDataType.Array, 104, 0, (MetaName)11), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ResourceReference), - new PsoStructureEntryInfo(MetaName.residentResources, PsoDataType.Array, 120, 0, (MetaName)13), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ResourceReference), - new PsoStructureEntryInfo(MetaName.unregisterResources, PsoDataType.Array, 136, 0, (MetaName)15), - new PsoStructureEntryInfo(MetaName.requiresLoadingScreen, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.executionConditions, PsoDataType.Structure, 160, 0, MetaName.ExecutionConditions) - ); - case MetaName.ExecutionConditions: - return new PsoStructureInfo(MetaName.ExecutionConditions, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.ExecutionCondition), - new PsoStructureEntryInfo(MetaName.activeChangesetConditions, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.fwClipSetManager: - return new PsoStructureInfo(MetaName.fwClipSetManager, 0, 0, 128, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.clipSets, PsoDataType.Map, 8, 1, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fwClipDictionaryMetadata), - new PsoStructureEntryInfo(MetaName.clipDictionaryMetadatas, PsoDataType.Map, 32, 1, (MetaName)196612), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fwMemoryGroupMetadata), - new PsoStructureEntryInfo(MetaName.memoryGroupMetadatas, PsoDataType.Map, 56, 1, (MetaName)393223), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3219912345), - new PsoStructureEntryInfo((MetaName)3532340754, PsoDataType.Map, 80, 1, (MetaName)589834),//memory group modifiers - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.clipVariationSets, PsoDataType.Map, 104, 1, (MetaName)786445)//move network flags dictionary - ); - case (MetaName)MetaTypeName.ARRAYINFO://default map node entry, with a structure pointer - return new PsoStructureInfo((MetaName)MetaTypeName.ARRAYINFO, 0, 2, 16, - new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 3, 0) - ); - case MetaName.fwClipSet: - return new PsoStructureInfo(MetaName.fwClipSet, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.fallbackId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.clipDictionaryName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.clipItems, PsoDataType.Map, 16, 1, (MetaName)131075), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.moveNetworkFlags, PsoDataType.Array, 40, 0, (MetaName)5) - ); - case MetaName.fwDirectedClipItemWithProps: - return new PsoStructureInfo(MetaName.fwDirectedClipItemWithProps, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eAnimPlayerFlag), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), - new PsoStructureEntryInfo(MetaName.priority, PsoDataType.Enum, 12, 0, MetaName.eAnimPriority), - new PsoStructureEntryInfo(MetaName.boneMask, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.fwClipItemWithProps: - return new PsoStructureInfo(MetaName.fwClipItemWithProps, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eAnimPlayerFlag), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), - new PsoStructureEntryInfo(MetaName.priority, PsoDataType.Enum, 12, 0, MetaName.eAnimPriority), - new PsoStructureEntryInfo(MetaName.boneMask, PsoDataType.String, 16, 7, 0) - ); - case MetaName.fwClipItem: - return new PsoStructureInfo(MetaName.fwClipItem, 0, 0, 8 //empty struct... possibly abstract/base class - ); - case MetaName.fwClipSetWithGetup: //creature/animal clip set? - return new PsoStructureInfo(MetaName.fwClipSetWithGetup, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.fallbackId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.clipDictionaryName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.clipItems, PsoDataType.Map, 16, 1, (MetaName)131075), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.moveNetworkFlags, PsoDataType.Array, 40, 0, (MetaName)5), - new PsoStructureEntryInfo(MetaName.GetupSet, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo(MetaName.DeadBlendOutSet, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo(MetaName.AllowAnimatedDeadFall, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AnimatedDeadFallSet, PsoDataType.String, 68, 7, 0) - ); - case MetaName.fwClipDictionaryMetadata: - return new PsoStructureInfo(MetaName.fwClipDictionaryMetadata, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eStreamingPolicy), - new PsoStructureEntryInfo(MetaName.streamingPolicy, PsoDataType.Flags, 8, 0, (MetaName)2097152), - new PsoStructureEntryInfo(MetaName.memoryGroup, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.streamingPriority, PsoDataType.Enum, 16, 0, MetaName.eStreamingPriority) - ); - case MetaName.fwMemoryGroupMetadata: - return new PsoStructureInfo(MetaName.fwMemoryGroupMetadata, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)676191063, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1661025772, PsoDataType.UInt, 12, 0, 0) - ); - case (MetaName)3219912345://clip sets memory group modifier? - return new PsoStructureInfo((MetaName)3219912345, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2356519750), - new PsoStructureEntryInfo(MetaName.Adjustments, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)2356519750: //clip sets memory group modifier adjustment - return new PsoStructureInfo((MetaName)2356519750, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MemoryGroup, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Amount, PsoDataType.SInt, 12, 0, 0) - ); - case MetaName.fwClipVariationSet: //clip sets move network flags list/group? - return new PsoStructureInfo(MetaName.fwClipVariationSet, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.clips, PsoDataType.Array, 8, 0, 0) - ); - //case (MetaName)257://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo - // return new PsoStructureInfo((MetaName)257, 0, 2, 32, - // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), - // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, MetaName.fwClipDictionaryMetadata) - // ); - //case (MetaName)258://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo - // return new PsoStructureInfo((MetaName)258, 0, 2, 24, - // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), - // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, MetaName.fwMemoryGroupMetadata) - // ); - //case (MetaName)259://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo - // return new PsoStructureInfo((MetaName)259, 0, 2, 32, - // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), - // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, (MetaName)3219912345) - // ); - case MetaName.AnimPostFXManager: - return new PsoStructureInfo(MetaName.AnimPostFXManager, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2319197961), - new PsoStructureEntryInfo(MetaName.RegisteredStacks, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)2319197961: - return new PsoStructureInfo((MetaName)2319197961, 0, 0, 384, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FXStack, PsoDataType.Structure, 16, 0, (MetaName)2675557154), - new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.UByte, 376, 0, 0) - ); - case (MetaName)2675557154: - return new PsoStructureInfo((MetaName)2675557154, 0, 0, 360, - new PsoStructureEntryInfo(MetaName.LayerBlend, PsoDataType.Structure, 8, 0, (MetaName)2367955297), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.AnimatedPostFX), - new PsoStructureEntryInfo(MetaName.Layers, PsoDataType.Array, 48, 1, (MetaName)393217), - new PsoStructureEntryInfo(MetaName.GroupId, PsoDataType.SInt, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)1991133938, PsoDataType.UInt, 348, 0, 0), - new PsoStructureEntryInfo((MetaName)4185090704, PsoDataType.UInt, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.EventType, PsoDataType.Enum, 356, 0, (MetaName)2168155209) - ); - case (MetaName)2367955297: - return new PsoStructureInfo((MetaName)2367955297, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.LayerA, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.LayerB, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.FrequencyNoise, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AmplitudeNoise, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.Frequency, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.Bias, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.AnimatedPostFX: - return new PsoStructureInfo(MetaName.AnimatedPostFX, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.ModifierName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimMode, PsoDataType.Enum, 12, 0, (MetaName)2476021071), - new PsoStructureEntryInfo(MetaName.StartDelayDuration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.InDuration, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HoldDuration, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.OutDuration, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.LoopMode, PsoDataType.Enum, 36, 0, (MetaName)3696221852), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 40, 0, 0) - ); - case (MetaName)1300198536: - return new PsoStructureInfo((MetaName)1300198536, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.LensArtefact), - new PsoStructureEntryInfo(MetaName.layers, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.LensArtefact: - return new PsoStructureInfo(MetaName.LensArtefact, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.blurType, PsoDataType.Enum, 12, 0, (MetaName)3261591327), - new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.offset, PsoDataType.Float2, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.colorShift, PsoDataType.UInt, 32, 1, 0), - new PsoStructureEntryInfo(MetaName.opacity, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2600565536, PsoDataType.Enum, 40, 0, (MetaName)516897642), - new PsoStructureEntryInfo((MetaName)1250212400, PsoDataType.Float2, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.streakDirection, PsoDataType.Enum, 52, 0, (MetaName)2665868448), - new PsoStructureEntryInfo(MetaName.enabled, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.sortIndex, PsoDataType.SInt, 60, 0, 0) - ); - case MetaName.CPtFxAssetInfoMgr: - return new PsoStructureInfo(MetaName.CPtFxAssetInfoMgr, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.ptfxAssetDependencyInfos, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.CPtFxAssetDependencyInfo: - return new PsoStructureInfo(MetaName.CPtFxAssetDependencyInfo, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.parentName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.childName, PsoDataType.String, 12, 7, 0) - ); - case MetaName.CVfxFogVolumeInfoMgr: - return new PsoStructureInfo(MetaName.CVfxFogVolumeInfoMgr, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxFogVolumeInfos, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.CVfxFogVolumeInfo: - return new PsoStructureInfo(MetaName.CVfxFogVolumeInfo, 0, 0, 112, - new PsoStructureEntryInfo((MetaName)4135301713, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1768347469, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.colR, PsoDataType.UByte, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.colG, PsoDataType.UByte, 65, 0, 0), - new PsoStructureEntryInfo(MetaName.colB, PsoDataType.UByte, 66, 0, 0), - new PsoStructureEntryInfo(MetaName.colA, PsoDataType.UByte, 67, 0, 0), - new PsoStructureEntryInfo(MetaName.hdrMult, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.range, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.density, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.falloff, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.interiorHash, PsoDataType.Long, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.isUnderwater, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.lightingType, PsoDataType.Enum, 100, 0, (MetaName)2628996780) - ); - case MetaName.CVfxInteriorInfoMgr: - return new PsoStructureInfo(MetaName.CVfxInteriorInfoMgr, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxInteriorSetups, PsoDataType.Map, 8, 1, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxInteriorInfos, PsoDataType.Map, 32, 1, (MetaName)196612) - ); - case MetaName.CVfxInteriorSetup: - return new PsoStructureInfo(MetaName.CVfxInteriorSetup, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.interiorInfoName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxRoomSetups, PsoDataType.Map, 16, 1, (MetaName)65538) - ); - case MetaName.CVfxRoomSetup: - return new PsoStructureInfo(MetaName.CVfxRoomSetup, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.interiorInfoName, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CVfxInteriorInfo: - return new PsoStructureInfo(MetaName.CVfxInteriorInfo, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.smokePtFxEnabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.smokePtFxName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.smokePtFxLevelOverride, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.dustPtFxEnabled, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.dustPtFxName, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.dustPtFxEvo, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CVfxPedInfoMgr: - return new PsoStructureInfo(MetaName.CVfxPedInfoMgr, 0, 0, 224, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)1639857157, PsoDataType.Map, 8, 1, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)190681942, PsoDataType.Map, 32, 1, (MetaName)196612), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)866013965, PsoDataType.Map, 56, 1, (MetaName)393223), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)619497315, PsoDataType.Map, 80, 1, (MetaName)589834), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)1719780883, PsoDataType.Map, 104, 1, (MetaName)786445), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)2436902422, PsoDataType.Map, 128, 1, (MetaName)983056), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)670699231, PsoDataType.Map, 152, 1, (MetaName)1179667), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)161646760, PsoDataType.Map, 176, 1, (MetaName)1376278), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxPedInfos, PsoDataType.Map, 200, 1, (MetaName)1572889) - ); - case (MetaName)3745427162: - return new PsoStructureInfo((MetaName)3745427162, 0, 0, 104, - new PsoStructureEntryInfo((MetaName)2328909272, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3928010395, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)1667415425, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3934831401, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2811575072, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3485910056, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)924601972, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2748666322, PsoDataType.SInt, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2717336085, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)383606187, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1201928922, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2683338794, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)244388834, PsoDataType.SInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3603110778, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1531021558, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1193506380, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)1561972343, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)2527519128, PsoDataType.SInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.decalWidth, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.decalLength, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)1369041264, PsoDataType.UByte, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1201263928, PsoDataType.UByte, 89, 0, 0), - new PsoStructureEntryInfo((MetaName)1596752989, PsoDataType.UByte, 90, 0, 0), - new PsoStructureEntryInfo((MetaName)2768457985, PsoDataType.UByte, 91, 0, 0), - new PsoStructureEntryInfo((MetaName)1822646338, PsoDataType.UByte, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)2318441304, PsoDataType.UByte, 93, 0, 0), - new PsoStructureEntryInfo(MetaName.decalLife, PsoDataType.Float, 96, 0, 0) - ); - case (MetaName)1299390333: - return new PsoStructureInfo((MetaName)1299390333, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)634726437, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)1754146930, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)4279228573, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxScale, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2425920550: - return new PsoStructureInfo((MetaName)2425920550, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)3741812782, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2206302043, PsoDataType.String, 12, 7, 0) - ); - case (MetaName)1811001251: - return new PsoStructureInfo((MetaName)1811001251, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.decalId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3806811108, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)3913505542, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3041920342, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2666183704, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1369041264, PsoDataType.UByte, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1201263928, PsoDataType.UByte, 29, 0, 0), - new PsoStructureEntryInfo((MetaName)1596752989, PsoDataType.UByte, 30, 0, 0) - ); - case (MetaName)1559486096: - return new PsoStructureInfo((MetaName)1559486096, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ptFxDepthEvoMin, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxDepthEvoMax, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxSpeedEvoMin, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxSpeedEvoMax, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)4188307664: - return new PsoStructureInfo((MetaName)4188307664, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)3741812782, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2206302043, PsoDataType.String, 12, 7, 0) - ); - case (MetaName)1073939452: - return new PsoStructureInfo((MetaName)1073939452, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.sizeEvo, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.depthMult, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.speedMult, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.widthRatio, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2217981082: - return new PsoStructureInfo((MetaName)2217981082, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.sampleSize, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.boneSize, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2990477260, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxEnabled, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxEnabled, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxEnabled, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxEnabled, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2545172352, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxRange, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxRange, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxRange, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxRange, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1146082049, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CVfxPedInfo: - return new PsoStructureInfo(MetaName.CVfxPedInfo, 0, 0, 512, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)231867887), - new PsoStructureEntryInfo((MetaName)293516458, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1904273735), - new PsoStructureEntryInfo((MetaName)4005470263, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)1938733863, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2108095349, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)898188953, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)815580680, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)728045365, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1340027467, PsoDataType.Bool, 57, 0, 0), - new PsoStructureEntryInfo((MetaName)1185708987, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)3067401171, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)267862759, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)481653295, PsoDataType.Bool, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3695423274, PsoDataType.Bool, 73, 0, 0), - new PsoStructureEntryInfo((MetaName)1954970508, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1273209835, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)1481826432, PsoDataType.Bool, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)1210003497, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)3343556845, PsoDataType.Bool, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)300193613, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)2234775971, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)2648212357, PsoDataType.Bool, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)2189031336, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)1537566823, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)2106749959, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)621919678, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)1944160314, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)537443923, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1293634249, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)1694886060, PsoDataType.Bool, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3575961872, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)423449081, PsoDataType.String, 144, 7, 0), - new PsoStructureEntryInfo((MetaName)4063560113, PsoDataType.Bool, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1810355587), - new PsoStructureEntryInfo((MetaName)1379225165, PsoDataType.Array, 152, 0, (MetaName)34), - new PsoStructureEntryInfo((MetaName)2002559884, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)717291862, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)606684208, PsoDataType.Bool, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)2292742472, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1437576219, PsoDataType.String, 184, 7, 0), - new PsoStructureEntryInfo((MetaName)3754033729, PsoDataType.Enum, 188, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)1020967481, PsoDataType.Enum, 192, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)2592389483, PsoDataType.Bool, 196, 0, 0), - new PsoStructureEntryInfo((MetaName)4054422403, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo((MetaName)740137113, PsoDataType.String, 204, 7, 0), - new PsoStructureEntryInfo((MetaName)1841095686, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)886073686, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo((MetaName)1055815172, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo((MetaName)2913384203, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo((MetaName)3977079346, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo((MetaName)3136327436, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo((MetaName)2168759960, PsoDataType.Bool, 232, 0, 0), - new PsoStructureEntryInfo((MetaName)2723487263, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo((MetaName)1349459576, PsoDataType.String, 240, 7, 0), - new PsoStructureEntryInfo((MetaName)2366514623, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo((MetaName)194784077, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo((MetaName)1052325933, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo((MetaName)2774545125, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo((MetaName)431439807, PsoDataType.Bool, 260, 0, 0), - new PsoStructureEntryInfo((MetaName)2591692617, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo((MetaName)2631634259, PsoDataType.String, 268, 7, 0), - new PsoStructureEntryInfo((MetaName)3959299203, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)2821295083, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo((MetaName)3995586056, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo((MetaName)3353201139, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo((MetaName)412619038, PsoDataType.Bool, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)1889989706, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo((MetaName)3972116805, PsoDataType.Bool, 296, 0, 0), - new PsoStructureEntryInfo((MetaName)4143286255, PsoDataType.String, 300, 7, 0), - new PsoStructureEntryInfo((MetaName)30217815, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)1079949132, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo((MetaName)4224134658, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)901763385, PsoDataType.Bool, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)3950900138, PsoDataType.String, 320, 7, 0), - new PsoStructureEntryInfo((MetaName)10501246, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo((MetaName)4131076032, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo((MetaName)1327278534, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxName, PsoDataType.String, 336, 7, 0), - new PsoStructureEntryInfo((MetaName)374673880, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo((MetaName)1335117116, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)4258146773, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxName, PsoDataType.String, 352, 7, 0), - new PsoStructureEntryInfo((MetaName)4020845257, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)1518647754, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxName, PsoDataType.String, 364, 7, 0), - new PsoStructureEntryInfo((MetaName)4021444798, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)2149475580, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxName, PsoDataType.String, 376, 7, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMin, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMax, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo((MetaName)4096431642, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo((MetaName)415880732, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo((MetaName)3919360765, PsoDataType.String, 396, 7, 0), - new PsoStructureEntryInfo((MetaName)3723675330, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo((MetaName)3295859425, PsoDataType.Bool, 404, 0, 0), - new PsoStructureEntryInfo((MetaName)1659367240, PsoDataType.String, 408, 7, 0), - new PsoStructureEntryInfo((MetaName)2238873027, PsoDataType.String, 412, 7, 0), - new PsoStructureEntryInfo((MetaName)3354804163, PsoDataType.String, 416, 7, 0), - new PsoStructureEntryInfo((MetaName)1800302370, PsoDataType.String, 420, 7, 0), - new PsoStructureEntryInfo((MetaName)2345868328, PsoDataType.String, 424, 7, 0), - new PsoStructureEntryInfo((MetaName)2719523535, PsoDataType.Float, 428, 0, 0), - new PsoStructureEntryInfo((MetaName)460277230, PsoDataType.Float, 432, 0, 0), - new PsoStructureEntryInfo((MetaName)4222549442, PsoDataType.Float, 436, 0, 0), - new PsoStructureEntryInfo((MetaName)2205812843, PsoDataType.Bool, 440, 0, 0), - new PsoStructureEntryInfo((MetaName)2543787987, PsoDataType.Float, 444, 0, 0), - new PsoStructureEntryInfo((MetaName)789559375, PsoDataType.String, 448, 7, 0), - new PsoStructureEntryInfo((MetaName)610648776, PsoDataType.Enum, 452, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)2321865573, PsoDataType.Bool, 456, 0, 0), - new PsoStructureEntryInfo((MetaName)3482316648, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo((MetaName)3414327374, PsoDataType.String, 464, 7, 0), - new PsoStructureEntryInfo((MetaName)3991249477, PsoDataType.Enum, 468, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)3633780286, PsoDataType.Bool, 472, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3663974917), - new PsoStructureEntryInfo((MetaName)1614411627, PsoDataType.Array, 480, 0, (MetaName)113), - new PsoStructureEntryInfo((MetaName)2158250314, PsoDataType.Bool, 496, 0, 0), - new PsoStructureEntryInfo((MetaName)2801240542, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo((MetaName)1702406422, PsoDataType.String, 504, 7, 0) - ); - case (MetaName)231867887: - return new PsoStructureInfo((MetaName)231867887, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.vfxGroup, PsoDataType.Enum, 8, 0, MetaName.eVfxGroup), - new PsoStructureEntryInfo((MetaName)3557178741, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)3535009775, PsoDataType.String, 16, 7, 0) - ); - case (MetaName)1904273735: - return new PsoStructureInfo((MetaName)1904273735, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 8, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo(MetaName.limbId, PsoDataType.Enum, 16, 0, (MetaName)726948528), - new PsoStructureEntryInfo((MetaName)1061041502, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo((MetaName)2989606868, PsoDataType.String, 24, 7, 0) - ); - case (MetaName)1810355587: - return new PsoStructureInfo((MetaName)1810355587, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 16, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo(MetaName.limbId, PsoDataType.SInt, 20, 0, 0) - ); - case (MetaName)3663974917: - return new PsoStructureInfo((MetaName)3663974917, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), - new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 16, 0, MetaName.eAnimBoneTag) - ); - case MetaName.CVfxRegionInfoMgr: - return new PsoStructureInfo(MetaName.CVfxRegionInfoMgr, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxRegionInfos, PsoDataType.Map, 8, 1, (MetaName)1) - ); - case MetaName.CVfxRegionInfo: - return new PsoStructureInfo(MetaName.CVfxRegionInfo, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.windDebrisPtFxEnabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.windDebrisPtFxName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), - new PsoStructureEntryInfo((MetaName)157134441, PsoDataType.Array, 16, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), - new PsoStructureEntryInfo((MetaName)2975635968, PsoDataType.Array, 32, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), - new PsoStructureEntryInfo((MetaName)3751751493, PsoDataType.Array, 48, 0, (MetaName)6) - ); - case (MetaName)215011533: - return new PsoStructureInfo((MetaName)215011533, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.gpuPtFxEnabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)28713766, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)3099312282, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3614737265, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2437695423, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1775217766, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1202806570, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)4204794351, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)634319578, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)552536380, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CVfxVehicleInfoMgr: - return new PsoStructureInfo(MetaName.CVfxVehicleInfoMgr, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.vfxVehicleInfos, PsoDataType.Map, 8, 1, (MetaName)1) - ); - case MetaName.CVfxVehicleInfo: - return new PsoStructureInfo(MetaName.CVfxVehicleInfo, 0, 0, 880, - new PsoStructureEntryInfo(MetaName.mtlBangPtFxVehicleEvo, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.mtlBangPtFxVehicleScale, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.mtlScrapePtFxVehicleEvo, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.mtlScrapePtFxVehicleScale, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxEnabled, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxName, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxCutOffSpeed, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxRange, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxScale, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxSpeedEvoMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxSpeedEvoMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxTempEvoMin, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxTempEvoMax, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.exhaustPtFxThrottleEvoOnGearChange, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.engineStartupPtFxEnabled, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.engineStartupPtFxName, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.engineStartupPtFxRange, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.misfirePtFxEnabled, PsoDataType.Bool, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.misfirePtFxName, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo(MetaName.misfirePtFxRange, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.backfirePtFxEnabled, PsoDataType.Bool, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.backfirePtFxName, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo(MetaName.backfirePtFxRange, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxEnabled, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxHasPanel, PsoDataType.Bool, 97, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxHasRotorEvo, PsoDataType.Bool, 98, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxNoPanelName, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxPanelOpenName, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxPanelShutName, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxRange, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxSpeedEvoMin, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.engineDamagePtFxSpeedEvoMax, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxEnabled, PsoDataType.Bool, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxName, PsoDataType.String, 128, 7, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxRange, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxAngleThresh, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxSpeedThresh, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxEngineHealthThresh, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxEnabled, PsoDataType.Bool, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxOilName, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxPetrolName, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxRange, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxSpeedEvoMin, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.leakPtFxSpeedEvoMax, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelGenericPtFxSet, PsoDataType.SInt, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelGenericDecalSet, PsoDataType.SInt, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelGenericRangeMult, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelSkidmarkRearOnly, PsoDataType.Bool, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelSkidmarkSlipMult, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelSkidmarkPressureMult, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelFrictionPtFxFricMult, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelDisplacementPtFxDispMult, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelBurnoutPtFxFricMult, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelBurnoutPtFxTempMult, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelLowLodPtFxScale, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelPuncturePtFxName, PsoDataType.String, 216, 7, 0), - new PsoStructureEntryInfo(MetaName.wheelPuncturePtFxRange, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelBurstPtFxName, PsoDataType.String, 224, 7, 0), - new PsoStructureEntryInfo(MetaName.wheelBurstPtFxRange, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelFirePtFxName, PsoDataType.String, 232, 7, 0), - new PsoStructureEntryInfo(MetaName.wheelFirePtFxRange, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelFirePtFxSpeedEvoMin, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.wheelFirePtFxSpeedEvoMax, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFirePtFxEnabled, PsoDataType.Bool, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFirePtFxName, PsoDataType.String, 252, 7, 0), - new PsoStructureEntryInfo(MetaName.wreckedFirePtFxDurationMin, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFirePtFxDurationMax, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFirePtFxRadius, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxEnabled, PsoDataType.Bool, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxName, PsoDataType.String, 272, 7, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxDurationMin, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxDurationMax, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxRadius, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2UseOverheatBone, PsoDataType.Bool, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire2OffsetPos, PsoDataType.Float3, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxEnabled, PsoDataType.Bool, 320, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxName, PsoDataType.String, 324, 7, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxDurationMin, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxDurationMax, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxRadius, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3UseOverheatBone, PsoDataType.Bool, 340, 0, 0), - new PsoStructureEntryInfo(MetaName.wreckedFire3OffsetPos, PsoDataType.Float3, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxName, PsoDataType.String, 368, 7, 0), - new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxRange, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxSpeedEvoMin, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxSpeedEvoMax, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxRadius, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxEnabled, PsoDataType.Bool, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxRange, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxName, PsoDataType.String, 396, 7, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxSpeedEvoMin, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxSpeedEvoMax, PsoDataType.Float, 404, 0, 0), - new PsoStructureEntryInfo(MetaName.boatEntryPtFxScale, PsoDataType.Float, 408, 0, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxEnabled, PsoDataType.Bool, 412, 0, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxRange, PsoDataType.Float, 416, 0, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxName, PsoDataType.String, 420, 7, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxSpeedEvoMin, PsoDataType.Float, 424, 0, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxSpeedEvoMax, PsoDataType.Float, 428, 0, 0), - new PsoStructureEntryInfo(MetaName.boatExitPtFxScale, PsoDataType.Float, 432, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxEnabled, PsoDataType.Bool, 436, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxRange, PsoDataType.Float, 440, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardName, PsoDataType.String, 444, 7, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxReverseName, PsoDataType.String, 448, 7, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardMountedName, PsoDataType.String, 452, 7, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardMountedOffset, PsoDataType.Float3, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxSpeedEvoMin, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxSpeedEvoMax, PsoDataType.Float, 484, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxKeelEvoMin, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxKeelEvoMax, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxScale, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.boatBowPtFxReverseOffset, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxEnabled, PsoDataType.Bool, 504, 0, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxRange, PsoDataType.Float, 508, 0, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxName, PsoDataType.String, 512, 7, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxSpeedEvoMin, PsoDataType.Float, 516, 0, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxSpeedEvoMax, PsoDataType.Float, 520, 0, 0), - new PsoStructureEntryInfo(MetaName.boatWashPtFxScale, PsoDataType.Float, 524, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxEnabled, PsoDataType.Bool, 528, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxRange, PsoDataType.Float, 532, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxName, PsoDataType.String, 536, 7, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxForwardSpeedEvoMin, PsoDataType.Float, 540, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxForwardSpeedEvoMax, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxBackwardSpeedEvoMin, PsoDataType.Float, 548, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxBackwardSpeedEvoMax, PsoDataType.Float, 552, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxDepthEvoMin, PsoDataType.Float, 556, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxDepthEvoMax, PsoDataType.Float, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.boatPropellerPtFxScale, PsoDataType.Float, 564, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxEnabled, PsoDataType.Bool, 568, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxRangeMin, PsoDataType.Float, 572, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxRangeMax, PsoDataType.Float, 576, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxName, PsoDataType.String, 580, 7, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxSpeedEvoMin, PsoDataType.Float, 584, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxSpeedEvoMax, PsoDataType.Float, 588, 0, 0), - new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxScale, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxEnabled, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxName, PsoDataType.String, 600, 7, 0), - new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxRange, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxScale, PsoDataType.Float, 608, 0, 0), - new PsoStructureEntryInfo(MetaName.planeWingTipPtFxEnabled, PsoDataType.Bool, 612, 0, 0), - new PsoStructureEntryInfo(MetaName.planeWingTipPtFxName, PsoDataType.String, 616, 7, 0), - new PsoStructureEntryInfo(MetaName.planeWingTipPtFxRange, PsoDataType.Float, 620, 0, 0), - new PsoStructureEntryInfo(MetaName.planeWingTipPtFxSpeedEvoMin, PsoDataType.Float, 624, 0, 0), - new PsoStructureEntryInfo(MetaName.planeWingTipPtFxSpeedEvoMax, PsoDataType.Float, 628, 0, 0), - new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxEnabled, PsoDataType.Bool, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxName, PsoDataType.String, 636, 7, 0), - new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxRange, PsoDataType.Float, 640, 0, 0), - new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxSpeedEvoMin, PsoDataType.Float, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxSpeedEvoMax, PsoDataType.Float, 648, 0, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxEnabled, PsoDataType.Bool, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameDefault, PsoDataType.String, 656, 7, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameSand, PsoDataType.String, 660, 7, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameDirt, PsoDataType.String, 664, 7, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameWater, PsoDataType.String, 668, 7, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameFoliage, PsoDataType.String, 672, 7, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxRange, PsoDataType.Float, 676, 0, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxDist, PsoDataType.Float, 680, 0, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxSpeedEvoMin, PsoDataType.Float, 684, 0, 0), - new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxSpeedEvoMax, PsoDataType.Float, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxEnabled, PsoDataType.Bool, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxName, PsoDataType.String, 696, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxRange, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxSpeedEvoMin, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxSpeedEvoMax, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxEnabled, PsoDataType.Bool, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameDefault, PsoDataType.String, 716, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameSand, PsoDataType.String, 720, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameDirt, PsoDataType.String, 724, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameWater, PsoDataType.String, 728, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameFoliage, PsoDataType.String, 732, 7, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxRange, PsoDataType.Float, 736, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxDist, PsoDataType.Float, 740, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxSpeedEvoMin, PsoDataType.Float, 744, 0, 0), - new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxSpeedEvoMax, PsoDataType.Float, 748, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxEnabled, PsoDataType.Bool, 752, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxRange, PsoDataType.Float, 756, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxName, PsoDataType.String, 760, 7, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSizeEvoMax, PsoDataType.Float, 764, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardThresh, PsoDataType.Float, 768, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedLateralEvoMin, PsoDataType.Float, 772, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedLateralEvoMax, PsoDataType.Float, 776, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardEvoMin, PsoDataType.Float, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardEvoMax, PsoDataType.Float, 784, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxEnabled, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxRange, PsoDataType.Float, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxName, PsoDataType.String, 796, 7, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxSizeEvoMax, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedLateralEvoMin, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedLateralEvoMax, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedUpwardEvoMin, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedUpwardEvoMax, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxEnabled, PsoDataType.Bool, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxRange, PsoDataType.Float, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxName, PsoDataType.String, 828, 7, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxSizeEvoMax, PsoDataType.Float, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedVehicleEvoMin, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedVehicleEvoMax, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedRiverEvoMin, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedRiverEvoMax, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxEnabled, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxRange, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxName, PsoDataType.String, 860, 7, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxSizeEvoMax, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMin, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMax, PsoDataType.Float, 872, 0, 0) - ); - case MetaName.CVfxWeaponInfoMgr: - return new PsoStructureInfo(MetaName.CVfxWeaponInfoMgr, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)3938144758, PsoDataType.Map, 8, 1, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo((MetaName)735539988, PsoDataType.Map, 32, 1, (MetaName)196612) - ); - case (MetaName)2452529929: - return new PsoStructureInfo((MetaName)2452529929, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)294307720, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.probability, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.colTint, PsoDataType.UInt, 20, 1, 0) - ); - case (MetaName)1794703310: - return new PsoStructureInfo((MetaName)1794703310, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)1914084434, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.probability, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)3089927233, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2658317066, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CProceduralInfo: - return new PsoStructureInfo(MetaName.CProceduralInfo, 0, 0, 4120, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2143317860), - new PsoStructureEntryInfo(MetaName.procObjInfos, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlantInfo), - new PsoStructureEntryInfo(MetaName.plantInfos, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3343541253), - new PsoStructureEntryInfo(MetaName.procTagTable, PsoDataType.Array, 40, 4, (MetaName)16711684) - ); - case (MetaName)3343541253: - return new PsoStructureInfo((MetaName)3343541253, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1599521754), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 2, (MetaName)524288) - ); - case (MetaName)2143317860: - return new PsoStructureInfo((MetaName)2143317860, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Tag, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PlantTag, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.Spacing, PsoDataType.HFloat, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinXRotation, PsoDataType.HFloat, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxXRotation, PsoDataType.HFloat, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinYRotation, PsoDataType.HFloat, 26, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYRotation, PsoDataType.HFloat, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinZRotation, PsoDataType.HFloat, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZRotation, PsoDataType.HFloat, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinScale, PsoDataType.HFloat, 34, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxScale, PsoDataType.HFloat, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinScaleZ, PsoDataType.HFloat, 38, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxScaleZ, PsoDataType.HFloat, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinZOffset, PsoDataType.HFloat, 42, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZOffset, PsoDataType.HFloat, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.HFloat, 46, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.HFloat, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTintPalette, PsoDataType.UByte, 50, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTintPalette, PsoDataType.UByte, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)956281369), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 52, 2, (MetaName)524308) - ); - case MetaName.CPlantInfo: - return new PsoStructureInfo(MetaName.CPlantInfo, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Tag, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Color, PsoDataType.UInt, 12, 1, 0), - new PsoStructureEntryInfo(MetaName.GroundColor, PsoDataType.UInt, 16, 1, 0), - new PsoStructureEntryInfo(MetaName.ScaleXY, PsoDataType.HFloat, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleZ, PsoDataType.HFloat, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleVariationXY, PsoDataType.HFloat, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleVariationZ, PsoDataType.HFloat, 26, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleRangeXYZ, PsoDataType.HFloat, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleRangeZ, PsoDataType.HFloat, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.MicroMovementsScaleH, PsoDataType.HFloat, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MicroMovementsScaleV, PsoDataType.HFloat, 34, 0, 0), - new PsoStructureEntryInfo(MetaName.MicroMovementsFreqH, PsoDataType.HFloat, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MicroMovementsFreqV, PsoDataType.HFloat, 38, 0, 0), - new PsoStructureEntryInfo(MetaName.WindBendScale, PsoDataType.HFloat, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.WindBendVariation, PsoDataType.HFloat, 42, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.HFloat, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.Density, PsoDataType.HFloat, 46, 0, 0), - new PsoStructureEntryInfo(MetaName.DensityRange, PsoDataType.HFloat, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ModelId, PsoDataType.UByte, 50, 0, 0), - new PsoStructureEntryInfo(MetaName.TextureId, PsoDataType.UByte, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1247137385), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 52, 1, (MetaName)1048596), - new PsoStructureEntryInfo(MetaName.Intensity, PsoDataType.UByte, 54, 0, 0), - new PsoStructureEntryInfo(MetaName.IntensityVar, PsoDataType.UByte, 55, 0, 0) - ); - case MetaName.camMetadataStore: - return new PsoStructureInfo(MetaName.camMetadataStore, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.MetadataList, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.DirectorList, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case MetaName.camDepthOfFieldSettingsMetadata: - return new PsoStructureInfo(MetaName.camDepthOfFieldSettingsMetadata, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3872687437, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)809440628, PsoDataType.Float2, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)490969727, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3622576788, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1424443550, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3810611648, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1068831663, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1181720025, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2941105367, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1760535059, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)244310625, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2726944087, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)366578954, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1584584282, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)4112080817, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)4019248724, PsoDataType.Bool, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)3170603601, PsoDataType.Bool, 85, 0, 0), - new PsoStructureEntryInfo((MetaName)367424479, PsoDataType.Bool, 86, 0, 0), - new PsoStructureEntryInfo((MetaName)3748087913, PsoDataType.Bool, 87, 0, 0), - new PsoStructureEntryInfo((MetaName)981218312, PsoDataType.Bool, 88, 0, 0) - ); - case MetaName.camCinematicAnimatedCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicAnimatedCameraMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0) - ); - case MetaName.camCinematicCameraManCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicCameraManCameraMetadata, 0, 0, 328, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2962759393, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3005507009, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1535052963, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3023548272, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)846082931, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)3539146194, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3668836939, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)69722150, PsoDataType.Bool, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ScanDistance, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 128, 0, MetaName.camCinematicCameraOperatorShakeSettings), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo((MetaName)3518053347, PsoDataType.Bool, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo((MetaName)2596681112, PsoDataType.Bool, 284, 0, 0), - new PsoStructureEntryInfo((MetaName)1468609247, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)727781899, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo((MetaName)3140771983, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo((MetaName)3196312636, PsoDataType.Bool, 300, 0, 0), - new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 324, 0, 0) - ); - case MetaName.camCinematicCameraOperatorShakeSettings: - return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeSettings, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.UncertaintySettings, PsoDataType.Structure, 8, 0, MetaName.camCinematicCameraOperatorShakeUncertaintySettings), - new PsoStructureEntryInfo(MetaName.TurbulenceSettings, PsoDataType.Structure, 88, 0, MetaName.camCinematicCameraOperatorShakeTurbulenceSettings) - ); - case MetaName.camCinematicCameraOperatorShakeUncertaintySettings: - return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeUncertaintySettings, 0, 0, 80, - new PsoStructureEntryInfo((MetaName)784117005, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)4083769430, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)4138212913, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2793659114, PsoDataType.Float2, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2611684493, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3850080675, PsoDataType.Float2, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2902509544, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)3004590170, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ScalingFactor, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2280675285, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)933422390, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3253772488, PsoDataType.Float, 72, 0, 0) - ); - case MetaName.camCinematicCameraOperatorShakeTurbulenceSettings: - return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeTurbulenceSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)1741343660, PsoDataType.Float2, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceRange, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2902509544, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3004590170, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camCinematicHeliChaseCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicHeliChaseCameraMetadata, 0, 0, 392, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDuration, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3800346187, PsoDataType.UInt, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2004927681, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)408757490, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1805018741, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1929531797, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)1117152888, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3610993313, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2885533396, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1162205528, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2128811877, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3504182592, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)2040715445, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)1346377414, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)495502725, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)3725520797, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)832331471, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)953228499, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1288561522, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)4220570274, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)613448395, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)106130617, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)2289962831, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)3658577234, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)3483998043, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)2217923367, PsoDataType.Bool, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 169, 0, 0), - new PsoStructureEntryInfo((MetaName)2187445607, PsoDataType.Bool, 170, 0, 0), - new PsoStructureEntryInfo((MetaName)1144995443, PsoDataType.Bool, 171, 0, 0), - new PsoStructureEntryInfo((MetaName)4185802977, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)315713489, PsoDataType.Bool, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 188, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 192, 7, 0), - new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 196, 7, 0), - new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 200, 7, 0), - new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 208, 0, MetaName.camCinematicCameraOperatorShakeSettings), - new PsoStructureEntryInfo((MetaName)983508410, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)3451936358, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo((MetaName)2352608445, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)3574069037, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo((MetaName)761184934, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)1444706843, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo((MetaName)218641622, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 388, 0, 0) - ); - case MetaName.camCinematicVehicleOrbitCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitCameraMetadata, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)315073442, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleDelta, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)559738595, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)2153696126, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)765619120, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)3644129030, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)3991802629, PsoDataType.UInt, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicVehicleOrbitCameraInitalSettings), - new PsoStructureEntryInfo((MetaName)1539141183, PsoDataType.Array, 104, 0, (MetaName)20), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 128, 0, 0) - ); - case MetaName.camCinematicVehicleOrbitCameraInitalSettings: - return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitCameraInitalSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Heading, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingDelta, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camCinematicVehicleLowOrbitCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleLowOrbitCameraMetadata, 0, 0, 256, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)315073442, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleDelta, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2037218535, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)4219845621, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)1088437692, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)565251953, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)2153696126, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)765619120, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicVehicleOrbitCameraInitalSettings), - new PsoStructureEntryInfo((MetaName)1539141183, PsoDataType.Array, 112, 0, (MetaName)MetaTypeName.UINT), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)1958709726, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)2815616753, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)2843406703, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)4109249654, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)565527739, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)3889226535, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)3920334627, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)3189979615, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)1031927866, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)2223609026, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo((MetaName)752307799, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo((MetaName)1612512934, PsoDataType.Structure, 192, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), - new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 224, 0, MetaName.camSpeedRelativeShakeSettingsMetadata) - ); - case MetaName.camSpeedRelativeShakeSettingsMetadata: - return new PsoStructureInfo(MetaName.camSpeedRelativeShakeSettingsMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3092190689, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camCinematicIdleCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicIdleCameraMetadata, 0, 0, 168, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1305640980, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)653716069, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)887335192, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.WideShot, PsoDataType.Structure, 48, 0, MetaName.camCinematicIdleShots), - new PsoStructureEntryInfo(MetaName.MediumShot, PsoDataType.Structure, 72, 0, MetaName.camCinematicIdleShots), - new PsoStructureEntryInfo((MetaName)2026925651, PsoDataType.Structure, 96, 0, MetaName.camCinematicIdleShots), - new PsoStructureEntryInfo((MetaName)2443187932, PsoDataType.Float2, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)762567518, PsoDataType.Float2, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)348135302, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.Float, 160, 0, 0) - ); - case MetaName.camCinematicIdleShots: - return new PsoStructureInfo(MetaName.camCinematicIdleShots, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceLimits, PsoDataType.Float2, 16, 0, 0) - ); - case MetaName.camCinematicFirstPersonIdleCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicFirstPersonIdleCameraMetadata, 0, 0, 200, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.tacticalXml, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2146055434, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)498489070, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)642179285, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3833690476, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)91642876, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3423831703, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1365351828, PsoDataType.UInt, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1799833343, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2451425179, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2398830068, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)4013543182, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)4060544092, PsoDataType.UInt, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)1863497759, PsoDataType.UInt, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2865768466, PsoDataType.UInt, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)2935498108, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)3267214601, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)25343385, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)2453008156, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)333391552, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)3472598366, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)3523922750, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)27172088, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)2656885705, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)3821389091, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)3137663245, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)2149837453, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)1352549573, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)559353307, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)340096669, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)3997020725, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)1330235813, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)3625015755, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)815735892, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)2653018133, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)216085311, PsoDataType.UInt, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)811132412, PsoDataType.UInt, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1561520371, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo((MetaName)2384466151, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo((MetaName)1800176594, PsoDataType.Float, 192, 0, 0) - ); - case MetaName.camCinematicStuntCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicStuntCameraMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3686787728, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2332427685, PsoDataType.Float2, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3195921543, PsoDataType.Float2, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2033229500, PsoDataType.Float2, 60, 0, 0) - ); - case MetaName.camCinematicGroupCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicGroupCameraMetadata, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3686787728, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)4150576777, PsoDataType.Float2, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)3434528744, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2373655501, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)400251000, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1856660360, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 92, 0, 0) - ); - case MetaName.camCinematicTrainTrackingCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicTrainTrackingCameraMetadata, 0, 0, 400, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2962759393, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3005507009, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1535052963, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3023548272, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)846082931, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)3539146194, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3668836939, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)69722150, PsoDataType.Bool, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ScanDistance, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 128, 0, MetaName.camCinematicCameraOperatorShakeSettings), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo((MetaName)3518053347, PsoDataType.Bool, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo((MetaName)2596681112, PsoDataType.Bool, 284, 0, 0), - new PsoStructureEntryInfo((MetaName)1468609247, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)727781899, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo((MetaName)3140771983, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo((MetaName)3196312636, PsoDataType.Bool, 300, 0, 0), - new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo((MetaName)886237220, PsoDataType.Float3, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)649866655, PsoDataType.Float2, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)3049827950, PsoDataType.Float2, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)1066491626, PsoDataType.Float2, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)3832386323, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo((MetaName)412149987, PsoDataType.Float2, 384, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadata, 0, 0, 1344, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.MobilePhoneCameraControlHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo((MetaName)3464513788, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.RagdollBlendEnvelopeRef, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)4071354708, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo((MetaName)972815273, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo((MetaName)844800904, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo((MetaName)648641770, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo((MetaName)722540604, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo((MetaName)3400674238, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo((MetaName)885223840, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachPosition, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)1792533284, PsoDataType.Float3, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.BoneRelativeAttachOffset, PsoDataType.Float3, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)3162861957, PsoDataType.Float3, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)2981089011, PsoDataType.Float3, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)464677746, PsoDataType.Float3, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)2301891370, PsoDataType.Float3, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)1452169682, PsoDataType.Float3, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)4196591490, PsoDataType.Float3, 224, 0, 0), - new PsoStructureEntryInfo((MetaName)1001532487, PsoDataType.Float3, 240, 0, 0), - new PsoStructureEntryInfo((MetaName)1862921276, PsoDataType.Float3, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimits, PsoDataType.Float2, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimitsForPassengers, PsoDataType.Float2, 280, 0, 0), - new PsoStructureEntryInfo((MetaName)3248777081, PsoDataType.Float2, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)74704022, PsoDataType.Float2, 296, 0, 0), - new PsoStructureEntryInfo((MetaName)4088070730, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)2782354748, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo((MetaName)1994565733, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)383680708, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)2931383793, PsoDataType.Bool, 320, 0, 0), - new PsoStructureEntryInfo((MetaName)1919709187, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo((MetaName)945934562, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultRelativePitch, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultReversePitch, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)742850166, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo((MetaName)2686299665, PsoDataType.Float2, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)1473955583, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)704024974, PsoDataType.Bool, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)2135497875, PsoDataType.Bool, 357, 0, 0), - new PsoStructureEntryInfo((MetaName)4187867131, PsoDataType.Bool, 358, 0, 0), - new PsoStructureEntryInfo((MetaName)2423170684, PsoDataType.Structure, 360, 0, MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle), - new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 376, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), - new PsoStructureEntryInfo((MetaName)1672349165, PsoDataType.Structure, 408, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), - new PsoStructureEntryInfo(MetaName.RocketSettings, PsoDataType.Structure, 440, 0, MetaName.camVehicleRocketSettings), - new PsoStructureEntryInfo((MetaName)1913942883, PsoDataType.Bool, 456, 0, 0), - new PsoStructureEntryInfo((MetaName)3459873736, PsoDataType.Bool, 457, 0, 0), - new PsoStructureEntryInfo((MetaName)880876795, PsoDataType.Bool, 458, 0, 0), - new PsoStructureEntryInfo((MetaName)153965986, PsoDataType.Structure, 464, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), - new PsoStructureEntryInfo((MetaName)1625111759, PsoDataType.Structure, 504, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), - new PsoStructureEntryInfo((MetaName)2701071860, PsoDataType.Structure, 544, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), - new PsoStructureEntryInfo((MetaName)1020746469, PsoDataType.Structure, 584, 0, MetaName.camCinematicMountedCameraMetadataFirstPersonRoll), - new PsoStructureEntryInfo((MetaName)3266557322, PsoDataType.Structure, 608, 0, MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset), - new PsoStructureEntryInfo((MetaName)4210630063, PsoDataType.Bool, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringDampingRatio, PsoDataType.Float, 660, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForMaxRelativeAttachSpringConstant, PsoDataType.Float, 664, 0, 0), - new PsoStructureEntryInfo((MetaName)17770171, PsoDataType.Float, 668, 0, 0), - new PsoStructureEntryInfo((MetaName)2454715147, PsoDataType.Float, 672, 0, 0), - new PsoStructureEntryInfo((MetaName)789371927, PsoDataType.Bool, 676, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToFollowPedHead, PsoDataType.Bool, 677, 0, 0), - new PsoStructureEntryInfo((MetaName)2639714447, PsoDataType.Bool, 678, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToFollowPedSeat, PsoDataType.Bool, 679, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldRestictToFrontSeat, PsoDataType.Bool, 680, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToVehicleExitEntryPoint, PsoDataType.Bool, 681, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToVehicleBone, PsoDataType.Bool, 682, 0, 0), - new PsoStructureEntryInfo((MetaName)4227962431, PsoDataType.Bool, 683, 0, 0), - new PsoStructureEntryInfo((MetaName)3424726202, PsoDataType.Bool, 684, 0, 0), - new PsoStructureEntryInfo((MetaName)883646732, PsoDataType.Bool, 685, 0, 0), - new PsoStructureEntryInfo((MetaName)1344883999, PsoDataType.Bool, 686, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2782414211), - new PsoStructureEntryInfo((MetaName)3524553148, PsoDataType.Flags, 688, 0, (MetaName)2097231), - new PsoStructureEntryInfo(MetaName.VehicleAttachPart, PsoDataType.Enum, 692, 0, (MetaName)3404480226), - new PsoStructureEntryInfo(MetaName.LookAtBehaviour, PsoDataType.Enum, 696, 0, (MetaName)2136742399), - new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.LookBehindRelativeAttachPosition, PsoDataType.Float3, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLookBehindCustomPosition, PsoDataType.Bool, 736, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowPedLookAtBoneTag, PsoDataType.SInt, 740, 0, 0), - new PsoStructureEntryInfo(MetaName.OrientationSpring, PsoDataType.Structure, 744, 0, MetaName.camCinematicMountedCameraMetadataOrientationSpring), - new PsoStructureEntryInfo((MetaName)2204528705, PsoDataType.Structure, 808, 0, MetaName.camCinematicMountedCameraMetadataLeadingLookSettings), - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo((MetaName)3932844561, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo((MetaName)1690462370, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeHeadingLimitsForMobilePhoneCamera, PsoDataType.Float2, 872, 0, 0), - new PsoStructureEntryInfo(MetaName.IsBehindVehicleGlass, PsoDataType.Bool, 880, 0, 0), - new PsoStructureEntryInfo((MetaName)2385481086, PsoDataType.Bool, 881, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 882, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMakeFollowPedHeadInvisible, PsoDataType.Bool, 883, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMakePedInAttachSeatInvisible, PsoDataType.Bool, 884, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldCopyVehicleCameraMotionBlur, PsoDataType.Bool, 885, 0, 0), - new PsoStructureEntryInfo(MetaName.LimitAttachParentRelativePitchAndHeading, PsoDataType.Bool, 886, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateForPitchAndHeading, PsoDataType.Bool, 887, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRelativePitch, PsoDataType.Float2, 888, 0, 0), - new PsoStructureEntryInfo((MetaName)1537030464, PsoDataType.Float2, 896, 0, 0), - new PsoStructureEntryInfo((MetaName)3275096368, PsoDataType.Float2, 904, 0, 0), - new PsoStructureEntryInfo((MetaName)923714524, PsoDataType.Float2, 912, 0, 0), - new PsoStructureEntryInfo((MetaName)3680927973, PsoDataType.Float2, 920, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 928, 0, 0), - new PsoStructureEntryInfo((MetaName)2362796003, PsoDataType.Float2, 936, 0, 0), - new PsoStructureEntryInfo((MetaName)2931436971, PsoDataType.Float2, 944, 0, 0), - new PsoStructureEntryInfo((MetaName)4288033461, PsoDataType.Float2, 952, 0, 0), - new PsoStructureEntryInfo((MetaName)1148577305, PsoDataType.Float2, 960, 0, 0), - new PsoStructureEntryInfo((MetaName)818123698, PsoDataType.Float2, 968, 0, 0), - new PsoStructureEntryInfo((MetaName)3197853445, PsoDataType.Float2, 976, 0, 0), - new PsoStructureEntryInfo((MetaName)1847367979, PsoDataType.Float2, 984, 0, 0), - new PsoStructureEntryInfo((MetaName)1083919137, PsoDataType.Float2, 992, 0, 0), - new PsoStructureEntryInfo((MetaName)4130730234, PsoDataType.Float2, 1000, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialRelativePitchLimits, PsoDataType.Float2, 1008, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialRelativeHeadingLimits, PsoDataType.Float2, 1016, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachParentRoll, PsoDataType.Bool, 1024, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateForWorldPitch, PsoDataType.Bool, 1025, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialWorldPitchLimits, PsoDataType.Float2, 1028, 0, 0), - new PsoStructureEntryInfo(MetaName.WorldPitchLimits, PsoDataType.Float2, 1036, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateForOcclusion, PsoDataType.Bool, 1044, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 1048, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateIfOccludedByAttachParent, PsoDataType.Bool, 1052, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccludedByAttachParent, PsoDataType.UInt, 1056, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 1060, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 1064, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateForDistanceToTarget, PsoDataType.Bool, 1068, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToTerminate, PsoDataType.Float, 1072, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldCalculateXYDistance, PsoDataType.Bool, 1076, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTestForClipping, PsoDataType.Bool, 1077, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToClipIntoDynamicCollision, PsoDataType.UInt, 1080, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 1084, 0, 0), - new PsoStructureEntryInfo((MetaName)816145056, PsoDataType.Bool, 1088, 0, 0), - new PsoStructureEntryInfo((MetaName)439797539, PsoDataType.Bool, 1089, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 1092, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 1096, 0, 0), - new PsoStructureEntryInfo((MetaName)976391107, PsoDataType.Bool, 1100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 1104, 0, 0), - new PsoStructureEntryInfo((MetaName)200247978, PsoDataType.Bool, 1108, 0, 0), - new PsoStructureEntryInfo((MetaName)1613380386, PsoDataType.Float, 1112, 0, 0), - new PsoStructureEntryInfo((MetaName)2154681758, PsoDataType.Bool, 1116, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 1120, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 1124, 7, 0), - new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 1128, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldByPassNearClip, PsoDataType.Bool, 1132, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTestForMapPenetrationFromAttachPosition, PsoDataType.Bool, 1133, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseHeading, PsoDataType.Float, 1136, 0, 0), - new PsoStructureEntryInfo((MetaName)1214392329, PsoDataType.Bool, 1140, 0, 0), - new PsoStructureEntryInfo((MetaName)2327168839, PsoDataType.Float, 1144, 0, 0), - new PsoStructureEntryInfo((MetaName)1246262822, PsoDataType.Float, 1148, 0, 0), - new PsoStructureEntryInfo((MetaName)4216676429, PsoDataType.Float, 1152, 0, 0), - new PsoStructureEntryInfo((MetaName)2719028802, PsoDataType.Structure, 1160, 0, MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings), - new PsoStructureEntryInfo((MetaName)36987752, PsoDataType.Float, 1208, 0, 0), - new PsoStructureEntryInfo((MetaName)3434721036, PsoDataType.Float3, 1216, 0, 0), - new PsoStructureEntryInfo((MetaName)3664516177, PsoDataType.Float, 1232, 0, 0), - new PsoStructureEntryInfo((MetaName)2807019381, PsoDataType.Float, 1236, 0, 0), - new PsoStructureEntryInfo((MetaName)1688077651, PsoDataType.Float, 1240, 0, 0), - new PsoStructureEntryInfo((MetaName)1499512130, PsoDataType.Float, 1244, 0, 0), - new PsoStructureEntryInfo((MetaName)805860083, PsoDataType.Float, 1248, 0, 0), - new PsoStructureEntryInfo((MetaName)1793179555, PsoDataType.Float, 1252, 0, 0), - new PsoStructureEntryInfo((MetaName)1784170819, PsoDataType.Float, 1256, 0, 0), - new PsoStructureEntryInfo((MetaName)2549816384, PsoDataType.Float, 1260, 0, 0), - new PsoStructureEntryInfo((MetaName)2482994089, PsoDataType.Float, 1264, 0, 0), - new PsoStructureEntryInfo((MetaName)3440187587, PsoDataType.Float, 1268, 0, 0), - new PsoStructureEntryInfo((MetaName)2744603068, PsoDataType.Float, 1272, 0, 0), - new PsoStructureEntryInfo((MetaName)1387580481, PsoDataType.Float, 1276, 0, 0), - new PsoStructureEntryInfo((MetaName)1233327091, PsoDataType.Float, 1280, 0, 0), - new PsoStructureEntryInfo((MetaName)3672709376, PsoDataType.Float3, 1296, 0, 0), - new PsoStructureEntryInfo((MetaName)2119789086, PsoDataType.Float3, 1312, 0, 0), - new PsoStructureEntryInfo((MetaName)2958804846, PsoDataType.Float, 1328, 0, 0), - new PsoStructureEntryInfo((MetaName)2107938182, PsoDataType.Float, 1332, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)1802668561, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)200823333, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataLookAroundSettings: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataLookAroundSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.LeanScale, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)214599438, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2702689596, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2951014073, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2830026870, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3102721723, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)509094775, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3198719034, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataFirstPersonRoll: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataFirstPersonRoll, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)455355504, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)694448363, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2004679597, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2782811596, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)551752221, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOffset, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1775298710, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2173221242, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)75090556, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataOrientationSpring: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataOrientationSpring, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)1464813290, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)12756205, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)967704366, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3344080959, PsoDataType.Float2, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)243857972, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2399868550, PsoDataType.Float2, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2060478858, PsoDataType.Float2, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)131585240, PsoDataType.Float2, 56, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataLeadingLookSettings: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataLeadingLookSettings, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)966483701, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1778767763, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)3524239627, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1788878871, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3960905630, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2872708052, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1733937006, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings: - return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)3974113312, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3305119805, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1186910375, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1778767763, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3493441660, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1259376027, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.camCinematicPositionCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicPositionCameraMetadata, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3715714007, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3434528744, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomDuration, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3609378888, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1843629037, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 100, 7, 0) - ); - case MetaName.camCinematicWaterCrashCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicWaterCrashCameraMetadata, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3106190053, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScale, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DropDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3822313305, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.tacticalXml, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2965889555, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.DropDuration, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)2920068067, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendDuration, PsoDataType.UInt, 80, 0, 0) - ); - case MetaName.camCinematicTwoShotCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicTwoShotCameraMetadata, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeScale, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3072113430, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)654218252, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.CameraRelativeVerticalOffset, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)1926313598, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1167967077, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)656358172, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)940306022, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)4169793326, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistance, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)1953981041, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleCmini, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)2383824547, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)1720877983, PsoDataType.Bool, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)1117249844, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3115155794, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)1144205032, PsoDataType.Bool, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1450705774, PsoDataType.Float, 132, 0, 0) - ); - case MetaName.camCinematicPedCloseUpCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicPedCloseUpCameraMetadata, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOffset, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1099610506, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.LookAtOffset, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)367186942, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)3381486527, PsoDataType.UInt, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)3185512023, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)4280914022, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)430381212, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)2406519031, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)2116722083, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)4065237819, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)1391390084, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)3698583789, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)2383824547, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)3406809215, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)4170206883, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)3418665750, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)2934396710, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)2715105524, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)3609378888, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 180, 0, 0) - ); - case MetaName.camControlHelperMetadata: - return new PsoStructureInfo(MetaName.camControlHelperMetadata, 0, 0, 288, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ViewModes, PsoDataType.Structure, 16, 0, MetaName.camControlHelperMetadataViewModes), - new PsoStructureEntryInfo(MetaName.LookAround, PsoDataType.Structure, 128, 0, MetaName.camControlHelperMetadataLookAround), - new PsoStructureEntryInfo(MetaName.Zoom, PsoDataType.Structure, 224, 0, MetaName.camControlHelperMetadataZoom), - new PsoStructureEntryInfo(MetaName.LookBehindOutroTimeMS, PsoDataType.UInt, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLookBehindInput, PsoDataType.Bool, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseAccurateModeInput, PsoDataType.Bool, 269, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldToggleAccurateModeInput, PsoDataType.Bool, 270, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplySniperControlPref, PsoDataType.Bool, 271, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyAimSensitivityPref, PsoDataType.Bool, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.AimSensitivityScalingLimits, PsoDataType.Float2, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDurationForMultiplayerViewModeActivation, PsoDataType.UInt, 284, 0, 0) - ); - case MetaName.camControlHelperMetadataViewModes: - return new PsoStructureInfo(MetaName.camControlHelperMetadataViewModes, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.ShouldUseViewModeInput, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldToggleViewModeBetweenThirdAndFirstPerson, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.Context, PsoDataType.Enum, 12, 0, (MetaName)513957198), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2703064232), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 16, 2, (MetaName)327683), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camControlHelperMetadataViewModeSettings), - new PsoStructureEntryInfo(MetaName.Settings, PsoDataType.Array, 24, 4, (MetaName)327685), - new PsoStructureEntryInfo(MetaName.ViewModeBlendEnvelopeRef, PsoDataType.String, 104, 7, 0) - ); - case MetaName.camControlHelperMetadataViewModeSettings: - return new PsoStructureInfo(MetaName.camControlHelperMetadataViewModeSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitScaling, PsoDataType.Float2, 8, 0, 0) - ); - case MetaName.camControlHelperMetadataLookAround: - return new PsoStructureInfo(MetaName.camControlHelperMetadataLookAround, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchSpeed, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MouseMaxHeadingSpeedMin, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MouseMaxHeadingSpeedMax, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MouseMaxPitchSpeedMin, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MouseMaxPitchSpeedMax, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.LSDeadZoneAngle, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.LSAcceleration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.LSDeceleration, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseGameTime, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.InputEnvelopeRef, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo(MetaName.PrecisionAimSettings, PsoDataType.Structure, 64, 0, MetaName.camControlHelperMetaDataPrecisionAimSettings) - ); - case MetaName.camControlHelperMetaDataPrecisionAimSettings: - return new PsoStructureInfo(MetaName.camControlHelperMetaDataPrecisionAimSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinAccelModifier, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAccelModifier, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDeccelModifier, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDeccelModifier, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.InputMagToIncreaseDeadZoneMin, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.InputMagToIncreaseDeadZoneMax, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.camControlHelperMetadataZoom: - return new PsoStructureInfo(MetaName.camControlHelperMetadataZoom, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldUseZoomInput, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDiscreteZoomControl, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseGameTime, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFovForNetworkPlay, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camCinematicVehicleTrackingCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleTrackingCameraMetadata, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.LookAtOffset, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.PositionOffset, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.Fov, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1292601136, PsoDataType.Float2, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3554537001, PsoDataType.Float2, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)4013358927, PsoDataType.Float2, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)328948722, PsoDataType.Float2, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)2198318784, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)1142735275, PsoDataType.UInt, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 124, 0, 0) - ); - case MetaName.camEnvelopeMetadata: - return new PsoStructureInfo(MetaName.camEnvelopeMetadata, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)4004354650, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AttackDuration, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DecayDuration, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1735638891, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.HoldDuration, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ReleaseDuration, PsoDataType.UInt, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2014772834, PsoDataType.Enum, 40, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)1004206996, PsoDataType.Enum, 44, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)1484523694, PsoDataType.Bool, 48, 0, 0) - ); - case MetaName.camSpringMountMetadata: - return new PsoStructureInfo(MetaName.camSpringMountMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AccelerationLimit, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationForce, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringForce, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DampeningForce, PsoDataType.Float3, 64, 0, 0) - ); - case MetaName.camAnimatedCameraMetadata: - return new PsoStructureInfo(MetaName.camAnimatedCameraMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0) - ); - case MetaName.camFreeCameraMetadata: - return new PsoStructureInfo(MetaName.camFreeCameraMetadata, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.StartPosition, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ForwardAcceleration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.StrafeAcceleration, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalAcceleration, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)430698760, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingAcceleration, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchAcceleration, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.RollAcceleration, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)991761956, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.FovAcceleration, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)2276437979, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1380375800, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)3305680632, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)3631492583, PsoDataType.UInt, 100, 0, 0) - ); - case MetaName.camCinematicMountedPartCameraMetadata: - return new PsoStructureInfo(MetaName.camCinematicMountedPartCameraMetadata, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantEnvelopeRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPart, PsoDataType.Enum, 48, 0, (MetaName)3404480226), - new PsoStructureEntryInfo((MetaName)2797646907, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimits, PsoDataType.Float2, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimitsForPassengers, PsoDataType.Float2, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForMaxRelativeAttachSpringConstant, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 120, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), - new PsoStructureEntryInfo(MetaName.IsBehindVehicleGlass, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)2385481086, PsoDataType.Bool, 153, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 154, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMakeFollowPedHeadInvisible, PsoDataType.Bool, 155, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldCopyVehicleCameraMotionBlur, PsoDataType.Bool, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTestForClipping, PsoDataType.Bool, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 188, 0, 0) - ); - case MetaName.camFollowPedCameraMetadata: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadata, 0, 0, 2288, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), - new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), - new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), - new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), - new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), - new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), - new PsoStructureEntryInfo((MetaName)1885083576, PsoDataType.Bool, 1104, 0, 0), - new PsoStructureEntryInfo((MetaName)1213389792, PsoDataType.Bool, 1105, 0, 0), - new PsoStructureEntryInfo((MetaName)473739279, PsoDataType.Float, 1108, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollBlendEnvelopeRef, PsoDataType.String, 1112, 7, 0), - new PsoStructureEntryInfo((MetaName)3575968142, PsoDataType.String, 1116, 7, 0), - new PsoStructureEntryInfo((MetaName)2291862537, PsoDataType.UInt, 1120, 0, 0), - new PsoStructureEntryInfo((MetaName)459469516, PsoDataType.Float, 1124, 0, 0), - new PsoStructureEntryInfo((MetaName)4093180426, PsoDataType.Float, 1128, 0, 0), - new PsoStructureEntryInfo((MetaName)1028171116, PsoDataType.Float, 1132, 0, 0), - new PsoStructureEntryInfo((MetaName)2578221071, PsoDataType.Float2, 1136, 0, 0), - new PsoStructureEntryInfo((MetaName)2418079526, PsoDataType.String, 1144, 7, 0), - new PsoStructureEntryInfo((MetaName)300074581, PsoDataType.Bool, 1148, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), - new PsoStructureEntryInfo((MetaName)95464861, PsoDataType.Array, 1152, 4, (MetaName)327809), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), - new PsoStructureEntryInfo((MetaName)741352357, PsoDataType.Array, 1272, 4, (MetaName)327811), - new PsoStructureEntryInfo((MetaName)1557873238, PsoDataType.Bool, 1392, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), - new PsoStructureEntryInfo((MetaName)1607272001, PsoDataType.Array, 1400, 4, (MetaName)327814), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), - new PsoStructureEntryInfo((MetaName)467721499, PsoDataType.Array, 1520, 4, (MetaName)327816), - new PsoStructureEntryInfo((MetaName)4261252982, PsoDataType.String, 1640, 7, 0), - new PsoStructureEntryInfo((MetaName)2397521015, PsoDataType.Float, 1644, 0, 0), - new PsoStructureEntryInfo((MetaName)886249434, PsoDataType.Float, 1648, 0, 0), - new PsoStructureEntryInfo((MetaName)3909973356, PsoDataType.Float, 1652, 0, 0), - new PsoStructureEntryInfo((MetaName)4282038076, PsoDataType.Float, 1656, 0, 0), - new PsoStructureEntryInfo((MetaName)1414513338, PsoDataType.Float, 1660, 0, 0), - new PsoStructureEntryInfo((MetaName)233447402, PsoDataType.Float, 1664, 0, 0), - new PsoStructureEntryInfo((MetaName)813655062, PsoDataType.Float, 1668, 0, 0), - new PsoStructureEntryInfo((MetaName)859959795, PsoDataType.Float, 1672, 0, 0), - new PsoStructureEntryInfo((MetaName)2322941924, PsoDataType.Structure, 1680, 0, MetaName.camFollowPedCameraMetadataAssistedMovementAlignment), - new PsoStructureEntryInfo(MetaName.LadderAlignment, PsoDataType.Structure, 1768, 0, MetaName.camFollowPedCameraMetadataLadderAlignment), - new PsoStructureEntryInfo(MetaName.RappellingAlignment, PsoDataType.Structure, 1952, 0, MetaName.camFollowPedCameraMetadataRappellingAlignment), - new PsoStructureEntryInfo((MetaName)215880757, PsoDataType.Bool, 1968, 0, 0), - new PsoStructureEntryInfo((MetaName)4161177976, PsoDataType.Structure, 1976, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo((MetaName)2738607365, PsoDataType.Float2, 2040, 0, 0), - new PsoStructureEntryInfo((MetaName)3410646358, PsoDataType.Float2, 2048, 0, 0), - new PsoStructureEntryInfo((MetaName)528803049, PsoDataType.Bool, 2056, 0, 0), - new PsoStructureEntryInfo((MetaName)3857904181, PsoDataType.Float, 2060, 0, 0), - new PsoStructureEntryInfo((MetaName)2773176002, PsoDataType.Float, 2064, 0, 0), - new PsoStructureEntryInfo((MetaName)3592715839, PsoDataType.Bool, 2068, 0, 0), - new PsoStructureEntryInfo((MetaName)3895855693, PsoDataType.Float2, 2072, 0, 0), - new PsoStructureEntryInfo((MetaName)2344836057, PsoDataType.Structure, 2080, 0, MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision), - new PsoStructureEntryInfo((MetaName)3095276846, PsoDataType.Float, 2112, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleEntryExitPitchLevelSmoothRate, PsoDataType.Float, 2116, 0, 0), - new PsoStructureEntryInfo((MetaName)2068541596, PsoDataType.Float, 2120, 0, 0), - new PsoStructureEntryInfo((MetaName)1699579049, PsoDataType.Structure, 2128, 0, MetaName.camFollowPedCameraMetadataRunningShakeSettings), - new PsoStructureEntryInfo((MetaName)498572221, PsoDataType.Structure, 2160, 0, MetaName.camFollowPedCameraMetadataSwimmingShakeSettings), - new PsoStructureEntryInfo((MetaName)2385645301, PsoDataType.Structure, 2192, 0, MetaName.camFollowPedCameraMetadataDivingShakeSettings), - new PsoStructureEntryInfo((MetaName)136635268, PsoDataType.Structure, 2224, 0, MetaName.camFollowPedCameraMetadataHighFallShakeSettings), - new PsoStructureEntryInfo((MetaName)41370383, PsoDataType.Structure, 2248, 0, MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings) - ); - case MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.HeightScaling, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxExtraHeightForVehicleTrailers, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxExtraHeightForTowedVehicles, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveVehicleDriverSeat, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataBasePivotPosition: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBasePivotPosition, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.ShouldUseBaseAttachPosition, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttain, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttainInTightSpace, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyInAttachParentLocalSpace, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 24, 0, MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings), - new PsoStructureEntryInfo(MetaName.RelativeOffset, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockVerticalOffset, PsoDataType.Bool, 80, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachParentRoll, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleScalingFactor, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataPivotPosition: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataPivotPosition, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.CameraRelativeSideOffset, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.CameraRelativeVerticalOffset, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentWidthScalingForCameraRelativeSideOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForCameraRelativeVerticalOffset, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyAlternateScalingMin, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyAlternateScalingMax, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.maxDistanceAfterAimingToApplyAlternateScalingMax, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyDistanceBlend, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForCameraRelativeVerticalOffset_AfterAiming, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2888330455, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.BlendLevel, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraCameraRelativeVerticalOffset, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForExtraCameraRelativeVerticalOffset, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataBuoyancySettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBuoyancySettings, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.ShouldApplyBuoyancy, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayBetweenBuoyancyStateChanges, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayOnSubmerging, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayOnSurfacing, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSpentSwimmingToRespectMotionTask, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentDepthUnderWaterToRemainBuoyant, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentDepthUnderWaterToRemainBuoyantOut, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionFallBackBlendLevelToForceUnderWater, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldSetBuoyantWhenAttachParentNotFullySubmerged, PsoDataType.Bool, 40, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttain, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachParentHeightRatioToPushAwayFromCollision, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)4004666528, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendLevelAfterPushAwayFromCollision, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)31648245, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2702477980, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)20195593, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyInAttachParentLocalSpace, PsoDataType.Bool, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDurationToTrackVehicles, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToTestDownForVehiclesToReject, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataLookOverSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataLookOverSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchOffsetAtMinHeight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchOffsetAtMaxHeight, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataStealthZoomSettings: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataStealthZoomSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camFollowCameraMetadataPullAroundSettings: - return new PsoStructureInfo(MetaName.camFollowCameraMetadataPullAroundSettings, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.ShouldBlendOutWhenAttachParentIsInAir, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldBlendOutWhenAttachParentIsOnGround, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldBlendWithAttachParentMatrixForRelativeOrbitBlend, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundMinMoveSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundMaxMoveSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpeedAtMaxMoveSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundErrorScalingBlendLevel, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpringConstant, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpringDampingRatio, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundMinMoveSpeed, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundMaxMoveSpeed, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundSpeedAtMaxMoveSpeed, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundErrorScalingBlendLevel, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundSpringConstant, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchPullAroundSpringDampingRatio, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.camFollowCameraMetadataFollowOrientationConing: - return new PsoStructureInfo(MetaName.camFollowCameraMetadataFollowOrientationConing, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AspectRatio, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchOffset, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SmoothRate, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowCameraMetadataRollSettings: - return new PsoStructureInfo(MetaName.camFollowCameraMetadataRollSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldApplyRoll, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.RollSpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.RollSpringDampRatio, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.RollAngleScale, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camFollowCameraMetadataHighAltitudeZoomSettings: - return new PsoStructureInfo(MetaName.camFollowCameraMetadataHighAltitudeZoomSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinAltitudeDelta, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAltitudeDelta, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBaseFovScaling, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataCustomViewModeSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataCustomViewModeSettings, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)4026985674, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataAssistedMovementAlignment: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataAssistedMovementAlignment, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)2541847736, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)3143901835, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2602308947, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 24, 0, MetaName.camFollowCameraMetadataPullAroundSettings) - ); - case MetaName.camFollowPedCameraMetadataLadderAlignment: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataLadderAlignment, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)2541847736, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)261180327, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)666447554, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)4131471736, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3980517625, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 56, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo((MetaName)738690141, PsoDataType.Structure, 120, 0, MetaName.camFollowCameraMetadataPullAroundSettings) - ); - case MetaName.camFollowPedCameraMetadataRappellingAlignment: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataRappellingAlignment, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)261180327, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)1746008730, PsoDataType.Float2, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)256117257, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataRunningShakeSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataRunningShakeSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)491218034, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2700987639, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataSwimmingShakeSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataSwimmingShakeSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)491218034, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1443947683, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2015392943, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataDivingShakeSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataDivingShakeSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataHighFallShakeSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataHighFallShakeSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings: - return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.MaxDurationToTrackVehicles, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1159487467, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2913317904, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)752814960, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1115262693, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DetectionRadius, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToTestDownForVehiclesToReject, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camCollisionMetadata: - return new PsoStructureInfo(MetaName.camCollisionMetadata, 0, 0, 240, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithBrokenFragments, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithBrokenFragmentsOfIgnoredEntities, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMoveTowardsLos, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldSweepToAvoidPopIn, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistPopInBehaviour, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullBackByCapsuleRadius, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithSelectCollision, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithRagdolls, PsoDataType.Bool, 23, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldReportAsCameraTypeTest, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.OcclusionSweep, PsoDataType.Structure, 32, 0, MetaName.camCollisionMetadataOcclusionSweep), - new PsoStructureEntryInfo(MetaName.PathFinding, PsoDataType.Structure, 72, 0, MetaName.camCollisionMetadataPathFinding), - new PsoStructureEntryInfo(MetaName.RotationTowardsLos, PsoDataType.Structure, 88, 0, MetaName.camCollisionMetadataRotationTowardsLos), - new PsoStructureEntryInfo(MetaName.OrbitDistanceDamping, PsoDataType.Structure, 104, 0, MetaName.camCollisionMetadataOrbitDistanceDamping), - new PsoStructureEntryInfo(MetaName.ClippingAvoidance, PsoDataType.Structure, 136, 0, MetaName.camCollisionMetadataClippingAvoidance), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 152, 0, MetaName.camCollisionMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.PushBeyondEntitiesIfClipping, PsoDataType.Structure, 184, 0, MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping), - new PsoStructureEntryInfo(MetaName.PullBackTowardsCollision, PsoDataType.Structure, 216, 0, MetaName.camCollisionMetadataPullBackTowardsCollision) - ); - case MetaName.camCollisionMetadataOcclusionSweep: - return new PsoStructureInfo(MetaName.camCollisionMetadataOcclusionSweep, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.NumCapsuleTests, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionRootSpeedToForcePopIn, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPreCollisionCameraSpeedToForcePopIn, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSweepAngleWhenMovingTowardsLos, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSweepAngleWhenAvoidingPopIn, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOrientationSpeedToMaintainDirection, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCameraMoveSpeedToSweepInDirectionOfTravel, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camCollisionMetadataPathFinding: - return new PsoStructureInfo(MetaName.camCollisionMetadataPathFinding, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxCapsuleTests, PsoDataType.UInt, 8, 0, 0) - ); - case MetaName.camCollisionMetadataRotationTowardsLos: - return new PsoStructureInfo(MetaName.camCollisionMetadataRotationTowardsLos, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camCollisionMetadataOrbitDistanceDamping: - return new PsoStructureInfo(MetaName.camCollisionMetadataOrbitDistanceDamping, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MaxCollisionRootSpeedToPausePullBack, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPreCollisionCameraSpeedToPausePullBack, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceErrorToIgnore, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camCollisionMetadataClippingAvoidance: - return new PsoStructureInfo(MetaName.camCollisionMetadataClippingAvoidance, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxIterations, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.CapsuleLengthForDetection, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camCollisionMetadataBuoyancySettings: - return new PsoStructureInfo(MetaName.camCollisionMetadataBuoyancySettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShouldApplyBuoyancy, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreBuoyancyStateAndAvoidSurface, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHitNormalDotWorldUpForRivers, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.WaterHeightSmoothRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWaterWhenBuoyant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDepthUnderWaterWhenNotBuoyant, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping: - return new PsoStructureInfo(MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ExtraDistanceToPushAway, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingToApplyWhenPushing, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PullBackSpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PushInSpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowOtherCollisionToConstrainCameraIntoEntities, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)925224069, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo((MetaName)631999118, PsoDataType.Bool, 30, 0, 0) - ); - case MetaName.camCollisionMetadataPullBackTowardsCollision: - return new PsoStructureInfo(MetaName.camCollisionMetadataPullBackTowardsCollision, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.camHintHelperMetadata: - return new PsoStructureInfo(MetaName.camHintHelperMetadata, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FovScalar, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1674069994, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)67329582, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2753181554, PsoDataType.Structure, 40, 0, MetaName.camHintHelperMetadataPivotPositionAdditive), - new PsoStructureEntryInfo((MetaName)3051761482, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo((MetaName)399304638, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo((MetaName)315713489, PsoDataType.Bool, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3421755121, PsoDataType.Bool, 73, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1167921072, PsoDataType.Bool, 80, 0, 0) - ); - case MetaName.camHintHelperMetadataPivotPositionAdditive: - return new PsoStructureInfo(MetaName.camHintHelperMetadataPivotPositionAdditive, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)3517580346, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)2171374488, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)3803694830, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)187223663, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camInconsistentBehaviourZoomHelperMetadata: - return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperMetadata, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2835430912, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)192388977, PsoDataType.Structure, 24, 0, MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings), - new PsoStructureEntryInfo((MetaName)3137016932, PsoDataType.Structure, 64, 0, MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings), - new PsoStructureEntryInfo((MetaName)3922359176, PsoDataType.Structure, 104, 0, MetaName.camInconsistentBehaviourZoomHelperAirborneSettings), - new PsoStructureEntryInfo((MetaName)3604184077, PsoDataType.Structure, 144, 0, MetaName.camInconsistentBehaviourZoomHelperLosSettings) - ); - case MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings: - return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2802018341, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings: - return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1513989445, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)423008264, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camInconsistentBehaviourZoomHelperAirborneSettings: - return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperAirborneSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)424844475, PsoDataType.UInt, 32, 0, 0) - ); - case MetaName.camInconsistentBehaviourZoomHelperLosSettings: - return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperLosSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1918423771, PsoDataType.UInt, 32, 0, 0) - ); - case MetaName.camCatchUpHelperMetadata: - return new PsoStructureInfo(MetaName.camCatchUpHelperMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)482340760, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1046944473, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendDuration, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3764337155, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2836572250, PsoDataType.Enum, 32, 0, MetaName.eCurveType) - ); - case MetaName.camLookAtDampingHelperMetadata: - return new PsoStructureInfo(MetaName.camLookAtDampingHelperMetadata, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3543584583, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2722511334, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3076282416, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3481945794, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1705112434, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)627718911, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3152826625, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3880553368, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1561096582, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1150311187, PsoDataType.Float, 52, 0, 0) - ); - case MetaName.camLookAheadHelperMetadata: - return new PsoStructureInfo(MetaName.camLookAheadHelperMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)765307181, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)988110708, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3931376905, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1623903878, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3766959106, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)88070689, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1846985178, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2004585270, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 60, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadata: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadata, 0, 0, 1376, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), - new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), - new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), - new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), - new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), - new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), - new PsoStructureEntryInfo(MetaName.HandBrakeSwingSettings, PsoDataType.Structure, 1104, 0, MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings), - new PsoStructureEntryInfo(MetaName.DuckUnderOverheadCollisionSettings, PsoDataType.Structure, 1136, 0, MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings), - new PsoStructureEntryInfo(MetaName.HighSpeedZoomSettings, PsoDataType.Structure, 1192, 0, MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings), - new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 1224, 0, MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings), - new PsoStructureEntryInfo(MetaName.WaterEntryShakeSettings, PsoDataType.Structure, 1248, 0, MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings), - new PsoStructureEntryInfo(MetaName.VerticalFlightModeSettings, PsoDataType.Structure, 1280, 0, MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings), - new PsoStructureEntryInfo(MetaName.DoorAlignmentSettings, PsoDataType.Structure, 1296, 0, MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings), - new PsoStructureEntryInfo(MetaName.VehicleEntryExitPitchLevelSmoothRate, PsoDataType.Float, 1336, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraOrbitPitchOffsetForHighAngleMode, PsoDataType.Float, 1340, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraOrbitPitchOffsetForThirdPersonFarViewMode, PsoDataType.Float, 1344, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldForceCutToOrbitDistanceLimitsForThirdPersonFarViewMode, PsoDataType.Bool, 1348, 0, 0), - new PsoStructureEntryInfo(MetaName.ThirdPersonVehicleAimCameraRef, PsoDataType.String, 1352, 7, 0), - new PsoStructureEntryInfo((MetaName)4075164277, PsoDataType.Bool, 1356, 0, 0), - new PsoStructureEntryInfo((MetaName)2625336677, PsoDataType.String, 1360, 7, 0), - new PsoStructureEntryInfo((MetaName)3347720841, PsoDataType.Float2, 1364, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.HandBrakeInputEnvelopeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinLateralSkidSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLateralSkidSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SwingSpeedAtMaxSkidSpeed, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.EnvelopeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDuck, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchOffsetWhenFullyDucked, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToPersist, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CapsuleSettings, PsoDataType.Structure, 32, 0, MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings) - ); - case MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.NumTests, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LengthScaling, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.OffsetLimits, PsoDataType.Float2, 16, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBaseFovScaling, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CutsceneBlendSpringConstant, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CutsceneBlendSpringDampingRatio, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxShakeInstances, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DownwardSpeedLimits, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AmplitudeLimits, PsoDataType.Float2, 24, 0, 0) - ); - case MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings: - return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 8, 0, 0) - ); - case MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAlignOnVehicleExit, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo((MetaName)669372144, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.AlignmentConeOffsetTowardsVehicleFrontAngle, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AlignmentConeAngle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AlignmentConeAngleWithTrailer, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCut, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCutForReverseAngle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCutWithTrailer, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camFollowParachuteCameraMetadata: - return new PsoStructureInfo(MetaName.camFollowParachuteCameraMetadata, 0, 0, 1136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), - new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), - new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), - new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), - new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), - new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), - new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), - new PsoStructureEntryInfo(MetaName.CustomSettings, PsoDataType.Structure, 1104, 0, MetaName.camFollowParachuteCameraMetadataCustomSettings) - ); - case MetaName.camFollowParachuteCameraMetadataCustomSettings: - return new PsoStructureInfo(MetaName.camFollowParachuteCameraMetadataCustomSettings, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)3501562487, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)1514912105, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2028447415, PsoDataType.String, 16, 7, 0) - ); - case MetaName.camFirstPersonPedAimCameraMetadata: - return new PsoStructureInfo(MetaName.camFirstPersonPedAimCameraMetadata, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMakeAttachedEntityInvisible, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)1959607978, PsoDataType.Bool, 113, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 114, 0, 0), - new PsoStructureEntryInfo((MetaName)1120407412, PsoDataType.Bool, 115, 0, 0), - new PsoStructureEntryInfo(MetaName.ShakeFirstPersonShootingAbilityLimits, PsoDataType.Float2, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.ShakeAmplitudeScalingForShootingAbilityLimits, PsoDataType.Float2, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)2758176724, PsoDataType.Structure, 136, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), - new PsoStructureEntryInfo((MetaName)330110937, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachPositionSmoothRate, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTorsoIkLimitsOverrideOrbitPitchLimits, PsoDataType.Bool, 188, 0, 0), - new PsoStructureEntryInfo((MetaName)1847867369, PsoDataType.Bool, 189, 0, 0), - new PsoStructureEntryInfo((MetaName)1173900687, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)1322555765, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo((MetaName)1723254225, PsoDataType.Bool, 200, 0, 0) - ); - case MetaName.camFirstPersonAimCameraMetadataHeadingCorrection: - return new PsoStructureInfo(MetaName.camFirstPersonAimCameraMetadataHeadingCorrection, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1496770623, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DeltaTolerance, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadata: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadata, 0, 0, 1664, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldMakeAttachedEntityInvisible, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)1959607978, PsoDataType.Bool, 113, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 114, 0, 0), - new PsoStructureEntryInfo((MetaName)1120407412, PsoDataType.Bool, 115, 0, 0), - new PsoStructureEntryInfo(MetaName.ShakeFirstPersonShootingAbilityLimits, PsoDataType.Float2, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.ShakeAmplitudeScalingForShootingAbilityLimits, PsoDataType.Float2, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)2758176724, PsoDataType.Structure, 136, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), - new PsoStructureEntryInfo((MetaName)330110937, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo((MetaName)3500215588, PsoDataType.Float3, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)1583458555, PsoDataType.Float3, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)3253139357, PsoDataType.Float3, 224, 0, 0), - new PsoStructureEntryInfo((MetaName)4262893203, PsoDataType.Float3, 240, 0, 0), - new PsoStructureEntryInfo((MetaName)2347724525, PsoDataType.Float3, 256, 0, 0), - new PsoStructureEntryInfo((MetaName)3438104893, PsoDataType.Float3, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)424961570, PsoDataType.Float3, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)104465235, PsoDataType.Float3, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)4034848485, PsoDataType.Float3, 320, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)2372600507, PsoDataType.Float2, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)971666241, PsoDataType.Float2, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)162051482, PsoDataType.Float2, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)3789298543, PsoDataType.Float2, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)3507003526, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo((MetaName)1765689234, PsoDataType.String, 384, 7, 0), - new PsoStructureEntryInfo((MetaName)722540604, PsoDataType.String, 388, 7, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 392, 7, 0), - new PsoStructureEntryInfo((MetaName)3102337801, PsoDataType.String, 396, 7, 0), - new PsoStructureEntryInfo((MetaName)1038878908, PsoDataType.String, 400, 7, 0), - new PsoStructureEntryInfo((MetaName)3684814544, PsoDataType.String, 404, 7, 0), - new PsoStructureEntryInfo((MetaName)2377645189, PsoDataType.String, 408, 7, 0), - new PsoStructureEntryInfo((MetaName)3664775821, PsoDataType.String, 412, 7, 0), - new PsoStructureEntryInfo((MetaName)3075522471, PsoDataType.String, 416, 7, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 420, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeAttachPositionSmoothRate, PsoDataType.Float, 424, 0, 0), - new PsoStructureEntryInfo((MetaName)3559802057, PsoDataType.Structure, 432, 0, MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings), - new PsoStructureEntryInfo((MetaName)3284913244, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo((MetaName)742850166, PsoDataType.Float, 548, 0, 0), - new PsoStructureEntryInfo((MetaName)1801708329, PsoDataType.Float, 552, 0, 0), - new PsoStructureEntryInfo((MetaName)522025471, PsoDataType.Float, 556, 0, 0), - new PsoStructureEntryInfo(MetaName.AimFov, PsoDataType.Float, 560, 0, 0), - new PsoStructureEntryInfo((MetaName)2685045238, PsoDataType.Float, 564, 0, 0), - new PsoStructureEntryInfo((MetaName)1545486036, PsoDataType.Float, 568, 0, 0), - new PsoStructureEntryInfo(MetaName.PhoneFov, PsoDataType.Float, 572, 0, 0), - new PsoStructureEntryInfo((MetaName)2263644173, PsoDataType.Float, 576, 0, 0), - new PsoStructureEntryInfo((MetaName)189771911, PsoDataType.Float, 580, 0, 0), - new PsoStructureEntryInfo((MetaName)3266229162, PsoDataType.Float, 584, 0, 0), - new PsoStructureEntryInfo((MetaName)3113298498, PsoDataType.Float, 588, 0, 0), - new PsoStructureEntryInfo((MetaName)317025866, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo((MetaName)788370107, PsoDataType.Float, 596, 0, 0), - new PsoStructureEntryInfo((MetaName)1892114730, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo((MetaName)2312570903, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo((MetaName)1650788232, PsoDataType.Float, 608, 0, 0), - new PsoStructureEntryInfo((MetaName)3142109941, PsoDataType.Float, 612, 0, 0), - new PsoStructureEntryInfo((MetaName)1692829019, PsoDataType.Float, 616, 0, 0), - new PsoStructureEntryInfo((MetaName)1583361695, PsoDataType.Float, 620, 0, 0), - new PsoStructureEntryInfo((MetaName)3530519735, PsoDataType.Float, 624, 0, 0), - new PsoStructureEntryInfo((MetaName)1560089378, PsoDataType.Float, 628, 0, 0), - new PsoStructureEntryInfo((MetaName)1683046794, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo((MetaName)1176445410, PsoDataType.Float, 636, 0, 0), - new PsoStructureEntryInfo((MetaName)3761456258, PsoDataType.Float, 640, 0, 0), - new PsoStructureEntryInfo((MetaName)413985988, PsoDataType.Float, 644, 0, 0), - new PsoStructureEntryInfo((MetaName)731578407, PsoDataType.Float, 648, 0, 0), - new PsoStructureEntryInfo((MetaName)3517278862, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.LadderPitch, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo((MetaName)83336335, PsoDataType.Float, 660, 0, 0), - new PsoStructureEntryInfo((MetaName)3203179444, PsoDataType.Float, 664, 0, 0), - new PsoStructureEntryInfo((MetaName)803486985, PsoDataType.Float, 668, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 672, 0, 0), - new PsoStructureEntryInfo((MetaName)2122499987, PsoDataType.Float, 676, 0, 0), - new PsoStructureEntryInfo((MetaName)1515082975, PsoDataType.Float, 680, 0, 0), - new PsoStructureEntryInfo((MetaName)1515564685, PsoDataType.Float, 684, 0, 0), - new PsoStructureEntryInfo((MetaName)3592059377, PsoDataType.Float, 688, 0, 0), - new PsoStructureEntryInfo((MetaName)448454700, PsoDataType.Bool, 692, 0, 0), - new PsoStructureEntryInfo((MetaName)545313111, PsoDataType.Float, 696, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo((MetaName)1534221961, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo((MetaName)270168093, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo((MetaName)2100042799, PsoDataType.Float, 712, 0, 0), - new PsoStructureEntryInfo((MetaName)3626441228, PsoDataType.UInt, 716, 0, 0), - new PsoStructureEntryInfo((MetaName)700340890, PsoDataType.UInt, 720, 0, 0), - new PsoStructureEntryInfo((MetaName)1968480925, PsoDataType.UInt, 724, 0, 0), - new PsoStructureEntryInfo((MetaName)2850438294, PsoDataType.UInt, 728, 0, 0), - new PsoStructureEntryInfo((MetaName)1608452380, PsoDataType.UInt, 732, 0, 0), - new PsoStructureEntryInfo((MetaName)2387142724, PsoDataType.UInt, 736, 0, 0), - new PsoStructureEntryInfo((MetaName)2743970065, PsoDataType.UInt, 740, 0, 0), - new PsoStructureEntryInfo((MetaName)2452155390, PsoDataType.UInt, 744, 0, 0), - new PsoStructureEntryInfo(MetaName.OrientationSpring, PsoDataType.Structure, 752, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), - new PsoStructureEntryInfo((MetaName)415673303, PsoDataType.Structure, 792, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), - new PsoStructureEntryInfo((MetaName)3397810078, PsoDataType.Structure, 832, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), - new PsoStructureEntryInfo((MetaName)3440729757, PsoDataType.Structure, 872, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)2454767338, PsoDataType.Structure, 888, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)1962460716, PsoDataType.Structure, 904, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)1766077384, PsoDataType.Structure, 920, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)2053281479, PsoDataType.Structure, 936, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)3083287001, PsoDataType.Structure, 952, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)4060968766, PsoDataType.Structure, 968, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)2437540040, PsoDataType.Structure, 984, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)3391036765, PsoDataType.Structure, 1000, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)2728534787, PsoDataType.Structure, 1016, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)3139215619, PsoDataType.Structure, 1032, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)4087791749, PsoDataType.Structure, 1048, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)2550891007, PsoDataType.Structure, 1064, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), - new PsoStructureEntryInfo((MetaName)475503552, PsoDataType.Float, 1080, 0, 0), - new PsoStructureEntryInfo((MetaName)1215439957, PsoDataType.Float2, 1084, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTorsoIkLimitsOverrideOrbitPitchLimits, PsoDataType.Bool, 1092, 0, 0), - new PsoStructureEntryInfo((MetaName)1723254225, PsoDataType.Bool, 1093, 0, 0), - new PsoStructureEntryInfo((MetaName)366723406, PsoDataType.String, 1096, 7, 0), - new PsoStructureEntryInfo((MetaName)264754789, PsoDataType.String, 1100, 7, 0), - new PsoStructureEntryInfo((MetaName)1539647797, PsoDataType.String, 1104, 7, 0), - new PsoStructureEntryInfo((MetaName)1519473347, PsoDataType.Float, 1108, 0, 0), - new PsoStructureEntryInfo((MetaName)3224324247, PsoDataType.Float, 1112, 0, 0), - new PsoStructureEntryInfo((MetaName)2478271115, PsoDataType.Float, 1116, 0, 0), - new PsoStructureEntryInfo((MetaName)2317113905, PsoDataType.Float, 1120, 0, 0), - new PsoStructureEntryInfo((MetaName)3903912151, PsoDataType.Float, 1124, 0, 0), - new PsoStructureEntryInfo((MetaName)2266019553, PsoDataType.Float, 1128, 0, 0), - new PsoStructureEntryInfo((MetaName)3706052819, PsoDataType.Float, 1132, 0, 0), - new PsoStructureEntryInfo((MetaName)2722258227, PsoDataType.Float, 1136, 0, 0), - new PsoStructureEntryInfo((MetaName)1525907069, PsoDataType.Float, 1140, 0, 0), - new PsoStructureEntryInfo((MetaName)2570774561, PsoDataType.Float, 1144, 0, 0), - new PsoStructureEntryInfo((MetaName)1547572758, PsoDataType.Bool, 1148, 0, 0), - new PsoStructureEntryInfo((MetaName)3957958745, PsoDataType.UInt, 1152, 0, 0), - new PsoStructureEntryInfo((MetaName)1630855608, PsoDataType.Float, 1156, 0, 0), - new PsoStructureEntryInfo((MetaName)3965978499, PsoDataType.Structure, 1160, 0, MetaName.camFirstPersonShooterCameraMetadataStickyAim), - new PsoStructureEntryInfo((MetaName)585212636, PsoDataType.Structure, 1272, 0, MetaName.camFirstPersonShooterCameraMetadataStickyAim), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 1384, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 1385, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 1388, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 1392, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 1396, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 1400, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 1404, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 1408, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 1412, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 1416, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 1420, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 1424, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 1428, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 1432, 0, 0), - new PsoStructureEntryInfo((MetaName)2447870594, PsoDataType.Float, 1436, 0, 0), - new PsoStructureEntryInfo((MetaName)2225908075, PsoDataType.Float, 1440, 0, 0), - new PsoStructureEntryInfo((MetaName)1894138, PsoDataType.Float, 1444, 0, 0), - new PsoStructureEntryInfo((MetaName)724885771, PsoDataType.Float, 1448, 0, 0), - new PsoStructureEntryInfo((MetaName)2413827894, PsoDataType.Float2, 1452, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverSettings, PsoDataType.Structure, 1464, 0, MetaName.camFirstPersonShooterCameraMetadataCoverSettings), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings), - new PsoStructureEntryInfo((MetaName)2011532787, PsoDataType.Array, 1584, 1, (MetaName)131236), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 1656, 7, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings, 0, 0, 112, - new PsoStructureEntryInfo((MetaName)3727099699, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3120224920, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2408234737, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)869960116, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3340971535, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2197092363, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2198368821, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3606762226, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1647925848, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)490937808, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)379620733, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1441798592, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3840322276, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3383026591, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1824793815, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1259376027, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2964527414, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)2439730995, PsoDataType.Float3, 96, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataOrientationSpring: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataOrientationSpring, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.HeadingLimits, PsoDataType.Float2, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1524988618, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1290012653, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataStickyAim: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataStickyAim, 0, 0, 112, - new PsoStructureEntryInfo((MetaName)934287534, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1890095417, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2911838887, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1168068740, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)943460322, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2440008981, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3546382126, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3702929248, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1390609527, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1952283316, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1859396322, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)3508865952, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)4071651879, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3012719683, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1163787532, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3148686816, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2294593316, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3264503435, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)432760898, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3118501359, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2024506330, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1824271937, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)721888806, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)903289241, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)2991714924, PsoDataType.Float, 104, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataCoverSettings: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataCoverSettings, 0, 0, 120, - new PsoStructureEntryInfo((MetaName)2970917480, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)256711860, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)2716737212, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1153272400, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)11232964, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1680843526, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1294539981, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3548711893, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3299300152, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1497386222, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)783496886, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2616989255, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingCorrection, PsoDataType.Structure, 56, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), - new PsoStructureEntryInfo((MetaName)907428778, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)4143200730, PsoDataType.SInt, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)105496678, PsoDataType.SInt, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)2098811685, PsoDataType.SInt, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)1946159554, PsoDataType.SInt, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)3595423851, PsoDataType.SInt, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)153370955, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1271201291, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)558015512, PsoDataType.UInt, 112, 0, 0) - ); - case MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings: - return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)741085985, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)87271889, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)4190510062, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1438187592, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1823031239, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2144963791, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.camFirstPersonHeadTrackingAimCameraMetadata: - return new PsoStructureInfo(MetaName.camFirstPersonHeadTrackingAimCameraMetadata, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 116, 0, 0) - ); - case MetaName.camThirdPersonPedAimCameraMetadata: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadata, 0, 0, 1040, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), - new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), - new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), - new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0) - ); - case MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldApplyDamping, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedHeadingSpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedHeadingSpringDampingRatio, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedPitchSpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedPitchSpringDampingRatio, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedDistanceSpringConstant, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.StunnedDistanceSpringDampingRatio, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldApplyScaling, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnDistanceLimits, PsoDataType.Float2, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingLimits, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingSpringConstant, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingSpringDampingRatio, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraMetadata: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraMetadata, 0, 0, 1584, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), - new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), - new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), - new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), - new PsoStructureEntryInfo((MetaName)2612404486, PsoDataType.Bool, 1040, 0, 0), - new PsoStructureEntryInfo((MetaName)3464513788, PsoDataType.String, 1044, 7, 0), - new PsoStructureEntryInfo((MetaName)3165832172, PsoDataType.Float, 1048, 0, 0), - new PsoStructureEntryInfo((MetaName)313901382, PsoDataType.Float, 1052, 0, 0), - new PsoStructureEntryInfo((MetaName)3456520914, PsoDataType.Float, 1056, 0, 0), - new PsoStructureEntryInfo((MetaName)3227758752, PsoDataType.Float, 1060, 0, 0), - new PsoStructureEntryInfo((MetaName)2595201884, PsoDataType.Structure, 1064, 0, MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings), - new PsoStructureEntryInfo((MetaName)1699579049, PsoDataType.Structure, 1088, 0, MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings), - new PsoStructureEntryInfo((MetaName)2514985597, PsoDataType.Structure, 1112, 0, MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings), - new PsoStructureEntryInfo((MetaName)3459655185, PsoDataType.Structure, 1136, 0, MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings), - new PsoStructureEntryInfo((MetaName)1039438125, PsoDataType.Structure, 1192, 0, MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings), - new PsoStructureEntryInfo((MetaName)2331386580, PsoDataType.Structure, 1248, 0, MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings), - new PsoStructureEntryInfo((MetaName)3975806377, PsoDataType.Structure, 1432, 0, MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings), - new PsoStructureEntryInfo((MetaName)2579888707, PsoDataType.Structure, 1464, 0, MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings) - ); - case MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.AmplitudeScale, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3083741385, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2434404012, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo((MetaName)1424595128, PsoDataType.Bool, 22, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3290868314, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1239610477, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)4266810853, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2490035552, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1582111169, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ErrorThreshold, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.SideOffset, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3185812029, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2740464011, PsoDataType.Float, 52, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)1778381348, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)352609433, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2503271690, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings, 0, 0, 184, - new PsoStructureEntryInfo((MetaName)3112353702, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3298892127, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)3924454742, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2215779446, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)917560913, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1705773296, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3495762240, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2011477591, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3944656129, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3273599536, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.ZoomFactor, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1293989475, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3934763180, PsoDataType.Structure, 56, 0, MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings), - new PsoStructureEntryInfo((MetaName)4209943355, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)3222932576, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)1411402256, PsoDataType.Structure, 120, 0, MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 180, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2192037365, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)1207772736, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1953981041, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleCmini, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3067708566, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3928624067, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)4117544351, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3546588287, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2433975532, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2894326732, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.AttackDelay, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AttackDuration, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ReleaseDelay, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1918481730, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredPitch, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3067708566, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3928624067, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)4117544351, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3648026356, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)632884413, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3501089975, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)1841607681, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)405521980, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3044106186, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2342994624, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2363962395, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3996729234, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2974603259, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1163820100, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1153320978, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)887750583, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.parameterIntensity, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3038154213, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)795086429, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2305231569, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2043206239, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1283135688, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3878807616, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3640542370, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)3758922505, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1764223557, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)3214654546, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)1111260888, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)3050977735, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1185331567, PsoDataType.Float, 108, 0, 0) - ); - case MetaName.camThirdPersonPedAimInCoverCameraMetadata: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadata, 0, 0, 1248, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), - new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), - new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), - new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), - new PsoStructureEntryInfo((MetaName)124410885, PsoDataType.Float, 1040, 0, 0), - new PsoStructureEntryInfo((MetaName)1852506764, PsoDataType.Float, 1044, 0, 0), - new PsoStructureEntryInfo((MetaName)1914946004, PsoDataType.Float, 1048, 0, 0), - new PsoStructureEntryInfo((MetaName)2125876256, PsoDataType.Float, 1052, 0, 0), - new PsoStructureEntryInfo((MetaName)3456376985, PsoDataType.Float, 1056, 0, 0), - new PsoStructureEntryInfo(MetaName.streamedMusc, PsoDataType.Float, 1060, 0, 0), - new PsoStructureEntryInfo((MetaName)2791057952, PsoDataType.Float, 1064, 0, 0), - new PsoStructureEntryInfo((MetaName)1336398630, PsoDataType.Bool, 1068, 0, 0), - new PsoStructureEntryInfo((MetaName)1847527244, PsoDataType.Float, 1072, 0, 0), - new PsoStructureEntryInfo((MetaName)364456330, PsoDataType.Float, 1076, 0, 0), - new PsoStructureEntryInfo((MetaName)3398320415, PsoDataType.Float, 1080, 0, 0), - new PsoStructureEntryInfo((MetaName)2699503170, PsoDataType.Float, 1084, 0, 0), - new PsoStructureEntryInfo((MetaName)2215910236, PsoDataType.Float, 1088, 0, 0), - new PsoStructureEntryInfo((MetaName)2140597790, PsoDataType.Float, 1092, 0, 0), - new PsoStructureEntryInfo((MetaName)2141354850, PsoDataType.Float, 1096, 0, 0), - new PsoStructureEntryInfo((MetaName)9125054, PsoDataType.Float, 1100, 0, 0), - new PsoStructureEntryInfo((MetaName)341585039, PsoDataType.Float, 1104, 0, 0), - new PsoStructureEntryInfo((MetaName)3090152422, PsoDataType.Float, 1108, 0, 0), - new PsoStructureEntryInfo((MetaName)3518102089, PsoDataType.Float, 1112, 0, 0), - new PsoStructureEntryInfo((MetaName)2714979879, PsoDataType.Float, 1116, 0, 0), - new PsoStructureEntryInfo((MetaName)4047322117, PsoDataType.Float, 1120, 0, 0), - new PsoStructureEntryInfo((MetaName)10419895, PsoDataType.Float, 1124, 0, 0), - new PsoStructureEntryInfo((MetaName)817394632, PsoDataType.Float2, 1128, 0, 0), - new PsoStructureEntryInfo((MetaName)3793303691, PsoDataType.Bool, 1136, 0, 0), - new PsoStructureEntryInfo((MetaName)891610436, PsoDataType.Float, 1140, 0, 0), - new PsoStructureEntryInfo((MetaName)1332592052, PsoDataType.Float, 1144, 0, 0), - new PsoStructureEntryInfo((MetaName)3712243434, PsoDataType.Float, 1148, 0, 0), - new PsoStructureEntryInfo((MetaName)2126717159, PsoDataType.Float, 1152, 0, 0), - new PsoStructureEntryInfo((MetaName)467663222, PsoDataType.Float, 1156, 0, 0), - new PsoStructureEntryInfo((MetaName)3920880465, PsoDataType.Float, 1160, 0, 0), - new PsoStructureEntryInfo((MetaName)1407257659, PsoDataType.UInt, 1164, 0, 0), - new PsoStructureEntryInfo((MetaName)1350298358, PsoDataType.Structure, 1168, 0, MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings), - new PsoStructureEntryInfo(MetaName.AimingSettings, PsoDataType.Structure, 1208, 0, MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings) - ); - case MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)2811394796, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)388057725, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)4026985674, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2972801644, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings: - return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)3794685898, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3031220740, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)810186943, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2302950975, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camThirdPersonPedMeleeAimCameraMetadata: - return new PsoStructureInfo(MetaName.camThirdPersonPedMeleeAimCameraMetadata, 0, 0, 1088, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), - new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), - new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), - new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), - new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), - new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), - new PsoStructureEntryInfo((MetaName)3195731427, PsoDataType.Float, 1040, 0, 0), - new PsoStructureEntryInfo((MetaName)2888452072, PsoDataType.Float2, 1044, 0, 0), - new PsoStructureEntryInfo((MetaName)2501102835, PsoDataType.Float, 1052, 0, 0), - new PsoStructureEntryInfo((MetaName)2903662656, PsoDataType.Float, 1056, 0, 0), - new PsoStructureEntryInfo((MetaName)2037218535, PsoDataType.Float, 1060, 0, 0), - new PsoStructureEntryInfo((MetaName)4219845621, PsoDataType.Float, 1064, 0, 0), - new PsoStructureEntryInfo((MetaName)3549368383, PsoDataType.Float, 1068, 0, 0), - new PsoStructureEntryInfo((MetaName)1000603972, PsoDataType.Float, 1072, 0, 0), - new PsoStructureEntryInfo((MetaName)1991971403, PsoDataType.Float, 1076, 0, 0) - ); - case MetaName.camThirdPersonVehicleAimCameraMetadata: - return new PsoStructureInfo(MetaName.camThirdPersonVehicleAimCameraMetadata, 0, 0, 896, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), - new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), - new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), - new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), - new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), - new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), - new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), - new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), - new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), - new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), - new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), - new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAimingForDriver, PsoDataType.Bool, 880, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAimingForPassenger, PsoDataType.Bool, 881, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraSideOffsetForHangingOnLeftSide, PsoDataType.Float, 884, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraSideOffsetForHangingOnRightSide, PsoDataType.Float, 888, 0, 0) - ); - case MetaName.camMarketingFreeCameraMetadata: - return new PsoStructureInfo(MetaName.camMarketingFreeCameraMetadata, 0, 0, 200, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0) - ); - case MetaName.camMarketingFreeCameraMetadataInputResponse: - return new PsoStructureInfo(MetaName.camMarketingFreeCameraMetadataInputResponse, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)3855676319, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.camMarketingAToBCameraMetadata: - return new PsoStructureInfo(MetaName.camMarketingAToBCameraMetadata, 0, 0, 216, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)1044888659, PsoDataType.String, 200, 7, 0), - new PsoStructureEntryInfo((MetaName)1147067733, PsoDataType.UInt, 204, 0, 0), - new PsoStructureEntryInfo((MetaName)1825469896, PsoDataType.UInt, 208, 0, 0) - ); - case MetaName.camTimedSplineCameraMetadata: - return new PsoStructureInfo(MetaName.camTimedSplineCameraMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) - ); - case MetaName.camMarketingOrbitCameraMetadata: - return new PsoStructureInfo(MetaName.camMarketingOrbitCameraMetadata, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 204, 7, 0) - ); - case MetaName.camMarketingMountedCameraMetadata: - return new PsoStructureInfo(MetaName.camMarketingMountedCameraMetadata, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 204, 7, 0) - ); - case MetaName.camMarketingStickyCameraMetadata: - return new PsoStructureInfo(MetaName.camMarketingStickyCameraMetadata, 0, 0, 200, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0) - ); - case MetaName.camScriptedCameraMetadata: - return new PsoStructureInfo(MetaName.camScriptedCameraMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camScriptedFlyCameraMetadata: - return new PsoStructureInfo(MetaName.camScriptedFlyCameraMetadata, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1160500952, PsoDataType.Structure, 40, 0, MetaName.camScriptedFlyCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2802203540, PsoDataType.Structure, 64, 0, MetaName.camScriptedFlyCameraMetadataInputResponse), - new PsoStructureEntryInfo(MetaName.DefaultPitch, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)2736468652, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.CapsuleRadius, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)2779060394, PsoDataType.UInt, 112, 0, 0) - ); - case MetaName.camScriptedFlyCameraMetadataInputResponse: - return new PsoStructureInfo(MetaName.camScriptedFlyCameraMetadataInputResponse, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAcceleration, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDeceleration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camCustomTimedSplineCameraMetadata: - return new PsoStructureInfo(MetaName.camCustomTimedSplineCameraMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) - ); - case MetaName.camRoundedSplineCameraMetadata: - return new PsoStructureInfo(MetaName.camRoundedSplineCameraMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camSmoothedSplineCameraMetadata: - return new PsoStructureInfo(MetaName.camSmoothedSplineCameraMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) - ); - case MetaName.camSwitchCameraMetadata: - return new PsoStructureInfo(MetaName.camSwitchCameraMetadata, 0, 0, 144, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1245276384, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)2105074563, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.Fov, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MotionBlurStrength, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1056782751, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)341706306, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2303904065, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)978298090, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultPitch, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)1771807090, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)1215756626, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1181521957, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)2559186523, PsoDataType.UInt, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)1045169360, PsoDataType.UInt, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)1298516568, PsoDataType.UInt, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3976211620, PsoDataType.UInt, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)3193297650, PsoDataType.UInt, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)3466836211, PsoDataType.UInt, 132, 0, 0) - ); - case MetaName.camReplayRecordedCameraMetadata: - return new PsoStructureInfo(MetaName.camReplayRecordedCameraMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camReplayPresetCameraMetadata: - return new PsoStructureInfo(MetaName.camReplayPresetCameraMetadata, 0, 0, 256, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3243156997, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3869518259, PsoDataType.Structure, 80, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 104, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 128, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)777402839, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)1557834870, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)1089474876, PsoDataType.Bool, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)2480397790, PsoDataType.Bool, 173, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionSettings, PsoDataType.Structure, 176, 0, MetaName.camReplayBaseCameraMetadataCollisionSettings), - new PsoStructureEntryInfo((MetaName)549109147, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo((MetaName)3394194196, PsoDataType.UInt, 228, 0, 0), - new PsoStructureEntryInfo((MetaName)2704093958, PsoDataType.UInt, 232, 0, 0), - new PsoStructureEntryInfo((MetaName)1677933530, PsoDataType.UInt, 236, 0, 0), - new PsoStructureEntryInfo((MetaName)343964264, PsoDataType.UInt, 240, 0, 0), - new PsoStructureEntryInfo((MetaName)681964647, PsoDataType.UInt, 244, 0, 0), - new PsoStructureEntryInfo((MetaName)2782721869, PsoDataType.UInt, 248, 0, 0) - ); - case MetaName.camReplayBaseCameraMetadataInputResponse: - return new PsoStructureInfo(MetaName.camReplayBaseCameraMetadataInputResponse, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAcceleration, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDeceleration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camReplayBaseCameraMetadataCollisionSettings: - return new PsoStructureInfo(MetaName.camReplayBaseCameraMetadataCollisionSettings, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)2162401385, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.WaterHeightSmoothRate, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)653804618, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3232040475, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)819688366, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)122123361, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)557881422, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 40, 0, 0) - ); - case MetaName.camReplayFreeCameraMetadata: - return new PsoStructureInfo(MetaName.camReplayFreeCameraMetadata, 0, 0, 544, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1160500952, PsoDataType.Structure, 48, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2802203540, PsoDataType.Structure, 72, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2292446130, PsoDataType.Structure, 96, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 120, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)1176189471, PsoDataType.Structure, 168, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)4043692651, PsoDataType.Structure, 192, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)2391928883, PsoDataType.Structure, 216, 0, MetaName.camReplayBaseCameraMetadataInputResponse), - new PsoStructureEntryInfo((MetaName)1466164024, PsoDataType.Structure, 240, 0, MetaName.camInterpolatorMetadata), - new PsoStructureEntryInfo((MetaName)3699879509, PsoDataType.Structure, 280, 0, MetaName.camInterpolatorMetadata), - new PsoStructureEntryInfo((MetaName)2461431150, PsoDataType.Structure, 320, 0, MetaName.camInterpolatorMetadata), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.CapsuleRadius, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo((MetaName)537337364, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo((MetaName)870756038, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo((MetaName)1068739939, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo((MetaName)3629360459, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo((MetaName)479683481, PsoDataType.Float, 396, 0, 0), - new PsoStructureEntryInfo((MetaName)2077539523, PsoDataType.Float3, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionSettings, PsoDataType.Structure, 416, 0, MetaName.camReplayBaseCameraMetadataCollisionSettings), - new PsoStructureEntryInfo((MetaName)4113213041, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo((MetaName)2101093733, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo((MetaName)2090863388, PsoDataType.Float, 472, 0, 0), - new PsoStructureEntryInfo((MetaName)109690208, PsoDataType.Float, 476, 0, 0), - new PsoStructureEntryInfo((MetaName)425553139, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)2285453310, PsoDataType.UInt, 484, 0, 0), - new PsoStructureEntryInfo((MetaName)3186336829, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo((MetaName)858986389, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo((MetaName)168114371, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo((MetaName)2257617130, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo((MetaName)4119877675, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo((MetaName)2969211614, PsoDataType.UInt, 508, 0, 0), - new PsoStructureEntryInfo((MetaName)3394194196, PsoDataType.UInt, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)2704093958, PsoDataType.UInt, 516, 0, 0), - new PsoStructureEntryInfo((MetaName)1677933530, PsoDataType.UInt, 520, 0, 0), - new PsoStructureEntryInfo((MetaName)343964264, PsoDataType.UInt, 524, 0, 0), - new PsoStructureEntryInfo((MetaName)681964647, PsoDataType.UInt, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)2782721869, PsoDataType.UInt, 532, 0, 0), - new PsoStructureEntryInfo((MetaName)3026527735, PsoDataType.Float, 536, 0, 0), - new PsoStructureEntryInfo((MetaName)1272604977, PsoDataType.Float, 540, 0, 0) - ); - case MetaName.camShakeMetadata: - return new PsoStructureInfo(MetaName.camShakeMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)1260823161, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)1428204256, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3480173900, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camShakeMetadataFrameComponent), - new PsoStructureEntryInfo(MetaName.FrameComponents, PsoDataType.Array, 24, 0, (MetaName)4), - new PsoStructureEntryInfo(MetaName.Vibration, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camShakeMetadataFrameComponent: - return new PsoStructureInfo(MetaName.camShakeMetadataFrameComponent, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, (MetaName)4206293824), - new PsoStructureEntryInfo((MetaName)3866719227, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.EnvelopeRef, PsoDataType.String, 16, 7, 0) - ); - case MetaName.camOscillatorMetadata: - return new PsoStructureInfo(MetaName.camOscillatorMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Waveform, PsoDataType.Enum, 16, 0, (MetaName)902027429), - new PsoStructureEntryInfo(MetaName.Amplitude, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.Frequency, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.phase, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2974245218, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.Decay, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.camAnimatedShakeMetadata: - return new PsoStructureInfo(MetaName.camAnimatedShakeMetadata, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)1260823161, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)1428204256, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3480173900, PsoDataType.Bool, 21, 0, 0) - ); - case MetaName.camCinematicCameraManShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicCameraManShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.camCinematicCraningCameraManShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicCraningCameraManShotMetadata, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)934463872, PsoDataType.Bool, 65, 0, 0), - new PsoStructureEntryInfo((MetaName)2227467637, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)943740099, PsoDataType.Bool, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1606540295, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3516181833, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3249173046, PsoDataType.Float2, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2987455099, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0) - ); - case MetaName.camCinematicInVehicleCrashShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleCrashShotMetadata, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRoll, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3669617802, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3100384106, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelocity, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)3730987855, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)4150416286, PsoDataType.UInt, 88, 0, 0) - ); - case MetaName.camCinematicVehiclePartShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehiclePartShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)233780411, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicHeliTrackingShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicHeliTrackingShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.camCinematicVehicleOrbitShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicVehicleLowOrbitShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleLowOrbitShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicTrainRoofMountedShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicTrainRoofMountedShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicTrainStationShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicTrainStationShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicTrainPassengerShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicTrainPassengerShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicTrainTrackShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicTrainTrackShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicPoliceCarMountedShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicPoliceCarMountedShotMetadata, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.LimitAttachParentRelativePitchAndHeading, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldTerminateForPitchAndHeading, PsoDataType.Bool, 65, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRelativePitch, PsoDataType.Float2, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialRelativePitchLimits, PsoDataType.Float2, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialRelativeHeadingLimits, PsoDataType.Float2, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 108, 0, 0) - ); - case MetaName.camCinematicPoliceHeliMountedShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicPoliceHeliMountedShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.camCinematicPoliceInCoverShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicPoliceInCoverShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.camCinematicPoliceRoadBlockShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicPoliceRoadBlockShotMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)876494977, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.SpreadLimit, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 72, 0, 0) - ); - case MetaName.camCinematicPoliceExitVehicleShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicPoliceExitVehicleShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.camCinematicOnFootIdleShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootIdleShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicOnFootFirstPersonIdleShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootFirstPersonIdleShotMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Cameras, PsoDataType.Array, 64, 0, (MetaName)14) - ); - case MetaName.camCinematicStuntJumpShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicStuntJumpShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicParachuteHeliShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicParachuteHeliShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicParachuteCameraManShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicParachuteCameraManShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicOnFootAssistedAimingKillShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootAssistedAimingKillShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1965493319, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)513375599, PsoDataType.Float, 68, 0, 0) - ); - case MetaName.camCinematicOnFootMeleeShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootMeleeShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicVehicleBonnetShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleBonnetShotMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1109718587, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)4170146926, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2661334408, PsoDataType.String, 72, 7, 0) - ); - case MetaName.camCinematicBustedShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicBustedShotMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3180920449, PsoDataType.Float, 64, 0, 0) - ); - case MetaName.camCinematicVehicleGroupShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleGroupShotMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)189014933, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3490628210, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)456924361, PsoDataType.UInt, 72, 0, 0) - ); - case MetaName.camCinematicMissileKillShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicMissileKillShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicWaterCrashShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicWaterCrashShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicFallFromHeliShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicFallFromHeliShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicVehicleConvertibleRoofShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicVehicleConvertibleRoofShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camCinematicScriptRaceCheckPointShotMetadata: - return new PsoStructureInfo(MetaName.camCinematicScriptRaceCheckPointShotMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), - new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camLongSwoopSwitchHelperMetadata: - return new PsoStructureInfo(MetaName.camLongSwoopSwitchHelperMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), - new PsoStructureEntryInfo((MetaName)796068415, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)417423151, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3958574934, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2939152164, PsoDataType.Enum, 52, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2707662935, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)26423852, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)322264486, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2868975511, PsoDataType.Enum, 68, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)3659327390, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)833330146, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.camShortZoomToHeadSwitchHelperMetadata: - return new PsoStructureInfo(MetaName.camShortZoomToHeadSwitchHelperMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), - new PsoStructureEntryInfo((MetaName)864831122, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1837935839, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2395979106, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)4037747409, PsoDataType.Float, 68, 0, 0) - ); - case MetaName.camShortRotationSwitchHelperMetadata: - return new PsoStructureInfo(MetaName.camShortRotationSwitchHelperMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), - new PsoStructureEntryInfo((MetaName)2291716575, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camShortTranslationSwitchHelperMetadata: - return new PsoStructureInfo(MetaName.camShortTranslationSwitchHelperMetadata, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), - new PsoStructureEntryInfo((MetaName)3634726737, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.camShortZoomInOutSwitchHelperMetadata: - return new PsoStructureInfo(MetaName.camShortZoomInOutSwitchHelperMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), - new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), - new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), - new PsoStructureEntryInfo((MetaName)1190587282, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)547488153, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2504913741, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)26423852, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)4037747409, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.camNearClipScannerMetadata: - return new PsoStructureInfo(MetaName.camNearClipScannerMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)494178060, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1713774083, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3006651453, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1502537267, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3831489261, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1103532228, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)639510975, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1947972687, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)529344496, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)1434632498, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3130208423, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1525295652, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)304640727, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2477079271, PsoDataType.Float, 72, 0, 0) - ); - case MetaName.camVehicleCustomSettingsMetadata: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadata, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DoorAlignmentSettings, PsoDataType.Structure, 16, 0, MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings), - new PsoStructureEntryInfo((MetaName)2728784918, PsoDataType.Structure, 56, 0, MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings), - new PsoStructureEntryInfo((MetaName)556143364, PsoDataType.Structure, 72, 0, MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings), - new PsoStructureEntryInfo((MetaName)981761687, PsoDataType.Structure, 104, 0, MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings), - new PsoStructureEntryInfo((MetaName)955775077, PsoDataType.Structure, 136, 0, MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings), - new PsoStructureEntryInfo((MetaName)3842334374, PsoDataType.Structure, 152, 0, MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras), - new PsoStructureEntryInfo((MetaName)3299186532, PsoDataType.Bool, 184, 0, 0) - ); - case MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)2549072274, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)109781807, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)2400069518, PsoDataType.Array, 16, 0, (MetaName)2) - ); - case MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)3579087558, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.HeightScaling, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras: - return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camSeatSpecificCameras), - new PsoStructureEntryInfo((MetaName)1517635298, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.camSeatSpecificCameras: - return new PsoStructureInfo(MetaName.camSeatSpecificCameras, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.SeatIndex, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)1261448360, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.PovCameraOffset, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2254474492, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)273799675, PsoDataType.Bool, 36, 0, 0) - ); - case MetaName.camGameplayDirectorMetadata: - return new PsoStructureInfo(MetaName.camGameplayDirectorMetadata, 0, 0, 608, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2089690180, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo((MetaName)519684035, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)4121580243, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)3253949128, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo((MetaName)3345137885, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)2365172496, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.ThirdPersonVehicleAimCameraRef, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)3734793071, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo((MetaName)2936418982, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo((MetaName)595399339, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo((MetaName)4266955763, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo((MetaName)1070442381, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo((MetaName)838085564, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo((MetaName)1252415609, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo((MetaName)2466448846, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo((MetaName)3845919335, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo((MetaName)3326977311, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo((MetaName)374047020, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo((MetaName)859347369, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo((MetaName)1384877759, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo((MetaName)399013837, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo((MetaName)3929905827, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo((MetaName)2078537289, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo((MetaName)2211994659, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo((MetaName)1839344859, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo((MetaName)1168367025, PsoDataType.String, 124, 7, 0), - new PsoStructureEntryInfo((MetaName)3316487821, PsoDataType.String, 128, 7, 0), - new PsoStructureEntryInfo((MetaName)2772847581, PsoDataType.String, 132, 7, 0), - new PsoStructureEntryInfo((MetaName)766173022, PsoDataType.String, 136, 7, 0), - new PsoStructureEntryInfo((MetaName)2535543863, PsoDataType.String, 140, 7, 0), - new PsoStructureEntryInfo((MetaName)160927927, PsoDataType.String, 144, 7, 0), - new PsoStructureEntryInfo((MetaName)478304411, PsoDataType.String, 148, 7, 0), - new PsoStructureEntryInfo((MetaName)2995820414, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo((MetaName)2615323901, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo((MetaName)773221014, PsoDataType.UInt, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)1041806552, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)2032331076, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)1446696509, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo((MetaName)3986662918, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)508043832, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)2976021060, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo((MetaName)3396642792, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo((MetaName)3225930628, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)1352017718, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo((MetaName)73333937, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo((MetaName)1414986019, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo((MetaName)3574987574, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)992242800, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo((MetaName)2148272557, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo((MetaName)1884609047, PsoDataType.UInt, 220, 0, 0), - new PsoStructureEntryInfo((MetaName)839256524, PsoDataType.Float2, 224, 0, 0), - new PsoStructureEntryInfo((MetaName)3914143003, PsoDataType.Float2, 232, 0, 0), - new PsoStructureEntryInfo((MetaName)1935117365, PsoDataType.Float2, 240, 0, 0), - new PsoStructureEntryInfo((MetaName)3465208228, PsoDataType.Float2, 248, 0, 0), - new PsoStructureEntryInfo((MetaName)2745575061, PsoDataType.UInt, 256, 0, 0), - new PsoStructureEntryInfo((MetaName)19236851, PsoDataType.UInt, 260, 0, 0), - new PsoStructureEntryInfo((MetaName)3381171437, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo((MetaName)4274113098, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo((MetaName)3364491568, PsoDataType.UInt, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)565980479, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo((MetaName)467608921, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo((MetaName)3180328046, PsoDataType.UInt, 284, 0, 0), - new PsoStructureEntryInfo((MetaName)924888517, PsoDataType.UInt, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)1870040536, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camGameplayDirectorMetadataVehicleCustomSettings), - new PsoStructureEntryInfo(MetaName.VehicleCustomSettingsList, PsoDataType.Array, 296, 0, (MetaName)66), - new PsoStructureEntryInfo((MetaName)3559905910, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)259392755, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)1523938219, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo((MetaName)3704241863, PsoDataType.UInt, 324, 0, 0), - new PsoStructureEntryInfo((MetaName)2185907197, PsoDataType.UInt, 328, 0, 0), - new PsoStructureEntryInfo((MetaName)2766631017, PsoDataType.UInt, 332, 0, 0), - new PsoStructureEntryInfo((MetaName)4088657953, PsoDataType.UInt, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)2940797056, PsoDataType.UInt, 340, 0, 0), - new PsoStructureEntryInfo((MetaName)926072750, PsoDataType.UInt, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)4071374960, PsoDataType.UInt, 348, 0, 0), - new PsoStructureEntryInfo((MetaName)4097214758, PsoDataType.UInt, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)4182146981, PsoDataType.UInt, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)3961367630, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)1597015313, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo((MetaName)2284520874, PsoDataType.Bool, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)4217422073, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo((MetaName)636518286, PsoDataType.String, 376, 7, 0), - new PsoStructureEntryInfo((MetaName)984379181, PsoDataType.UInt, 380, 0, 0), - new PsoStructureEntryInfo((MetaName)2430934664, PsoDataType.UInt, 384, 0, 0), - new PsoStructureEntryInfo((MetaName)1190562413, PsoDataType.Float2, 388, 0, 0), - new PsoStructureEntryInfo((MetaName)3193796044, PsoDataType.Float2, 396, 0, 0), - new PsoStructureEntryInfo((MetaName)3497158180, PsoDataType.Float2, 404, 0, 0), - new PsoStructureEntryInfo((MetaName)202581691, PsoDataType.Float2, 412, 0, 0), - new PsoStructureEntryInfo((MetaName)1600149759, PsoDataType.Float2, 420, 0, 0), - new PsoStructureEntryInfo((MetaName)310864401, PsoDataType.Float2, 428, 0, 0), - new PsoStructureEntryInfo((MetaName)910310359, PsoDataType.Float, 436, 0, 0), - new PsoStructureEntryInfo((MetaName)1518272577, PsoDataType.Float, 440, 0, 0), - new PsoStructureEntryInfo((MetaName)2881277133, PsoDataType.Float, 444, 0, 0), - new PsoStructureEntryInfo((MetaName)1283045856, PsoDataType.Float, 448, 0, 0), - new PsoStructureEntryInfo((MetaName)1013584657, PsoDataType.UInt, 452, 0, 0), - new PsoStructureEntryInfo((MetaName)1494877942, PsoDataType.UInt, 456, 0, 0), - new PsoStructureEntryInfo((MetaName)3664775821, PsoDataType.String, 460, 7, 0), - new PsoStructureEntryInfo((MetaName)1867117468, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo((MetaName)425967458, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo((MetaName)2079587041, PsoDataType.Float, 472, 0, 0), - new PsoStructureEntryInfo((MetaName)3495981266, PsoDataType.Float, 476, 0, 0), - new PsoStructureEntryInfo((MetaName)3273630905, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)3860060233, PsoDataType.Float, 484, 0, 0), - new PsoStructureEntryInfo((MetaName)2204296545, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo((MetaName)111546466, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo((MetaName)2322128139, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo((MetaName)642537232, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo((MetaName)2040447490, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo((MetaName)928667502, PsoDataType.Float, 508, 0, 0), - new PsoStructureEntryInfo((MetaName)3216527316, PsoDataType.UInt, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)3465879577, PsoDataType.UInt, 516, 0, 0), - new PsoStructureEntryInfo((MetaName)3390712027, PsoDataType.UInt, 520, 0, 0), - new PsoStructureEntryInfo((MetaName)2683111365, PsoDataType.UInt, 524, 0, 0), - new PsoStructureEntryInfo((MetaName)3170020756, PsoDataType.UInt, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)4287333189, PsoDataType.UInt, 532, 0, 0), - new PsoStructureEntryInfo((MetaName)115056986, PsoDataType.UInt, 536, 0, 0), - new PsoStructureEntryInfo((MetaName)1843179030, PsoDataType.UInt, 540, 0, 0), - new PsoStructureEntryInfo((MetaName)3134298162, PsoDataType.String, 544, 7, 0), - new PsoStructureEntryInfo((MetaName)1564626128, PsoDataType.String, 548, 7, 0), - new PsoStructureEntryInfo((MetaName)834090440, PsoDataType.Structure, 552, 0, MetaName.camGameplayDirectorMetadataExplosionShakeSettings) - ); - case MetaName.camGameplayDirectorMetadataExplosionShakeSettings: - return new PsoStructureInfo(MetaName.camGameplayDirectorMetadataExplosionShakeSettings, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DistanceLimits, PsoDataType.Float2, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxInstances, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.RumbleDuration, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3070197011, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2337695573, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)815713089, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1985122943, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3938350897, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)951241725, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.camGameplayDirectorMetadataVehicleCustomSettings: - return new PsoStructureInfo(MetaName.camGameplayDirectorMetadataVehicleCustomSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SettingsRef, PsoDataType.String, 12, 7, 0) - ); - case MetaName.camCinematicDirectorMetadata: - return new PsoStructureInfo(MetaName.camCinematicDirectorMetadata, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)164388064, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1567199172, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)4027640984, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)730699960, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)4198475225, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)3640482549, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2985235183, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)200602575, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2683111365, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1677201089, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo((MetaName)2101508607, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo((MetaName)1867117468, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)425967458, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)2079587041, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.CinematicContexts, PsoDataType.Array, 80, 0, (MetaName)MetaTypeName.STRING), - new PsoStructureEntryInfo((MetaName)28440621, PsoDataType.UInt, 96, 0, 0) - ); - case MetaName.camCinematicInVehicleMultiplayerPassengerContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleMultiplayerPassengerContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicShots: - return new PsoStructureInfo(MetaName.camCinematicShots, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Shot, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ProbabilityWeighting, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.camCinematicSpectatorNewsChannelContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicSpectatorNewsChannelContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicScriptedMissionCreatorFailContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicScriptedMissionCreatorFailContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicScriptContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicScriptContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicScriptedRaceCheckPointContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicScriptedRaceCheckPointContextMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1650416254, PsoDataType.UInt, 72, 0, 0) - ); - case MetaName.camCinematicBustedContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicBustedContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicFallFromHeliContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicFallFromHeliContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicInVehicleOverriddenFirstPersonContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleOverriddenFirstPersonContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicInVehicleWantedContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleWantedContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camPreferredShotSelectionType: - return new PsoStructureInfo(MetaName.camPreferredShotSelectionType, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Shot, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.InputType, PsoDataType.Enum, 12, 0, (MetaName)3889593720) - ); - case MetaName.camCinematicInVehicleContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicInTrainAtStationContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInTrainAtStationContextMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2216049071, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)3119408512, PsoDataType.UInt, 76, 0, 0) - ); - case MetaName.camCinematicInTrainContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInTrainContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicOnFootSpectatingContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootSpectatingContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicParachuteContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicParachuteContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicStuntJumpContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicStuntJumpContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicOnFootAssistedAimingContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootAssistedAimingContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicOnFootMeleeContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootMeleeContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicInVehicleFirstPersonContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicInVehicleFirstPersonContextMetadata, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) - ); - case MetaName.camCinematicOnFootIdleContextMetadata: - return new PsoStructureInfo(MetaName.camCinematicOnFootIdleContextMetadata, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), - new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), - new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1879525600, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1202637816, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.camSyncedSceneDirectorMetadata: - return new PsoStructureInfo(MetaName.camSyncedSceneDirectorMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2406434970, PsoDataType.String, 24, 7, 0) - ); - case MetaName.camScriptDirectorMetadata: - return new PsoStructureInfo(MetaName.camScriptDirectorMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3308601968, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo((MetaName)1044888659, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)609660376, PsoDataType.UInt, 32, 0, 0) - ); - case MetaName.camSwitchDirectorMetadata: - return new PsoStructureInfo(MetaName.camSwitchDirectorMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)4284026199, PsoDataType.String, 24, 7, 0) - ); - case MetaName.camCutsceneDirectorMetadata: - return new PsoStructureInfo(MetaName.camCutsceneDirectorMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1814055656, PsoDataType.String, 24, 7, 0) - ); - case MetaName.camReplayDirectorMetadata: - return new PsoStructureInfo(MetaName.camReplayDirectorMetadata, 0, 0, 160, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2721634605, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo((MetaName)2132680058, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)491767013, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)2648380967, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo((MetaName)4072288030, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)664486210, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo((MetaName)3903471436, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)3789126205, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2319741638, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1596110048, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1238798750, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1362065867, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo((MetaName)2640324566, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)3068943162, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)81027141, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)4246618820, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)1674718375, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)227690771, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo((MetaName)1982856886, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo((MetaName)881665360, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo((MetaName)2599823537, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo((MetaName)3206570060, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo((MetaName)1690145332, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)4171384554, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)3385138470, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)950635108, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)925408249, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)3918000719, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)1379084243, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)2245689292, PsoDataType.Float, 152, 0, 0) - ); - case MetaName.camDebugDirectorMetadata: - return new PsoStructureInfo(MetaName.camDebugDirectorMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2750009688, PsoDataType.String, 24, 7, 0) - ); - case MetaName.camMarketingDirectorMetadata: - return new PsoStructureInfo(MetaName.camMarketingDirectorMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camMarketingDirectorMetadataMode), - new PsoStructureEntryInfo(MetaName.Modes, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case MetaName.camMarketingDirectorMetadataMode: - return new PsoStructureInfo(MetaName.camMarketingDirectorMetadataMode, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TextLabel, PsoDataType.String, 12, 0, (MetaName)1048576) - ); - case MetaName.CExplosionInfoManager: - return new PsoStructureInfo(MetaName.CExplosionInfoManager, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2541591167), - new PsoStructureEntryInfo(MetaName.aExplosionTagData, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)2541591167: - return new PsoStructureInfo((MetaName)2541591167, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo(MetaName.damageAtCentre, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.damageAtEdge, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.networkPlayerModifier, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.networkPedModifier, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.endRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.initSpeed, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.decayFactor, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.forceFactor, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fRagdollForceModifier, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fSelfForceModifier, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.directedWidth, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.directedLifeTime, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.camShakeName, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.camShake, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.camShakeRollOffScaling, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.shockingEventVisualRangeOverride, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.shockingEventAudioRangeOverride, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.minorExplosion, PsoDataType.Bool, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.vfxTagHashName, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo(MetaName.fragDamage, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.bAppliesContinuousDamage, PsoDataType.Bool, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.bPostProcessCollisionsWithNoForce, PsoDataType.Bool, 105, 0, 0), - new PsoStructureEntryInfo(MetaName.bDamageVehicles, PsoDataType.Bool, 106, 0, 0), - new PsoStructureEntryInfo(MetaName.bDamageObjects, PsoDataType.Bool, 107, 0, 0), - new PsoStructureEntryInfo(MetaName.bOnlyAffectsLivePeds, PsoDataType.Bool, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.bIgnoreExplodingEntity, PsoDataType.Bool, 109, 0, 0), - new PsoStructureEntryInfo(MetaName.bNoOcclusion, PsoDataType.Bool, 110, 0, 0), - new PsoStructureEntryInfo(MetaName.explodeAttachEntityWhenFinished, PsoDataType.Bool, 111, 0, 0), - new PsoStructureEntryInfo(MetaName.bCanSetPedOnFire, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.bCanSetPlayerOnFire, PsoDataType.Bool, 113, 0, 0), - new PsoStructureEntryInfo(MetaName.bSuppressCrime, PsoDataType.Bool, 114, 0, 0), - new PsoStructureEntryInfo(MetaName.bUseDistanceDamageCalc, PsoDataType.Bool, 115, 0, 0), - new PsoStructureEntryInfo(MetaName.bPreventWaterExplosionVFX, PsoDataType.Bool, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.bIgnoreRatioCheckForFire, PsoDataType.Bool, 117, 0, 0), - new PsoStructureEntryInfo(MetaName.bAllowUnderwaterExplosion, PsoDataType.Bool, 118, 0, 0), - new PsoStructureEntryInfo(MetaName.bForceVehicleExplosion, PsoDataType.Bool, 119, 0, 0), - new PsoStructureEntryInfo(MetaName.midRadius, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.damageAtMid, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.bApplyVehicleEMP, PsoDataType.Bool, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.bApplyVehicleSlick, PsoDataType.Bool, 129, 0, 0), - new PsoStructureEntryInfo(MetaName.bApplyVehicleSlowdown, PsoDataType.Bool, 130, 0, 0), - new PsoStructureEntryInfo(MetaName.bApplyVehicleTyrePop, PsoDataType.Bool, 131, 0, 0), - new PsoStructureEntryInfo(MetaName.bForcePetrolTankDamage, PsoDataType.Bool, 132, 0, 0) - ); - case MetaName.CPedModelInfo__PersonalityDataList: - return new PsoStructureInfo(MetaName.CPedModelInfo__PersonalityDataList, 0, 0, 88, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1111461724), - new PsoStructureEntryInfo(MetaName.MovementModeUnholsterData, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)29118966), - new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4185391031), - new PsoStructureEntryInfo(MetaName.PedPersonalities, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)905918498), - new PsoStructureEntryInfo(MetaName.BraveryTypes, PsoDataType.Array, 56, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2072330808), - new PsoStructureEntryInfo(MetaName.CriminalityTypes, PsoDataType.Array, 72, 0, (MetaName)8) - ); - case (MetaName)1111461724: - return new PsoStructureInfo((MetaName)1111461724, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2934735155), - new PsoStructureEntryInfo(MetaName.UnholsterClips, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case (MetaName)2934735155: - return new PsoStructureInfo((MetaName)2934735155, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Weapons, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Clip, PsoDataType.String, 24, 7, 0) - ); - case (MetaName)29118966: - return new PsoStructureInfo((MetaName)29118966, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1727236615), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Array, 0, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.Array, 16, 4, (MetaName)131074), - new PsoStructureEntryInfo(MetaName.LastBattleEventHighEnergyStartTime, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.LastBattleEventHighEnergyEndTime, PsoDataType.Float, 52, 0, 0) - ); - case (MetaName)1727236615: - return new PsoStructureInfo((MetaName)1727236615, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Weapons, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3455138791), - new PsoStructureEntryInfo(MetaName.ClipSets, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)3455138791: - return new PsoStructureInfo((MetaName)3455138791, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.MovementClipSetId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponClipSetId, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponClipFilterId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.UpperBodyShadowExpressionEnabled, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.UpperBodyFeatheredLeanEnabled, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.UseWeaponAnimsForGrip, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.UseLeftHandIk, PsoDataType.Bool, 23, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleTransitionBlendOutTime, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.IdleTransitions, PsoDataType.Array, 32, 0, (MetaName)8), - new PsoStructureEntryInfo(MetaName.UnholsterClipSetId, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.UnholsterClipData, PsoDataType.String, 52, 7, 0) - ); - case (MetaName)4185391031: - return new PsoStructureInfo((MetaName)4185391031, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.PersonalityName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultWeaponLoadout, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.Bravery, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.AgitatedPersonality, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.Criminality, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.AgitationTriggers, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo(MetaName.HealthConfigHash, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponAnimations, PsoDataType.Array, 40, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo(MetaName.AmbientAudio, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo(MetaName.WitnessPersonality, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo(MetaName.Agility, PsoDataType.Structure, 64, 0, (MetaName)265080325), - new PsoStructureEntryInfo(MetaName.IsMale, PsoDataType.Bool, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.IsHuman, PsoDataType.Bool, 81, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldRewardMoneyOnDeath, PsoDataType.Bool, 82, 0, 0), - new PsoStructureEntryInfo(MetaName.IsGang, PsoDataType.Bool, 83, 0, 0), - new PsoStructureEntryInfo(MetaName.IsSecurity, PsoDataType.Bool, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.IsWeird, PsoDataType.Bool, 85, 0, 0), - new PsoStructureEntryInfo(MetaName.IsDangerousAnimal, PsoDataType.Bool, 86, 0, 0), - new PsoStructureEntryInfo(MetaName.CausesRumbleWhenCollidesWithPlayer, PsoDataType.Bool, 87, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowSlowCruisingWithMusic, PsoDataType.Bool, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowRoadCrossHurryOnLightChange, PsoDataType.Bool, 89, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2920442291), - new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 92, 0, (MetaName)524310), - new PsoStructureEntryInfo(MetaName.AttackStrengthMin, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.AttackStrengthMax, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.StaminaEfficiency, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.ArmourEfficiency, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.HealthRegenEfficiency, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.ExplosiveDamageMod, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.HandGunDamageMod, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.RifleDamageMod, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.SmgDamageMod, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.PopulationFleeMod, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.HotwireRate, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MotivationMin, PsoDataType.UInt, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MotivationMax, PsoDataType.UInt, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.DrivingAbilityMin, PsoDataType.UByte, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.DrivingAbilityMax, PsoDataType.UByte, 149, 0, 0), - new PsoStructureEntryInfo(MetaName.DrivingAggressivenessMin, PsoDataType.UByte, 150, 0, 0), - new PsoStructureEntryInfo(MetaName.DrivingAggressivenessMax, PsoDataType.UByte, 151, 0, 0), - new PsoStructureEntryInfo(MetaName.Affluence, PsoDataType.Enum, 152, 0, MetaName.Affluence), - new PsoStructureEntryInfo(MetaName.TechSavvy, PsoDataType.Enum, 156, 0, MetaName.TechSavvy), - new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.String, 160, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSIdle, PsoDataType.String, 164, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSRNG, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSLT, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSScope, PsoDataType.String, 176, 7, 0) - ); - case (MetaName)265080325: - return new PsoStructureInfo((MetaName)265080325, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2675594832), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), - new PsoStructureEntryInfo(MetaName.MovementCostModifier, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)905918498: - return new PsoStructureInfo((MetaName)905918498, 0, 0, 256, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3079935216), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153), - new PsoStructureEntryInfo(MetaName.TakedownProbability, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ThreatResponseUnarmed, PsoDataType.Structure, 24, 0, (MetaName)3637970520), - new PsoStructureEntryInfo(MetaName.ThreatResponseMelee, PsoDataType.Structure, 96, 0, (MetaName)3637970520), - new PsoStructureEntryInfo(MetaName.ThreatResponseArmed, PsoDataType.Structure, 168, 0, (MetaName)3637970520), - new PsoStructureEntryInfo(MetaName.FleeDuringCombat, PsoDataType.Structure, 240, 0, (MetaName)651017172) - ); - case (MetaName)3637970520: - return new PsoStructureInfo((MetaName)3637970520, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Action, PsoDataType.Structure, 8, 0, (MetaName)3450423538), - new PsoStructureEntryInfo(MetaName.Fight, PsoDataType.Structure, 32, 0, (MetaName)301719986) - ); - case (MetaName)3450423538: - return new PsoStructureInfo((MetaName)3450423538, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)3954379444) - ); - case (MetaName)3954379444: - return new PsoStructureInfo((MetaName)3954379444, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Fight, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Flee, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)301719986: - return new PsoStructureInfo((MetaName)301719986, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)272028034), - new PsoStructureEntryInfo(MetaName.ProbabilityDrawWeaponWhenLosing, PsoDataType.Float, 32, 0, 0) - ); - case (MetaName)272028034: - return new PsoStructureInfo((MetaName)272028034, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.KeepWeapon, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MatchTargetWeapon, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.EquipBestWeapon, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)651017172: - return new PsoStructureInfo((MetaName)651017172, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesWhenBuddyKilledWithScaryWeapon, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)2072330808: - return new PsoStructureInfo((MetaName)2072330808, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1639628591), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) - ); - case MetaName.sStatsMetadataTuning: - return new PsoStructureInfo(MetaName.sStatsMetadataTuning, 0, 0, 72, - new PsoStructureEntryInfo((MetaName)1063717096, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardVehicleJumpTime, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardParachuteJumpTime, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SPLargeAccidenThresold, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MPLargeAccidenThresold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.FreefallThresold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardVehicleJumpDistanceA, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardVehicleJumpDistanceB, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardParachuteJumpDistanceA, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AwardParachuteJumpDistanceB, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.nonFlyableAreas, PsoDataType.Structure, 48, 0, MetaName.NonFlyableAreaArray) - ); - case MetaName.CFiringPatternInfoManager: - return new PsoStructureInfo(MetaName.CFiringPatternInfoManager, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Infos, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.CFiringPatternInfo: - return new PsoStructureInfo(MetaName.CFiringPatternInfo, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.NumberOfBurstsMin, PsoDataType.SShort, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.NumberOfBurstsMax, PsoDataType.SShort, 14, 0, 0), - new PsoStructureEntryInfo(MetaName.NumberOfShotsPerBurstMin, PsoDataType.SShort, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.NumberOfShotsPerBurstMax, PsoDataType.SShort, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenShotsMin, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenShotsMax, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenShotsAbsoluteMin, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMin, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMax, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsAbsoluteMin, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeFiringMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeFiringMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2922044807, PsoDataType.Bool, 52, 0, 0) - ); - case MetaName.CTuningFile: - return new PsoStructureInfo(MetaName.CTuningFile, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Tunables, PsoDataType.Array, 0, 0, 0) - ); - case MetaName.CCombatTaskManager__Tunables: - return new PsoStructureInfo(MetaName.CCombatTaskManager__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenUpdates, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxPedsInCombatTask, PsoDataType.SInt, 20, 0, 0) - ); - case MetaName.CTaskAnimatedHitByExplosion__Tunables: - return new PsoStructureInfo(MetaName.CTaskAnimatedHitByExplosion__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.InitialRagdollDelay, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowPitchAndRoll, PsoDataType.Bool, 20, 0, 0) - ); - case MetaName.CTaskStandGuard__Tunables: - return new PsoStructureInfo(MetaName.CTaskStandGuard__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinStandWaitTimeMS, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStandWaitTimeMS, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDefendPointWaitTimeMS, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDefendPointWaitTimeMS, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinNavmeshPatrolRadiusFactor, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNavmeshPatrolRadiusFactor, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.RouteRadiusFactor, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskCombatAdditionalTask__Tunables: - return new PsoStructureInfo(MetaName.CTaskCombatAdditionalTask__Tunables, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.iBulletEventResponseLengthMs, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fChanceOfDynamicRun, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDynamicStrafeDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeInState, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMoveBlendRatioLerpTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToClearCorner, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDistanceFromCorner, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxLeavingCornerDistance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fBlockedLosAimTime, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fStartAimingDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fStopAimingDistance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinOtherPedDistanceDiff, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeBetweenRunDirectlyChecks, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeStrafing, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeRunning, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.fForceStrafeDistance, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)2878670581, PsoDataType.Float, 80, 0, 0) - ); - case MetaName.CTaskCombatFlank__Tunables: - return new PsoStructureInfo(MetaName.CTaskCombatFlank__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fInfluenceSphereInnerWeight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fInfluenceSphereOuterWeight, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fInfluenceSphereRequestRadius, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fInfluenceSphereCheckRouteRadius, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fSmallInfluenceSphereRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fDistanceBetweenInfluenceSpheres, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fAbsoluteMinDistanceToTarget, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoverPointScoreMultiplier, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CTaskHelicopterStrafe__Tunables: - return new PsoStructureInfo(MetaName.CTaskHelicopterStrafe__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FlightHeightAboveTarget, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDirectionMinDot, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetOffset, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetMinSpeedToIgnore, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetMaxSpeedToStrafe, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToAvoidTargetAfterDamaged, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidOffsetXY, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidOffsetZ, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToBeConsideredInFront, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.BehindRotateAngleLookAhead, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.SearchRotateAngleLookAhead, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.CircleRotateAngleLookAhead, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.BehindTargetAngle, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetOffsetFilter, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenStrafeDirectionChanges, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.CTaskMeleeActionResult__Tunables: - return new PsoStructureInfo(MetaName.CTaskMeleeActionResult__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ActionModeTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceRunDelayTime, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskMoveCombatMounted__Tunables: - return new PsoStructureInfo(MetaName.CTaskMoveCombatMounted__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.CircleTestRadii, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.CircleTestsMoveDistToTestNewPos, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceAnyCircleJoined, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceSameCircleJoined, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TransitionReactionTime, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.VelStartCircling, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.VelStopCircling, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeWaitingForCircleMs, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.CTaskDyingDead__Tunables: - return new PsoStructureInfo(MetaName.CTaskDyingDead__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.VehicleForwardInitialScale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleForwardScale, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToApplyPushFromVehicleForce, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceToApply, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFallingSpeedForAnimatedDyingFall, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SphereTestRadiusForDeadWaterSettle, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollAbortPoseDistanceThreshold, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollAbortPoseMaxVelocity, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToThrowWeaponMS, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToThrowWeaponPlayerMS, PsoDataType.UInt, 52, 0, 0) - ); - case MetaName.CTaskDamageElectric__Tunables: - return new PsoStructureInfo(MetaName.CTaskDamageElectric__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FallsOutofVehicleVelocity, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskInvestigate__Tunables: - return new PsoStructureInfo(MetaName.CTaskInvestigate__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.iTimeToStandAtSearchPoint, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToUseVehicle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceSavingToUseVehicle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeToStandAtPerimeter, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fNewPositionThreshold, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskCombat__Tunables: - return new PsoStructureInfo(MetaName.CTaskCombat__Tunables, 0, 0, 704, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BuddyShot, PsoDataType.Structure, 16, 0, (MetaName)4144542252), - new PsoStructureEntryInfo(MetaName.LackOfHostility, PsoDataType.Structure, 48, 0, (MetaName)455065356), - new PsoStructureEntryInfo(MetaName.EnemyAccuracyScaling, PsoDataType.Structure, 144, 0, (MetaName)1818844971), - new PsoStructureEntryInfo(MetaName.ChargeTuning, PsoDataType.Structure, 168, 0, (MetaName)3736726978), - new PsoStructureEntryInfo(MetaName.ThrowSmokeGrenadeTuning, PsoDataType.Structure, 240, 0, (MetaName)1530415684), - new PsoStructureEntryInfo(MetaName.MaxDistToCoverZ, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToCoverXY, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.fAmbientAnimsMinDistToTargetSq, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.fAmbientAnimsMaxDistToTargetSq, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.fGoToDefAreaTimeOut, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.fFireContinuouslyDistMin, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo(MetaName.fFireContinuouslyDistMax, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo(MetaName.fLostTargetTime, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeAfterAimPoseForStateChange, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxAttemptMoveToCoverDelay, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinAttemptMoveToCoverDelay, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxAttemptMoveToCoverDelayGlobal, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinAttemptMoveToCoverDelayGlobal, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceForAltCover, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeStandingAtCover, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeBetweenFrustratedPeds, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenFrustratedPeds, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.fRetreatTime, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.fTargetTooCloseDistance, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenJackingAttempts, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenCoverSearchesMin, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenCoverSearchesMax, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenAltCoverSearches, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.fShoutTargetPositionInterval, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.fShoutBlockingLosInterval, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenDragsMin, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenSecondaryTargetUsesMin, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenSecondaryTargetUsesMax, PsoDataType.Float, 396, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeToUseSecondaryTargetMin, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeToUseSecondaryTargetMax, PsoDataType.Float, 404, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenCombatDirectorUpdates, PsoDataType.Float, 408, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenPassiveAnimsMin, PsoDataType.Float, 412, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenPassiveAnimsMax, PsoDataType.Float, 416, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenQuickGlancesMin, PsoDataType.Float, 420, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenQuickGlancesMax, PsoDataType.Float, 424, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenGestureAnimsMin, PsoDataType.Float, 428, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenGestureAnimsMax, PsoDataType.Float, 432, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenFailedGestureMin, PsoDataType.Float, 436, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenFailedGestureMax, PsoDataType.Float, 440, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenGesturesMinGlobal, PsoDataType.Float, 444, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenGesturesMaxGlobal, PsoDataType.Float, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeSinceLastAimedAtForGesture, PsoDataType.Float, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeBeforeReactToExplosion, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeBeforeReactToExplosion, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetInfluenceSphereRadius, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetMinDistanceToRoute, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetMinDistanceToAwayFacingNavLink, PsoDataType.Float, 472, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxWaitForCoverExitTime, PsoDataType.Float, 476, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDstanceToMoveAwayFromAlly, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenAllyProximityChecks, PsoDataType.Float, 484, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceFromPrimaryTarget, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxAngleBetweenTargets, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromPedToHelpPed, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDotToTargetToHelpPed, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingDifferenceForQuickGlanceInSameDirection, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenQuickGlancesInSameDirection, PsoDataType.Float, 508, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToStartJackingVehicle, PsoDataType.Float, 512, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToContinueJackingVehicle, PsoDataType.Float, 516, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetJackRadius, PsoDataType.Float, 520, 0, 0), - new PsoStructureEntryInfo(MetaName.SafetyProportionInDefensiveAreaMin, PsoDataType.Float, 524, 0, 0), - new PsoStructureEntryInfo(MetaName.SafetyProportionInDefensiveAreaMax, PsoDataType.Float, 528, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveToDefensiveAreaAngleVariation, PsoDataType.Float, 532, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToEnterVehicleIfTargetEntersVehicle, PsoDataType.Float, 536, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToMyVehicleToChase, PsoDataType.Float, 540, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToVehicleForCommandeer, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.NumEarlyVehicleEntryDriversAllowed, PsoDataType.UByte, 548, 0, 0), - new PsoStructureEntryInfo(MetaName.SafeTimeBeforeLeavingCover, PsoDataType.UInt, 552, 0, 0), - new PsoStructureEntryInfo(MetaName.WaitTimeForJackingSlowedVehicle, PsoDataType.UInt, 556, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxInjuredTargetTimerVariation, PsoDataType.Float, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNumPedsChasingOnFoot, PsoDataType.UByte, 564, 0, 0), - new PsoStructureEntryInfo(MetaName.FireTimeAfterStaticMovementAbort, PsoDataType.Float, 568, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMovingToCoverTimeToStop, PsoDataType.Float, 572, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToCoverToStop, PsoDataType.Float, 576, 0, 0), - new PsoStructureEntryInfo(MetaName.FireTimeAfterStoppingMoveToCover, PsoDataType.Float, 580, 0, 0), - new PsoStructureEntryInfo(MetaName.ApproachingTargetVehicleHoldFireDistance, PsoDataType.Float, 584, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDefensiveAreaRadiusForWillAdvance, PsoDataType.Float, 588, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToHoldFireForArrest, PsoDataType.Float, 592, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToDelayChaseOnFoot, PsoDataType.Float, 596, 0, 0), - new PsoStructureEntryInfo(MetaName.FireTimeAfterChaseOnFoot, PsoDataType.Float, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToChangeChaseOnFootSpeed, PsoDataType.UInt, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableForcedFireForTargetProximity, PsoDataType.Bool, 608, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForceFiringStateTime, PsoDataType.Float, 612, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForceFiringStateTime, PsoDataType.Float, 616, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeInitialForcedFire, PsoDataType.Float, 620, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenForcedFireStates, PsoDataType.Float, 624, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInStateForForcedFire, PsoDataType.Float, 628, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForceFiringDistance, PsoDataType.Float, 632, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForceFiringDistance, PsoDataType.Float, 636, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForAimIntro, PsoDataType.Float, 640, 0, 0), - new PsoStructureEntryInfo((MetaName)3129989164, PsoDataType.Float, 644, 0, 0), - new PsoStructureEntryInfo((MetaName)4269476531, PsoDataType.Float, 648, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbientAnimLengthBuffer, PsoDataType.Float, 652, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenPlayerArrestAttempts, PsoDataType.UInt, 656, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenArmedMeleeAttemptsInMs, PsoDataType.UInt, 660, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowMovingArmedMeleeAttack, PsoDataType.Bool, 664, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToHoldFireAfterJack, PsoDataType.Float, 668, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenMeleeJackAttempts, PsoDataType.UInt, 672, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenMeleeJackAttemptsOnNetworkClone, PsoDataType.UInt, 676, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToHoldFireAtTaskInitialization, PsoDataType.Float, 680, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToRejectRespawnedTarget, PsoDataType.UInt, 684, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForLawToFleeFromCombat, PsoDataType.Float, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForLawToReturnToCombatFromFlee, PsoDataType.Float, 692, 0, 0), - new PsoStructureEntryInfo((MetaName)2186966715, PsoDataType.Float, 696, 0, 0) - ); - case (MetaName)4144542252: - return new PsoStructureInfo((MetaName)4144542252, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeReact, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBeforeReact, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeSinceShot, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)455065356: - return new PsoStructureInfo((MetaName)455065356, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.WantedLevel1, PsoDataType.Structure, 8, 0, (MetaName)2841666617), - new PsoStructureEntryInfo(MetaName.WantedLevel2, PsoDataType.Structure, 24, 0, (MetaName)2841666617), - new PsoStructureEntryInfo(MetaName.WantedLevel3, PsoDataType.Structure, 40, 0, (MetaName)2841666617), - new PsoStructureEntryInfo(MetaName.WantedLevel4, PsoDataType.Structure, 56, 0, (MetaName)2841666617), - new PsoStructureEntryInfo(MetaName.WantedLevel5, PsoDataType.Structure, 72, 0, (MetaName)2841666617), - new PsoStructureEntryInfo(MetaName.MaxSpeedForVehicle, PsoDataType.Float, 88, 0, 0) - ); - case (MetaName)2841666617: - return new PsoStructureInfo((MetaName)2841666617, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceLastHostileAction, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)1818844971: - return new PsoStructureInfo((MetaName)1818844971, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.iMinNumEnemiesForScaling, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fAccuracyReductionPerEnemy, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fAccuracyReductionFloor, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)3736726978: - return new PsoStructureInfo((MetaName)3736726978, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.bChargeTargetEnabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.uMaxNumActiveChargers, PsoDataType.UByte, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.uConsiderRecentChargeAsActiveTimeoutMS, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.uMinTimeBetweenChargesAtSameTargetMS, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.uMinTimeForSamePedToChargeAgainMS, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.uCheckForChargeTargetPeriodMS, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeInCombatSeconds, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToTarget, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDistanceToTarget, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistToNonTargetEnemy, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistBetweenTargetAndOtherEnemies, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fDistToHidingTarget_Outer, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fDistToHidingTarget_Inner, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fChargeGoalCompletionRadius, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fCancelTargetOutOfCoverMovedDist, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.fCancelTargetInCoverMovedDist, PsoDataType.Float, 64, 0, 0) - ); - case (MetaName)1530415684: - return new PsoStructureInfo((MetaName)1530415684, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.bThrowSmokeGrenadeEnabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.uMaxNumActiveThrowers, PsoDataType.UByte, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.uConsiderRecentThrowAsActiveTimeoutMS, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.uMinTimeBetweenThrowsAtSameTargetMS, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.uMinTimeForSamePedToThrowAgainMS, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.uCheckForSmokeThrowPeriodMS, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToTarget, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDistanceToTarget, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fDotMinThrowerToTarget, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinLoiteringTimeSeconds, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskReactAimWeapon__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactAimWeapon__Tunables, 0, 0, 680, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Professional, PsoDataType.Structure, 16, 0, (MetaName)3326118529), - new PsoStructureEntryInfo(MetaName.NotProfessional, PsoDataType.Structure, 344, 0, (MetaName)3326118529), - new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 672, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRateVariance, PsoDataType.Float, 676, 0, 0) - ); - case (MetaName)3326118529: - return new PsoStructureInfo((MetaName)3326118529, 0, 0, 328, - new PsoStructureEntryInfo(MetaName.Flinch, PsoDataType.Structure, 8, 0, (MetaName)2563725968), - new PsoStructureEntryInfo(MetaName.Surprised, PsoDataType.Structure, 88, 0, (MetaName)2563725968), - new PsoStructureEntryInfo(MetaName.Sniper, PsoDataType.Structure, 168, 0, (MetaName)2563725968), - new PsoStructureEntryInfo(MetaName.None, PsoDataType.Structure, 248, 0, (MetaName)2563725968) - ); - case (MetaName)2563725968: - return new PsoStructureInfo((MetaName)2563725968, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Pistol, PsoDataType.Structure, 8, 0, (MetaName)3972028972), - new PsoStructureEntryInfo(MetaName.Rifle, PsoDataType.Structure, 32, 0, (MetaName)3972028972), - new PsoStructureEntryInfo(MetaName.MicroSMG, PsoDataType.Structure, 56, 0, (MetaName)3972028972) - ); - case (MetaName)3972028972: - return new PsoStructureInfo((MetaName)3972028972, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ClipSetId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.HasSixDirections, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.HasCreateWeaponTag, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.HasInterruptTag, PsoDataType.Bool, 18, 0, 0) - ); - case MetaName.CTaskSearch__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearch__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToStare, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetReached, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskSearchForUnknownThreat__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchForUnknownThreat__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.iMinTimeBeforeSearchingForNewHidingPlace, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxTimeBeforeSearchingForNewHidingPlace, PsoDataType.SInt, 20, 0, 0) - ); - case MetaName.CTaskSharkCircle__Tunables: - return new PsoStructureInfo(MetaName.CTaskSharkCircle__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AdvanceDistanceSquared, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveRateOverride, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskSharkAttack__Tunables: - return new PsoStructureInfo(MetaName.CTaskSharkAttack__Tunables, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SurfaceProjectionDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceZOffset, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDepthBelowSurface, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CirclingAngularSpeed, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToCircle, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCircleRadius, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCircleRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.CirclingMBR, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveProjectionDistance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveDepth, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveMBR, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinNumberFakeApproaches, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNumberFakeApproaches, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.FakeLungeOffset, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.LungeForwardOffset, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.LungeZOffset, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.LungeChangeDistance, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.LungeTargetRadius, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowTimeout, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowYOffset, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowZOffset, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.LandProbeLength, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingVehicleVelocityThreshold, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.SharkFleeDist, PsoDataType.Float, 108, 0, 0) - ); - case MetaName.CTaskCover__Tunables: - return new PsoStructureInfo(MetaName.CTaskCover__Tunables, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3698046827, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1862046997, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1686691958, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3171144783, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1788624470, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1235126752, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1335048013, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2787523036, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PriorityCoverWeighting, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleToCameraWeighting, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleToDynamicCoverWeighting, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceWeighting, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleToCoverWeighting, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleOfCoverWeighting, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeWeighting, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendOutDurationRun, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendOutDurationRunStart, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendOutDuration, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlayerToCoverDist, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)1534623417, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularDiffBetweenDynamicAndStaticCover, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.RangeToUseDynamicCoverPointMin, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.RangeToUseDynamicCoverPointMax, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToCoverAnyDir, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToPriorityCoverToForce, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToCoverSpecificDir, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.BehindPedToCoverCosTolerance, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.SearchToCoverCosTolerance, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.CapsuleZOffset, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenTestSpheresIntersectingRoute, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToCoverWhenPlayerIsClose, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCoverToPlayerCoverDist, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMoveToCoverDistForCoverMeAudio, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSecondsAsTopLevelTask, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceStreamingFailure, PsoDataType.Bool, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.StreamedUnarmedCoverMovementClipSetId, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo((MetaName)1804897490, PsoDataType.String, 160, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamedOneHandedCoverMovementClipSetId, PsoDataType.String, 164, 7, 0), - new PsoStructureEntryInfo(MetaName.AIOneHandedAimingClipSetId, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo(MetaName.AITwoHandedAimingClipSetId, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo(MetaName.CoreWeaponClipSetId, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo((MetaName)3902347552, PsoDataType.String, 180, 7, 0), - new PsoStructureEntryInfo((MetaName)2620277506, PsoDataType.String, 184, 7, 0) - ); - case MetaName.CTaskEnterCover__Tunables: - return new PsoStructureInfo(MetaName.CTaskEnterCover__Tunables, 0, 0, 368, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryRatePlayer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryRateAI, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryShortDistanceAI, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryShortDistancePlayer, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryStandDistance, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryStandStrafeDistance, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMinDistance, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMaxDistance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMinDistanceAI, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMaxDistanceAI, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMaxDirectDistance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMinTimeNavigatingAI, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryMinAngleToScale, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryHeadingReachedTol, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverEntryPositionReachedTol, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.FromCoverExitDistance, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendInDuration, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.DistFromCoverToAllowReloadCache, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.WaitForFootPlant, PsoDataType.Bool, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableFootTagSyncing, PsoDataType.Bool, 89, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceToTarget, PsoDataType.Bool, 90, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableInitialHeadingBlend, PsoDataType.Bool, 91, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableTranslationScaling, PsoDataType.Bool, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableRotationScaling, PsoDataType.Bool, 93, 0, 0), - new PsoStructureEntryInfo(MetaName.PreventTranslationOvershoot, PsoDataType.Bool, 94, 0, 0), - new PsoStructureEntryInfo(MetaName.PreventRotationOvershoot, PsoDataType.Bool, 95, 0, 0), - new PsoStructureEntryInfo(MetaName.DoInitialHeadingBlend, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.DoFinalHeadingFixUp, PsoDataType.Bool, 97, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToPlayEntryAnim, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToScale, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotSpeed, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTransScale, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTransScale, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRotScale, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotScale, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.DeltaTolerance, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRotDelta, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleToSetDirectly, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.AiEntryHalfAngleTolerance, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableNewAICoverEntry, PsoDataType.Bool, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableUseSwatClipSet, PsoDataType.Bool, 149, 0, 0), - new PsoStructureEntryInfo(MetaName.UseShortDistAngleRotation, PsoDataType.Bool, 150, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableAiCoverEntryStreamCheck, PsoDataType.Bool, 151, 0, 0), - new PsoStructureEntryInfo(MetaName.DistToUseShortestRotation, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.InCoverTolerance, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.DotThresholdForCenterEnter, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.AiEntryMinRate, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.AiEntryMaxRate, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSprintEntryRate, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultPlayerStandEntryStartMovementPhase, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultPlayerStandEntryEndMovementPhase, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleToBeginRotationScale, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDefaultAngularVelocity, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverInterruptMinTime, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverInterruptDistanceTolerance, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverInterruptHeadingTolerance, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAimInterruptDistanceTolerance, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAimInterruptHeadingTolerance, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 216, 0, (MetaName)1285383250), - new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 256, 0, (MetaName)1285383250), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)711010751), - new PsoStructureEntryInfo(MetaName.AIEnterCoverClips, PsoDataType.Array, 296, 0, (MetaName)62), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3590219800), - new PsoStructureEntryInfo(MetaName.AIStandEnterCoverClips, PsoDataType.Array, 312, 0, (MetaName)64), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)711010751), - new PsoStructureEntryInfo(MetaName.AIEnterTransitionClips, PsoDataType.Array, 328, 0, (MetaName)66), - new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingBase1H, PsoDataType.String, 344, 7, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingBase2H, PsoDataType.String, 348, 7, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingSwat1H, PsoDataType.String, 352, 7, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingSwat2H, PsoDataType.String, 356, 7, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAITransition1H, PsoDataType.String, 360, 7, 0), - new PsoStructureEntryInfo(MetaName.EnterCoverAITransition2H, PsoDataType.String, 364, 7, 0) - ); - case (MetaName)1285383250: - return new PsoStructureInfo((MetaName)1285383250, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo((MetaName)611524654, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo((MetaName)1120845094, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)3038580099: - return new PsoStructureInfo((MetaName)3038580099, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097154) - ); - case (MetaName)711010751: - return new PsoStructureInfo((MetaName)711010751, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.EnterClipId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) - ); - case (MetaName)3590219800: - return new PsoStructureInfo((MetaName)3590219800, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.StandClip0Id, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StandClip1Id, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.StandClip2Id, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 20, 0, (MetaName)2097155) - ); - case MetaName.CTaskExitCover__Tunables: - return new PsoStructureInfo(MetaName.CTaskExitCover__Tunables, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4010326834), - new PsoStructureEntryInfo(MetaName.CornerExitClips, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.ExitCoverBaseClipSetId, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)2123164199, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.ExitCoverExtraClipSetId, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)1757551615, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.MinInputToInterruptIdle, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.CornerExitHeadingModifier, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitCornerZOffset, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitCornerYOffset, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitCornerDirOffset, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 72, 0, (MetaName)246682624), - new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 96, 0, (MetaName)246682624) - ); - case (MetaName)246682624: - return new PsoStructureInfo((MetaName)246682624, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo((MetaName)1123873278, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)4010326834: - return new PsoStructureInfo((MetaName)4010326834, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ExitClipId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) - ); - case MetaName.CTaskInCover__Tunables: - return new PsoStructureInfo(MetaName.CTaskInCover__Tunables, 0, 0, 536, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MovementClipRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnClipRate, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxInputForIdleExit, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.InputYAxisCornerExitValue, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlDebugXPos, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlDebugYPos, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlDebugRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlDebugBeginAngle, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.ControlDebugEndAngle, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickInputToMoveInCover, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickInputXAxisToTurnInCover, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)927329696, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.InputYAxisQuitValue, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.StartExtendedProbeTime, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToSpendInTask, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDistanceToCover, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDistanceToCoverToRequestStep, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.OptimumDistToRightCoverEdgeCrouched, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.OptimumDistToLeftCoverEdgeCrouched, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.OptimumDistToRightCoverEdge, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.OptimumDistToLeftCoverEdge, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMovingProbeOffset, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMovingProbeOffset, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTurnProbeOffset, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTurnProbeOffset, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultProbeOffset, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStoppingEdgeCheckProbeOffset, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStoppingEdgeCheckProbeOffset, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStoppingProbeOffset, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStoppingProbeOffset, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingChangeRate, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeAllowingCornerMove, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.CrouchedLeftFireOffset, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.CrouchedRightFireOffset, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverLeftFireModifier, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverRightFireModifier, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverLeftFireModifierLow, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverRightFireModifierLow, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)2625425324, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.CFriendlyIssues, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverLeftIncreaseModifier, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverRightIncreaseModifier, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.AimTurnCosAngleTolerance, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.InCoverMovementSpeedEnterCover, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.InCoverMovementSpeed, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingMovementSpeed, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.UseAutoPeekAimFromCoverControls, PsoDataType.Bool, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.ComeBackInWhenAimDirectChangeInHighCover, PsoDataType.Bool, 201, 0, 0), - new PsoStructureEntryInfo(MetaName.AlternateControlStickInputThreshold, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeCapsuleRadius, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeStartXOffset, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeEndXOffset, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeStartYOffset, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeEndYOffset, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.InsideEdgeStartYOffset, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.InsideEdgeEndYOffset, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.InsideEdgeStartXOffset, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.InsideEdgeEndXOffset, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.WallTestYOffset, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialLowEdgeWallTestYOffset, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.HighCloseEdgeWallTestYOffset, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.WallTestStartXOffset, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.WallTestEndXOffset, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.WallHighTestZOffset, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingEdgeTestStartYOffset, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingEdgeTestEndYOffset, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverEdgeTestStartYOffset, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverEdgeTestEndYOffset, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingEdgeTestStartYOffset, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingEdgeTestEndYOffset, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialLowEdgeTestStartYOffset, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialLowEdgeTestEndYOffset, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeHighZOffset, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeLowZOffset, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeMinimumOffsetDiff, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeMaximumOffsetDiff, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownPeekChance, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownBlindFireChance, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeAllowingAutoPeek, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableAimDirectlyIntros, PsoDataType.Bool, 328, 0, 0), - new PsoStructureEntryInfo(MetaName.PedDirToPedCoverCosAngleTol, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.CamToPedDirCosAngleTol, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo(MetaName.CamToCoverDirCosAngleTol, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToTargetForPeek, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenPeeksWithoutLOS, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1466791495), - new PsoStructureEntryInfo(MetaName.ThrowProjectileClips, PsoDataType.Array, 352, 0, (MetaName)86), - new PsoStructureEntryInfo(MetaName.RecreateWeaponTime, PsoDataType.SInt, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.BlindFireHighCoverMinPitchLimit, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.BlindFireHighCoverMaxPitchLimit, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableLeftHandIkInCover, PsoDataType.Bool, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableReloadingWhilstMovingInCover, PsoDataType.Bool, 381, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroRateForAi, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.AimOutroRateForAi, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.MinReactToFireRate, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxReactToFireRate, PsoDataType.Float, 396, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxReactToFireDelay, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeUntilReturnToIdleFromAimAfterAimedAt, PsoDataType.Float, 404, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeUntilReturnToIdleFromAimAfterAimedAt, PsoDataType.Float, 408, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeUntilReturnToIdleFromAimDefault, PsoDataType.Float, 412, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeUntilReturnToIdleFromAimDefault, PsoDataType.Float, 416, 0, 0), - new PsoStructureEntryInfo(MetaName.GlobalLateralTorsoOffsetInLeftCover, PsoDataType.Float, 420, 0, 0), - new PsoStructureEntryInfo((MetaName)3668359056, PsoDataType.Float, 424, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponLongBlockingOffsetInLeftCover, PsoDataType.Float, 428, 0, 0), - new PsoStructureEntryInfo((MetaName)2805643991, PsoDataType.Float, 432, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponBlockingOffsetInLeftCover, PsoDataType.Float, 436, 0, 0), - new PsoStructureEntryInfo((MetaName)3824828934, PsoDataType.Float, 440, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponBlockingOffsetInRightCover, PsoDataType.Float, 444, 0, 0), - new PsoStructureEntryInfo((MetaName)3593181124, PsoDataType.Float, 448, 0, 0), - new PsoStructureEntryInfo((MetaName)1214766569, PsoDataType.Float, 452, 0, 0), - new PsoStructureEntryInfo((MetaName)2018978213, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponBlockingLengthOffset, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo((MetaName)2717483602, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverStepClipSetId, PsoDataType.String, 468, 7, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownTakeCoverAmount, PsoDataType.Float, 472, 0, 0), - new PsoStructureEntryInfo(MetaName.AmountPinnedDownByDamage, PsoDataType.Float, 476, 0, 0), - new PsoStructureEntryInfo(MetaName.AmountPinnedDownByBullet, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo(MetaName.AmountPinnedDownByWitnessKill, PsoDataType.Float, 484, 0, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownByBulletRange, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownDecreaseAmountPerSecond, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroTaskBlendOutDuration, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToBePinnedDown, PsoDataType.UInt, 500, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMaxRandomPercent, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo(MetaName.AimOutroDelayTime, PsoDataType.UInt, 508, 0, 0), - new PsoStructureEntryInfo((MetaName)3531438516, PsoDataType.UInt, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)796325569, PsoDataType.UInt, 516, 0, 0), - new PsoStructureEntryInfo((MetaName)2152868269, PsoDataType.Bool, 520, 0, 0), - new PsoStructureEntryInfo((MetaName)1536785516, PsoDataType.Bool, 521, 0, 0), - new PsoStructureEntryInfo(MetaName.ThrowProjectileClipSetId, PsoDataType.String, 524, 7, 0), - new PsoStructureEntryInfo((MetaName)3576155857, PsoDataType.String, 528, 7, 0) - ); - case (MetaName)1466791495: - return new PsoStructureInfo((MetaName)1466791495, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.IntroClipId, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PullPinClipId, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.BaseClipId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.ThrowLongClipId, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.ThrowShortClipId, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo((MetaName)1925480184, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)3487669030, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 36, 0, (MetaName)2097159) - ); - case MetaName.CTaskMotionInCover__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionInCover__Tunables, 0, 0, 1112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverClipRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableCoverToCoverTranslationScaling, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableCoverToCoverRotationScaling, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.UseButtonToMoveAroundCorner, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableCoverToCover, PsoDataType.Bool, 23, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableWalkStops, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableCoverPeekingVariations, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableCoverPinnedVariations, PsoDataType.Bool, 26, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableCoverIdleVariations, PsoDataType.Bool, 27, 0, 0), - new PsoStructureEntryInfo(MetaName.UseSprintButtonForCoverToCover, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.VerifyCoverInterval, PsoDataType.UByte, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeForCornerMove, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultSettleBlendDuration, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.HeightChangeSettleBlendDuration, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeStayPinned, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStayPinned, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PinnedDownThreshold, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ForcePinnedDown, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToTargetForIdleVariations, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenIdleVariations, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBetweenIdleVariations, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWaitTimeToPlayPlayerIdleVariations, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenPlayerIdleVariations, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBetweenPlayerIdleVariations, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverDuration, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinScalePhase, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMaxScalePhase, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinRotScalePhase, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMaxRotScalePhase, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotationalSpeed, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickInputToEnableMoveAroundCorner, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickInputToEnableCoverToCover, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickInputToMoveAroundCorner, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStoppingDuration, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStoppingDist, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToScale, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCDepthDistanceCompletionOffset, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeLowCoverMoveTime, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToStandUp, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinDistToScale, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinAngToScale, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinAng, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverDistTol, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMaxDistToStep, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverAngTol, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMaxAngToStep, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMaxAccel, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.ForwardDistToStartSideScale, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverMinDepthToScale, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverToCoverSmallAnimDist, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendToIdleTime, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.InsideCornerStopDistance, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverHeadingCloseEnough, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverHeadingCloseEnoughTurn, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverPositionCloseEnough, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultStillToTurnBlendDuration, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultEdgeTurnBlendDuration, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.PeekToEdgeTurnBlendDuration, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMoveSpeedInCover, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.MinEdgeDistanceForStoppingAnim, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.UseNewStepAndWalkStarts, PsoDataType.Bool, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.UseNewTurns, PsoDataType.Bool, 237, 0, 0), - new PsoStructureEntryInfo(MetaName.UseNewTurnWalkStarts, PsoDataType.Bool, 238, 0, 0), - new PsoStructureEntryInfo(MetaName.CoreMotionClipSetId, PsoDataType.String, 240, 7, 0), - new PsoStructureEntryInfo((MetaName)1642317087, PsoDataType.String, 244, 7, 0), - new PsoStructureEntryInfo(MetaName.CoreAIMotionClipSetId, PsoDataType.String, 248, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.PeekingVariationAnimStateInfos, PsoDataType.Array, 256, 0, (MetaName)69), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PeekingLow1HVariationClipsets, PsoDataType.Array, 272, 0, (MetaName)71), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PeekingLow2HVariationClipsets, PsoDataType.Array, 288, 0, (MetaName)73), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PeekingHigh1HVariationClipsets, PsoDataType.Array, 304, 0, (MetaName)75), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PeekingHigh2HVariationClipsets, PsoDataType.Array, 320, 0, (MetaName)77), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PinnedLow1HVariationClipsets, PsoDataType.Array, 336, 0, (MetaName)79), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PinnedLow2HVariationClipsets, PsoDataType.Array, 352, 0, (MetaName)81), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PinnedHigh1HVariationClipsets, PsoDataType.Array, 368, 0, (MetaName)83), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PinnedHigh2HVariationClipsets, PsoDataType.Array, 384, 0, (MetaName)85), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.OutroReact1HVariationClipsets, PsoDataType.Array, 400, 0, (MetaName)87), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.OutroReact2HVariationClipsets, PsoDataType.Array, 416, 0, (MetaName)89), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.IdleLow1HVariationClipsets, PsoDataType.Array, 432, 0, (MetaName)91), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.IdleLow2HVariationClipsets, PsoDataType.Array, 448, 0, (MetaName)93), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.IdleHigh1HVariationClipsets, PsoDataType.Array, 464, 0, (MetaName)95), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.IdleHigh2HVariationClipsets, PsoDataType.Array, 480, 0, (MetaName)97), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleLow0HVariationClipsets, PsoDataType.Array, 496, 0, (MetaName)99), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleLow1HVariationClipsets, PsoDataType.Array, 512, 0, (MetaName)101), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleLow2HVariationClipsets, PsoDataType.Array, 528, 0, (MetaName)103), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleHigh0HVariationClipsets, PsoDataType.Array, 544, 0, (MetaName)105), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleHigh1HVariationClipsets, PsoDataType.Array, 560, 0, (MetaName)107), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleHigh2HVariationClipsets, PsoDataType.Array, 576, 0, (MetaName)109), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.PinnedIntroAnimStateInfos, PsoDataType.Array, 592, 0, (MetaName)111), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.PinnedIdleAnimStateInfos, PsoDataType.Array, 608, 0, (MetaName)113), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.PinnedOutroAnimStateInfos, PsoDataType.Array, 624, 0, (MetaName)115), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.IdleVariationAnimStateInfos, PsoDataType.Array, 640, 0, (MetaName)117), - new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 656, 0, (MetaName)2625948332), - new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 880, 0, (MetaName)2625948332), - new PsoStructureEntryInfo((MetaName)1230607954, PsoDataType.Bool, 1104, 0, 0), - new PsoStructureEntryInfo((MetaName)1949874056, PsoDataType.Bool, 1105, 0, 0), - new PsoStructureEntryInfo((MetaName)3098272438, PsoDataType.Bool, 1106, 0, 0), - new PsoStructureEntryInfo((MetaName)2038512667, PsoDataType.Bool, 1107, 0, 0) - ); - case (MetaName)2625948332: - return new PsoStructureInfo((MetaName)2625948332, 0, 0, 224, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.IdleAnimStateInfos, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.AtEdgeAnimStateInfos, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.PeekingAnimStateInfos, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.StoppingAnimStateInfos, PsoDataType.Array, 56, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.MovingAnimStateInfos, PsoDataType.Array, 72, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.EdgeTurnAnimStateInfos, PsoDataType.Array, 88, 0, (MetaName)10), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.CoverToCoverAnimStateInfos, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.SteppingAnimStateInfos, PsoDataType.Array, 120, 0, (MetaName)14), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.WalkStartAnimStateInfos, PsoDataType.Array, 136, 0, (MetaName)MetaTypeName.STRING), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.SettleAnimStateInfos, PsoDataType.Array, 152, 0, (MetaName)18), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.TurnEnterAnimStateInfos, PsoDataType.Array, 168, 0, (MetaName)20), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.TurnEndAnimStateInfos, PsoDataType.Array, 184, 0, (MetaName)22), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo(MetaName.TurnWalkStartAnimStateInfos, PsoDataType.Array, 200, 0, (MetaName)24), - new PsoStructureEntryInfo((MetaName)3535710087, PsoDataType.String, 216, 7, 0) - ); - case MetaName.CTaskAimGunFromCoverIntro__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimGunFromCoverIntro__Tunables, 0, 0, 312, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.UpperBodyAimBlendInDuration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroMovementDuration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableIntroScaling, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableIntroOverShootCheck, PsoDataType.Bool, 26, 0, 0), - new PsoStructureEntryInfo(MetaName.UseConstantIntroScaling, PsoDataType.Bool, 27, 0, 0), - new PsoStructureEntryInfo(MetaName.RenderArcsAtCoverPosition, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.RenderAimArcDebug, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.UseMoverPositionWhilePeeking, PsoDataType.Bool, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableWeaponBlocking, PsoDataType.Bool, 31, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTranslationScaling, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ArcRadius, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroScalingDefaultStartPhase, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroScalingDefaultEndPhase, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroRotScalingDefaultStartPhase, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroRotScalingDefaultEndPhase, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.AiAimIntroCloseEnoughTolerance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStepBackDist, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStepOutDist, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStepOutDist, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroMaxScale, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.IntroRate, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)2875886470, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroRate, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2575356761, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingApproachRateSlow, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingApproachRate, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingApproachRateFast, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.SteppingHeadingApproachRate, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRotationalSpeedScale, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.StepOutCapsuleRadiusScale, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.AimDirectlyMaxAngle, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.StepOutLeftX, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.StepOutRightX, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.StepOutY, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.LowXClearOffsetCapsuleTest, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.LowXOffsetCapsuleTest, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.LowYOffsetCapsuleTest, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.LowZOffsetCapsuleTest, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.LowOffsetCapsuleLength, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.LowOffsetCapsuleRadius, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.LowLeftStep, PsoDataType.Float2, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.LowRightStep, PsoDataType.Float2, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.LowBlockedBlend, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepOutLeftXBlocked, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepOutLeftYBlocked, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepBackLeftXBlocked, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepBackLeftYBlocked, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepOutRightXBlocked, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepOutRightYBlocked, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepBackRightXBlocked, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.LowStepBackRightYBlocked, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.LowSideZOffset, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.DistConsideredAtAimPosition, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPhaseToApplyExtraHeadingAi, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPhaseToApplyExtraHeadingPlayer, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityAi, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayer, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayerForcedStandAim, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.HighLeftAimStepInfoSet, PsoDataType.Structure, 248, 0, (MetaName)791301518), - new PsoStructureEntryInfo(MetaName.HighRightAimStepInfoSet, PsoDataType.Structure, 272, 0, (MetaName)791301518), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4162893736), - new PsoStructureEntryInfo(MetaName.AimIntroClips, PsoDataType.Array, 296, 0, (MetaName)64) - ); - case (MetaName)791301518: - return new PsoStructureInfo((MetaName)791301518, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2996437115), - new PsoStructureEntryInfo(MetaName.StepInfos, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)2996437115: - return new PsoStructureInfo((MetaName)2996437115, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.StepOutX, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.StepOutY, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.StepTransitionMinAngle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StepTransitionMaxAngle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.PreviousTransitionExtraScalar, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.NextTransitionExtraScalar, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.PreviousTransitionClipId, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.NextTransitionClipId, PsoDataType.String, 36, 7, 0) - ); - case (MetaName)4162893736: - return new PsoStructureInfo((MetaName)4162893736, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097154) - ); - case MetaName.CTaskAimGunFromCoverOutro__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimGunFromCoverOutro__Tunables, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DisableOutroScaling, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableOutroOverShootCheck, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.UseConstantOutroScaling, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroRotationScalingDefaultStartPhase, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroRotationScalingDefaultEndPhase, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroScalingDefaultStartPhase, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroScalingDefaultEndPhase, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroMaxScale, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AdditionalModifier, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.EndHeadingTolerance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDistanceToCover, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.InCoverMovementSpeed, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.OutroMovementDuration, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.UpperBodyAimBlendOutDuration, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityAi, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayer, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)2412106599, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayerForcedStandAim, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 80, 0, (MetaName)1280972310), - new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 104, 0, (MetaName)1280972310) - ); - case (MetaName)1280972310: - return new PsoStructureInfo((MetaName)1280972310, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), - new PsoStructureEntryInfo((MetaName)2828309925, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.CTaskAimGunBlindFire__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimGunBlindFire__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RemoveReticuleDuringBlindFire, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DontRemoveReticuleDuringBlindFireNew, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.LowBlindFireAimingDirectlyLimitAngle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HighBlindFireAimingDirectlyLimitAngle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)994532516), - new PsoStructureEntryInfo(MetaName.BlindFireAnimStateNewInfos, PsoDataType.Array, 32, 0, (MetaName)5) - ); - case (MetaName)994532516: - return new PsoStructureInfo((MetaName)994532516, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.IntroClip0Id, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.IntroClip1Id, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.SweepClip0Id, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.SweepClip1Id, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo(MetaName.SweepClip2Id, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.OutroClip0Id, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)2291961208, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)3610728325, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo((MetaName)1018316975, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.CockGunWeaponClipId, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 48, 0, (MetaName)2097162), - new PsoStructureEntryInfo(MetaName.MinHeadingAngle, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingAngle, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3127121455, PsoDataType.Structure, 64, 0, (MetaName)4209697792), - new PsoStructureEntryInfo((MetaName)465339689, PsoDataType.Structure, 88, 0, (MetaName)4209697792) - ); - case (MetaName)4209697792: - return new PsoStructureInfo((MetaName)4209697792, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinPitchAngle, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchAngle, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitchAngle2H, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchAngle2H, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CAiCoverClipVariationHelper__Tunables: - return new PsoStructureInfo(MetaName.CAiCoverClipVariationHelper__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinUsesForPeekingVariationChange, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUsesForPeekingVariationChange, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUsesForPinnedVariationChange, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUsesForPinnedVariationChange, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUsesForOutroReactVariationChange, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUsesForOutroReactVariationChange, PsoDataType.UInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinUsesForIdleVariationChange, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUsesForIdleVariationChange, PsoDataType.UInt, 44, 0, 0) - ); - case MetaName.CPlayerCoverClipVariationHelper__Tunables: - return new PsoStructureInfo(MetaName.CPlayerCoverClipVariationHelper__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinUsesForIdleVariationChange, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUsesForIdleVariationChange, PsoDataType.UInt, 20, 0, 0) - ); - case MetaName.CDynamicCoverHelper__Tunables: - return new PsoStructureInfo(MetaName.CDynamicCoverHelper__Tunables, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EnableConflictingNormalCollisionRemoval, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.UseStickHistoryForCoverSearch, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.StickDownDuration, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.StickDownMinRange, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.UseCameraOrientationWeighting, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.UseCameraOrientationWhenStill, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.UseCameraOrientationForBackwardsDirection, PsoDataType.Bool, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.BehindThreshold, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToWallStanding, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToWallCrouching, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToWallCoverToCover, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMCrouchedForwardClearanceOffset, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMStandingForwardClearanceOffset, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMSideClearanceDepth, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMClearanceCapsuleRadius, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMSideTestDepth, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMCrouchedHeightOffset, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.OCMStandingHeightOffset, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCSideOffset, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCProbeDepth, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCForwardOffset, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCSpacingOffset, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCCapsuleRadius, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCHeightOffset, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.LowCoverProbeHeight, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.HighCoverProbeHeight, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleRadius, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleStartForwardOffset, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleEndForwardOffset, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleStartZOffset, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleEndZOffset, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.CTCMinDistance, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleEdgeProbeXOffset, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleEdgeProbeZOffset, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZDiffBetweenCoverPoints, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZDiffBetweenPedPos, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingDiffBetweenCTCPoints, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.PedToCoverCapsuleRadius, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.PedToCoverEndPullBackDistance, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.PedToCoverEndZOffset, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStickInputAngleInfluence, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleYStartOffset, PsoDataType.Float, 168, 0, 0) - ); - case MetaName.CClipScalingHelper__Tunables: - return new PsoStructureInfo(MetaName.CClipScalingHelper__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableRotationOvershoot, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTranslationScaling, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTranslationOvershoot, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelocityToScale, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTransVelocity, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRemainingAnimDurationToScale, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAnimRotationDeltaToScale, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAnimTranslationDeltaToScale, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCurrentRotationDeltaToScale, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMinRotationScalingValue, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMaxRotationScalingValue, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMinTranslationScalingValue, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMaxTranslationScalingValue, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.CTaskAdvance__Tunables: - return new PsoStructureInfo(MetaName.CTaskAdvance__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToWaitAtPosition, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenPointUpdates, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenSeekChecksAtTacticalPoint, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskAimFromGround__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimFromGround__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxAimFromGroundTime, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskBoatChase__Tunables: - return new PsoStructureInfo(MetaName.CTaskBoatChase__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceForPursue, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskBoatCombat__Tunables: - return new PsoStructureInfo(MetaName.CTaskBoatCombat__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)384450892), - new PsoStructureEntryInfo(MetaName.MinSpeedForChase, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLookAheadForCollision, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DepthForLandProbe, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToWait, PsoDataType.Float, 44, 0, 0) - ); - case (MetaName)384450892: - return new PsoStructureInfo((MetaName)384450892, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionProbe, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.LandProbe, PsoDataType.Bool, 10, 0, 0) - ); - case MetaName.CTaskBoatStrafe__Tunables: - return new PsoStructureInfo(MetaName.CTaskBoatStrafe__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AdditionalDistanceForApproach, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AdditionalDistanceForStrafe, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedForStrafe, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.RotationLookAhead, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAdjustmentLookAhead, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskDraggingToSafety__Tunables: - return new PsoStructureInfo(MetaName.CTaskDraggingToSafety__Tunables, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ObstructionProbe, PsoDataType.Structure, 16, 0, (MetaName)1469164696), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 40, 0, (MetaName)512689970), - new PsoStructureEntryInfo(MetaName.MaxTimeForStream, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverMinDistance, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverMaxDistance, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.LookAtUpdateTime, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.LookAtTime, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverWeightDistance, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverWeightUsage, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverWeightValue, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.SeparationPickup, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.SeparationDrag, PsoDataType.Float3, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.SeparationPutdown, PsoDataType.Float3, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.AbortAimedAtMinDistance, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverResponseTimeout, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotForPickupDirection, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForHolster, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForPedToBeVeryCloseToCover, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNumPedsAllowedToBeVeryCloseToCover, PsoDataType.SInt, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenCoverPointSearches, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToSetApproachPosition, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderTooClose, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToAlwaysLookAtTarget, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeightDifferenceToApproachTarget, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxXYDistanceToApproachTarget, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToBeObstructed, PsoDataType.Float, 192, 0, 0) - ); - case (MetaName)1469164696: - return new PsoStructureInfo((MetaName)1469164696, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Height, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Radius, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraHeightForGround, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)512689970: - return new PsoStructureInfo((MetaName)512689970, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ObstructionProbe, PsoDataType.Bool, 9, 0, 0) - ); - case MetaName.CTaskHeliChase__Tunables: - return new PsoStructureInfo(MetaName.CTaskHeliChase__Tunables, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DriftX, PsoDataType.Structure, 16, 0, (MetaName)1407012688), - new PsoStructureEntryInfo(MetaName.DriftY, PsoDataType.Structure, 40, 0, (MetaName)1407012688), - new PsoStructureEntryInfo(MetaName.DriftZ, PsoDataType.Structure, 64, 0, (MetaName)1407012688), - new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDistanceMin, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDistanceMax, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForOrientation, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.NearDistanceForOrientation, PsoDataType.Float, 108, 0, 0) - ); - case (MetaName)1407012688: - return new PsoStructureInfo((MetaName)1407012688, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinValueForCorrection, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxValueForCorrection, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskHeliCombat__Tunables: - return new PsoStructureInfo(MetaName.CTaskHeliCombat__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Chase, PsoDataType.Structure, 16, 0, (MetaName)960897278) - ); - case (MetaName)960897278: - return new PsoStructureInfo((MetaName)960897278, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetOffsetX, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetOffsetX, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetOffsetY, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetOffsetY, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetOffsetZ, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetOffsetZ, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetOffsetZ_TargetInAir, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetOffsetZ_TargetInAir, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskPlaneChase__Tunables: - return new PsoStructureInfo(MetaName.CTaskPlaneChase__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskReactToBuddyShot__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactToBuddyShot__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskVariedAimPose__Tunables: - return new PsoStructureInfo(MetaName.CTaskVariedAimPose__Tunables, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeCanChooseNewPose, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeNewPose, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBeforeNewPose, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForMinTimeBeforeNewPose, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForMaxTimeBeforeNewPose, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidNearbyPedHorizontal, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidNearbyPedVertical, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidNearbyPedDotThreshold, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenReactions, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAnimOffsetMagnitude, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToCareAboutBlockingLineOfSight, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToUseUrgentTransitions, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToUseUrgentTransitionsWhenThreatened, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenReactionChecksForGunAimedAt, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToReactForGunAimedAt, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxClipsToCheckPerFrame, PsoDataType.SInt, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugDraw, PsoDataType.Bool, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultStandingPose, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultCrouchingPose, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)896772506), - new PsoStructureEntryInfo(MetaName.AimPoses, PsoDataType.Array, 104, 0, (MetaName)22) - ); - case (MetaName)896772506: - return new PsoStructureInfo((MetaName)896772506, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.IsCrouching, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.IsStationary, PsoDataType.Bool, 13, 0, 0), - new PsoStructureEntryInfo(MetaName.LoopClipSetId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.LoopClipId, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2263463390), - new PsoStructureEntryInfo(MetaName.Transitions, PsoDataType.Array, 24, 0, (MetaName)5) - ); - case (MetaName)2263463390: - return new PsoStructureInfo((MetaName)2263463390, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ToPose, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ClipSetId, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.ClipId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)966624441), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 2, (MetaName)524292) - ); - case MetaName.CTaskVehicleChase__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleChase__Tunables, 0, 0, 264, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CloseDistance, PsoDataType.Structure, 16, 0, (MetaName)653343499), - new PsoStructureEntryInfo(MetaName.Block, PsoDataType.Structure, 32, 0, (MetaName)45194904), - new PsoStructureEntryInfo(MetaName.Pursue, PsoDataType.Structure, 56, 0, (MetaName)2956630463), - new PsoStructureEntryInfo(MetaName.Ram, PsoDataType.Structure, 80, 0, (MetaName)533527745), - new PsoStructureEntryInfo(MetaName.SpinOut, PsoDataType.Structure, 104, 0, (MetaName)2379651736), - new PsoStructureEntryInfo(MetaName.PullAlongside, PsoDataType.Structure, 128, 0, (MetaName)3309127383), - new PsoStructureEntryInfo(MetaName.AggressiveMove, PsoDataType.Structure, 152, 0, (MetaName)2082149421), - new PsoStructureEntryInfo(MetaName.Cheat, PsoDataType.Structure, 216, 0, (MetaName)3284002922), - new PsoStructureEntryInfo(MetaName.MaxDotForHandBrake, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenCarChaseShockingEvents, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForCarChaseShockingEvents, PsoDataType.Float, 256, 0, 0) - ); - case (MetaName)653343499: - return new PsoStructureInfo((MetaName)653343499, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MinDistanceToStart, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToContinue, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)45194904: - return new PsoStructureInfo((MetaName)45194904, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MaxDotToStartFromAnalyze, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDotToContinueFromAnalyze, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2956630463: - return new PsoStructureInfo((MetaName)2956630463, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinDotToStartFromAnalyze, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToContinueFromAnalyze, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)533527745: - return new PsoStructureInfo((MetaName)533527745, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)2379651736: - return new PsoStructureInfo((MetaName)2379651736, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)3309127383: - return new PsoStructureInfo((MetaName)3309127383, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)2082149421: - return new PsoStructureInfo((MetaName)2082149421, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.MaxDistanceToStartFromPursue, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToStartFromPursue, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedLeewayToStartFromPursue, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetSteerAngleToStartFromPursue, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToContinueFromPursue, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToContinueFromPursue, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeInStateToContinueFromPursue, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetSteerAngleToContinueFromPursue, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelay, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelay, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.WeightToRamFromPursue, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.WeightToBlockFromPursue, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.WeightToSpinOutFromPursue, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.WeightToPullAlongsideFromPursue, PsoDataType.Float, 60, 0, 0) - ); - case (MetaName)3284002922: - return new PsoStructureInfo((MetaName)3284002922, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinSpeedDifferenceForPowerAdjustment, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedDifferenceForPowerAdjustment, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PowerForMinAdjustment, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PowerForMaxAdjustment, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.destroySuppressor, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskVehiclePersuit__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehiclePersuit__Tunables, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ApproachTarget, PsoDataType.Structure, 16, 0, (MetaName)2385857407), - new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleA, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleB, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleC, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceOnBikeAndTargetUnarmed, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceOnBikeAndTargetArmed, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceInVehicleAndTargetUnarmed, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceInVehicleAndTargetArmed, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceShotAt, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceCouldLeaveCar, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToStopMultiplier, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToStopMassIdeal, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToStopMassWeight, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDriverTimeToLeaveVehicle, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDriverTimeToLeaveVehicle, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPassengerTimeToLeaveVehicle, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPassengerTimeToLeaveVehicle, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForEarlyCombatExit, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToJumpOutOfVehicle, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBoatOutOfWaterForExit, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidanceMarginForOtherLawEnforcementVehicles, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToWaitForOtherPedToExit, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayExitTime, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayExitTime, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.PreventShufflingExtraRange, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeWaitForExitBeforeWarp, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTargetStandingOnTrainSpeed, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToFollowInCar, PsoDataType.SInt, 176, 0, 0) - ); - case (MetaName)2385857407: - return new PsoStructureInfo((MetaName)2385857407, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.TargetArriveDist, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderClose, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenClose, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenObstructedByLawEnforcementPed, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenObstructedByLawEnforcementVehicle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1208093369, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)4019091857, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2510151940, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1955661253, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2422052515, PsoDataType.SInt, 48, 0, 0) - ); - case MetaName.CTaskVehicleCombat__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleCombat__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenShootOutTiresGlobal, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBetweenShootOutTiresGlobal, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInCombatToShootOutTires, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeInCombatToShootOutTires, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToApplyReactionWhenShootingOutTire, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToPrepareWeapon, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToPrepareWeapon, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1726607124, PsoDataType.UInt, 44, 0, 0) - ); - case MetaName.CTaskSearchBase__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchBase__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToGiveUp, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPositionVariance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDirectionVariance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskSearchInAutomobile__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchInAutomobile__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskSearchInBoat__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchInBoat__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskSearchInHeli__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchInHeli__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 24, 0, 0) - ); - case MetaName.CTaskSearchOnFoot__Tunables: - return new PsoStructureInfo(MetaName.CTaskSearchOnFoot__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeSafeDistance, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskShootOutTire__Tunables: - return new PsoStructureInfo(MetaName.CTaskShootOutTire__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeoutToAcquireLineOfSight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeoutToAcquireLineOfSight, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenLineOfSightChecks, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToWaitForShot, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToWaitForShot, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWaitForShotFailures, PsoDataType.SInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToApplyReaction, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskTargetUnreachable__Tunables: - return new PsoStructureInfo(MetaName.CTaskTargetUnreachable__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fTimeBetweenRouteSearches, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskTargetUnreachableInInterior__Tunables: - return new PsoStructureInfo(MetaName.CTaskTargetUnreachableInInterior__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fDirectionTestProbeLength, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskTargetUnreachableInExterior__Tunables: - return new PsoStructureInfo(MetaName.CTaskTargetUnreachableInExterior__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RangePercentage, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromNavMesh, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToWait, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToWait, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CPedTargetting__Tunables: - return new PsoStructureInfo(MetaName.CPedTargetting__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fExistingTargetScoreWeight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fTargetingInactiveDisableTime, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fBlockedLosWeighting, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fTimeToIgnoreBlockedLosWeighting, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerHighThreatWeighting, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1742395925, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.iTargetNotSeenIgnoreTimeMs, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerThreatDistance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerDirectThreatDistance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerBeingTargetedExtraDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.iPlayerDirectThreatTimeMs, PsoDataType.SInt, 56, 0, 0) - ); - case MetaName.CTaskPursueCriminal__Tunables: - return new PsoStructureInfo(MetaName.CTaskPursueCriminal__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToFindVehicle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToFindVehicle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeightDifference, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DotProductFacing, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DotProductBehind, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToFollowVehicleBeforeFlee, PsoDataType.SInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToSignalVehiclePursuitToCriminal, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToSignalVehiclePursuitToCriminalMin, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToSignalVehiclePursuitToCriminalMax, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DrawDebug, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowPursuePlayer, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo(MetaName.CriminalVehicleMinStartSpeed, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.CTaskReactToPursuit__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactToPursuit__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToFleeInVehicle, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToFleeInVehicle, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeSpeedInVehicle, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskStealVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskStealVehicle__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToFindVehicle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToPursueVehicle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToRunToVehicle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CanStealPlayersVehicle, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CanStealCarsAtLights, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.CanStealParkedCars, PsoDataType.Bool, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.CanStealStationaryCars, PsoDataType.Bool, 31, 0, 0) - ); - case MetaName.CLookAtHistory__Tunables: - return new PsoStructureInfo(MetaName.CLookAtHistory__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.HistoryCosineThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MemoryDuration, PsoDataType.UInt, 20, 0, 0) - ); - case MetaName.CAmbientLookAt__Tunables: - return new PsoStructureInfo(MetaName.CAmbientLookAt__Tunables, 0, 0, 416, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultLookAtThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultDistanceFromWorldCenter, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtendedDistanceFromWorldCenter, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToScanLookAts, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.BaseTimeToLook, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AITimeBetweenLookAtsFailureMin, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AITimeBetweenLookAtsFailureMax, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerTimeBetweenLookAtsMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerTimeBetweenLookAtsMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerTimeMyVehicleLookAtsMin, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerTimeMyVehicleLookAtsMax, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenScenarioScans, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioScanOffsetDistance, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioScanRadius, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlayerScore, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.BasicPedScore, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.BasicVehicleScore, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.BasicObjectScore, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.BehindPedModifier, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerPedModifier, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.WalkingRoundPedModifier, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.RunningPedModifier, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.ClimbingOrJumpingPedModifier, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.FightingModifier, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.JackingModifier, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.HangingAroundVehicleModifier, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioToScenarioPedModifier, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.GangScenarioPedToPlayerModifier, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.ApproachingPlayerModifier, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosePlayerModifier, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.InRangePlayerModifier, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.InRangeDrivingPlayerModifier, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.HoldingWeaponPlayerModifier, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.CoveredInBloodPlayerModifier, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollingModifier, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.PickingUpBikeModifier, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.RecklessCarModifier, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.RecentlyLookedAtPlayerModifier, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.RecentlyLookedAtEntityModifier, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.HighImportanceModifier, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MediumImportanceModifier, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.LowImportanceModifier, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.ModelNamesToConsiderPlayersForScoringPurposes, PsoDataType.Array, 184, 0, (MetaName)43), - new PsoStructureEntryInfo(MetaName.RecklessCarSpeedMin, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.RecklessCarSpeedMax, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.CarSirenModifier, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerCopModifier, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSexyPedModifier, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSwankyCarModifier, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerCopCarModifier, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerHasslingModifier, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedMinDistance, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedMaxDistance, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedMinDotAngle, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedMaxDotAngle, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedMaxHeightDifference, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.InRangePlayerDistanceThreshold, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.InRangePlayerInRaceDistanceThreshold, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosePlayerDistanceThreshold, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.ApproachingPlayerDistanceThreshold, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.ApproachingPlayerCosineThreshold, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollPlayerDistanceThreshold, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.LookingInRangePlayerMaxDotAngle, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVelocityForVehicleLookAtSqr, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSwankyCarMin, PsoDataType.UByte, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSwankyCarMax, PsoDataType.UByte, 285, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedRenderDebug, PsoDataType.Bool, 286, 0, 0), - new PsoStructureEntryInfo(MetaName.HotPedDisableSexinessFlagChecks, PsoDataType.Bool, 287, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBeforeSwitchLookAt, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookBackAngle, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTurnSpeedMotionOverPOI, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedForNarrowestAnglePickPOI, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAnglePickPOI, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAnglePickPOI, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchingAnglePickPOI, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerLookAtDebugDraw, PsoDataType.Bool, 316, 0, 0), - new PsoStructureEntryInfo(MetaName.CameraLookAtTurnRate, PsoDataType.Enum, 320, 0, MetaName.LookIkTurnRate), - new PsoStructureEntryInfo(MetaName.POILookAtTurnRate, PsoDataType.Enum, 324, 0, MetaName.LookIkTurnRate), - new PsoStructureEntryInfo(MetaName.MotionLookAtTurnRate, PsoDataType.Enum, 328, 0, MetaName.LookIkTurnRate), - new PsoStructureEntryInfo(MetaName.VehicleJumpLookAtTurnRate, PsoDataType.Enum, 332, 0, MetaName.LookIkTurnRate), - new PsoStructureEntryInfo(MetaName.CameraLookAtBlendRate, PsoDataType.Enum, 336, 0, MetaName.LookIkBlendRate), - new PsoStructureEntryInfo(MetaName.POILookAtBlendRate, PsoDataType.Enum, 340, 0, MetaName.LookIkBlendRate), - new PsoStructureEntryInfo(MetaName.MotionLookAtBlendRate, PsoDataType.Enum, 344, 0, MetaName.LookIkBlendRate), - new PsoStructureEntryInfo(MetaName.VehicleJumpLookAtBlendRate, PsoDataType.Enum, 348, 0, MetaName.LookIkBlendRate), - new PsoStructureEntryInfo(MetaName.CameraLookAtRotationLimit, PsoDataType.Enum, 352, 0, MetaName.LookIkRotationLimit), - new PsoStructureEntryInfo(MetaName.POILookAtRotationLimit, PsoDataType.Enum, 356, 0, MetaName.LookIkRotationLimit), - new PsoStructureEntryInfo(MetaName.MotionLookAtRotationLimit, PsoDataType.Enum, 360, 0, MetaName.LookIkRotationLimit), - new PsoStructureEntryInfo(MetaName.AITimeWaitingToCrossRoadMin, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.AITimeWaitingToCrossRoadMax, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.fAIGreetingDistanceMin, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.fAIGreetingDistanceMax, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.uAITimeBetweenGreeting, PsoDataType.UInt, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.fAIGreetingPedModifier, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.uTimeBetweenLookBacks, PsoDataType.UInt, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.uTimeToLookBack, PsoDataType.UInt, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.uAimToIdleLookAtTime, PsoDataType.UInt, 396, 0, 0), - new PsoStructureEntryInfo(MetaName.fAimToIdleBreakOutAngle, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.fAimToIdleAngleLimitLeft, PsoDataType.Float, 404, 0, 0), - new PsoStructureEntryInfo(MetaName.fAimToIdleAngleLimitRight, PsoDataType.Float, 408, 0, 0), - new PsoStructureEntryInfo((MetaName)3044687592, PsoDataType.UInt, 412, 0, 0) - ); - case MetaName.CTaskAmbientClips__Tunables: - return new PsoStructureInfo(MetaName.CTaskAmbientClips__Tunables, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.LowLodBaseClipSetId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultChanceOfStandingWhileMoving, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTimeBetweenIdles, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterGunshotToPlayIdles, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterGunshotForPlayerToPlayIdles, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.playerNearToHangoutDistanceInMetersSquared, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.minSecondsNearPlayerUntilHangoutQuit, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.maxSecondsNearPlayerUntilHangoutQuit, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.maxHangoutChatDistSq, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.VFXCullRangeScaleNotVisible, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondsSinceInWaterThatCountsAsWet, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVehicleVelocityForAmbientIdles, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSteeringAngleForAmbientIdles, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeSinceGetUpForAmbientIdles, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)110858295, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)990057437, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.fArgumentProbability, PsoDataType.Float, 80, 0, 0) - ); - case MetaName.CTaskChat__Tunables: - return new PsoStructureInfo(MetaName.CTaskChat__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.HeadingToleranceDegrees, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWaitTime, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskCuffed__Tunables: - return new PsoStructureInfo(MetaName.CTaskCuffed__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.HandcuffedClipSetId, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.ActionsHandcuffedNetworkId, PsoDataType.String, 20, 7, 0) - ); - case MetaName.CTaskInCustody__Tunables: - return new PsoStructureInfo(MetaName.CTaskInCustody__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AbandonDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowRadius, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.FollowOffset, PsoDataType.Float3, 32, 0, 0) - ); - case MetaName.CTaskFlyingWander__Tunables: - return new PsoStructureInfo(MetaName.CTaskFlyingWander__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RangeOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingWanderChange, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskPlayerOnFoot__Tunables: - return new PsoStructureInfo(MetaName.CTaskPlayerOnFoot__Tunables, 0, 0, 368, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ParachutePack, PsoDataType.Structure, 16, 0, (MetaName)810561649), - new PsoStructureEntryInfo(MetaName.ScubaGear, PsoDataType.Structure, 88, 0, (MetaName)4252665724), - new PsoStructureEntryInfo((MetaName)973020790, PsoDataType.Structure, 152, 0, (MetaName)2770060121), - new PsoStructureEntryInfo(MetaName.EvaluateThreatFromCoverPoints, PsoDataType.Bool, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.UseThreatWeighting, PsoDataType.Bool, 209, 0, 0), - new PsoStructureEntryInfo((MetaName)1978058747, PsoDataType.Bool, 210, 0, 0), - new PsoStructureEntryInfo((MetaName)3319528567, PsoDataType.Bool, 211, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestDistance, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestDot, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxEncumberedClimbHeight, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTrainClimbHeight, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.TakeCustodyDistance, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.UncuffDistance, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToTalk, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToTalk, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenPlayerEvents, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceBetweenAiPedsCoverAndPlayersCover, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceAiPedFromTheirCoverToAbortPlayerEnterCover, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.SmallCapsuleCoverPenalty, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.SmallCapsuleCoverRadius, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.PriorityCoverWeight, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.EdgeCoverWeight, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.DistToCoverWeightThreat, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.DistToCoverWeight, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.DistToCoverWeightNoStickBonus, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.VeryCloseToCoverDist, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.VeryCloseToCoverWeight, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDirToCoverWeight, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDirToCoverAimingWeight, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.ThreatDirWeight, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.ThreatEngageDirWeight, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMin, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMax, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMaxAimGun, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMaxScaleDist, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredDirToCoverMinDot, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo(MetaName.CameraDirToCoverMinDot, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo(MetaName.StaticLosTest1Offset, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo(MetaName.StaticLosTest2Offset, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo(MetaName.CollisionLosHeightOffset, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo(MetaName.VeryCloseIgnoreDesAndCamToleranceDist, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo(MetaName.VeryCloseIgnoreDesAndCamToleranceDistAimGun, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo(MetaName.DeadZoneStickNorm, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.SearchThreatMaxDot, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)3328482583, PsoDataType.String, 360, 7, 0), - new PsoStructureEntryInfo((MetaName)1221942053, PsoDataType.Bool, 364, 0, 0), - new PsoStructureEntryInfo((MetaName)1138836382, PsoDataType.Bool, 365, 0, 0) - ); - case (MetaName)810561649: - return new PsoStructureInfo((MetaName)810561649, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)1276417684), - new PsoStructureEntryInfo(MetaName.AttachOffsetX, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOffsetY, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOffsetZ, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationX, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationY, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationZ, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendInDeltaForPed, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendInDeltaForProp, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 68, 0, 0) - ); - case (MetaName)1276417684: - return new PsoStructureInfo((MetaName)1276417684, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)4252665724: - return new PsoStructureInfo((MetaName)4252665724, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)2201360486), - new PsoStructureEntryInfo(MetaName.AttachOffsetX, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOffsetY, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOffsetZ, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationX, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationY, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachOrientationZ, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 60, 0, 0) - ); - case (MetaName)2201360486: - return new PsoStructureInfo((MetaName)2201360486, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2770060121: - return new PsoStructureInfo((MetaName)2770060121, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)549752042), - new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3586541171, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)4160387967, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo((MetaName)2801649672, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)2028074979, PsoDataType.String, 52, 7, 0) - ); - case (MetaName)549752042: - return new PsoStructureInfo((MetaName)549752042, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskSwimmingWander__Tunables: - return new PsoStructureInfo(MetaName.CTaskSwimmingWander__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SurfaceSkimmerDepth, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.NormalPreferredDepth, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidanceProbeLength, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidanceProbePullback, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidanceProbeInterval, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AvoidanceSteerAngleDegrees, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.InstantProbeDurationMin, PsoDataType.UInt, 40, 0, 0) - ); - case MetaName.CTaskUnalerted__Tunables: - return new PsoStructureInfo(MetaName.CTaskUnalerted__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureMin, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureMax, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureWhenStationary, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterNotAbleToSearch, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterSuccessMin, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterSuccessMax, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayInitialMin, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ScenarioDelayInitialMax, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeDriverAnimCheck, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenSearchesForNextScenarioInChain, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeMinBeforeLastPoint, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeMinBeforeLastPointType, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PavementFloodFillSearchRadius, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.WaitTimeAfterFailedVehExit, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToReturnToLastUsedVehicle, PsoDataType.Float, 72, 0, 0) - ); - case MetaName.CTaskWander__Tunables: - return new PsoStructureInfo(MetaName.CTaskWander__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.uNumPedsToTransitionToRainPerPeriod, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fSecondsInRainTransitionPeriod, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskWanderInArea__Tunables: - return new PsoStructureInfo(MetaName.CTaskWanderInArea__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinWaitTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWaitTime, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CDispatchSpawnHelper__Tunables: - return new PsoStructureInfo(MetaName.CDispatchSpawnHelper__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Restrictions, PsoDataType.Structure, 16, 0, (MetaName)2369454477), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 32, 0, (MetaName)3541869149), - new PsoStructureEntryInfo(MetaName.IdealSpawnDistance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotForInFront, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceTraveledMultiplier, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToBeConsideredEscapingInVehicle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForDispatchPosition, PsoDataType.Float, 64, 0, 0) - ); - case (MetaName)2369454477: - return new PsoStructureInfo((MetaName)2369454477, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxDistanceFromCameraForViewportChecks, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusForViewportCheck, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)3541869149: - return new PsoStructureInfo((MetaName)3541869149, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DispatchNode, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.FindSpawnPointInDirection, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.IncidentLocation, PsoDataType.Bool, 11, 0, 0) - ); - case MetaName.CDispatchAdvancedSpawnHelper__Tunables: - return new PsoStructureInfo(MetaName.CDispatchAdvancedSpawnHelper__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)3744572044), - new PsoStructureEntryInfo(MetaName.TimeBetweenInvalidateInvalidDispatchVehicles, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenMarkDispatchVehiclesForDespawn, PsoDataType.Float, 36, 0, 0) - ); - case (MetaName)3744572044: - return new PsoStructureInfo((MetaName)3744572044, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0) - ); - case MetaName.CDispatchHelperSearchOnFoot__Tunables: - return new PsoStructureInfo(MetaName.CDispatchHelperSearchOnFoot__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), - new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromNavMesh, PsoDataType.Float, 32, 0, 0) - ); - case (MetaName)2350715434: - return new PsoStructureInfo((MetaName)2350715434, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.MinTimeSinceLastSpotted, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeSinceLastSpotted, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRadiusForMinTimeSinceLastSpotted, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRadiusForMaxTimeSinceLastSpotted, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.UseLastSeenPosition, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.UseByDefault, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo(MetaName.UseEnclosedSearchRegions, PsoDataType.Bool, 34, 0, 0) - ); - case MetaName.CDispatchHelperSearchInAutomobile__Tunables: - return new PsoStructureInfo(MetaName.CDispatchHelperSearchInAutomobile__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), - new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromRoadNode, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CDispatchHelperSearchInBoat__Tunables: - return new PsoStructureInfo(MetaName.CDispatchHelperSearchInBoat__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), - new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CDispatchHelperSearchInHeli__Tunables: - return new PsoStructureInfo(MetaName.CDispatchHelperSearchInHeli__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), - new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.CDispatchHelperVolumes__Tunables: - return new PsoStructureInfo(MetaName.CDispatchHelperVolumes__Tunables, 0, 0, 152, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)3452608618), - new PsoStructureEntryInfo(MetaName.LocationForNearestCarNodeOverrides, PsoDataType.Structure, 32, 0, (MetaName)3249772165), - new PsoStructureEntryInfo(MetaName.EnclosedSearchRegions, PsoDataType.Structure, 72, 0, (MetaName)898276026), - new PsoStructureEntryInfo(MetaName.BlockingAreas, PsoDataType.Structure, 112, 0, (MetaName)2312163633) - ); - case (MetaName)3452608618: - return new PsoStructureInfo((MetaName)3452608618, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LocationForNearestCarNodeOverrides, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.EnclosedSearchRegions, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.BlockingAreas, PsoDataType.Bool, 11, 0, 0) - ); - case (MetaName)3249772165: - return new PsoStructureInfo((MetaName)3249772165, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1419890352), - new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3809247475), - new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)898276026: - return new PsoStructureInfo((MetaName)898276026, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2129766809), - new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)253441159), - new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)2312163633: - return new PsoStructureInfo((MetaName)2312163633, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3558216355), - new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1335944774), - new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)1419890352: - return new PsoStructureInfo((MetaName)1419890352, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.AngledArea, PsoDataType.Structure, 8, 0, (MetaName)3558216355), - new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Structure, 72, 0, (MetaName)2431379611) - ); - case (MetaName)3558216355: - return new PsoStructureInfo((MetaName)3558216355, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 8, 0, (MetaName)2431379611), - new PsoStructureEntryInfo(MetaName.End, PsoDataType.Structure, 32, 0, (MetaName)2431379611), - new PsoStructureEntryInfo(MetaName.Width, PsoDataType.Float, 56, 0, 0) - ); - case (MetaName)2431379611: - return new PsoStructureInfo((MetaName)2431379611, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)2129766809: - return new PsoStructureInfo((MetaName)2129766809, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.AngledArea, PsoDataType.Structure, 8, 0, (MetaName)3558216355), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)4002001992), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 72, 0, (MetaName)2097153) - ); - case MetaName.CWantedHelicopterDispatch__Tunables: - return new PsoStructureInfo(MetaName.CWantedHelicopterDispatch__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttempts, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpawnTimeForPoliceHeliAfterDestroyed, PsoDataType.UInt, 20, 0, 0) - ); - case MetaName.CPoliceBoatDispatch__Tunables: - return new PsoStructureInfo(MetaName.CPoliceBoatDispatch__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttempts, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CEventPedJackingMyVehicle__Tunables: - return new PsoStructureInfo(MetaName.CEventPedJackingMyVehicle__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CEventEncroachingPed__Tunables: - return new PsoStructureInfo(MetaName.CEventEncroachingPed__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CEventRequestHelp__Tunables: - return new PsoStructureInfo(MetaName.CEventRequestHelp__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxRangeWithoutRadioForFistFights, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CEventCrimeCryForHelp__Tunables: - return new PsoStructureInfo(MetaName.CEventCrimeCryForHelp__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1405855513, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)4108300187, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1818772152, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)2579479361, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)977600457, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CEventSuspiciousActivity__Tunables: - return new PsoStructureInfo(MetaName.CEventSuspiciousActivity__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToBeConsideredSameEvent, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CEventAgitated__Tunables: - return new PsoStructureInfo(MetaName.CEventAgitated__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToLive, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbientEventLifetime, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TriggerAmbientReactionChances, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForAmbientReaction, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForAmbientReaction, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeForAmbientReaction, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForAmbientReaction, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbientEventType, PsoDataType.Enum, 44, 0, MetaName.AmbientEventType) - ); - case MetaName.CEventRespondedToThreat__Tunables: - return new PsoStructureInfo(MetaName.CEventRespondedToThreat__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskCallPolice__Tunables: - return new PsoStructureInfo(MetaName.CTaskCallPolice__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeMovingAwayToGiveToWitness, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceTalkingEndedToMakeCall, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceTargetTalkingEndedToMakeCall, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeTargetHasBeenTalkingToMakeCall, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSinceTalkingEndedToSayContextForCall, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeSpentInEarLoopToSayContextForCall, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToSpendInEarLoopToPutDownPhone, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSpendInEarLoopToPutDownPhone, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CTaskConversationHelper__Tunables: - return new PsoStructureInfo(MetaName.CTaskConversationHelper__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fMinSecondsDelayBetweenPhoneLines, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxSecondsDelayBetweenPhoneLines, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinSecondsDelayBetweenChatLines, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxSecondsDelayBetweenChatLines, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceSquaredToPlayerForAudio, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fChanceOfConversationRant, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fChanceOfArgumentChallenge, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fChanceOfArgumentChallengeBeingAccepted, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.uTimeInMSUntilNewWeirdPedComment, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.uMaxTimeInMSToPlayRingTone, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.uTimeToWaitAfterNewSayFailureInSeconds, PsoDataType.UByte, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.uTicksUntilHangoutConversationCheck, PsoDataType.UByte, 57, 0, 0) - ); - case MetaName.CLegIkSolver__Tunables: - return new PsoStructureInfo(MetaName.CLegIkSolver__Tunables, 0, 0, 392, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PelvisInterp, PsoDataType.Structure, 16, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.PelvisInterpMoving, PsoDataType.Structure, 40, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.PelvisInterpOnDynamic, PsoDataType.Structure, 64, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.FootInterp, PsoDataType.Structure, 88, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.FootInterpIntersecting, PsoDataType.Structure, 112, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.FootInterpMoving, PsoDataType.Structure, 136, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.FootInterpIntersectingMoving, PsoDataType.Structure, 160, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.FootInterpOnDynamic, PsoDataType.Structure, 184, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsPelvisInterp, PsoDataType.Structure, 208, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsPelvisInterpMoving, PsoDataType.Structure, 232, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsPelvisInterpCoverAim, PsoDataType.Structure, 256, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsFootInterp, PsoDataType.Structure, 280, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsFootInterpIntersecting, PsoDataType.Structure, 304, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.StairsFootInterpCoverAim, PsoDataType.Structure, 328, 0, (MetaName)1560218317), - new PsoStructureEntryInfo(MetaName.UpStairsPelvisMaxDeltaZMoving, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.UpStairsPelvisMaxNegativeDeltaZMoving, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo(MetaName.DownStairsPelvisMaxDeltaZMoving, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo(MetaName.DownStairsPelvisMaxNegativeDeltaZMoving, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.StairsPelvisMaxNegativeDeltaZCoverAim, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.VelMagStairsSpringMin, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.VelMagStairsSpringMax, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.StairsSpringMultiplierMin, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.StairsSpringMultiplierMax, PsoDataType.Float, 384, 0, 0) - ); - case (MetaName)1560218317: - return new PsoStructureInfo((MetaName)1560218317, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationBased, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleAccelWithDelta, PsoDataType.Bool, 13, 0, 0), - new PsoStructureEntryInfo(MetaName.ZeroRateOnDirectionChange, PsoDataType.Bool, 14, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelRate, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CMiniMap__Tunables: - return new PsoStructureInfo(MetaName.CMiniMap__Tunables, 0, 0, 352, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Sonar, PsoDataType.Structure, 16, 0, (MetaName)53366421), - new PsoStructureEntryInfo(MetaName.HealthBar, PsoDataType.Structure, 132, 0, (MetaName)1902464991), - new PsoStructureEntryInfo(MetaName.Bitmap, PsoDataType.Structure, 140, 0, (MetaName)2026887270), - new PsoStructureEntryInfo((MetaName)1791333322, PsoDataType.Structure, 172, 0, (MetaName)1690619373), - new PsoStructureEntryInfo(MetaName.Camera, PsoDataType.Structure, 200, 0, (MetaName)283649933), - new PsoStructureEntryInfo(MetaName.Tiles, PsoDataType.Structure, 300, 0, (MetaName)3031405081), - new PsoStructureEntryInfo(MetaName.Overlay, PsoDataType.Structure, 320, 0, (MetaName)2449081679), - new PsoStructureEntryInfo(MetaName.Display, PsoDataType.Structure, 340, 0, (MetaName)1640186987) - ); - case (MetaName)53366421: - return new PsoStructureInfo((MetaName)53366421, 0, 0, 116, - new PsoStructureEntryInfo(MetaName.fSoundRange_BarelyAudible, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_MostlyAudible, PsoDataType.Float, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_ClearlyAudible, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Whisper, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Talking, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Shouting, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Megaphone, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_FootstepBase, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_HeavyFootstep, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_FootstepFoliage, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_LandFromFall, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_WeaponSpinUp, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Gunshot, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_SilencedGunshot, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)60903513, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_Explosion, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_ObjectCollision, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_GlassBreak, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_CarHorn, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_CarLowSpeed, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_CarHighSpeed, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_WaterSplashSmall, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.fSoundRange_WaterSplashLarge, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinListenerRangeToDrawSonarBlips, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.fRainSnowSoundReductionAmount, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.fRadioSoundReductionAmount, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.fRadioSoundReductionDistance, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.fConversationSoundReductionAmount, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.fConversationSoundReductionDistance, PsoDataType.Float, 112, 0, 0) - ); - case (MetaName)1902464991: - return new PsoStructureInfo((MetaName)1902464991, 0, 0, 8, - new PsoStructureEntryInfo(MetaName.fStaminaDepletionBlinkPercentage, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iHealthDepletionBlinkPercentage, PsoDataType.SInt, 4, 0, 0) - ); - case (MetaName)2026887270: - return new PsoStructureInfo((MetaName)2026887270, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)2262853888, PsoDataType.UShort, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)735818480, PsoDataType.UShort, 2, 0, 0), - new PsoStructureEntryInfo((MetaName)4138858726, PsoDataType.Float2, 4, 0, 0), - new PsoStructureEntryInfo((MetaName)3205558428, PsoDataType.Float2, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)1388742013, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3712817443, PsoDataType.Enum, 24, 0, (MetaName)1049598006), - new PsoStructureEntryInfo((MetaName)1737696498, PsoDataType.Enum, 28, 0, (MetaName)1049598006) - ); - case (MetaName)1690619373: - return new PsoStructureInfo((MetaName)1690619373, 0, 0, 28, - new PsoStructureEntryInfo(MetaName.fWorldX, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fWorldY, PsoDataType.Float, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.fWorldW, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fWorldH, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fBaseAlpha, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2170322240, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fFowWaterHeight, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)283649933: - return new PsoStructureInfo((MetaName)283649933, 0, 0, 100, - new PsoStructureEntryInfo((MetaName)3708284943, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)1172300147, PsoDataType.Float, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.fExteriorFootZoom, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fExteriorFootZoomRunning, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fExteriorFootZoomWanted, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fExteriorFootZoomWantedRunning, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1296848312, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)187030077, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fInteriorFootZoom, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2652932444, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2075786872, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fParachutingZoom, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleStaticZoom, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleStaticWantedZoom, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleMovingZoom, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleMovingWantedZoom, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleSpeedZoomScalar, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleTilt, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fVehicleOffset, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1912611271, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)4158832075, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)2229181525, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)1723892124, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.fRangeZoomedScalarStandard, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.fRangeZoomedScalarPlane, PsoDataType.Float, 96, 0, 0) - ); - case (MetaName)3031405081: - return new PsoStructureInfo((MetaName)3031405081, 0, 0, 20, - new PsoStructureEntryInfo((MetaName)2152230135, PsoDataType.Float2, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)4201231105, PsoDataType.Float2, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)142519492, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)866622976, PsoDataType.Bool, 17, 0, 0) - ); - case (MetaName)2449081679: - return new PsoStructureInfo((MetaName)2449081679, 0, 0, 20, - new PsoStructureEntryInfo(MetaName.vPos, PsoDataType.Float2, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.vScale, PsoDataType.Float2, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fDisplayZ, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)1640186987: - return new PsoStructureInfo((MetaName)1640186987, 0, 0, 12, - new PsoStructureEntryInfo((MetaName)717614933, PsoDataType.UShort, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)81490677, PsoDataType.UShort, 2, 0, 0), - new PsoStructureEntryInfo((MetaName)2014573657, PsoDataType.Float, 4, 0, 0), - new PsoStructureEntryInfo((MetaName)3269987179, PsoDataType.Float, 8, 0, 0) - ); - case MetaName.CTaskMotionAiming__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionAiming__Tunables, 0, 0, 144, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PlayerMoveAccel, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerMoveDecel, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.PedMoveAccel, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.PedMoveDecel, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FromOnFootAccelerationMod, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.WalkAngAccel, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.RunAngAccel, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1722146938, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1350763236, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)3375971933, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3611401160, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.Turn180ActivationAngle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.Turn180ConsistentAngleTolerance, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.Turn, PsoDataType.Structure, 72, 0, (MetaName)150934045), - new PsoStructureEntryInfo(MetaName.PitchChangeRate, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchChangeRateAcceleration, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.OverwriteMaxPitch, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroMaxAngleChangeRate, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroMinPhaseChangeRate, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroMaxPhaseChangeRate, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.AimIntroMaxTimedOutPhaseChangeRate, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerIdleIntroAnimRate, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateMin, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateMax, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateAcceleration, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.DoPostCameraClipUpdateForPlayer, PsoDataType.Bool, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableIkForAI, PsoDataType.Bool, 133, 0, 0), - new PsoStructureEntryInfo((MetaName)122800807, PsoDataType.Bool, 134, 0, 0), - new PsoStructureEntryInfo((MetaName)259313148, PsoDataType.Bool, 135, 0, 0), - new PsoStructureEntryInfo((MetaName)2900191858, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)827074596, PsoDataType.Bool, 140, 0, 0) - ); - case (MetaName)150934045: - return new PsoStructureInfo((MetaName)150934045, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxVariationForCurrentPitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVariationForDesiredPitch, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.CTaskBirdLocomotion__Tunables: - return new PsoStructureInfo(MetaName.CTaskBirdLocomotion__Tunables, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinWaitTimeBetweenTakeOffsMS, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWaitTimeBetweenTakeOffsMS, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTakeOffRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTakeOffRate, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTakeOffHeadingChangeRate, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTakeOffHeadingChangeRate, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2759154614, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToFlapMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToFlapMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1388183900, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceNoTimeslicingHeadingDiff, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceFromPlayerToDeleteStuckBird, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeUntilDeletionWhenStuckOffscreen, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeWhenStuckToIgnoreBird, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.HighLodWalkHeadingLerpRate, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.LowLodWalkHeadingLerpRate, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)325409255, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)2032071225, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)171073592, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)2122727094, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)578605354, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)961953658, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)291845288, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1918070033, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)677105748, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)2691956573, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)27278755, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)2575647854, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)3370383430, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 132, 7, 0) - ); - case MetaName.CTaskMotionSwimming__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionSwimming__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinStruggleTime, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStruggleTime, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4258712195), - new PsoStructureEntryInfo(MetaName.ScubaGearVariations, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fCargoFuel), - new PsoStructureEntryInfo(MetaName.ScubaMaskProps, PsoDataType.Array, 40, 0, (MetaName)5) - ); - case (MetaName)4258712195: - return new PsoStructureInfo((MetaName)4258712195, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3020467458), - new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case (MetaName)3020467458: - return new PsoStructureInfo((MetaName)3020467458, 0, 0, 72, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2469984956), - new PsoStructureEntryInfo(MetaName.Wearing, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ScubaGearWithLightsOn, PsoDataType.Structure, 24, 0, (MetaName)2354064210), - new PsoStructureEntryInfo(MetaName.ScubaGearWithLightsOff, PsoDataType.Structure, 48, 0, (MetaName)2354064210) - ); - case (MetaName)2354064210: - return new PsoStructureInfo((MetaName)2354064210, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo(MetaName.DrawableId, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DrawableAltId, PsoDataType.UInt, 16, 0, 0) - ); - case (MetaName)2469984956: - return new PsoStructureInfo((MetaName)2469984956, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.DrawableIds, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.fCargoFuel: - return new PsoStructureInfo(MetaName.fCargoFuel, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Index, PsoDataType.SInt, 12, 0, 0) - ); - case MetaName.CTaskMotionBasicLocomotionLowLod__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionBasicLocomotionLowLod__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAcceleration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceUpdatesWhenTurningStartThresholdRadians, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceUpdatesWhenTurningStopThresholdRadians, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskFishLocomotion__Tunables: - return new PsoStructureInfo(MetaName.CTaskFishLocomotion__Tunables, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StartTurnThresholdDegrees, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StopTurnThresholdDegrees, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTurnApproachRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealTurnApproachRate, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)190400066, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnAcceleration, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)2035076014, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchAcceleration, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2691956573, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1242076965, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2945548240, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)3350282721, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.FishOutOfWaterDelay, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1246801857, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.AssistanceAngle, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraHeadingRate, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceProbeHead, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceProbeTail, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfacePitchLerpRate, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceHeightFallingLerpRate, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceHeightRisingLerpRate, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.SurfaceHeightFollowingTriggerRange, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)2334883967, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)487169156, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo((MetaName)1984559896, PsoDataType.Float, 116, 0, 0) - ); - case MetaName.CTaskHumanLocomotion__Tunables: - return new PsoStructureInfo(MetaName.CTaskHumanLocomotion__Tunables, 0, 0, 864, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Player_MBRAcceleration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Player_MBRDeceleration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AI_MBRAcceleration, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AI_MBRDeceleration, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FromStrafeAccelerationMod, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.FastWalkRateMin, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.FastWalkRateMax, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowRunRateMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowRunRateMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.FastRunRateMin, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.FastRunRateMax, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.Turn180ActivationAngle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.Turn180ConsistentAngleTolerance, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleHeadingLerpRate, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.Player_IdleTurnRate, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.AI_IdleTurnRate, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.FromStrafe_WeightRate, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.FromStrafe_MovingBlendOutTime, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleTransitionBlendTimeFromActionMode, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleTransitionBlendTimeFromStealth, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2557519583), - new PsoStructureEntryInfo(MetaName.MovingVarsSet, PsoDataType.Array, 96, 4, (MetaName)196629) - ); - case (MetaName)2557519583: - return new PsoStructureInfo((MetaName)2557519583, 0, 0, 256, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Standard, PsoDataType.Structure, 16, 0, (MetaName)1246324819), - new PsoStructureEntryInfo(MetaName.StandardAI, PsoDataType.Structure, 96, 0, (MetaName)1246324819), - new PsoStructureEntryInfo(MetaName.TighterTurn, PsoDataType.Structure, 176, 0, (MetaName)1246324819) - ); - case (MetaName)1246324819: - return new PsoStructureInfo((MetaName)1246324819, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingAngleMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingAngleMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMin, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMaxWalk, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMaxRun, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateAccelerationMin, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateAccelerationMax, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardAngleWalk, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardAngleRun, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardRateMod, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardRateAccelerationMod, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeAngleMin, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeAngleMax, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateWalk, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateRun, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAccelerationMin, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAccelerationMax, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.UseExtraHeading, PsoDataType.Bool, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.UseMovingDirectionDiff, PsoDataType.Bool, 77, 0, 0) - ); - case MetaName.CTaskMotionTennis__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionTennis__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMinAI, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMaxAI, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMinPlayer, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMaxPlayer, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskQuadLocomotion__Tunables: - return new PsoStructureInfo(MetaName.CTaskQuadLocomotion__Tunables, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StartAnimatedTurnsD, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StopAnimatedTurnsD, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnTransitionDelay, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnToIdleTransitionDelay, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.SteepSlopeStartAnimatedTurnsD, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SteepSlopeStopAnimatedTurnsD, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.SteepSlopeThresholdD, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.InMotionAlignmentVelocityTolerance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.InMotionTighterTurnsVelocityTolerance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.InPlaceAlignmentVelocityTolerance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnSpeedMBRThreshold, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowMinTurnApproachRate, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.FastMinTurnApproachRate, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowTurnApproachRate, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.FastTurnApproachRate, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowTurnAcceleration, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.FastTurnAcceleration, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnResetThresholdD, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.ProcessPhysicsApproachRate, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTimeslicingHeadingThresholdD, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.LowLodExtraHeadingAdjustmentRate, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionBlendoutThreshold, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionHeadingDeltaBlendoutThreshold, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionDefaultBlendDuration, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionDefaultBlendOutDuration, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionEarlyOutBlendOutDuration, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.StartLocomotionWalkRunBoundary, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.StartToIdleDirectlyPhaseThreshold, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MovementAcceleration, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMBRToStop, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.PursuitModeGallopRateFactor, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.PursuitModeExtraHeadingRate, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.StoppingDistanceWalkMBR, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.StoppingDistanceRunMBR, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.StoppingDistanceGallopMBR, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.StoppingGotoPointRemainingDist, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.StopPhaseThreshold, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStopPhaseToResumeMovement, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStopPhaseToResumeMovement, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo((MetaName)3492404675, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo((MetaName)3330274310, PsoDataType.Float, 180, 0, 0) - ); - case MetaName.CEventPotentialBeWalkedInto__Tunables: - return new PsoStructureInfo(MetaName.CEventPotentialBeWalkedInto__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3702961077, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3689187240, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1651660816, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CEventPotentialGetRunOver__Tunables: - return new PsoStructureInfo(MetaName.CEventPotentialGetRunOver__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToDive, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedToAlwaysDive, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToDive, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToDive, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)4246045187, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelay, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelay, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CEventPotentialBlast__Tunables: - return new PsoStructureInfo(MetaName.CEventPotentialBlast__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskComplexEvasiveStep__Tunables: - return new PsoStructureInfo(MetaName.CTaskComplexEvasiveStep__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskFall__Tunables: - return new PsoStructureInfo(MetaName.CTaskFall__Tunables, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ImmediateHighFallSpeedPlayer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ImmediateHighFallSpeedAi, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HighFallProbeLength, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1694135928, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ContinuousGapHighFallTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3844027585, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)3197570465, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)391736247, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2495576534, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirHeadingRate, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirMovementRate, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirMovementApproachRate, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.LandHeadingModifier, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.StandingLandHeadingModifier, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.FallLandThreshold, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.ReenterFallLandThreshold, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMinIntensity, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMaxIntensity, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMinHeight, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMaxHeight, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMinDuration, PsoDataType.UInt, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.PadShakeMaxDuration, PsoDataType.UInt, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)2719065213, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)358840176, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.VaultFallTestAngle, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.JumpFallTestAngle, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.FallTestAngleBlendOutTime, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveControlMaxFallDistance, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveControlExtraDistanceForDiveFromVehicle, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveControlExtraDistanceBlendOutSpeed, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveWaterOffsetToHitFullyInControlWeight, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.LandRollHeightFromJump, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.LandRollHeightFromVault, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.LandRollHeight, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo((MetaName)4229439207, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)2581310221, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)3807299066, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo((MetaName)2776570354, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)4036569890, PsoDataType.Float, 168, 0, 0) - ); - case MetaName.CTaskFlyToPoint__Tunables: - return new PsoStructureInfo(MetaName.CTaskFlyToPoint__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.HeightMapDelta, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.HeightMapLookAheadDist, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialTerrainAvoidanceAngleD, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ProgressiveTerrainAvoidanceAngleD, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenIncreasingAvoidanceAngle, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskGetUp__Tunables: - return new PsoStructureInfo(MetaName.CTaskGetUp__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fPreferInjuredGetupPlayerHealthThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fInjuredGetupImpulseMag2, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeInGetUpToAllowCover, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowNonPlayerHighFallAbort, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowOffScreenHighFallAbort, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.FallTimeBeforeHighFallAbort, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFallSpeedForHighFallAbort, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)866980885, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerMoverFixupMaxExtraHeadingChange, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AiMoverFixupMaxExtraHeadingChange, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.StartClipWaitTimePlayer, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.StartClipWaitTime, PsoDataType.SInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckWaitTime, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckWaitTimeMp, PsoDataType.SInt, 64, 0, 0) - ); - case MetaName.CTaskGoToScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskGoToScenario__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ClosePointDistanceSquared, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosePointCounterMax, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingDiffStartBlendDegrees, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.PositionDiffStartBlend, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ExactStopTargetRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.PreferNearWaterSurfaceArrivalRadius, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBrokenPointChecks, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskMoveToTacticalPoint__Tunables: - return new PsoStructureInfo(MetaName.CTaskMoveToTacticalPoint__Tunables, 0, 0, 224, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 16, 0, (MetaName)2164459263), - new PsoStructureEntryInfo(MetaName.TargetRadiusForMoveToPosition, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeUntilRelease, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderCloseToPositionToMoveTo, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenInfluenceSphereChecks, PsoDataType.Float, 220, 0, 0) - ); - case (MetaName)2164459263: - return new PsoStructureInfo((MetaName)2164459263, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.CoverPoint, PsoDataType.Structure, 8, 0, (MetaName)3018405043), - new PsoStructureEntryInfo(MetaName.NavMeshPoint, PsoDataType.Structure, 88, 0, (MetaName)1211016943), - new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Structure, 160, 0, (MetaName)3791189200) - ); - case (MetaName)3018405043: - return new PsoStructureInfo((MetaName)3018405043, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Bonus, PsoDataType.Structure, 16, 0, (MetaName)1890577968), - new PsoStructureEntryInfo(MetaName.Penalty, PsoDataType.Structure, 32, 0, (MetaName)3436208238) - ); - case (MetaName)1890577968: - return new PsoStructureInfo((MetaName)1890577968, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Current, PsoDataType.Float, 8, 0, 0) - ); - case (MetaName)3436208238: - return new PsoStructureInfo((MetaName)3436208238, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 8, 0, (MetaName)532562236), - new PsoStructureEntryInfo(MetaName.Arc, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.LineOfSight, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Float, 40, 0, 0) - ); - case (MetaName)532562236: - return new PsoStructureInfo((MetaName)532562236, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)1211016943: - return new PsoStructureInfo((MetaName)1211016943, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Bonus, PsoDataType.Structure, 16, 0, (MetaName)1762528765), - new PsoStructureEntryInfo(MetaName.Penalty, PsoDataType.Structure, 32, 0, (MetaName)2194913513) - ); - case (MetaName)1762528765: - return new PsoStructureInfo((MetaName)1762528765, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Current, PsoDataType.Float, 8, 0, 0) - ); - case (MetaName)2194913513: - return new PsoStructureInfo((MetaName)2194913513, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 8, 0, (MetaName)333617339), - new PsoStructureEntryInfo(MetaName.LineOfSight, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Float, 36, 0, 0) - ); - case (MetaName)333617339: - return new PsoStructureInfo((MetaName)333617339, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)3791189200: - return new PsoStructureInfo((MetaName)3791189200, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MaxDistanceFromPed, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMaxDistanceFromPed, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMinDistanceFromPed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromOptimal, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMaxDistanceFromOptimal, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMinDistanceFromOptimal, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskMoveCrossRoadAtTrafficLights__Tunables: - return new PsoStructureInfo(MetaName.CTaskMoveCrossRoadAtTrafficLights__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.bTrafficLightPositioning, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)645072887), - new PsoStructureEntryInfo(MetaName.WaitingOffsets, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.iMaxPedsAtTrafficLights, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceBetweenPeds, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fDecideToRunChance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerObstructionCheckRadius, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerObstructionRadius, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.bDebugRender, PsoDataType.Bool, 60, 0, 0) - ); - case (MetaName)645072887: - return new PsoStructureInfo((MetaName)645072887, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Pos, PsoDataType.Float3, 16, 0, 0) - ); - case MetaName.CTaskMoveWithinAttackWindow__Tunables: - return new PsoStructureInfo(MetaName.CTaskMoveWithinAttackWindow__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fMaxAngleOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinAlliesForMaxAngleOffset, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxAllyDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxRandomAdditionalOffset, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxRouteDistanceModifier, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeToWait, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeToWait, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskMoveFollowNavMesh__Tunables: - return new PsoStructureInfo(MetaName.CTaskMoveFollowNavMesh__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.uRepeatedAttemptsBeforeTeleportToLeader, PsoDataType.UByte, 16, 0, 0) - ); - case MetaName.CTaskParachute__Tunables: - return new PsoStructureInfo(MetaName.CTaskParachute__Tunables, 0, 0, 1312, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ChangeRatesForSkydiving, PsoDataType.Structure, 16, 0, (MetaName)2342773550), - new PsoStructureEntryInfo(MetaName.ChangeRatesForParachuting, PsoDataType.Structure, 40, 0, (MetaName)1918103038), - new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForSkydiving, PsoDataType.Structure, 64, 0, (MetaName)3788337195), - new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForParachutingNormal, PsoDataType.Structure, 96, 0, (MetaName)4209854321), - new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForParachutingBraking, PsoDataType.Structure, 144, 0, (MetaName)4209854321), - new PsoStructureEntryInfo(MetaName.PedAngleLimitsForSkydiving, PsoDataType.Structure, 192, 0, (MetaName)3009185102), - new PsoStructureEntryInfo(MetaName.MoveParameters, PsoDataType.Structure, 208, 0, (MetaName)560894723), - new PsoStructureEntryInfo(MetaName.ForcesForSkydiving, PsoDataType.Structure, 264, 0, (MetaName)2934924657), - new PsoStructureEntryInfo(MetaName.ParachutingAi, PsoDataType.Structure, 280, 0, (MetaName)2046463254), - new PsoStructureEntryInfo(MetaName.Landing, PsoDataType.Structure, 464, 0, (MetaName)2206940602), - new PsoStructureEntryInfo(MetaName.CrashLanding, PsoDataType.Structure, 552, 0, (MetaName)954219518), - new PsoStructureEntryInfo(MetaName.Allow, PsoDataType.Structure, 592, 0, (MetaName)202257215), - new PsoStructureEntryInfo(MetaName.CameraSettings, PsoDataType.Structure, 616, 0, (MetaName)892940524), - new PsoStructureEntryInfo(MetaName.ParachutePhysics, PsoDataType.Structure, 640, 0, (MetaName)3266862316), - new PsoStructureEntryInfo(MetaName.ExtraForces, PsoDataType.Structure, 656, 0, (MetaName)889782022), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 1008, 0, (MetaName)629460530), - new PsoStructureEntryInfo(MetaName.LowLod, PsoDataType.Structure, 1024, 0, (MetaName)196547756), - new PsoStructureEntryInfo(MetaName.ParachuteBones, PsoDataType.Structure, 1040, 0, (MetaName)1078023650), - new PsoStructureEntryInfo(MetaName.Aiming, PsoDataType.Structure, 1144, 0, (MetaName)2787675897), - new PsoStructureEntryInfo(MetaName.PadShake, PsoDataType.Structure, 1160, 0, (MetaName)947557087), - new PsoStructureEntryInfo(MetaName.BrakingDifferenceForLinearVZMin, PsoDataType.Float, 1216, 0, 0), - new PsoStructureEntryInfo(MetaName.BrakingDifferenceForLinearVZMax, PsoDataType.Float, 1220, 0, 0), - new PsoStructureEntryInfo(MetaName.LinearVZForBrakingDifferenceMin, PsoDataType.Float, 1224, 0, 0), - new PsoStructureEntryInfo(MetaName.LinearVZForBrakingDifferenceMax, PsoDataType.Float, 1228, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchRatioForLinearVZMin, PsoDataType.Float, 1232, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchRatioForLinearVZMax, PsoDataType.Float, 1236, 0, 0), - new PsoStructureEntryInfo(MetaName.LinearVZForPitchRatioMin, PsoDataType.Float, 1240, 0, 0), - new PsoStructureEntryInfo(MetaName.LinearVZForPitchRatioMax, PsoDataType.Float, 1244, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBrakeForCloseUpCamera, PsoDataType.Float, 1248, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteMass, PsoDataType.Float, 1252, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteMassReduced, PsoDataType.Float, 1256, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToLookAheadForFutureTargetPosition, PsoDataType.Float, 1260, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDifferenceToAverageBrakes, PsoDataType.Float, 1264, 0, 0), - new PsoStructureEntryInfo(MetaName.ModelForParachuteInSP, PsoDataType.String, 1268, 7, 0), - new PsoStructureEntryInfo(MetaName.ModelForParachuteInMP, PsoDataType.String, 1272, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)974228846), - new PsoStructureEntryInfo(MetaName.ParachutePackVariations, PsoDataType.Array, 1280, 0, (MetaName)36), - new PsoStructureEntryInfo(MetaName.FirstPersonDriveByIKOffset, PsoDataType.Float3, 1296, 0, 0) - ); - case (MetaName)2342773550: - return new PsoStructureInfo((MetaName)2342773550, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Pitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Roll, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Yaw, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Heading, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)1918103038: - return new PsoStructureInfo((MetaName)1918103038, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Pitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Roll, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Yaw, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Brake, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)3788337195: - return new PsoStructureInfo((MetaName)3788337195, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.InflectionPitch, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYaw, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)4209854321: - return new PsoStructureInfo((MetaName)4209854321, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRollFromStick, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRollFromBrake, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYawFromStick, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYawFromRoll, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.RollForMinYaw, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.RollForMaxYaw, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYaw, PsoDataType.Float, 44, 0, 0) - ); - case (MetaName)3009185102: - return new PsoStructureInfo((MetaName)3009185102, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)560894723: - return new PsoStructureInfo((MetaName)560894723, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Parachuting, PsoDataType.Structure, 8, 0, (MetaName)801836577) - ); - case (MetaName)801836577: - return new PsoStructureInfo((MetaName)801836577, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.InterpRates, PsoDataType.Structure, 8, 0, (MetaName)2238420428), - new PsoStructureEntryInfo(MetaName.MinParachutePitch, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxParachutePitch, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxParachuteRoll, PsoDataType.Float, 40, 0, 0) - ); - case (MetaName)2238420428: - return new PsoStructureInfo((MetaName)2238420428, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.StickX, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.StickY, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.TotalStickInput, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CurrentHeading, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2934924657: - return new PsoStructureInfo((MetaName)2934924657, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxThrust, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLift, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)2046463254: - return new PsoStructureInfo((MetaName)2046463254, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.Target, PsoDataType.Structure, 8, 0, (MetaName)4228543633), - new PsoStructureEntryInfo(MetaName.Brake, PsoDataType.Structure, 24, 0, (MetaName)1021020250), - new PsoStructureEntryInfo(MetaName.RollForNormal, PsoDataType.Structure, 56, 0, (MetaName)1305267132), - new PsoStructureEntryInfo(MetaName.RollForBraking, PsoDataType.Structure, 80, 0, (MetaName)1305267132), - new PsoStructureEntryInfo(MetaName.PitchForNormal, PsoDataType.Structure, 104, 0, (MetaName)2131363216), - new PsoStructureEntryInfo(MetaName.PitchForBraking, PsoDataType.Structure, 128, 0, (MetaName)2131363216), - new PsoStructureEntryInfo(MetaName.Drop, PsoDataType.Structure, 152, 0, (MetaName)209420440) - ); - case (MetaName)4228543633: - return new PsoStructureInfo((MetaName)4228543633, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MinDistanceToAdjust, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Adjustment, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)1021020250: - return new PsoStructureInfo((MetaName)1021020250, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToStart, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForFull, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleForMin, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleForMax, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)1305267132: - return new PsoStructureInfo((MetaName)1305267132, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.AngleDifferenceForMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleDifferenceForMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.StickValueForMin, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StickValueForMax, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2131363216: - return new PsoStructureInfo((MetaName)2131363216, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.DesiredTimeToResolveAngleDifference, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DeltaForMaxStickChange, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStickChangePerSecond, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)209420440: - return new PsoStructureInfo((MetaName)209420440, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDot, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)2206940602: - return new PsoStructureInfo((MetaName)2206940602, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.NormalThresholds, PsoDataType.Structure, 8, 0, (MetaName)3954319942), - new PsoStructureEntryInfo(MetaName.MaxVelocityForSlow, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelocityForFast, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteProbeRadius, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinStickMagnitudeForEarlyOutMovement, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.FramesToLookAheadForProbe, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendDurationForEarlyOut, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.AngleForRunway, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.LookAheadForRunway, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.DropForRunway, PsoDataType.Float, 80, 0, 0) - ); - case (MetaName)3954319942: - return new PsoStructureInfo((MetaName)3954319942, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Normal, PsoDataType.Structure, 8, 0, (MetaName)1558938460), - new PsoStructureEntryInfo(MetaName.Braking, PsoDataType.Structure, 24, 0, (MetaName)1558938460) - ); - case (MetaName)1558938460: - return new PsoStructureInfo((MetaName)1558938460, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Forward, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Collision, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)954219518: - return new PsoStructureInfo((MetaName)954219518, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.NoParachuteTimeForMinCollisionNormalThreshold, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.NoParachuteMaxCollisionNormalThreshold, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.NoParachuteMinCollisionNormalThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.NoParachuteMaxPitch, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteProbeRadius, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteUpThreshold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.FramesToLookAheadForProbe, PsoDataType.Float, 32, 0, 0) - ); - case (MetaName)202257215: - return new PsoStructureInfo((MetaName)202257215, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinClearDistanceBelow, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFallingSpeedInRagdoll, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInRagdoll, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)892940524: - return new PsoStructureInfo((MetaName)892940524, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.SkyDivingCamera, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ParachuteCamera, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.ParachuteCloseUpCamera, PsoDataType.String, 16, 7, 0) - ); - case (MetaName)3266862316: - return new PsoStructureInfo((MetaName)3266862316, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ParachuteInitialVelocityY, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachuteInitialVelocityZ, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)889782022: - return new PsoStructureInfo((MetaName)889782022, 0, 0, 352, - new PsoStructureEntryInfo(MetaName.Parachuting, PsoDataType.Structure, 8, 0, (MetaName)1386112053) - ); - case (MetaName)1386112053: - return new PsoStructureInfo((MetaName)1386112053, 0, 0, 344, - new PsoStructureEntryInfo(MetaName.Normal, PsoDataType.Structure, 8, 0, (MetaName)899207522), - new PsoStructureEntryInfo(MetaName.Braking, PsoDataType.Structure, 224, 0, (MetaName)3310740500) - ); - case (MetaName)899207522: - return new PsoStructureInfo((MetaName)899207522, 0, 0, 216, - new PsoStructureEntryInfo(MetaName.TurnFromStick, PsoDataType.Structure, 8, 0, (MetaName)3387028743), - new PsoStructureEntryInfo(MetaName.TurnFromRoll, PsoDataType.Structure, 120, 0, (MetaName)3597070589) - ); - case (MetaName)3387028743: - return new PsoStructureInfo((MetaName)3387028743, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.FromValue, PsoDataType.Structure, 8, 0, (MetaName)3597070589), - new PsoStructureEntryInfo(MetaName.UseVerticalAxis, PsoDataType.Bool, 104, 0, 0) - ); - case (MetaName)3597070589: - return new PsoStructureInfo((MetaName)3597070589, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinValue, PsoDataType.Structure, 16, 0, (MetaName)162458425), - new PsoStructureEntryInfo(MetaName.ZeroValue, PsoDataType.Structure, 40, 0, (MetaName)162458425), - new PsoStructureEntryInfo(MetaName.MaxValue, PsoDataType.Structure, 64, 0, (MetaName)162458425), - new PsoStructureEntryInfo(MetaName.IsLocal, PsoDataType.Bool, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.ClearZ, PsoDataType.Bool, 89, 0, 0) - ); - case (MetaName)162458425: - return new PsoStructureInfo((MetaName)162458425, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)3310740500: - return new PsoStructureInfo((MetaName)3310740500, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.TurnFromStick, PsoDataType.Structure, 8, 0, (MetaName)3387028743) - ); - case (MetaName)629460530: - return new PsoStructureInfo((MetaName)629460530, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.RunwayProbes, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.ValidityProbes, PsoDataType.Bool, 10, 0, 0) - ); - case (MetaName)196547756: - return new PsoStructureInfo((MetaName)196547756, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.AlwaysUse, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.NeverUse, PsoDataType.Bool, 13, 0, 0) - ); - case (MetaName)1078023650: - return new PsoStructureInfo((MetaName)1078023650, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.LeftGrip, PsoDataType.Structure, 8, 0, (MetaName)2874150626), - new PsoStructureEntryInfo(MetaName.RightGrip, PsoDataType.Structure, 32, 0, (MetaName)2874150626), - new PsoStructureEntryInfo(MetaName.LeftWire, PsoDataType.Structure, 56, 0, (MetaName)2874150626), - new PsoStructureEntryInfo(MetaName.RightWire, PsoDataType.Structure, 80, 0, (MetaName)2874150626) - ); - case (MetaName)2874150626: - return new PsoStructureInfo((MetaName)2874150626, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.UseOrientationFromParachuteBone, PsoDataType.Bool, 20, 0, 0) - ); - case (MetaName)2787675897: - return new PsoStructureInfo((MetaName)2787675897, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 8, 0, 0) - ); - case (MetaName)947557087: - return new PsoStructureInfo((MetaName)947557087, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Falling, PsoDataType.Structure, 8, 0, (MetaName)3452040071), - new PsoStructureEntryInfo(MetaName.Deploy, PsoDataType.Structure, 40, 0, (MetaName)2930279050) - ); - case (MetaName)3452040071: - return new PsoStructureInfo((MetaName)3452040071, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchForMinIntensity, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchForMaxIntensity, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinIntensity, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxIntensity, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)2930279050: - return new PsoStructureInfo((MetaName)2930279050, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Intensity, PsoDataType.Float, 12, 0, 0) - ); - case (MetaName)974228846: - return new PsoStructureInfo((MetaName)974228846, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1192596872), - new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case (MetaName)1192596872: - return new PsoStructureInfo((MetaName)1192596872, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3788247444), - new PsoStructureEntryInfo(MetaName.Wearing, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ParachutePack, PsoDataType.Structure, 24, 0, (MetaName)3901274641) - ); - case (MetaName)3901274641: - return new PsoStructureInfo((MetaName)3901274641, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo(MetaName.DrawableId, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DrawableAltId, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TexId, PsoDataType.UInt, 20, 0, 0) - ); - case (MetaName)3788247444: - return new PsoStructureInfo((MetaName)3788247444, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.DrawableIds, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.CTaskParachuteObject__Tunables: - return new PsoStructureInfo(MetaName.CTaskParachuteObject__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PhaseDuringDeployToConsiderOut, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskTakeOffPedVariation__Tunables: - return new PsoStructureInfo(MetaName.CTaskTakeOffPedVariation__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskHeliPassengerRappel__Tunables: - return new PsoStructureInfo(MetaName.CTaskHeliPassengerRappel__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fDefaultRopeLength, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fExtraRopeLength, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fExitDescendRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fDefaultDescendRate, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fStartDescendingDistToTargetSq, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fRopeUnwindRate, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinHeightToRappel, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxHeliSpeedForRappel, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CTaskRappel__Tunables: - return new PsoStructureInfo(MetaName.CTaskRappel__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fJumpDescendRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fLongJumpDescendRate, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fJumpToSmashWindowPhaseChange, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinJumpPhaseAllowDescend, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxJumpPhaseAllowDescend, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinJumpPhaseAllowSmashWindow, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxJumpPhaseAllowSmashWindow, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinSmashWindowPhase, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fGlassBreakRadius, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fGlassDamage, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinDistanceToBreakWindow, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinStickValueAllowDescend, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.bAllowSmashDuringJump, PsoDataType.Bool, 64, 0, 0) - ); - case MetaName.CTaskVault__Tunables: - return new PsoStructureInfo(MetaName.CTaskVault__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AngledClimbTheshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAngleForScaleVelocityExtension, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleForScaleVelocityExtension, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AngledClimbScaleVelocityExtensionMax, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableVaultForwardDot, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.SlideWalkAnimRate, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskJump__Tunables: - return new PsoStructureInfo(MetaName.CTaskJump__Tunables, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinSuperJumpInitialVelocity, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSuperJumpInitialVelocity, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)3568425813, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)1477129396, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.HighJumpMinAngleForVelScale, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.HighJumpMaxAngleForVelScale, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.HighJumpMinVelScale, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.HighJumpMaxVelScale, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableJumpOnSteepStairs, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStairsJumpAngle, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.bEnableJumpCollisions, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.bEnableJumpCollisionsMp, PsoDataType.Bool, 57, 0, 0), - new PsoStructureEntryInfo(MetaName.bBlockJumpCollisionAgainstRagdollBlocked, PsoDataType.Bool, 58, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveProbeZOffset, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveBraceStartDelay, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveBraceProbeLength, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveBraceBlendInDuration, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveBraceBlendOutDuration, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveBraceMaxUpDotSlope, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveRagdollIntersectionDot, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveRagdollStartDelay, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveRagdollProbeLength, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveRagdollProbeRadius, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.PredictiveRagdollRequiredVelocityMag, PsoDataType.Float, 100, 0, 0) - ); - case MetaName.CPedTargetEvaluator__Tunables: - return new PsoStructureInfo(MetaName.CPedTargetEvaluator__Tunables, 0, 0, 232, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitMelee, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitMeleeLockOnNoStick, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetDistanceWeightMelee, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2485794835, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetDistanceWeightMeleeRunning, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2082223604, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetHeadingWeightMelee, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3532059041, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetHeadingWeightMeleeRunning, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)1974328161, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitVehicleWeapon, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeLockOnStickWeighting, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeLockOnCameraWeighting, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeLockOnCameraWeightingNoStick, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeLockOnPedWeightingNoStick, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioHarmless, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioNeutral, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioNeutralInjured, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioIngangOrFriend, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPotentialThreat, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMissionThreat, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMissionThreatCuffed, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.DownedThreatModifier, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerEveryone, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerStrangers, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerAttackers, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPlayer2Player, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerCuffed, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioScriptedHighPriority, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMeleeDead, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMeleeCombatThreat, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMeleeDownedCombatThreat, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMeleeInjured, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.PrioMeleePotentialThreat, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.InCoverScoreModifier, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosestPointToLineDist, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosestPointToLineBonusModifier, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeHeadingOverride, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeHeadingOverrideRunning, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeHeadingFalloffPowerRunning, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMeleeRange, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceWeightingMin, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceWeightingMax, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetHeadingWeighting, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceMaxWeightingAimTime, PsoDataType.UInt, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceFallOffMin, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceFallOffMax, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.RejectLockonHeadingTheshold, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingScoreForCoverLockOnRejection, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo((MetaName)680689338, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeForTakedownTargetAcquiry, PsoDataType.UInt, 216, 0, 0), - new PsoStructureEntryInfo((MetaName)3508597107, PsoDataType.UInt, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.UseMeleeHeadingOverride, PsoDataType.Bool, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.LimitMeleeRangeToDefault, PsoDataType.Bool, 225, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugTargetting, PsoDataType.Bool, 226, 0, 0), - new PsoStructureEntryInfo(MetaName.UseNonNormalisedScoringForPlayer, PsoDataType.Bool, 227, 0, 0), - new PsoStructureEntryInfo(MetaName.RejectLockIfBestTargetIsInCover, PsoDataType.Bool, 228, 0, 0) - ); - case MetaName.CGrabHelper__Tunables: - return new PsoStructureInfo(MetaName.CGrabHelper__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Sets, PsoDataType.Structure, 16, 0, (MetaName)2070432509) - ); - case (MetaName)2070432509: - return new PsoStructureInfo((MetaName)2070432509, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.sets, PsoDataType.Map, 8, 1, (MetaName)1) - ); - case MetaName.CNmTuningSet: - return new PsoStructureInfo(MetaName.CNmTuningSet, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Id, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Messages, PsoDataType.Array, 24, 0, (MetaName)3) - ); - case MetaName.CNmMessage: - return new PsoStructureInfo(MetaName.CNmMessage, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Params, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.ForceNewMessage, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TaskMessage, PsoDataType.Bool, 33, 0, 0) - ); - case MetaName.CNmParameterBool: - return new PsoStructureInfo(MetaName.CNmParameterBool, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Bool, 16, 0, 0) - ); - case MetaName.CNmParameterFloat: - return new PsoStructureInfo(MetaName.CNmParameterFloat, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CNmParameterRandomFloat: - return new PsoStructureInfo(MetaName.CNmParameterRandomFloat, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CNmParameterInt: - return new PsoStructureInfo(MetaName.CNmParameterInt, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.SInt, 16, 0, 0) - ); - case MetaName.CTaskNMControl__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMControl__Tunables, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DriveToGetup, PsoDataType.Structure, 16, 0, (MetaName)3336326859), - new PsoStructureEntryInfo(MetaName.OnEnableDriveToGetup, PsoDataType.Structure, 48, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnDisableDriveToGetup, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet) - ); - case (MetaName)3336326859: - return new PsoStructureInfo((MetaName)3336326859, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.AllowDriveToGetup, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.OnlyAllowForShot, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowWhenBalanced, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHealth, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxUprightRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MatchTimer, PsoDataType.UInt, 24, 0, 0) - ); - case MetaName.CNmParameterString: - return new PsoStructureInfo(MetaName.CNmParameterString, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.String, 16, 8, 0) - ); - case MetaName.CTaskNMBehaviour__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMBehaviour__Tunables, 0, 0, 936, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EnableRagdollPooling, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxGameplayNmAgents, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRageRagdolls, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ReserveLocalPlayerNmAgent, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableRagdollPoolingMp, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxGameplayNmAgentsMp, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRageRagdollsMp, PsoDataType.SInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ReserveLocalPlayerNmAgentMp, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.BlockOffscreenShotReactions, PsoDataType.Bool, 41, 0, 0), - new PsoStructureEntryInfo(MetaName.UsePreEmptiveEdgeActivation, PsoDataType.Bool, 42, 0, 0), - new PsoStructureEntryInfo(MetaName.UsePreEmptiveEdgeActivationMp, PsoDataType.Bool, 43, 0, 0), - new PsoStructureEntryInfo(MetaName.UseBalanceForEdgeActivation, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxVel, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxHeadingDiff, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMinDotVel, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxDistance, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMinDesiredMBR2, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.StandardBlendOutThresholds, PsoDataType.Structure, 72, 0, (MetaName)3979439077), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4115910995), - new PsoStructureEntryInfo(MetaName.CamAttachPositionWeights, PsoDataType.Array, 176, 0, (MetaName)MetaTypeName.USHORT), - new PsoStructureEntryInfo(MetaName.SpActivationModifiers, PsoDataType.Structure, 192, 0, (MetaName)2720813484), - new PsoStructureEntryInfo(MetaName.MpActivationModifiers, PsoDataType.Structure, 272, 0, (MetaName)2720813484), - new PsoStructureEntryInfo(MetaName.PlayerBumpedByCloneCarActivationModifier, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo(MetaName.ClonePlayerBumpedByCarActivationModifier, PsoDataType.Float, 356, 0, 0), - //new PsoStructureEntryInfo(MetaName.ClonePlayerBumpedByCloneCarActivationModifier, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)2048881690, PsoDataType.Float, 360, 0, 0), //seems to be newer than above.. - new PsoStructureEntryInfo(MetaName.MaxVehicleCapsulePushTimeForRagdollActivation, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVehicleCapsulePushTimeForPlayerRagdollActivation, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForContinuousPushActivation, PsoDataType.Float, 372, 0, 0), - new PsoStructureEntryInfo(MetaName.MinContactDepthForContinuousPushActivation, PsoDataType.Float, 376, 0, 0), - new PsoStructureEntryInfo(MetaName.DurationRampDownCapsulePushedByVehicle, PsoDataType.Float, 380, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForAiActivation, PsoDataType.Float, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForStationaryAiActivation, PsoDataType.Float, 388, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForPlayerActivation, PsoDataType.Float, 392, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForStationaryPlayerActivation, PsoDataType.Float, 396, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForWarningActivation, PsoDataType.Float, 400, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleFallingSpeedWeight, PsoDataType.Float, 404, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierDefault, PsoDataType.Float, 408, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBicycle, PsoDataType.Float, 412, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBike, PsoDataType.Float, 416, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBoat, PsoDataType.Float, 420, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierPlane, PsoDataType.Float, 424, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierQuadBike, PsoDataType.Float, 428, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierHeli, PsoDataType.Float, 432, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierTrain, PsoDataType.Float, 436, 0, 0), - new PsoStructureEntryInfo(MetaName.ExcludePedBumpAngleFromPushCalculation, PsoDataType.Bool, 440, 0, 0), - new PsoStructureEntryInfo(MetaName.PedActivationForceMultiplier, PsoDataType.Float, 444, 0, 0), - new PsoStructureEntryInfo(MetaName.ObjectMinSpeedForActivation, PsoDataType.Float, 448, 0, 0), - new PsoStructureEntryInfo(MetaName.ObjectActivationForceMultiplier, PsoDataType.Float, 452, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlayerCapsulePushTimeForRagdollActivation, PsoDataType.SInt, 456, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerCapsuleMinSpeedForContinuousPushActivation, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckOnVehicleMaxTime, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckOnVehicleBlendOutThresholds, PsoDataType.Structure, 472, 0, (MetaName)3979439077), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 576, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.TeeterControl, PsoDataType.Structure, 616, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.animPoseDefault, PsoDataType.Structure, 656, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.animPoseAttachDefault, PsoDataType.Structure, 696, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.animPoseAttachToVehicle, PsoDataType.Structure, 736, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.animPoseHandsCuffed, PsoDataType.Structure, 776, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.forceFall, PsoDataType.Structure, 816, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.RagdollUnderWheelTuning, PsoDataType.Structure, 856, 0, (MetaName)267001783), - new PsoStructureEntryInfo(MetaName.KickOnGroundTuning, PsoDataType.Structure, 880, 0, (MetaName)2578171686), - new PsoStructureEntryInfo(MetaName.CapsuleVehicleHitTuning, PsoDataType.Structure, 896, 0, (MetaName)1040069698) - ); - case (MetaName)3979439077: - return new PsoStructureInfo((MetaName)3979439077, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Ai, PsoDataType.Structure, 8, 0, (MetaName)3749122641), - new PsoStructureEntryInfo(MetaName.Player, PsoDataType.Structure, 40, 0, (MetaName)3749122641), - new PsoStructureEntryInfo(MetaName.PlayerMp, PsoDataType.Structure, 72, 0, (MetaName)3749122641) - ); - case (MetaName)3749122641: - return new PsoStructureInfo((MetaName)3749122641, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.MaxLinearVelocity, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularVelocity, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SettledTimeMS, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.RandomiseSettledTime, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SettledTimeMinMS, PsoDataType.SInt, 24, 0, 0) - ); - case (MetaName)2720813484: - return new PsoStructureInfo((MetaName)2720813484, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.BumpedByCar, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByCarFriendly, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerBumpedByCar, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVehicleWarning, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPedMinVel, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPedMinDotVel, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPed, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPlayerRagdoll, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPedRagdoll, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPedFriendly, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByPedIsQuadruped, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BumpedByObject, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.Walking, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.Running, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlayerActivationLimit, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAiActivationLimit, PsoDataType.Float, 72, 0, 0) - ); - case (MetaName)267001783: - return new PsoStructureInfo((MetaName)267001783, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.fImpulseMultLimbs, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fImpulseMultSpine, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinSpeedForPush, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fFastCarPushImpulseMult, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2578171686: - return new PsoStructureInfo((MetaName)2578171686, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.fPronePedKickImpulse, PsoDataType.Float, 8, 0, 0) - ); - case (MetaName)1040069698: - return new PsoStructureInfo((MetaName)1040069698, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.EnableActivationsFromCapsuleImpacts, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleVelToImpactNormalMinDot, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableSideSwipeActivations, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2302810051, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSideNormalForSideSwipe, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelThroughNormalForSideSwipe, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAccumulatedImpactForSideSwipe, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVehVelMagForSideSwipe, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVehVelMagForBicycleSideSwipe, PsoDataType.Float, 36, 0, 0) - ); - case (MetaName)4115910995: - return new PsoStructureInfo((MetaName)4115910995, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Bound, PsoDataType.Enum, 8, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.Weight, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.CTaskNMBalance__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMBalance__Tunables, 0, 0, 912, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.InitialBumpComponent, PsoDataType.Enum, 16, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.InitialBumpForce, PsoDataType.Structure, 24, 0, (MetaName)760338219), - new PsoStructureEntryInfo(MetaName.InitialBumpOffset, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleStayUprightWithVel, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.StayUprightAtMaxVel, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVel, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.StayUprightAtMinVel, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVel, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.lookAtVelProbIfNoBumpTarget, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTargetDistToUpdateFlinch, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTargetDistToUpdateFlinchOnGround, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.fFlinchTargetZOffset, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.fFlinchTargetZOffsetOnGround, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinForwardVectorToFlinch, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinForwardVectorToFlinchOnGround, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeadLookZOffset, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeadLookZOffsetOnGround, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSteps, PsoDataType.SInt, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.timeToCatchfallMS, PsoDataType.SInt, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.StartWeak, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StartAggressive, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StartDefault, PsoDataType.Structure, 256, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BumpedByPed, PsoDataType.Structure, 296, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 336, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnSteepSlope, PsoDataType.Structure, 376, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnMovingGround, PsoDataType.Structure, 416, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.LostBalanceAndGrabbing, PsoDataType.Structure, 456, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Teeter, PsoDataType.Structure, 496, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.FallOffAMovingCar, PsoDataType.Structure, 536, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.RollingFall, PsoDataType.Structure, 576, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.CatchFall, PsoDataType.Structure, 616, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 656, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.NotBeingPushedDelayMS, PsoDataType.SInt, 696, 0, 0), - new PsoStructureEntryInfo(MetaName.NotBeingPushedOnGroundDelayMS, PsoDataType.SInt, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.BeingPushedOnGroundTooLongMS, PsoDataType.SInt, 704, 0, 0), - new PsoStructureEntryInfo(MetaName.OnBeingPushed, PsoDataType.Structure, 712, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBeingPushedOnGround, PsoDataType.Structure, 752, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnNotBeingPushed, PsoDataType.Structure, 792, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBeingPushedOnGroundTooLong, PsoDataType.Structure, 832, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.PushedThresholdOnGround, PsoDataType.Structure, 872, 0, (MetaName)3749122641) - ); - case (MetaName)760338219: - return new PsoStructureInfo((MetaName)760338219, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Enable, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Mag, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithVelocity, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityMin, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityMax, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceAtMinVelocity, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceAtMaxVelocity, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ClampImpulse, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinImpulse, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxImpulse, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 56, 0, 0) - ); - case MetaName.CNmParameterVector: - return new PsoStructureInfo(MetaName.CNmParameterVector, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float3, 16, 0, 0) - ); - case MetaName.CTaskNMBrace__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMBrace__Tunables, 0, 0, 1568, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.VehicleOverrides, PsoDataType.Structure, 16, 0, (MetaName)2216090795), - new PsoStructureEntryInfo(MetaName.InverseMassScales, PsoDataType.Structure, 40, 0, (MetaName)1267291753), - new PsoStructureEntryInfo(MetaName.AngularVelocityLimits, PsoDataType.Structure, 64, 0, (MetaName)238499603), - new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 144, 0, (MetaName)2808943365), - new PsoStructureEntryInfo(MetaName.ChestForce, PsoDataType.Structure, 176, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.FeetLiftForce, PsoDataType.Structure, 232, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.RootLiftForce, PsoDataType.Structure, 288, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.FlipForce, PsoDataType.Structure, 344, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.CapsuleHitForce, PsoDataType.Structure, 400, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.SideSwipeForce, PsoDataType.Structure, 456, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.ForceUnderVehicle, PsoDataType.Bool, 512, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceOverVehicle, PsoDataType.Bool, 513, 0, 0), - new PsoStructureEntryInfo(MetaName.ChestForcePitch, PsoDataType.Float, 516, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowWarningActivations, PsoDataType.Bool, 520, 0, 0), - new PsoStructureEntryInfo(MetaName.LowVelocityReactionThreshold, PsoDataType.Float, 524, 0, 0), - new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 528, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionElasticityMult, PsoDataType.Float, 532, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionFrictionMult, PsoDataType.Float, 536, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionNormalPitchOverVehicle, PsoDataType.Float, 540, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionNormalPitchUnderVehicle, PsoDataType.Float, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.AiClearedVehicleDelay, PsoDataType.SInt, 548, 0, 0), - new PsoStructureEntryInfo(MetaName.AiClearedVehicleSmartFallDelay, PsoDataType.SInt, 552, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerClearedVehicleDelay, PsoDataType.SInt, 556, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerClearedVehicleSmartFallDelay, PsoDataType.SInt, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 608, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Weak, PsoDataType.Structure, 648, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 688, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailedStairs, PsoDataType.Structure, 728, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HighVelocity, PsoDataType.Structure, 768, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StuckUnderVehicleMaxUpright, PsoDataType.Float, 808, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 816, 0, (MetaName)1649426998), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 1256, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Dead, PsoDataType.Structure, 1296, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OverVehicle, PsoDataType.Structure, 1336, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.UnderVehicle, PsoDataType.Structure, 1376, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.ClearedVehicle, PsoDataType.Structure, 1416, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HighVelocityBlendOut, PsoDataType.Structure, 1456, 0, (MetaName)3979439077) - ); - case (MetaName)2216090795: - return new PsoStructureInfo((MetaName)2216090795, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1768633733), - new PsoStructureEntryInfo(MetaName.sets, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)1267291753: - return new PsoStructureInfo((MetaName)1267291753, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ApplyVehicleScale, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleScale, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ApplyPedScale, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.PedScale, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)238499603: - return new PsoStructureInfo((MetaName)238499603, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Apply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Constant, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Velocity, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.Velocity2, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.SInt, 68, 0, 0) - ); - case (MetaName)2808943365: - return new PsoStructureInfo((MetaName)2808943365, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.VelocityMin, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceAtMinVelocity, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceAtMaxVelocity, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 24, 0, 0) - ); - case (MetaName)3816043274: - return new PsoStructureInfo((MetaName)3816043274, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Apply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithVelocity, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelThreshold, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVelThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelMag, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVelMag, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleWithMass, PsoDataType.Bool, 29, 0, 0), - new PsoStructureEntryInfo(MetaName.ReduceWithPedVelocity, PsoDataType.Bool, 30, 0, 0), - new PsoStructureEntryInfo(MetaName.ReduceWithPedAngularVelocity, PsoDataType.Bool, 31, 0, 0), - new PsoStructureEntryInfo(MetaName.OnlyInContact, PsoDataType.Bool, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.OnlyNotInContact, PsoDataType.Bool, 33, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceMag, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMag, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxMag, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.SInt, 48, 0, 0) - ); - case (MetaName)1649426998: - return new PsoStructureInfo((MetaName)1649426998, 0, 0, 440, - new PsoStructureEntryInfo(MetaName.InitialDelay, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.UnderVehicleInitialDelay, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityThreshold, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ContinuousContactTime, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.UnderVehicleVelocityThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.UnderVehicleContinuousContactTime, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.UnderCarMaxVelocity, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 40, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.EndStuckOnVehicle, PsoDataType.Structure, 80, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.UpdateOnVehicle, PsoDataType.Structure, 120, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StuckUnderVehicle, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.EndStuckUnderVehicle, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StuckOnVehiclePlayer, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.EndStuckOnVehiclePlayer, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.UpdateOnVehiclePlayer, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StuckUnderVehiclePlayer, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.EndStuckUnderVehiclePlayer, PsoDataType.Structure, 400, 0, MetaName.CNmTuningSet) - ); - case (MetaName)1768633733: - return new PsoStructureInfo((MetaName)1768633733, 0, 0, 736, - new PsoStructureEntryInfo(MetaName.Id, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.OverrideInverseMassScales, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.InverseMassScales, PsoDataType.Structure, 16, 0, (MetaName)1267291753), - new PsoStructureEntryInfo(MetaName.OverrideReactionType, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceUnderVehicle, PsoDataType.Bool, 41, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceOverVehicle, PsoDataType.Bool, 42, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCentreZOffset, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.OverrideRootLiftForce, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.RootLiftForce, PsoDataType.Structure, 56, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.OverrideFlipForce, PsoDataType.Bool, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.FlipForce, PsoDataType.Structure, 120, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.OverrideInitialForce, PsoDataType.Bool, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 184, 0, (MetaName)2808943365), - new PsoStructureEntryInfo(MetaName.OverrideElasticity, PsoDataType.Bool, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionElasticityMult, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.OverrideFriction, PsoDataType.Bool, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleCollisionFrictionMult, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.LateralForce, PsoDataType.Structure, 232, 0, (MetaName)3816043274), - new PsoStructureEntryInfo(MetaName.OverrideStuckOnVehicleSets, PsoDataType.Bool, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.AddToBaseStuckOnVehicleSets, PsoDataType.Bool, 289, 0, 0), - new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 296, 0, (MetaName)1649426998) - ); - case MetaName.CNmParameterResetMessage: - return new PsoStructureInfo(MetaName.CNmParameterResetMessage, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0) - ); - case MetaName.CTaskNMDraggingToSafety__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMDraggingToSafety__Tunables, 0, 0, 160, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Stiffness, PsoDataType.Structure, 16, 0, (MetaName)2241487041), - new PsoStructureEntryInfo(MetaName.DraggerArmIk, PsoDataType.Structure, 48, 0, (MetaName)1214269741), - new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Structure, 96, 0, (MetaName)2410537644), - new PsoStructureEntryInfo(MetaName.Forces, PsoDataType.Structure, 112, 0, (MetaName)2059054874) - ); - case (MetaName)2241487041: - return new PsoStructureInfo((MetaName)2241487041, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Relaxation, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadAndNeck, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.AnkleAndWrist, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)1214269741: - return new PsoStructureInfo((MetaName)1214269741, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftBoneOffset, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.RightBoneOffset, PsoDataType.Float3, 32, 0, 0) - ); - case (MetaName)2410537644: - return new PsoStructureInfo((MetaName)2410537644, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 8, 0, 0) - ); - case (MetaName)2059054874: - return new PsoStructureInfo((MetaName)2059054874, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftHandOffset, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.RightHandOffset, PsoDataType.Float3, 32, 0, 0) - ); - case MetaName.CTaskNMDrunk__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMDrunk__Tunables, 0, 0, 256, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fMinHeadingDeltaToFixTurn, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeadingRandomizationRange, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.iHeadingRandomizationTimeMin, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.iHeadingRandomizationTimeMax, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fForceLeanInDirectionAmountMin, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fForceLeanInDirectionAmountMax, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fForceRampMinSpeed, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fForceRampMaxSpeed, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeadLookHeadingRandomizationRange, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeadLookPitchRandomizationRange, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.iHeadLookRandomizationTimeMin, PsoDataType.SInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.iHeadlookRandomizationTimeMax, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinHeadingDeltaToIdleTurn, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.iRunningTimeForVelocityBasedStayupright, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fStayUprightForceNonVelocityBased, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.fStayUprightForceMoving, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.fStayUprightForceIdle, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.fFallingSpeedForHighFall, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.bUseStayUpright, PsoDataType.Bool, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.bDrawIdleHeadLookTarget, PsoDataType.Bool, 89, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Moving, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Idle, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMElectrocute__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMElectrocute__Tunables, 0, 0, 400, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.InitialForceComponent, PsoDataType.Enum, 16, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 24, 0, (MetaName)760338219), - new PsoStructureEntryInfo(MetaName.InitialForceOffset, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 120, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Walking, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Running, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnCatchFallSuccess, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnElectrocuteFinished, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMExplosion__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMExplosion__Tunables, 0, 0, 344, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinStunnedTime, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStunnedTime, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowPlayerStunned, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.UseRelaxBehaviour, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.RollUpHeightThreshold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdRollUp, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdWindmill, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdClipPose, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToStartCatchFall, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToStartCatchFallPlayer, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DoCatchFallRelax, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.CatchFallRelaxHeight, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.HeightToStartWrithe, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeForInitialState, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForInitialState, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWritheTime, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWritheTime, PsoDataType.SInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceRollUp, PsoDataType.Bool, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceWindmill, PsoDataType.Bool, 81, 0, 0), - new PsoStructureEntryInfo(MetaName.StartWindmill, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StartCatchFall, PsoDataType.Structure, 128, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StartRollDownStairs, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Explosion, PsoDataType.Structure, 248, 0, (MetaName)3490848491) - ); - case (MetaName)3490848491: - return new PsoStructureInfo((MetaName)3490848491, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.NMBodyScale, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.HumanBodyScale, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.HumanPelvisScale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.HumanSpine0Scale, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HumanSpine1Scale, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AnimalBodyScale, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AnimalPelvisScale, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.StrongBlastMagnitude, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.FastMovingPedSpeed, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceAbovePedPositionToClampPitch, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchClampMin, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchClampMax, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MagnitudeClamp, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.SideScale, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchSideAngle, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchTorqueMin, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.PitchTorqueMax, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.BlanketForceScale, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraTorqueTwistMax, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableInjuredBehaviorImpulseLimit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableInjuredBehaviorDistLimit, PsoDataType.Float, 88, 0, 0) - ); - case MetaName.CTaskNMFlinch__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMFlinch__Tunables, 0, 0, 624, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Passive, PsoDataType.Structure, 56, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.WaterCannon, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Armoured, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BoundAnkles, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.FatallyInjured, PsoDataType.Structure, 256, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.PlayerDeath, PsoDataType.Structure, 296, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HoldingTwoHandedWeapon, PsoDataType.Structure, 336, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HoldingSingleHandedWeapon, PsoDataType.Structure, 376, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 416, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 456, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailedStairs, PsoDataType.Structure, 496, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.WeaponSets, PsoDataType.Structure, 536, 0, (MetaName)2070432509), - new PsoStructureEntryInfo(MetaName.ActionSets, PsoDataType.Structure, 568, 0, (MetaName)2070432509), - new PsoStructureEntryInfo(MetaName.RandomiseLeadingHand, PsoDataType.Bool, 600, 0, 0), - new PsoStructureEntryInfo(MetaName.MinLeanInDirectionTime, PsoDataType.SInt, 604, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLeanInDirectionTime, PsoDataType.SInt, 608, 0, 0), - new PsoStructureEntryInfo(MetaName.fImpulseReductionScaleMax, PsoDataType.Float, 612, 0, 0), - new PsoStructureEntryInfo(MetaName.fSpecialAbilityRageKickImpulseModifier, PsoDataType.Float, 616, 0, 0), - new PsoStructureEntryInfo(MetaName.fCounterImpulseScale, PsoDataType.Float, 620, 0, 0) - ); - case MetaName.CNmParameterRandomInt: - return new PsoStructureInfo(MetaName.CNmParameterRandomInt, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Min, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.SInt, 20, 0, 0) - ); - case MetaName.CTaskNMHighFall__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMHighFall__Tunables, 0, 0, 1112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.PitchInDirectionForce, PsoDataType.Structure, 16, 0, (MetaName)760338219), - new PsoStructureEntryInfo(MetaName.PitchInDirectionComponent, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.StuntJumpPitchInDirectionForce, PsoDataType.Structure, 88, 0, (MetaName)760338219), - new PsoStructureEntryInfo(MetaName.StuntJumpPitchInDirectionComponent, PsoDataType.SInt, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.HighFallTimeToBlockInjuredOnGround, PsoDataType.SInt, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.InAir, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Vault, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.FromCarHit, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SlopeSlide, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.TeeterEdge, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SprintExhausted, PsoDataType.Structure, 400, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.JumpCollision, PsoDataType.Structure, 440, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StuntJump, PsoDataType.Structure, 480, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailedSprintExhausted, PsoDataType.Structure, 520, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.DisableStartMessageForSprintExhausted, PsoDataType.Bool, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BlendOut, PsoDataType.Structure, 608, 0, (MetaName)3979439077), - new PsoStructureEntryInfo(MetaName.PlayerQuickBlendOut, PsoDataType.Structure, 712, 0, (MetaName)3749122641), - new PsoStructureEntryInfo(MetaName.MpPlayerQuickBlendOut, PsoDataType.Structure, 744, 0, (MetaName)3749122641), - new PsoStructureEntryInfo(MetaName.MaxHealthLossForQuickGetup, PsoDataType.Float, 776, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHealthForQuickGetup, PsoDataType.Float, 780, 0, 0), - new PsoStructureEntryInfo(MetaName.MpMaxHealthLossForQuickGetup, PsoDataType.Float, 784, 0, 0), - new PsoStructureEntryInfo(MetaName.MpMinHealthForQuickGetup, PsoDataType.Float, 788, 0, 0), - new PsoStructureEntryInfo(MetaName.UseRemainingMinTimeForGroundWrithe, PsoDataType.Bool, 792, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeRemainingForGroundWrithe, PsoDataType.SInt, 796, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeElapsedForGroundWrithe, PsoDataType.SInt, 800, 0, 0), - new PsoStructureEntryInfo(MetaName.HighHighFallStart, PsoDataType.Structure, 808, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SuperHighFallStart, PsoDataType.Structure, 848, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HighHighFallEnd, PsoDataType.Structure, 888, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.AirResistanceOption, PsoDataType.UByte, 928, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceZThresholdForHighHighFall, PsoDataType.Float, 932, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityZThresholdForHighHighFall, PsoDataType.Float, 936, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityZThresholdForSuperHighFall, PsoDataType.Float, 940, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollComponentAirResistanceForce, PsoDataType.Array, 944, 4, (MetaName)1376291), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollComponentAirResistanceMinStiffness, PsoDataType.Array, 1028, 4, (MetaName)1310757) - ); - case MetaName.CTaskNMInjuredOnGround__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMInjuredOnGround__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fDoInjuredOnGroundChance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fFallingSpeedThreshold, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.iRandomDurationMin, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.iRandomDurationMax, PsoDataType.SInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxNumInjuredOnGroundAgents, PsoDataType.SInt, 32, 0, 0) - ); - case MetaName.CTaskNMJumpRollFromRoadVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMJumpRollFromRoadVehicle__Tunables, 0, 0, 304, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.GravityScale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StartForceDownHeight, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 24, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.EntryPointSets, PsoDataType.Structure, 64, 0, (MetaName)2070432509), - new PsoStructureEntryInfo(MetaName.BlendOut, PsoDataType.Structure, 96, 0, (MetaName)3979439077), - new PsoStructureEntryInfo(MetaName.QuickBlendOut, PsoDataType.Structure, 200, 0, (MetaName)3979439077) - ); - case MetaName.CTaskNMOnFire__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMOnFire__Tunables, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Weak, PsoDataType.Structure, 56, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMPrototype__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMPrototype__Tunables, 0, 0, 288, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RunForever, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SimulationTimeInMs, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CheckForMovingGround, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 32, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 72, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 112, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTaskNMPrototype__Tunables__TimedTuning), - new PsoStructureEntryInfo(MetaName.TimedMessages, PsoDataType.Array, 152, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo(MetaName.DynamicSet1, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.DynamicSet2, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.DynamicSet3, PsoDataType.Structure, 248, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMPrototype__Tunables__TimedTuning: - return new PsoStructureInfo(MetaName.CTaskNMPrototype__Tunables__TimedTuning, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.TimeInSeconds, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Periodic, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Messages, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMRiverRapids__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMRiverRapids__Tunables, 0, 0, 272, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fMinRiverFlowForRapids, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinRiverGroundClearanceForRapids, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.bHorizontalRighting, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fHorizontalRightingStrength, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fHorizontalRightingTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.bVerticalRighting, PsoDataType.Bool, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fVerticalRightingStrength, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fVerticalRightingTime, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fRagdollComponentBuoyancy, PsoDataType.Array, 48, 4, (MetaName)1376265), - new PsoStructureEntryInfo(MetaName.BodyWrithe, PsoDataType.Structure, 136, 0, (MetaName)2361842970), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 192, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 232, 0, MetaName.CNmTuningSet) - ); - case (MetaName)2361842970: - return new PsoStructureInfo((MetaName)2361842970, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.bControlledByPlayerSprintInput, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinArmAmplitude, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxArmAmplitude, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinArmStiffness, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxArmStiffness, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinArmPeriod, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxArmPeriod, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinStroke, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxStroke, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinBuoyancy, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxBuoyancy, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.CTaskNMShot__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMShot__Tunables, 0, 0, 2304, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinimumShotReactionTimePlayerMS, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinimumShotReactionTimeAIMS, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.bUseClipPoseHelper, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.bEnableDebugDraw, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.fImpactConeAngleFront, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fImpactConeAngleBack, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.eImpactConeRagdollComponent, PsoDataType.Enum, 36, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.iShotMinTimeBeforeGunThreaten, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.iShotMaxTimeBeforeGunThreaten, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.iShotMinTimeBetweenFireGun, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.iShotMaxTimeBetweenFireGun, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.iShotMaxBlindFireTimeL, PsoDataType.SInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.iShotMaxBlindFireTimeH, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelayStanding, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDelayBalanceFailed, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fShotBlindFireProbability, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.fShotWeaponAngleToFireGun, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.fShotHeadAngleToFireGun, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.fFireWeaponStrengthForceMultiplier, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinFinisherShotgunTotalImpulseNormal, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinFinisherShotgunTotalImpulseBraced, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.fFinisherShotgunBonusArmedSpeedModifier, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleSnapWithSpineOrientation, PsoDataType.Bool, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSnap, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotAgainstWall, PsoDataType.Structure, 112, 0, (MetaName)2342621138), - new PsoStructureEntryInfo(MetaName.BCRExclusionZone, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.Impulses, PsoDataType.Structure, 152, 0, (MetaName)209088469), - new PsoStructureEntryInfo(MetaName.HitRandomisation, PsoDataType.Structure, 352, 0, (MetaName)996969243), - new PsoStructureEntryInfo(MetaName.HitRandomisationAutomatic, PsoDataType.Structure, 392, 0, (MetaName)996969243), - new PsoStructureEntryInfo(MetaName.StayUpright, PsoDataType.Structure, 432, 0, (MetaName)1001943080), - new PsoStructureEntryInfo(MetaName.ArmShot, PsoDataType.Structure, 464, 0, (MetaName)2149258416), - new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo(MetaName.ReduceDownedTimeByPerformanceTime, PsoDataType.Bool, 508, 0, 0), - new PsoStructureEntryInfo(MetaName.MinimumDownedTime, PsoDataType.SInt, 512, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceOfFallToKneesOnCollapse, PsoDataType.Float, 516, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceOfFallToKneesAfterLastStand, PsoDataType.Float, 520, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceForGutShotKnockdown, PsoDataType.Float, 524, 0, 0), - new PsoStructureEntryInfo(MetaName.LastStandMaxTotalTime, PsoDataType.Float, 528, 0, 0), - new PsoStructureEntryInfo(MetaName.LastStandMaxArmouredTotalTime, PsoDataType.Float, 532, 0, 0), - new PsoStructureEntryInfo(MetaName.RapidHitCount, PsoDataType.SInt, 536, 0, 0), - new PsoStructureEntryInfo(MetaName.ArmouredRapidHitCount, PsoDataType.SInt, 540, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowArmouredLegShot, PsoDataType.Bool, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowArmouredKnockdown, PsoDataType.Bool, 545, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShot, PsoDataType.Bool, 546, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShotMinDelay, PsoDataType.SInt, 548, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShotMaxDelay, PsoDataType.SInt, 552, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShot, PsoDataType.Bool, 556, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShotMinDelay, PsoDataType.SInt, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShotMaxDelay, PsoDataType.SInt, 564, 0, 0), - new PsoStructureEntryInfo(MetaName.ParamSets, PsoDataType.Structure, 568, 0, (MetaName)436100430), - new PsoStructureEntryInfo(MetaName.WeaponSets, PsoDataType.Structure, 2136, 0, (MetaName)2070432509), - new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 2168, 0, (MetaName)3979439077), - new PsoStructureEntryInfo(MetaName.SubmergedBlendOutThreshold, PsoDataType.Structure, 2272, 0, (MetaName)3749122641) - ); - case (MetaName)2342621138: - return new PsoStructureInfo((MetaName)2342621138, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.HealthRatioLimit, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.WallProbeRadius, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.WallProbeDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ProbeHeightAbovePelvis, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ImpulseMult, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWallAngle, PsoDataType.Float, 28, 0, 0) - ); - case (MetaName)209088469: - return new PsoStructureInfo((MetaName)209088469, 0, 0, 200, - new PsoStructureEntryInfo(MetaName.MaxArmourImpulseMult, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinArmourImpulseMult, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHealthImpulseMult, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHealthImpulseMult, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDamageTakenImpulseMult, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenImpulseMult, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDamageTakenThreshold, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenThreshold, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultKillShotImpulseMult, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultRapidFireKillShotImpulseMult, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMPKillShotImpulseMult, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMPRapidFireKillShotImpulseMult, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunMaxSpeedForLiftImpulse, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunMaxLiftImpulse, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunLiftNearThreshold, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveSpine3ImpulseToSpine2, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveNeckImpulseToSpine2, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveHeadImpulseToSpine2, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.RapidFireBoostShotImpulseMult, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.RapidFireBoostShotMinRandom, PsoDataType.SInt, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.RapidFireBoostShotMaxRandom, PsoDataType.SInt, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.EqualizeAmount, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.COMImpulseScale, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.COMImpulseComponent, PsoDataType.Flags, 100, 0, (MetaName)2097175), - new PsoStructureEntryInfo(MetaName.COMImpulseMaxRootVelocityMagnitude, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.COMImpulseOnlyWhileBalancing, PsoDataType.Bool, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadShotImpulseMultiplier, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadShotMPImpulseMultiplier, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.ScaleHeadShotImpulseWithSpineOrientation, PsoDataType.Bool, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeadShotImpulseMultiplier, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.AutomaticInitialSnapMult, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.BurstFireInitialSnapMult, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.FinalShotImpulseClampMax, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.RunningAgainstBulletImpulseMult, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.RunningAgainstBulletImpulseMultMax, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.RunningWithBulletImpulseMult, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.LegShotFallRootImpulseMinUpright, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.LegShotFallRootImpulseMult, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.SniperImpulses, PsoDataType.Structure, 160, 0, (MetaName)3192684380) - ); - case (MetaName)3192684380: - return new PsoStructureInfo((MetaName)3192684380, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.MaxHealthImpulseMult, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHealthImpulseMult, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDamageTakenImpulseMult, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenImpulseMult, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDamageTakenThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenThreshold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultKillShotImpulseMult, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultMPKillShotImpulseMult, PsoDataType.Float, 36, 0, 0) - ); - case (MetaName)996969243: - return new PsoStructureInfo((MetaName)996969243, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Enable, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.TopSpread, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.BottomSpread, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Blend, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TopComponent, PsoDataType.Enum, 24, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.BottomComponent, PsoDataType.Enum, 28, 0, (MetaName)3509057257), - new PsoStructureEntryInfo(MetaName.BiasSide, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BiasSideTime, PsoDataType.UInt, 36, 0, 0) - ); - case (MetaName)1001943080: - return new PsoStructureInfo((MetaName)1001943080, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.HoldingWeaponBonus, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.UnarmedBonus, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ArmouredBonus, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingMultiplierBonus, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HealthMultiplierBonus, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)2149258416: - return new PsoStructureInfo((MetaName)2149258416, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.MinLookAtArmWoundTime, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookAtArmWoundTime, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.UpperArmImpulseCap, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.LowerArmImpulseCap, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ClavicleImpulseScale, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.UpperArmNoTorsoHitImpulseCap, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.LowerArmNoTorseHitImpulseCap, PsoDataType.Float, 32, 0, 0) - ); - case (MetaName)436100430: - return new PsoStructureInfo((MetaName)436100430, 0, 0, 1568, - new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Structure, 8, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Melee, PsoDataType.Structure, 48, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Electrocute, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SprintingLegShot, PsoDataType.Structure, 128, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SprintingDeath, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.AutomaticHeadShot, PsoDataType.Structure, 248, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HeadShot, PsoDataType.Structure, 288, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.AutomaticNeckShot, PsoDataType.Structure, 328, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.NeckShot, PsoDataType.Structure, 368, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SniperLegShot, PsoDataType.Structure, 408, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.LegShot, PsoDataType.Structure, 448, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.ArmShot, PsoDataType.Structure, 488, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BackShot, PsoDataType.Structure, 528, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Underwater, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.UnderwaterRelax, PsoDataType.Structure, 608, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Armoured, PsoDataType.Structure, 648, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BoundAnkles, PsoDataType.Structure, 688, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.FatallyInjured, PsoDataType.Structure, 728, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.PlayerDeathSP, PsoDataType.Structure, 768, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.PlayerDeathMP, PsoDataType.Structure, 808, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 848, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.ShotAgainstWall, PsoDataType.Structure, 888, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.LastStand, PsoDataType.Structure, 928, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.LastStandArmoured, PsoDataType.Structure, 968, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HeadLook, PsoDataType.Structure, 1008, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.FallToKnees, PsoDataType.Structure, 1048, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.StaggerFall, PsoDataType.Structure, 1088, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.CatchFall, PsoDataType.Structure, 1128, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SetFallingReactionHealthy, PsoDataType.Structure, 1168, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SetFallingReactionInjured, PsoDataType.Structure, 1208, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SetFallingReactionFallOverWall, PsoDataType.Structure, 1248, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.SetFallingReactionFallOverVehicle, PsoDataType.Structure, 1288, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.RubberBulletKnockdown, PsoDataType.Structure, 1328, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Teeter, PsoDataType.Structure, 1368, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HoldingTwoHandedWeapon, PsoDataType.Structure, 1408, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.HoldingSingleHandedWeapon, PsoDataType.Structure, 1448, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.CrouchedOrLowCover, PsoDataType.Structure, 1488, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Female, PsoDataType.Structure, 1528, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskNMSimple__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMSimple__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2610655349), - new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Map, 16, 1, (MetaName)65538) - ); - case (MetaName)2610655349: - return new PsoStructureInfo((MetaName)2610655349, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.iMinTime, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxTime, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fRagdollScore, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 24, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 64, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.OnBalanceFailure, PsoDataType.Structure, 104, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 144, 0, (MetaName)3749122641) - ); - case MetaName.CTaskNMThroughWindscreen__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMThroughWindscreen__Tunables, 0, 0, 232, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.GravityScale, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StartForceDownHeight, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeForwardMinComponent, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeForwardMaxComponent, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeUpMinComponent, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeUpMaxComponent, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikePitchMinComponent, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikePitchMaxComponent, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeMinSpeed, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeMaxSpeed, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeMinUpright, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeMaxUpright, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeEjectMaxImpactDepth, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.KnockOffBikeEjectImpactFriction, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ClearVehicleTimeMS, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultInverseMassScales, PsoDataType.Structure, 80, 0, (MetaName)1267291753), - new PsoStructureEntryInfo(MetaName.BicycleInverseMassScales, PsoDataType.Structure, 104, 0, (MetaName)1267291753), - new PsoStructureEntryInfo(MetaName.BikeInverseMassScales, PsoDataType.Structure, 128, 0, (MetaName)1267291753), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 152, 0, MetaName.CNmTuningSet), - new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 192, 0, MetaName.CNmTuningSet) - ); - case MetaName.CTaskRageRagdoll__Tunables: - return new PsoStructureInfo(MetaName.CTaskRageRagdoll__Tunables, 0, 0, 168, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SpineStrengthTuning, PsoDataType.Structure, 16, 0, (MetaName)2579680791), - new PsoStructureEntryInfo(MetaName.NeckStrengthTuning, PsoDataType.Structure, 48, 0, (MetaName)2579680791), - new PsoStructureEntryInfo(MetaName.LimbStrengthTuning, PsoDataType.Structure, 80, 0, (MetaName)2579680791), - new PsoStructureEntryInfo(MetaName.RageRagdollImpulseTuning, PsoDataType.Structure, 112, 0, (MetaName)2715073781), - new PsoStructureEntryInfo(MetaName.fMuscleAngleStrengthRampDownRate, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.fMuscleSpeedStrengthRampDownRate, PsoDataType.Float, 164, 0, 0) - ); - case (MetaName)2579680791: - return new PsoStructureInfo((MetaName)2579680791, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.fInitialDelay, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fStartStrength, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fMidStrength, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fEndStrength, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fDurationStage1, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fDurationStage2, PsoDataType.Float, 28, 0, 0) - ); - case (MetaName)2715073781: - return new PsoStructureInfo((MetaName)2715073781, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.fImpulseReductionPerShot, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fImpulseRecoveryPerSecond, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxImpulseModifier, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinImpulseModifier, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fCounterImpulseRatio, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fTempInitialStiffnessWhenShot, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fAnimalMassMult, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fAnimalImpulseMultMin, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fAnimalImpulseMultMax, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fInitialHitImpulseMult, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CPlayerInfo__Tunables: - return new PsoStructureInfo(MetaName.CPlayerInfo__Tunables, 0, 0, 992, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EnemyCharging, PsoDataType.Structure, 16, 0, (MetaName)2968011987), - new PsoStructureEntryInfo(MetaName.CombatLoitering, PsoDataType.Structure, 48, 0, (MetaName)2859355160), - new PsoStructureEntryInfo(MetaName.MinVehicleCollisionDamageScale, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVehicleCollisionDamageScale, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngleConsidered, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToConsiderVehicleValid, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToConsiderVehicleValid, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.SprintReplenishFinishedPercentage, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)3763989739, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.SprintReplenishRateMultiplier, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.SprintReplenishRateMultiplierBike, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWorldLimitsPlayerX, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWorldLimitsPlayerY, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWorldLimitsPlayerX, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWorldLimitsPlayerY, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToTrespassWhileSwimmingBeforeDeath, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MovementAwayWeighting, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceWeighting, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingWeighting, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.CameraWeighting, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceWeightingNoStick, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingWeightingNoStick, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.OnFireWeightingMult, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeMaxRestoreDuration, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeMinRestoreDuration, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleDepletionMinMult, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleDepletionMidMult, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleDepletionMaxMult, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleMinDepletionLimit, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleMidDepletionLimit, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleMaxDepletionLimit, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenSwitchToClearTasks, PsoDataType.UInt, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenShoutTargetPosition, PsoDataType.UInt, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.TrespassGuardModelName, PsoDataType.String, 188, 7, 0), - new PsoStructureEntryInfo(MetaName.GuardWorldExtents, PsoDataType.Bool, 192, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlayerInfo__sSprintControlData), - new PsoStructureEntryInfo(MetaName.SprintControlData, PsoDataType.Array, 200, 1, (MetaName)262180), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlayerInfo__sPlayerStatInfo), - new PsoStructureEntryInfo(MetaName.PlayerStatInfos, PsoDataType.Array, 336, 1, (MetaName)524326), - new PsoStructureEntryInfo((MetaName)4178328957, PsoDataType.Float, 984, 0, 0), - new PsoStructureEntryInfo((MetaName)1447073898, PsoDataType.Float, 988, 0, 0) - ); - case (MetaName)2968011987: - return new PsoStructureInfo((MetaName)2968011987, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.fChargeGoalBehindCoverCentralOffset, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fChargeGoalLateralOffset, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fChargeGoalRearOffset, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fChargeGoalMaxAdjustRadius, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fPlayerMoveDistToResetChargeGoals, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)2859355160: - return new PsoStructureInfo((MetaName)2859355160, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.fPlayerMoveDistToResetLoiterPosition, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.uDistanceCheckPeriodMS, PsoDataType.UInt, 12, 0, 0) - ); - case MetaName.CPlayerInfo__sSprintControlData: - return new PsoStructureInfo(MetaName.CPlayerInfo__sSprintControlData, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.TapAdd, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.HoldSub, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ReleaseSub, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Threshhold, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLimit, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ResultMult, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CPlayerInfo__sPlayerStatInfo: - return new PsoStructureInfo(MetaName.CPlayerInfo__sPlayerStatInfo, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinStaminaDuration, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxStaminaDuration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHoldBreathDuration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHoldBreathDuration, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWheelieAbility, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWheelieAbility, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPlaneControlAbility, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlaneControlAbility, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPlaneDamping, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPlaneDamping, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeliDamping, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeliDamping, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFallHeight, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFallHeight, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDiveHeight, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDiveHeight, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.DiveRampPow, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.CAnimSpeedUps__Tunables: - return new PsoStructureInfo(MetaName.CAnimSpeedUps__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerClimbStandRateModifier, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerClimbRunningRateModifier, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerClimbClamberRateModifier, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerEnterExitJackVehicleRateModifier, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerLadderRateModifier, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerReloadRateModifier, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerCoverIntroRateModifier, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplayerIdleTurnRateModifier, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceMPAnimRatesInSP, PsoDataType.Bool, 48, 0, 0) - ); - case MetaName.CPlayerPedTargeting__Tunables: - return new PsoStructureInfo(MetaName.CPlayerPedTargeting__Tunables, 0, 0, 3776, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fTargetableDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fTargetThreatOverride, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestHardLockDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.UnarmedInCoverTargetingDistance, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1109599945, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MeleeLostLOSBreakTime, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToAllowCachedStickInputForMelee, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DoAynchronousProbesWhenFindingFreeAimAssistTarget, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowDriverLockOnToAmbientPeds, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowDriverLockOnToAmbientPedsInSP, PsoDataType.Bool, 46, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplayAimAssistIntersections, PsoDataType.Bool, 47, 0, 0), - new PsoStructureEntryInfo((MetaName)2235947157, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplayAimAssistCurves, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplayLockOnDistRanges, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplayLockOnAngularRanges, PsoDataType.Bool, 51, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplaySoftLockDebug, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplayFreeAimTargetDebug, PsoDataType.Bool, 53, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugLockOnTargets, PsoDataType.Bool, 54, 0, 0), - new PsoStructureEntryInfo(MetaName.UseRagdollTargetIfNoAssistTarget, PsoDataType.Bool, 55, 0, 0), - new PsoStructureEntryInfo(MetaName.UseReticuleSlowDownStrafeClamp, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.EasyTargettingDifficultyInfo, PsoDataType.Structure, 64, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo(MetaName.NormalTargettingDifficultyInfo, PsoDataType.Structure, 528, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)2843442022, PsoDataType.Structure, 992, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)933644170, PsoDataType.Structure, 1456, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)1051298047, PsoDataType.Structure, 1920, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)1712651720, PsoDataType.Structure, 2384, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)3769742750, PsoDataType.Structure, 2848, 0, MetaName.CTargettingDifficultyInfo), - new PsoStructureEntryInfo((MetaName)1604857901, PsoDataType.Structure, 3312, 0, MetaName.CTargettingDifficultyInfo) - ); - case MetaName.CTargettingDifficultyInfo: - return new PsoStructureInfo(MetaName.CTargettingDifficultyInfo, 0, 0, 464, - new PsoStructureEntryInfo(MetaName.LockType, PsoDataType.Enum, 8, 0, MetaName.LockType), - new PsoStructureEntryInfo((MetaName)3742855719, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.UseLockOnTargetSwitching, PsoDataType.Bool, 13, 0, 0), - new PsoStructureEntryInfo(MetaName.UseReticuleSlowDownForRunAndGun, PsoDataType.Bool, 14, 0, 0), - new PsoStructureEntryInfo(MetaName.UseReticuleSlowDown, PsoDataType.Bool, 15, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableBulletBending, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowSoftLockFineAim, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.UseFineAimSpring, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.UseNewSlowDownCode, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.UseCapsuleTests, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.UseDriveByAssistedAim, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo((MetaName)3708089905, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnRangeModifier, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ReticuleSlowDownRadius, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ReticuleSlowDownCapsuleRadius, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ReticuleSlowDownCapsuleLength, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimit, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitClose, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitCloseDistMin, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitCloseDistMax, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.WideTargetAngularLimit, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.CycleTargetAngularLimit, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.CycleTargetAngularLimitMelee, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAimPitchMin, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultTargetAimPitchMax, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleLockOnRangeModifier, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleMaxLockOnRange, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimit, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitClose, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitCloseDistMin, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitCloseDistMax, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.NoReticuleTargetAimPitchLimit, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelocityForDriveByAssistedAim, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnDistanceRejectionModifier, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimVerticalMovement, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimDownwardsVerticalMovement, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimSidewaysScale, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSoftLockBreakTime, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSoftLockBreakTimeCloseRange, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSoftLockBreakAtMaxXStickTime, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockBreakDistanceMin, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockBreakDistanceMax, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFineAimTime, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MinFineAimTimeHoldingStick, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MinNoReticuleAimTime, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.AimAssistCapsuleRadius, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo((MetaName)2152729841, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.AimAssistCapsuleMaxLength, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo((MetaName)1099784311, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.AimAssistBlendInTime, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.AimAssistBlendOutTime, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockFineAimBreakXYValue, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockFineAimBreakZValue, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockFineAimXYAbsoluteValue, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockFineAimXYAbsoluteValueClose, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockBreakValue, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockTime, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.SoftLockTimeToAcquireTarget, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo((MetaName)2167138628, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimHorSpeedMin, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimHorSpeedMax, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimVerSpeed, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplier, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimHorWeightSpeedMultiplier, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimHorSpeedPower, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierClose, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierCloseDistMin, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierCloseDistMax, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo((MetaName)1715236167, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo((MetaName)1204531501, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo((MetaName)2894104098, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo((MetaName)1976544803, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo((MetaName)922516025, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo((MetaName)3926385305, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo((MetaName)493048149, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo((MetaName)2549641570, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnSwitchTimeExtensionBreakLock, PsoDataType.UInt, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.LockOnSwitchTimeExtensionKillTarget, PsoDataType.UInt, 284, 0, 0), - new PsoStructureEntryInfo((MetaName)3957255740, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo((MetaName)3799655237, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCurveSet), - new PsoStructureEntryInfo(MetaName.CurveSets, PsoDataType.Array, 296, 1, (MetaName)262224), - new PsoStructureEntryInfo(MetaName.AimAssistDistanceCurve, PsoDataType.Structure, 432, 0, MetaName.CCurveSet) - ); - case MetaName.CCurveSet: - return new PsoStructureInfo(MetaName.CCurveSet, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCurve), - new PsoStructureEntryInfo(MetaName.curves, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case MetaName.CCurve: - return new PsoStructureInfo(MetaName.CCurve, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.fInputMax, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.fResultMax, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.fPow, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CRandomEventManager__Tunables: - return new PsoStructureInfo(MetaName.CRandomEventManager__Tunables, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RenderDebug, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceCrime, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.EventInterval, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.EventInitInterval, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1980648971), - new PsoStructureEntryInfo(MetaName.RandomEventType, PsoDataType.Array, 32, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2790883352), - new PsoStructureEntryInfo(MetaName.RandomEventData, PsoDataType.Array, 48, 0, (MetaName)8), - new PsoStructureEntryInfo(MetaName.SpawningChasesEnabled, PsoDataType.Bool, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNumberCopVehiclesInChase, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ProbSpawnHeli, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAmbientVehiclesToSpawnChase, PsoDataType.SInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPlayerMoveDistanceToSpawnChase, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.HeliVehicleModelId, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.HeliPedModelId, PsoDataType.String, 88, 7, 0) - ); - case (MetaName)1980648971: - return new PsoStructureInfo((MetaName)1980648971, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.RandomEventTypeName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RandomEventTimeIntervalMin, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.RandomEventTimeIntervalMax, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DeltaScaleWhenPlayerStationary, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)2790883352: - return new PsoStructureInfo((MetaName)2790883352, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.RandomEventName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RandomEventType, PsoDataType.Enum, 12, 0, (MetaName)3799765345) - ); - case MetaName.CEventExplosionHeard__Tunables: - return new PsoStructureInfo(MetaName.CEventExplosionHeard__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxCombineDistThresholdSquared, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CRelationshipManager__Tunables: - return new PsoStructureInfo(MetaName.CRelationshipManager__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DisplayRemovedGroups, PsoDataType.Bool, 16, 0, 0) - ); - case MetaName.CTaskAgitated__Tunables: - return new PsoStructureInfo(MetaName.CTaskAgitated__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)588501678), - new PsoStructureEntryInfo(MetaName.TimeBetweenLookAts, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MovingAwayVelocityMSThreshold, PsoDataType.Float, 36, 0, 0) - ); - case (MetaName)588501678: - return new PsoStructureInfo((MetaName)588501678, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Info, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.Hashes, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.History, PsoDataType.Bool, 11, 0, 0) - ); - case MetaName.CTaskConfront__Tunables: - return new PsoStructureInfo(MetaName.CTaskConfront__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceIfUnarmed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistanceIfArmed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToMove, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRadius, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToIntimidateArmedTarget, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToIntimidateUnarmedTarget, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskSmartFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskSmartFlee__Tunables, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2976849785, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2923989237, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo((MetaName)964747565, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2588997912, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3847831913, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)182226933, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3494668944, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)55450154, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)1156561437, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2850307001, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)4172340609, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)916666022, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1653710895, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleMaxDistance, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleRouteMinDistance, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenHandsUpChecks, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenExitVehicleDueToRouteChecks, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToCower, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeForHandsUp, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForHandsUp, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimeForExitVehicle, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimeForExitVehicle, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceToDeleteOnExitVehicle, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteOnExitVehicle, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRouteLengthForCower, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistFromTargetWhenCoweringToCheckForExit, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeTargetTooCloseDistance, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)945475130, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)909291779, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRouteSizeForCower, PsoDataType.SInt, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceCower, PsoDataType.Bool, 132, 0, 0) - ); - case MetaName.CTaskScenarioFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskScenarioFlee__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fFleeProjectRange, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fInitialSearchRadius, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fSearchScaler, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fSearchRangeMax, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fFleeRange, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1817496588, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fTargetScenarioRadius, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fProbeLength, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3328108206, PsoDataType.UInt, 48, 0, 0) - ); - case MetaName.CTaskExhaustedFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskExhaustedFlee__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StartingEnergy, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.EnergyLostPerSecond, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.OuterDistanceThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.InnerDistanceThreshold, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskWalkAway__Tunables: - return new PsoStructureInfo(MetaName.CTaskWalkAway__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SafeDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenRouteAdjustments, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskGrowlAndFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskGrowlAndFlee__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FleeMBR, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskIntimidate__Tunables: - return new PsoStructureInfo(MetaName.CTaskIntimidate__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)920671881, PsoDataType.Bool, 16, 0, 0) - ); - case MetaName.CTaskReactAndFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactAndFlee__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinFleeMoveBlendRatio, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFleeMoveBlendRatio, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.OverrideDirections, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.OverrideReactDirection, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.OverrideFleeDirection, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxReactionTime, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingChangeRate, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToRepeatLastAnimation, PsoDataType.Float, 52, 0, 0) - ); - case MetaName.CTaskReactInDirection__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactInDirection__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CTaskReactToExplosion__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactToExplosion__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxShellShockedDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFlinchDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLookAtDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskReactToImminentExplosion__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactToImminentExplosion__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxEscapeDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxFlinchDistance, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskShockingEvent__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEvent__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinRemainingRotationForScaling, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAngularVelocityScaleFactor, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAngularVelocityScaleFactor, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskShockingEventGoto__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventGoto__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DistSquaredThresholdAtCrowdRoundPos, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DistSquaredThresholdMovingToCrowdRoundPos, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DistVicinityOfCrowd, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraDistForGoto, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistFromOtherPeds, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveBlendRatioForFarGoto, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadiusForCloseNavMeshTask, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraToleranceForStopWatchDistance, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CTaskShockingEventHurryAway__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventHurryAway__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.LookAheadDistanceForBackAway, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToCallPolice, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToCallPolice, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToCallPolice, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancePlayingInitalTurnAnimSmallReact, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancePlayingCustomBackAwayAnimSmallReact, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancePlayingInitalTurnAnimBigReact, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancePlayingCustomBackAwayAnimBigReact, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFleeDistance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFleeVehicleDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldFleeFilmingDistance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.EvasionThreshold, PsoDataType.UInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosePlayerSpeedupDistanceSquaredThreshold, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ClosePlayerSpeedupTimeThreshold, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceFromPlayerToDeleteHurriedPed, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeUntilDeletionWhenHurrying, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.CTaskShockingEventWatch__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventWatch__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTargetAngularMovementForWatch, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ThresholdWatchAfterFace, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ThresholdWatchStop, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceBetweenFilmingPeds, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)1440458015, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceAwayForFilming, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskShockingEventReact__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventReact__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TurningTolerance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TurningRate, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TurningEnergyUpperThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TurningEnergyLowerThreshold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenReactionIdlesMin, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenReactionIdlesMax, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendoutPhase, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskShockingEventBackAway__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventBackAway__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingAdjustmentRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeadingAlignmentCosThreshold, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeadingAlignmentCosThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveNetworkBlendoutDuration, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultBackwardsProjectionRange, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AxesFacingTolerance, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForBackAway, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForBackAway, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWptAngle, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutPhase, PsoDataType.Float, 52, 0, 0) - ); - case MetaName.CTaskShockingEventReactToAircraft__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventReactToAircraft__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ThresholdWatch, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ThresholdRun, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskShockingPoliceInvestigate__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingPoliceInvestigate__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ExtraDistForGoto, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveBlendRatioForFarGoto, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteOffscreen, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DeleteOffscreenTimeMS_MIN, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DeleteOffscreenTimeMS_MAX, PsoDataType.UInt, 32, 0, 0) - ); - case MetaName.CTaskShockingEventStopAndStare__Tunables: - return new PsoStructureInfo(MetaName.CTaskShockingEventStopAndStare__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BringVehicleToHaltDistance, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskShove__Tunables: - return new PsoStructureInfo(MetaName.CTaskShove__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)838054604), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDot, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusForContact, PsoDataType.Float, 40, 0, 0) - ); - case (MetaName)838054604: - return new PsoStructureInfo((MetaName)838054604, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Contact, PsoDataType.Bool, 9, 0, 0) - ); - case MetaName.CTaskShoved__Tunables: - return new PsoStructureInfo(MetaName.CTaskShoved__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CScenarioClipHelper__Tunables: - return new PsoStructureInfo(MetaName.CScenarioClipHelper__Tunables, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CVehicleScenarioManager__AttractorTuning__Tunables: - return new PsoStructureInfo(MetaName.CVehicleScenarioManager__AttractorTuning__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ForwardDirectionThresholdCosSquared, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToPathDefault, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToVehicle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToVehicle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.NumToUpdatePerFrame, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterAttractionMs, PsoDataType.UInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterChainTestFailedMs, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterFailedConditionsMs, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAfterNoBoundsMs, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPassengersForAttraction, PsoDataType.UShort, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPassengersForAttraction, PsoDataType.UShort, 54, 0, 0) - ); - case MetaName.CTaskCoupleScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskCoupleScenario__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ResumeDistSq, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StopDistSq, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskCowerScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskCowerScenario__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EventDecayTimeMS, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ReturnToNormalDistanceSq, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BackHeadingInterpRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.EventlessSwitchStateTimeRequirement, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.EventlessSwitchInactivityTimeRequirement, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.EventlessSwitchDistanceRequirement, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteCoweringForever, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.CoweringForeverDeleteOffscreenTimeMS_MIN, PsoDataType.UInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.CoweringForeverDeleteOffscreenTimeMS_MAX, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.FlinchDecayTime, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenFlinches, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.CTaskUseScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskUseScenario__Tunables, 0, 0, 152, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AdvanceUseTimeRandomMaxProportion, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.BreakAttachmentMoveSpeedThreshold, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BreakAttachmentOrientationThreshold, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitAttachmentMoveSpeedThreshold, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.RouteLengthThresholdForFinalApproach, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ZThresholdForApproachOffset, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DetachExitDefaultPhaseThreshold, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.FastExitDefaultPhaseThreshold, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.RouteLengthThresholdForApproachOffset, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraFleeDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.FindPropInEnvironmentDist, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRateToPlayCowerReaction, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRateToPlayCowerReaction, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDifferenceBetweenCowerReactionRates, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactAndFleeBlendOutPhase, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.RegularExitDefaultPhaseThreshold, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeOfDayRandomnessHours, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLeaveMinBetweenAnybody, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLeaveRandomAmount, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLeaveRandomFraction, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.PavementFloodFillSearchRadius, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.DelayBetweenPavementFloodFillSearches, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeMBRMin, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeMBRMax, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPathLengthForValidExit, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceNavmeshMayAdjustPath, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenChecksToLeaveCowering, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.SkipGotoXYDist, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.SkipGotoZDist, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.SkipGotoHeadingDeltaDegrees, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MinExtraMoney, PsoDataType.SInt, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxExtraMoney, PsoDataType.SInt, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.UpdatesBeforeShiftingBounds, PsoDataType.SByte, 144, 0, 0) - ); - case MetaName.CTaskUseVehicleScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskUseVehicleScenario__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BringVehicleToHaltDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.IdleTimeRandomFactor, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDist, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownSpeed, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.SwitchToStraightLineDist, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetArriveDist, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.PlaneTargetArriveDist, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.HeliTargetArriveDist, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BoatTargetArriveDist, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PlaneTargetArriveDistTaxiOnGround, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PlaneDrivingSubtaskArrivalDist, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.BoatMaxAvoidanceAngle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSearchDistance, PsoDataType.UShort, 64, 0, 0) - ); - case MetaName.CTaskWanderingScenario__Tunables: - return new PsoStructureInfo(MetaName.CTaskWanderingScenario__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeWaitingForBlockingArea, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SwitchToNextPointDistWalking, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SwitchToNextPointDistJogging, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.PreferNearWaterSurfaceArrivalRadius, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenBlockingAreaChecksMS, PsoDataType.UInt, 32, 0, 0) - ); - case MetaName.CTaskPoliceOrderResponse__Tunables: - return new PsoStructureInfo(MetaName.CTaskPoliceOrderResponse__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToWait, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForVehicleMovingSlowly, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForVehicleMovingQuickly, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeOvertakeToMatchSpeedWhenPulledOver, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBeforeOvertakeToMatchSpeedWhenCruising, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.CheatPowerIncreaseForMatchSpeed, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.HashOrdering, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)683308669, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)527303977, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.CTaskArrestPed__Tunables: - return new PsoStructureInfo(MetaName.CTaskArrestPed__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AimDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestInVehicleDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MoveToDistanceInVehicle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetDistanceFromVehicleEntry, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)1425198943, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)4218266421, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)305536610, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.RegainComet, PsoDataType.UInt, 48, 0, 0) - ); - case MetaName.CTaskSwatOrderResponse__Tunables: - return new PsoStructureInfo(MetaName.CTaskSwatOrderResponse__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.HashOrdering, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)683308669, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskHeliOrderResponse__Tunables: - return new PsoStructureInfo(MetaName.CTaskHeliOrderResponse__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3905663903, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)143141277, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)490178156, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)2892876798, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)3618878970, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)3555374966, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskWitness__Tunables: - return new PsoStructureInfo(MetaName.CTaskWitness__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeMoveNearCrimeMs, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeMoveToLawMs, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeSearchMs, PsoDataType.UInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeMoveToLawFailedPathfindingMs, PsoDataType.UInt, 28, 0, 0) - ); - case MetaName.CEventShocking__Tunables: - return new PsoStructureInfo(MetaName.CEventShocking__Tunables, 0, 0, 224, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.LifeTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.VisualReactionRange, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.CopInVehicleVisualReactionRange, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AudioReactionRange, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.AIOnlyReactionRangeScaleFactor, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DuckAndCoverCanTriggerForPlayerTime, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.GotoWatchRange, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.StopWatchDistance, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayMBRChangeDelay, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayMBRChangeRange, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayInitialMBR, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayMoveBlendRatioWhenFar, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayMoveBlendRatioWhenNear, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWatchTime, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWatchTime, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinWatchTimeHurryAway, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxWatchTimeHurryAway, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceOfWatchRatherThanHurryAway, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPhoneFilmTime, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPhoneFilmTime, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPhoneFilmTimeHurryAway, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPhoneFilmTimeHurryAway, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceOfFilmingEventOnPhoneIfWatching, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.PedGenBlockedAreaMinRadius, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.WanderInfluenceSphereRadius, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.TriggerAmbientReactionChances, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForAmbientReaction, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForAmbientReaction, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbientEventLifetime, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeForAmbientReaction, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForAmbientReaction, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.PedFearImpact, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.ShockingSpeechChance, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.DuplicateDistanceCheck, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForAudioReaction, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToUseGunfireReactAndFleeAnimations, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.PedGenBlockingAreaLifeTimeMS, PsoDataType.UInt, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.DuplicateTimeCheck, PsoDataType.UInt, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.ShockingSpeechHash, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo(MetaName.ShockingFilmSpeechHash, PsoDataType.String, 180, 7, 0), - new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.SInt, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.AmbientEventType, PsoDataType.Enum, 188, 0, MetaName.AmbientEventType), - new PsoStructureEntryInfo(MetaName.AddPedGenBlockedArea, PsoDataType.Bool, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.CausesVehicleAvoidance, PsoDataType.Bool, 193, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowIgnoreAsLowPriority, PsoDataType.Bool, 194, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugDisplayAlwaysUseEventPosition, PsoDataType.Bool, 195, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugDisplayListPlayerInfo, PsoDataType.Bool, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.HurryAwayWatchFirst, PsoDataType.Bool, 197, 0, 0), - new PsoStructureEntryInfo(MetaName.MobileChatScenarioMayAbort, PsoDataType.Bool, 198, 0, 0), - new PsoStructureEntryInfo(MetaName.WatchSayFightCheers, PsoDataType.Bool, 199, 0, 0), - new PsoStructureEntryInfo(MetaName.WatchSayShocked, PsoDataType.Bool, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleSlowDown, PsoDataType.Bool, 201, 0, 0), - new PsoStructureEntryInfo(MetaName.IgnoreIfSensingPedIsOtherEntity, PsoDataType.Bool, 202, 0, 0), - new PsoStructureEntryInfo(MetaName.IgnorePavementChecks, PsoDataType.Bool, 203, 0, 0), - new PsoStructureEntryInfo(MetaName.AllowScanningEvenIfPreviouslyReacted, PsoDataType.Bool, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactionMode, PsoDataType.Enum, 208, 0, (MetaName)1809724872), - new PsoStructureEntryInfo(MetaName.StopResponseWhenExpired, PsoDataType.Bool, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeIfApproachedByOtherEntity, PsoDataType.Bool, 213, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeIfApproachedBySourceEntity, PsoDataType.Bool, 214, 0, 0), - new PsoStructureEntryInfo(MetaName.CanCallPolice, PsoDataType.Bool, 215, 0, 0), - new PsoStructureEntryInfo(MetaName.IgnoreFovForHeadIk, PsoDataType.Bool, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.ReactToOtherEntity, PsoDataType.Bool, 217, 0, 0) - ); - case MetaName.CSituationalClipSetStreamer__Tunables: - return new PsoStructureInfo(MetaName.CSituationalClipSetStreamer__Tunables, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Avoids, PsoDataType.Structure, 16, 0, (MetaName)2341712397), - new PsoStructureEntryInfo(MetaName.FleeReactions, PsoDataType.Structure, 48, 0, MetaName.iVectorDefault) - ); - case (MetaName)2341712397: - return new PsoStructureInfo((MetaName)2341712397, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.ClipSet, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ClipSetForCasual, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1095110195), - new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)2) - ); - case MetaName.iVectorDefault: - return new PsoStructureInfo(MetaName.iVectorDefault, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.ClipSetForIntro, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3696584734, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo((MetaName)4027846555, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.ClipSetForRuns, PsoDataType.String, 20, 7, 0), - new PsoStructureEntryInfo((MetaName)3482724306, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo((MetaName)551602790, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInCombatToNotStreamIn, PsoDataType.Float, 32, 0, 0) - ); - case (MetaName)1095110195: - return new PsoStructureInfo((MetaName)1095110195, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ClipSet, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.IsCasual, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Chances, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CEventFootStepHeard__Tunables: - return new PsoStructureInfo(MetaName.CEventFootStepHeard__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTacticalAnalysisNavMeshPoints__Tunables: - return new PsoStructureInfo(MetaName.CTacticalAnalysisNavMeshPoints__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BufferDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNewPosition, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenLineOfSightTests, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNearby, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSearchRadiusForNavMesh, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusForFindNearby, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithClearLineOfSight, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithoutClearLineOfSightInExteriors, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithoutClearLineOfSightInInteriors, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxXYDistanceForNewPosition, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNearbyToFindPerFrame, PsoDataType.SInt, 64, 0, 0) - ); - case MetaName.CTacticalAnalysisCoverPointSearch__Tunables: - return new PsoStructureInfo(MetaName.CTacticalAnalysisCoverPointSearch__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 16, 0, (MetaName)850484111), - new PsoStructureEntryInfo(MetaName.ScoreCalculationsPerFrame, PsoDataType.SInt, 48, 0, 0) - ); - case (MetaName)850484111: - return new PsoStructureInfo((MetaName)850484111, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Occupied, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Scripted, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.PointOnMap, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToBeConsideredOptimal, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToBeConsideredOptimal, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.Optimal, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTacticalAnalysisCoverPoints__Tunables: - return new PsoStructureInfo(MetaName.CTacticalAnalysisCoverPoints__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceMovedToStartSearch, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeBetweenSearches, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForSearch, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForSearch, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenLineOfSightTests, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNearby, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenStatusUpdates, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.RadiusForFindNearby, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNearbyToFindPerFrame, PsoDataType.SInt, 48, 0, 0) - ); - case MetaName.CTacticalAnalysis__Tunables: - return new PsoStructureInfo(MetaName.CTacticalAnalysis__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 16, 0, (MetaName)1310298123), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 40, 0, (MetaName)1230349399), - new PsoStructureEntryInfo(MetaName.MaxSpeedToActivate, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToDeactivate, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeWithNoReferences, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 76, 0, 0) - ); - case (MetaName)1310298123: - return new PsoStructureInfo((MetaName)1310298123, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ValueForUnableToFind, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForTooCloseToTarget, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForTaint, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DecayRate, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)1230349399: - return new PsoStructureInfo((MetaName)1230349399, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverPoints, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.NavMeshPoints, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Bool, 11, 0, 0), - new PsoStructureEntryInfo(MetaName.LineOfSightStatus, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ArcStatus, PsoDataType.Bool, 13, 0, 0), - new PsoStructureEntryInfo(MetaName.Reserved, PsoDataType.Bool, 14, 0, 0), - new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Bool, 15, 0, 0), - new PsoStructureEntryInfo(MetaName.BadRouteValue, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.Reservations, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.LineOfSightTests, PsoDataType.Bool, 18, 0, 0) - ); - case MetaName.CTaskVehicleApproach__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleApproach__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceAroundClosestRoadNode, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskVehicleBlock__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleBlock__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DistanceToCapSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToStartCappingSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AdditionalSpeedCap, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceFromTargetToForceStraightLineMode, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartBackAndForth, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsOurSideToStartBackAndForth, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueBackAndForth, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartBrakeInFront, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotMovingTowardsTargetToStartBrakeInFront, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueBrakeInFront, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotMovingTowardsTargetToContinueBrakeInFront, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartCruiseInFront, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotMovingAwayFromTargetToStartCruiseInFront, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueCruiseInFront, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.CTaskVehicleBlockCruiseInFront__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleBlockCruiseInFront__Tunables, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Probes, PsoDataType.Structure, 16, 0, (MetaName)3985328803), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 56, 0, (MetaName)999261493), - new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotForSlowdown, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForSlowdown, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForSlowdown, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMinSlowdown, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMaxSlowdown, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToAdjustSpeed, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToAdjustSpeed, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCruiseSpeedMultiplier, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCruiseSpeedMultiplier, PsoDataType.Float, 120, 0, 0) - ); - case (MetaName)3985328803: - return new PsoStructureInfo((MetaName)3985328803, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Collision, PsoDataType.Structure, 8, 0, (MetaName)1883924946) - ); - case (MetaName)1883924946: - return new PsoStructureInfo((MetaName)1883924946, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)2241187664, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)3879165256, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo((MetaName)4154217054, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinLength, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxLength, PsoDataType.Float, 24, 0, 0) - ); - case (MetaName)999261493: - return new PsoStructureInfo((MetaName)999261493, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Probe, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.ProbeResults, PsoDataType.Bool, 10, 0, 0), - new PsoStructureEntryInfo((MetaName)2932215080, PsoDataType.Bool, 11, 0, 0), - new PsoStructureEntryInfo((MetaName)1537468920, PsoDataType.Bool, 12, 0, 0) - ); - case MetaName.CTaskVehicleBlockBrakeInFront__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleBlockBrakeInFront__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeAheadForGetInPosition, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOffsetForGetInPosition, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAheadForBrake, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeAheadForBrakeOnWideRoads, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForBrake, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.FutureDistanceForMinSteerAngle, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.FutureDistanceForMaxSteerAngle, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToUseHandBrake, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToClampCruiseSpeed, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToClampCruiseSpeed, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCruiseSpeedWhenClamped, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.CTaskVehicleBlockBackAndForth__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleBlockBackAndForth__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ThrottleMultiplier, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskVehicleFlee__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleFlee__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ChancesForSwerve, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForSwerve, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToSwerve, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToSwerve, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesForHesitate, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForHesitate, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToHesitate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToHesitate, PsoDataType.Float, 44, 0, 0) - ); - case MetaName.CTaskVehicleCruiseBoat__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleCruiseBoat__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fTimeToPickNewPoint, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fDistToPickNewPoint, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fDistSearch, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskVehicleDeadDriver__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleDeadDriver__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SwerveTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.SteerAngleControl, PsoDataType.Enum, 20, 0, (MetaName)888350649), - new PsoStructureEntryInfo(MetaName.MinSteerAngle, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSteerAngle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ThrottleControl, PsoDataType.Enum, 32, 0, (MetaName)2055586340), - new PsoStructureEntryInfo(MetaName.MinThrottle, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxThrottle, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.BrakeControl, PsoDataType.Enum, 44, 0, (MetaName)3374036042), - new PsoStructureEntryInfo(MetaName.MinBrake, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBrake, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.HandBrakeControl, PsoDataType.Enum, 56, 0, (MetaName)4001255574) - ); - case MetaName.CTaskVehicleFleeBoat__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleFleeBoat__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.FleeDistance, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskVehicleCrash__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleCrash__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForWreck, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskVehicleGoToPointWithAvoidanceAutomobile__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleGoToPointWithAvoidanceAutomobile__Tunables, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TailgateDistanceMax, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TailgateIdealDistanceMin, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TailgateIdealDistanceMax, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.TailgateSpeedMultiplierMin, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TailgateSpeedMultiplierMax, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.TailgateVelocityMin, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ChanceOfPedSeeingCarFromBehind, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForAvoid, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForAvoid, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForAvoid, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForAvoid, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceForAvoidDirected, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForAvoidDirected, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceForAvoidDirected, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForAvoidDirected, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAbsDotForAvoidDirected, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForBrace, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForDive, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToConsiderDangerousDriving, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MultiplierForDangerousDriving, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToSideOnPavement, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToSideOnPavement, PsoDataType.Float, 100, 0, 0) - ); - case MetaName.CTaskVehicleGoToBoat__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleGoToBoat__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SlowdownDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.RouteArrivalDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.RouteLookAheadDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskVehicleGoToHelicopter__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleGoToHelicopter__Tunables, 0, 0, 152, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.slowDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.maxCruiseSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.maxPitchRoll, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.maxThrottle, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.leanKp, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.leanKi, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.leanKd, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKp, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKi, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKd, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKp, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKi, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKd, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.whiskerForwardTestDistance, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.whiskerForwardSpeedScale, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.whiskerLateralTestDistance, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.whiskerVerticalTestDistance, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.whiskerTestAngle, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.avoidHeadingChangeSpeed, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.avoidHeadingJump, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.avoidPitchChangeSpeed, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.avoidPitchJump, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.avoidLockDuration, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)2436197334, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)1438517312, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)444775360, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)3623227512, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3009403254, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.numHeightmapFutureSamples, PsoDataType.SInt, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.futureHeightmapSampleTime, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceXYToUseHeightMapAvoidance, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.TimesliceMinDistToTarget, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.TimesliceTimeAfterAvoidanceMs, PsoDataType.UInt, 144, 0, 0) - ); - case MetaName.CTaskVehicleGoToPlane__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleGoToPlane__Tunables, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.numFutureSamples, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.futureSampleTime, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.maxDesiredAngleYawDegrees, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.maxDesiredAnglePitchDegrees, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.maxDesiredAngleRollDegrees, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.angleToTargetDegreesToNotUseMinRadius, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.minMinDistanceForRollComputation, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.maxMinDistanceForRollComputation, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.maxYaw, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.maxPitch, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.maxRoll, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.maxThrottle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKp, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKi, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.yawKd, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.pitchKp, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.pitchKi, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.pitchKd, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.rollKp, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.rollKi, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.rollKd, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKp, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKi, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.throttleKd, PsoDataType.Float, 108, 0, 0) - ); - case MetaName.CTaskVehicleLandPlane__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleLandPlane__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeOnGroundToDrive, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.HeightToStartLanding, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.LandSlopeNoseUpMin, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.LandSlopeNoseUpMax, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskVehicleMissionBase__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleMissionBase__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToKeepEngineAndLightsOnWhileParked, PsoDataType.UInt, 16, 0, 0) - ); - case MetaName.CTaskVehicleParkNew__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleParkNew__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ParkingSpaceBlockedWaitTimePerAttempt, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ParkingSpaceBlockedMaxAttempts, PsoDataType.UByte, 20, 0, 0) - ); - case MetaName.CTaskVehiclePlaneChase__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehiclePlaneChase__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskVehiclePullAlongside__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehiclePullAlongside__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.OverlapSpeedMultiplier, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedDifference, PsoDataType.Float, 28, 0, 0) - ); - case MetaName.CTaskVehiclePursue__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehiclePursue__Tunables, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DriftX, PsoDataType.Structure, 16, 0, (MetaName)42267357), - new PsoStructureEntryInfo(MetaName.DriftY, PsoDataType.Structure, 40, 0, (MetaName)42267357), - new PsoStructureEntryInfo(MetaName.TimeToLookBehind, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToLookBehind, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedDifferenceForMinDistanceToStartMatchingSpeed, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedDifferenceForMaxDistanceToStartMatchingSpeed, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToStartMatchingSpeed, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToStartMatchingSpeed, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForBackOff, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.DotToClampSpeedToMinimum, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.DotToClampSpeedToMaximum, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.SpeedForMinimumDot, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenLineOfSightChecks, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForStraightLineModeAlways, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceForStraightLineModeIfLos, PsoDataType.Float, 112, 0, 0) - ); - case (MetaName)42267357: - return new PsoStructureInfo((MetaName)42267357, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.MinValueForCorrection, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxValueForCorrection, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskVehicleRam__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleRam__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BackOffTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBackOffDistance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxBackOffDistance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMinBackOffDistance, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMaxBackOffDistance, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskVehicleShotTire__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleShotTire__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeInSwerve, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedInSwerve, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToApplyTorque, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDotToApplyTorque, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.TorqueMultiplier, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.CTaskVehicleSpinOut__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleSpinOut__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BumperOverlapForMaxSpeed, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.BumperOverlapForMinSpeed, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.CatchUpSpeed, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BumperOverlapToBeInPosition, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSidePaddingForTurn, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TurnTime, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.InvMassScale, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.CPrioritizedClipSetRequestManager__Tunables: - return new PsoStructureInfo(MetaName.CPrioritizedClipSetRequestManager__Tunables, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.RenderDebugDraw, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.vScroll, PsoDataType.Float2, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fIndent, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxNumRequestsPerContext, PsoDataType.SInt, 32, 0, 0) - ); - case MetaName.CVehicleClipRequestHelper__Tunables: - return new PsoStructureInfo(MetaName.CVehicleClipRequestHelper__Tunables, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToScanForNearbyVehicle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToScanForNearbyVehicle, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistUpdateFrequency, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistUpdateFrequency, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistPercentageToScaleScanArc, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistScanArc, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistScanArc, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableVehicleDependencies, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableStreamedVehicleAnimRequestHelper, PsoDataType.Bool, 45, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableStreamedEntryAnims, PsoDataType.Bool, 46, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableStreamedInVehicleAnims, PsoDataType.Bool, 47, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableStreamedEntryVariationAnims, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.StreamConnectedSeatAnims, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo(MetaName.StreamInVehicleAndEntryAnimsTogether, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo(MetaName.StreamEntryAndInVehicleAnimsTogether, PsoDataType.Bool, 51, 0, 0) - ); - case MetaName.CTaskInVehicleBasic__Tunables: - return new PsoStructureInfo(MetaName.CTaskInVehicleBasic__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.fSecondsInAirBeforePassengerComment, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.CTaskPlayerDrive__Tunables: - return new PsoStructureInfo(MetaName.CTaskPlayerDrive__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.StealthNoisePeriodMS, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthSpeedThresholdLow, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthSpeedThresholdHigh, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.StealthVehicleTypeFactorBicycles, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPlayerJumpOutSpeedBike, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPlayerJumpOutSpeedCar, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenAddingDangerousVehicleEvents, PsoDataType.Float, 40, 0, 0) - ); - case MetaName.CTaskCarReactToVehicleCollision__Tunables: - return new PsoStructureInfo(MetaName.CTaskCarReactToVehicleCollision__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.SlowDown, PsoDataType.Structure, 16, 0, (MetaName)3933935552), - new PsoStructureEntryInfo(MetaName.MaxDamageToIgnore, PsoDataType.Float, 56, 0, 0) - ); - case (MetaName)3933935552: - return new PsoStructureInfo((MetaName)3933935552, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.MinTimeToReact, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToReact, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxCruiseSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToHonk, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToHonkHeldDown, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ChancesToFlipOff, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTime, PsoDataType.Float, 36, 0, 0) - ); - case MetaName.CTaskEnterVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskEnterVehicle__Tunables, 0, 0, 408, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.UseCombatEntryForAiJack, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableJackRateOverride, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableDoorHandleArmIk, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableBikeHandleArmIk, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableSeatBoneArmIk, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTagSyncIntoAlign, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableMoverFixups, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableBikePickPullUpOffsetScale, PsoDataType.Bool, 23, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableNewBikeEntry, PsoDataType.Bool, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ForcedDoorHandleArmIk, PsoDataType.Bool, 25, 0, 0), - new PsoStructureEntryInfo(MetaName.IgnoreRotationBlend, PsoDataType.Bool, 26, 0, 0), - new PsoStructureEntryInfo(MetaName.EnableBikePickUpAlign, PsoDataType.Bool, 27, 0, 0), - new PsoStructureEntryInfo((MetaName)192421777, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)509809270, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.BikePickUpAlignBlendDuration, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.GetInRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinMagForBikeToBeOnSide, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DistanceToEvaluateDoors, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendDuration, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.NetworkBlendDurationOpenDoorCombat, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpenSteps, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpen, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpenCombat, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorClosed, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.DistToEntryToAllowForcedActionMode, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.VaultDepth, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.VaultHorizClearance, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.VaultVertClearance, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseStart, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseEnd, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseStart, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseEnd, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseStart, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseEnd, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseStart, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseEnd, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo((MetaName)3408785399, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoor, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoorCombat, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoorPlayer, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoor, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoorCombat, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoorPlayer, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackRate, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeEnterForce, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleEnterForce, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.FastEnterExitRate, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRearDoorOpenRatio, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInitialOutside, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorOutside, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOscillationDisplacementOutside, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInitialInside, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInside, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOscillationDisplacementInside, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeEnterLeanAngleOvershootAmt, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeEnterLeanAngleOvershootRate, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToCheckEntryCollisionWhenIgnoring, PsoDataType.Float, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.CombatEntryBlendDuration, PsoDataType.Float, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToReactToJackForGoToDoor, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeWarpSP, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeWarpMP, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeSkippingCloseDoor, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStreamShuffleClipSetInBeforeWarp, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.ClimbAlignTolerance, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenDoorChecks, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.UseSlowInOut, PsoDataType.Bool, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.OpenDoorBlendDurationFromNormalAlign, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.OpenDoorBlendDurationFromOnVehicleAlign, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.OpenDoorToJackBlendDuration, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.GroupMemberWaitMinTime, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.GroupMemberSlowDownDistance, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.GroupMemberWalkCloseDistance, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.GroupMemberWaitDistance, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.SecondsBeforeWarpToLeader, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo((MetaName)119275101, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo((MetaName)2217815195, PsoDataType.UInt, 312, 0, 0), - new PsoStructureEntryInfo(MetaName.DurationHeldDownEnterButtonToJackFriendly, PsoDataType.UInt, 316, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackAlivePedFromOutsideClipId, PsoDataType.String, 320, 7, 0), - new PsoStructureEntryInfo((MetaName)3431653792, PsoDataType.String, 324, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromOutsideClipId, PsoDataType.String, 328, 7, 0), - new PsoStructureEntryInfo((MetaName)1983954745, PsoDataType.String, 332, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackAlivePedFromWaterClipId, PsoDataType.String, 336, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromWaterClipId, PsoDataType.String, 340, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackPedFromOnVehicleClipId, PsoDataType.String, 344, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromOnVehicleClipId, PsoDataType.String, 348, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackPedOnVehicleIntoWaterClipId, PsoDataType.String, 352, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedOnVehicleIntoWaterClipId, PsoDataType.String, 356, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultClimbUpClipId, PsoDataType.String, 360, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultClimbUpNoDoorClipId, PsoDataType.String, 364, 7, 0), - new PsoStructureEntryInfo((MetaName)1857752806, PsoDataType.String, 368, 7, 0), - new PsoStructureEntryInfo((MetaName)536807372, PsoDataType.String, 372, 7, 0), - new PsoStructureEntryInfo((MetaName)298521545, PsoDataType.String, 376, 7, 0), - new PsoStructureEntryInfo((MetaName)3045129247, PsoDataType.String, 380, 7, 0), - new PsoStructureEntryInfo((MetaName)2509236171, PsoDataType.String, 384, 7, 0), - new PsoStructureEntryInfo((MetaName)939217889, PsoDataType.String, 388, 7, 0), - new PsoStructureEntryInfo((MetaName)3905015036, PsoDataType.String, 392, 7, 0), - new PsoStructureEntryInfo((MetaName)3309036906, PsoDataType.String, 396, 7, 0), - new PsoStructureEntryInfo((MetaName)3854657159, PsoDataType.Bool, 400, 0, 0), - new PsoStructureEntryInfo((MetaName)1405627810, PsoDataType.Bool, 401, 0, 0), - new PsoStructureEntryInfo((MetaName)2067860370, PsoDataType.Float, 404, 0, 0) - ); - case MetaName.CTaskEnterVehicleAlign__Tunables: - return new PsoStructureInfo(MetaName.CTaskEnterVehicleAlign__Tunables, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.UseAttachDuringAlign, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.RenderDebugToTTY, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.ApplyRotationScaling, PsoDataType.Bool, 18, 0, 0), - new PsoStructureEntryInfo(MetaName.ApplyTranslationScaling, PsoDataType.Bool, 19, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableRotationOvershootCheck, PsoDataType.Bool, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableTranslationOvershootCheck, PsoDataType.Bool, 21, 0, 0), - new PsoStructureEntryInfo(MetaName.ReverseLeftFootAlignAnims, PsoDataType.Bool, 22, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceStandEnterOnly, PsoDataType.Bool, 23, 0, 0), - new PsoStructureEntryInfo(MetaName.TranslationChangeRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.RotationChangeRate, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultAlignRate, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.FastAlignRate, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.CombatAlignRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ActionCombatAlignRate, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.StandAlignMaxDist, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.AlignSuccessMaxDist, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultAlignStartFixupPhase, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultAlignEndFixupPhase, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadiusForOrientatedAlignWalk, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.TargetRadiusForOrientatedAlignRun, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRotationalSpeedScale, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRotationalSpeed, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTranslationalScale, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTranslationalScale, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTranslationalStandSpeed, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTranslationalMoveSpeed, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.StdVehicleMinPhaseToStartRotFixup, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeVehicleMinPhaseToStartRotFixup, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.VaultExtraZGroundTest, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSqdDistToSetPos, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistAwayFromEntryPointToConsiderFinished, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPedFwdToEntryDotToClampInitialOrientation, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistToAlwaysClampInitialOrientation, PsoDataType.Float, 128, 0, 0) - ); - case MetaName.CTaskOpenVehicleDoorFromOutside__Tunables: - return new PsoStructureInfo(MetaName.CTaskOpenVehicleDoorFromOutside__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EnableOpenDoorHandIk, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorStartPhase, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorEndPhase, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorStartIkPhase, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorEndIkPhase, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendWeightToUseHighClipEvents, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHandleHeightDiffVan, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHandleHeightDiffVan, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHandleHeightDiff, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultOpenDoorClipId, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo(MetaName.HighOpenDoorClipId, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo(MetaName.CombatOpenDoorClipId, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultTryLockedDoorClipId, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultForcedEntryClipId, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo((MetaName)26377711, PsoDataType.String, 76, 7, 0) - ); - case MetaName.CTaskCloseVehicleDoorFromInside__Tunables: - return new PsoStructureInfo(MetaName.CTaskCloseVehicleDoorFromInside__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.EnableCloseDoorHandIk, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultCloseDoorStartPhase, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultCloseDoorEndPhase, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultCloseDoorStartIkPhase, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultCloseDoorEndIkPhase, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinBlendWeightToUseFarClipEvents, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.CloseDoorForceMultiplier, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.VehicleSpeedToAbortCloseDoor, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.PedTestXOffset, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.PedTestYOffset, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.PedTestZStartOffset, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.PedTestZOffset, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.PedTestRadius, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinOpenDoorRatioToUseArmIk, PsoDataType.Float, 68, 0, 0) - ); - case MetaName.CTaskEnterVehicleSeat__Tunables: - return new PsoStructureInfo(MetaName.CTaskEnterVehicleSeat__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinVelocityToRagdollPed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVelocityToEnterBike, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetInClipId, PsoDataType.String, 24, 7, 0), - new PsoStructureEntryInfo(MetaName.GetOnQuickClipId, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo(MetaName.GetInFromWaterClipId, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.GetInStandOnClipId, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.GetInCombatClipId, PsoDataType.String, 40, 7, 0) - ); - case MetaName.CTaskExitVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskExitVehicle__Tunables, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TimeSinceLastSpottedToLeaveEngineOn, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.BeJackedBlendInDuration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleBlendInDuration, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.ThroughWindScreenBlendInDuration, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleBlendOutDuration, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleUnderWaterBlendOutDuration, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitVehicleAttempToFireBlendOutDuration, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeExitVehicleBlendOutDuration, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.LeaderExitVehicleDistance, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitProbeDistance, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.ExitDistance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.RearExitSideOffset, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelocityToRagdollPed, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToReserveComponentBeforeWarp, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraOffsetForGroundCheck, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.JumpOutofSubNeutralBuoyancyTime, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultClimbDownClipId, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultClimbDownNoDoorClipId, PsoDataType.String, 84, 7, 0) - ); - case MetaName.CTaskExitVehicleSeat__Tunables: - return new PsoStructureInfo(MetaName.CTaskExitVehicleSeat__Tunables, 0, 0, 232, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)3909498748, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.AdditionalWindscreenRagdollForceFwd, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.AdditionalWindscreenRagdollForceUp, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.SkyDiveProbeDistance, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirProbeDistance, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.ArrestProbeDistance, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.InWaterExitDepth, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.InWaterExitProbeLength, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeVelocityToUseAnimatedJumpOff, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleVelocityToUseAnimatedJumpOff, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutBlendDuration, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutNoWindBlendDuration, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeForArrestBreakout, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.ThroughWindscreenDamagePlayer, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.ThroughWindscreenDamageAi, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultCrashExitOnSideClipId, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedFromOutsideClipId, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo((MetaName)2529144140, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedFromOutsideClipId, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo((MetaName)3459414413, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedFromWaterClipId, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedFromWaterClipId, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedOnVehicleClipId, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedOnVehicleClipId, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedOnVehicleIntoWaterClipId, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedOnVehicleIntoWaterClipId, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultFleeExitClipId, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutClipId, PsoDataType.String, 124, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutToWaterClipId, PsoDataType.String, 128, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutOnToVehicleClipId, PsoDataType.String, 132, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultGetOutNoWingId, PsoDataType.String, 136, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultJumpOutClipId, PsoDataType.String, 140, 7, 0), - new PsoStructureEntryInfo(MetaName.DeadFallOutClipId, PsoDataType.String, 144, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)609992288), - new PsoStructureEntryInfo(MetaName.ExitToAimClipSets, PsoDataType.Array, 152, 0, (MetaName)34), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3736014569), - new PsoStructureEntryInfo(MetaName.ExitToAimVehicleInfos, PsoDataType.Array, 168, 0, (MetaName)36), - new PsoStructureEntryInfo(MetaName.BikeExitForce, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.RagdollIntoWaterVelocity, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundFixupHeight, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundFixupHeightLarge, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundFixupHeightLargeOffset, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundFixupHeightBoatInWaterInitial, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundFixupHeightBoatInWater, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.ExtraWaterZGroundFixup, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeExitExtraRotationSpeed, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.FleeExitExtraTranslationSpeed, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo((MetaName)1345368814, PsoDataType.String, 224, 7, 0), - new PsoStructureEntryInfo((MetaName)1495472466, PsoDataType.String, 228, 7, 0) - ); - case (MetaName)609992288: - return new PsoStructureInfo((MetaName)609992288, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case (MetaName)3736014569: - return new PsoStructureInfo((MetaName)3736014569, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1118518303), - new PsoStructureEntryInfo(MetaName.Seats, PsoDataType.Array, 16, 0, (MetaName)1) - ); - case (MetaName)1118518303: - return new PsoStructureInfo((MetaName)1118518303, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ExitToAimClipsName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.OneHandedClipSetName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.TwoHandedClipSetName, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo(MetaName.SeatPosition, PsoDataType.Enum, 20, 0, (MetaName)894416699) - ); - case MetaName.CTaskReactToBeingAskedToLeaveVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskReactToBeingAskedToLeaveVehicle__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToWatchVehicle, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToWatchVehicle, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskRideTrain__Tunables: - return new PsoStructureInfo(MetaName.CTaskRideTrain__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayForGetOff, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayForGetOff, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxWaitSeconds, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskTrainBase__Tunables: - return new PsoStructureInfo(MetaName.CTaskTrainBase__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskTryToGrabVehicleDoor__Tunables: - return new PsoStructureInfo(MetaName.CTaskTryToGrabVehicleDoor__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinGrabTime, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxGrabTime, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHandToHandleDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CTaskVehicleFSM__Tunables: - return new PsoStructureInfo(MetaName.CTaskVehicleFSM__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.AllowEntryToMPWarpInSeats, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ForceStreamingFailure, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.PushAngleDotTolerance, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.TowardsDoorPushAngleDotTolerance, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DeadZoneAnyInputDirection, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DisallowGroundProbeVelocity, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPedSpeedToActivateRagdoll, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPhysSpeedToActivateRagdoll, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHoverHeightDistToWarpIntoHeli, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToConsiderPedGoingToDoorPriority, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeToConsiderPedGoingToDoorPriority, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistToConsiderPedGoingToDoorPriority, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)1835160785, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)1964009554, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2552082535, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)3034610967, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeToConsiderEnterInputValid, PsoDataType.UInt, 76, 0, 0) - ); - case MetaName.CTaskMotionInVehicle__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionInVehicle__Tunables, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.DisableCloseDoor, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3306188437, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedForVehicleToBeConsideredStillSqr, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOut, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOutPlayerSP, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOutPlayerMP, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRateForInVehicleAnims, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRateForInVehicleAnims, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.HeavyBrakeYAcceleration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MinRatioForClosingDoor, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirZAccelTrigger, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirProbeDistance, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.InAirProbeForwardOffset, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitchDefault, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchDefault, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitchInAir, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchInAir, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultPitchSmoothingRate, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.BikePitchSmoothingRate, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.BikePitchSmoothingPassengerRate, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieAccelerateControlThreshold, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieMaxSpeedThreshold, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieUpDownControlThreshold, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieDesiredLeanAngleTol, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.StillAccTol, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.StillPitchAngleTol, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationSmoothing, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationSmoothingBike, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationScaleBike, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInCurrentStateForStill, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.AccelerationToStartLeaning, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.ZAccelerationToStartLeaning, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAccelerationForLean, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxXYAccelerationForLeanBike, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZAccelerationForLeanBike, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.StillDelayTime, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.ShuntAccelerateMag, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.ShuntAccelerateMagBike, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInShuntStateBeforeRestart, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAbsThrottleForCloseDoor, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVehSpeedToConsiderClosingDoor, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDoorSpeedToConsiderClosingDoor, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVehVelocityToGoThroughWindscreen, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVehVelocityToGoThroughWindscreenMP, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxZComponentForCollisionNormal, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeStreamInVehicleClipSetBeforeStartingEngine, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo((MetaName)599372255, PsoDataType.UInt, 200, 0, 0) - ); - case MetaName.CTaskMotionInAutomobile__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionInAutomobile__Tunables, 0, 0, 536, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.TestLowLodIdle, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3645563068, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2286839301, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInHornState, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxVelocityForSitIdles, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSteeringAngleForSitIdles, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MinCentredSteeringAngleTimeForSitIdles, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingRateMin, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingRateMax, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingAcc, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleMinAccAngle, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleMaxAccAngle, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftRightStickInputSmoothingRate, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.LeftRightStickInputMin, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanForwardsAngleSmoothingRate, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.UpDownStickInputSmoothingRate, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.UpDownStickInputMin, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.ZAccForLowImpact, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.ZAccForMedImpact, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.ZAccForHighImpact, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.UseLegIkOnBikes, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.LargeVerticalAccelerationDelta, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.NumFramesToPersistLargeVerticalAcceleration, PsoDataType.SInt, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.LowLodIdleClipSetId, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.SeatDisplacementSmoothingRateDriver, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.SeatDisplacementSmoothingRatePassenger, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)3038905403, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.StartEngineForce, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlope, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlope, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlopeBalance, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlopeBalance, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeInWheelieToEnforceMinPitch, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchWheelieBalance, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchWheelieBalance, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchWheelieBegin, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowFastSpeedThreshold, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlowSpeed, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlowSpeed, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchFastSpeed, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchFastSpeed, PsoDataType.Float, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowApproachRate, PsoDataType.Float, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.FastApproachRate, PsoDataType.Float, 184, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieApproachRate, PsoDataType.Float, 188, 0, 0), - new PsoStructureEntryInfo(MetaName.NewLeanSteerApproachRate, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenCloseDoorAttempts, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo(MetaName.ShuntDamageMultiplierAI, PsoDataType.Float, 200, 0, 0), - new PsoStructureEntryInfo(MetaName.ShuntDamageMultiplierPlayer, PsoDataType.Float, 204, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenToApplyDamageAI, PsoDataType.Float, 208, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageTakenToApplyDamagePlayer, PsoDataType.Float, 212, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInTaskToCheckForDamage, PsoDataType.Float, 216, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDamageToCheckForRandomDeath, PsoDataType.Float, 220, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDamageToCheckForRandomDeath, PsoDataType.Float, 224, 0, 0), - new PsoStructureEntryInfo(MetaName.MinHeavyCrashDeathChance, PsoDataType.Float, 228, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxHeavyCrashDeathChance, PsoDataType.Float, 232, 0, 0), - new PsoStructureEntryInfo(MetaName.SteeringDeadZoneCentreTimeMS, PsoDataType.UInt, 236, 0, 0), - new PsoStructureEntryInfo(MetaName.SteeringDeadZoneTimeMS, PsoDataType.UInt, 240, 0, 0), - new PsoStructureEntryInfo(MetaName.SteeringDeadZone, PsoDataType.Float, 244, 0, 0), - new PsoStructureEntryInfo(MetaName.SteeringChangeToStartProcessMoveSignals, PsoDataType.Float, 248, 0, 0), - new PsoStructureEntryInfo(MetaName.SteeringChangeToStopProcessMoveSignals, PsoDataType.Float, 252, 0, 0), - new PsoStructureEntryInfo(MetaName.SeatBlendLinSpeed, PsoDataType.Float, 256, 0, 0), - new PsoStructureEntryInfo(MetaName.SeatBlendAngSpeed, PsoDataType.Float, 260, 0, 0), - new PsoStructureEntryInfo(MetaName.HoldLegOutVelocity, PsoDataType.Float, 264, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelStillStart, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.MinVelStillStop, PsoDataType.Float, 272, 0, 0), - new PsoStructureEntryInfo(MetaName.ForcedLegUpVelocity, PsoDataType.Float, 276, 0, 0), - new PsoStructureEntryInfo(MetaName.BurnOutBlendInTol, PsoDataType.Float, 280, 0, 0), - new PsoStructureEntryInfo(MetaName.BurnOutBlendInSpeed, PsoDataType.Float, 284, 0, 0), - new PsoStructureEntryInfo(MetaName.BurnOutBlendOutSpeed, PsoDataType.Float, 288, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeInAirDriveToStandUpTimeMin, PsoDataType.Float, 292, 0, 0), - new PsoStructureEntryInfo(MetaName.BikeInAirDriveToStandUpTimeMax, PsoDataType.Float, 296, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSpeedToBlendInDriveFastFacial, PsoDataType.Float, 300, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDisplacementScale, PsoDataType.Float, 304, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplacementScaleApproachRateIn, PsoDataType.Float, 308, 0, 0), - new PsoStructureEntryInfo(MetaName.DisplacementScaleApproachRateOut, PsoDataType.Float, 312, 0, 0), - new PsoStructureEntryInfo((MetaName)640640576, PsoDataType.Float, 316, 0, 0), - new PsoStructureEntryInfo((MetaName)445721091, PsoDataType.Float, 320, 0, 0), - new PsoStructureEntryInfo((MetaName)2001571571, PsoDataType.Float, 324, 0, 0), - new PsoStructureEntryInfo((MetaName)1295618163, PsoDataType.Float, 328, 0, 0), - new PsoStructureEntryInfo((MetaName)622968896, PsoDataType.Float, 332, 0, 0), - new PsoStructureEntryInfo((MetaName)2029080904, PsoDataType.Float, 336, 0, 0), - new PsoStructureEntryInfo((MetaName)2895820001, PsoDataType.Float, 340, 0, 0), - new PsoStructureEntryInfo((MetaName)3604323696, PsoDataType.Float, 344, 0, 0), - new PsoStructureEntryInfo((MetaName)2175428814, PsoDataType.Float, 348, 0, 0), - new PsoStructureEntryInfo((MetaName)346108670, PsoDataType.Float, 352, 0, 0), - new PsoStructureEntryInfo((MetaName)3123171906, PsoDataType.Float, 356, 0, 0), - new PsoStructureEntryInfo((MetaName)3193879405, PsoDataType.Float, 360, 0, 0), - new PsoStructureEntryInfo((MetaName)1771118662, PsoDataType.Float, 364, 0, 0), - new PsoStructureEntryInfo((MetaName)1104842114, PsoDataType.Float, 368, 0, 0), - new PsoStructureEntryInfo((MetaName)2239621028, PsoDataType.UInt, 372, 0, 0), - new PsoStructureEntryInfo((MetaName)7898446, PsoDataType.UInt, 376, 0, 0), - new PsoStructureEntryInfo((MetaName)56684479, PsoDataType.UInt, 380, 0, 0), - new PsoStructureEntryInfo((MetaName)345487015, PsoDataType.UInt, 384, 0, 0), - new PsoStructureEntryInfo(MetaName.StartEngineClipId, PsoDataType.String, 388, 7, 0), - new PsoStructureEntryInfo((MetaName)2195918560, PsoDataType.String, 392, 7, 0), - new PsoStructureEntryInfo(MetaName.HotwireClipId, PsoDataType.String, 396, 7, 0), - new PsoStructureEntryInfo((MetaName)1348667163, PsoDataType.String, 400, 7, 0), - new PsoStructureEntryInfo(MetaName.PutOnHelmetClipId, PsoDataType.String, 404, 7, 0), - new PsoStructureEntryInfo((MetaName)1430534928, PsoDataType.String, 408, 7, 0), - new PsoStructureEntryInfo((MetaName)1851449258, PsoDataType.String, 412, 7, 0), - new PsoStructureEntryInfo((MetaName)2091354753, PsoDataType.String, 416, 7, 0), - new PsoStructureEntryInfo((MetaName)1023392893, PsoDataType.String, 420, 7, 0), - new PsoStructureEntryInfo((MetaName)2273702662, PsoDataType.String, 424, 7, 0), - new PsoStructureEntryInfo(MetaName.ChangeStationClipId, PsoDataType.String, 428, 7, 0), - new PsoStructureEntryInfo(MetaName.StillToSitClipId, PsoDataType.String, 432, 7, 0), - new PsoStructureEntryInfo(MetaName.SitToStillClipId, PsoDataType.String, 436, 7, 0), - new PsoStructureEntryInfo(MetaName.BurnOutClipId, PsoDataType.String, 440, 7, 0), - new PsoStructureEntryInfo((MetaName)1920935636, PsoDataType.String, 444, 7, 0), - new PsoStructureEntryInfo(MetaName.BikeHornClipId, PsoDataType.String, 448, 7, 0), - new PsoStructureEntryInfo((MetaName)4017603423, PsoDataType.String, 452, 7, 0), - new PsoStructureEntryInfo((MetaName)1797630730, PsoDataType.Float, 456, 0, 0), - new PsoStructureEntryInfo((MetaName)2658529211, PsoDataType.Float, 460, 0, 0), - new PsoStructureEntryInfo((MetaName)3474960988, PsoDataType.Float, 464, 0, 0), - new PsoStructureEntryInfo((MetaName)3061913457, PsoDataType.Float, 468, 0, 0), - new PsoStructureEntryInfo((MetaName)2713284751, PsoDataType.Float, 472, 0, 0), - new PsoStructureEntryInfo((MetaName)2044390676, PsoDataType.Float, 476, 0, 0), - new PsoStructureEntryInfo((MetaName)137806659, PsoDataType.Float, 480, 0, 0), - new PsoStructureEntryInfo((MetaName)402428981, PsoDataType.Float, 484, 0, 0), - new PsoStructureEntryInfo((MetaName)1039484179, PsoDataType.Float, 488, 0, 0), - new PsoStructureEntryInfo((MetaName)342194320, PsoDataType.Float, 492, 0, 0), - new PsoStructureEntryInfo((MetaName)2083391331, PsoDataType.Float, 496, 0, 0), - new PsoStructureEntryInfo((MetaName)2714021858, PsoDataType.Float, 500, 0, 0), - new PsoStructureEntryInfo((MetaName)2266547610, PsoDataType.Float, 504, 0, 0), - new PsoStructureEntryInfo((MetaName)1896779219, PsoDataType.Float, 508, 0, 0), - new PsoStructureEntryInfo((MetaName)1233910025, PsoDataType.Float, 512, 0, 0), - new PsoStructureEntryInfo((MetaName)1743777174, PsoDataType.Float, 516, 0, 0), - new PsoStructureEntryInfo((MetaName)868848233, PsoDataType.Float, 520, 0, 0), - new PsoStructureEntryInfo((MetaName)1182962200, PsoDataType.Float, 524, 0, 0), - new PsoStructureEntryInfo((MetaName)1798674235, PsoDataType.Float, 528, 0, 0), - new PsoStructureEntryInfo((MetaName)647907606, PsoDataType.Float, 532, 0, 0) - ); - case MetaName.CTaskMotionOnBicycle__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionOnBicycle__Tunables, 0, 0, 224, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.LeanAngleSmoothingRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.StillToSitPedalGearApproachRate, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.PedalGearApproachRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinXYVelForWantsToMove, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForStill, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedForStillReverse, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxThrottleForStill, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultPedalToFreewheelBlendDuration, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.SlowPedalToFreewheelBlendDuration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxRateForSlowBlendDuration, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.StillToSitLeanRate, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.StillToSitApproachRate, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.UpHillMinPitchToStandUp, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.DownHillMinPitchToStandUp, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInStandState, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1621924028, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.MinSprintResultToStand, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeSinceShiftedWeightForwardToAllowWheelie, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieShiftThreshold, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.MinPitchDefault, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchDefault, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlope, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlope, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.OnSlopeThreshold, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxJumpHeightForSmallImpact, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRateSlope, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRate, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRateSlow, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.SideZoneThreshold, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.ReturnZoneThreshold, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxYIntentionToUseSlowApproach, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeToStayUprightAfterImpact, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultSitToStandBlendDuration, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieSitToStandBlendDuration, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.WheelieStickPullBackMinIntention, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeSinceNotWantingToTrackStandToAllowStillTransition, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInSitToStillStateToReverse, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.PreventDirectTransitionToReverseFromSit, PsoDataType.Bool, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultSmallImpactCharClipId, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultImpactCharClipId, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultSmallImpactBikeClipId, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo(MetaName.DefaultImpactBikeClipId, PsoDataType.String, 180, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillSmallImpactCharClipId, PsoDataType.String, 184, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillImpactCharClipId, PsoDataType.String, 188, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillSmallImpactBikeClipId, PsoDataType.String, 192, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillImpactBikeClipId, PsoDataType.String, 196, 7, 0), - new PsoStructureEntryInfo(MetaName.SitToStillCharClipId, PsoDataType.String, 200, 7, 0), - new PsoStructureEntryInfo(MetaName.SitToStillBikeClipId, PsoDataType.String, 204, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandToStillLeftCharClipId, PsoDataType.String, 208, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandToStillLeftBikeClipId, PsoDataType.String, 212, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandToStillRightCharClipId, PsoDataType.String, 216, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandToStillRightBikeClipId, PsoDataType.String, 220, 7, 0) - ); - case MetaName.CTaskMotionOnBicycleController__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionOnBicycleController__Tunables, 0, 0, 184, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInStateToAllowTransitionFromFixieSkid, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeStillToTransitionToTrackStand, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInPedalState, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeInFreewheelState, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAiSpeedForStandingUp, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToTriggerTrackStandTransition, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxSpeedToTriggerFixieSkidTransition, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.CruiseDuckPrepLeftCharClipId, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.CruiseDuckPrepRightCharClipId, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.CruiseDuckPrepLeftBikeClipId, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo(MetaName.CruiseDuckPrepRightBikeClipId, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo(MetaName.FastDuckPrepLeftCharClipId, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo(MetaName.FastDuckPrepRightCharClipId, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.FastDuckPrepLeftBikeClipId, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.FastDuckPrepRightBikeClipId, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.LaunchLeftCharClipId, PsoDataType.String, 76, 7, 0), - new PsoStructureEntryInfo(MetaName.LaunchRightCharClipId, PsoDataType.String, 80, 7, 0), - new PsoStructureEntryInfo(MetaName.LaunchLeftBikeClipId, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.LaunchRightBikeClipId, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandLeftCharClipId, PsoDataType.String, 92, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandRightCharClipId, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandLeftBikeClipId, PsoDataType.String, 100, 7, 0), - new PsoStructureEntryInfo(MetaName.TrackStandRightBikeClipId, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidLeftCharClip0Id, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidLeftCharClip1Id, PsoDataType.String, 112, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidRightCharClip0Id, PsoDataType.String, 116, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidRightCharClip1Id, PsoDataType.String, 120, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidLeftBikeClip0Id, PsoDataType.String, 124, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidLeftBikeClip1Id, PsoDataType.String, 128, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidRightBikeClip0Id, PsoDataType.String, 132, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidRightBikeClip1Id, PsoDataType.String, 136, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceLeftCharClip1Id, PsoDataType.String, 140, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceRightCharClip1Id, PsoDataType.String, 144, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceLeftBikeClip1Id, PsoDataType.String, 148, 7, 0), - new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceRightBikeClip1Id, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo(MetaName.CruisePedalCharClipId, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo(MetaName.InAirFreeWheelCharClipId, PsoDataType.String, 160, 7, 0), - new PsoStructureEntryInfo(MetaName.InAirFreeWheelBikeClipId, PsoDataType.String, 164, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillInAirFreeWheelCharClipId, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo(MetaName.DownHillInAirFreeWheelBikeClipId, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo(MetaName.TuckFreeWheelToTrackStandRightCharClipId, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo(MetaName.TuckFreeWheelToTrackStandRightBikeClipId, PsoDataType.String, 180, 7, 0) - ); - case MetaName.CBikeLeanAngleHelper__Tunables: - return new PsoStructureInfo(MetaName.CBikeLeanAngleHelper__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.UseReturnOvershoot, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.UseInitialLeanForcing, PsoDataType.Bool, 17, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredLeanAngleTolToBringLegIn, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredSpeedToBringLegIn, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredLeanAngleRate, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredLeanAngleRateQuad, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanAngleReturnRate, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanAngleDefaultRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanAngleDefaultRatePassenger, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.DesiredOvershootLeanAngle, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.LeanAngleReturnedTol, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.HasStickInputThreshold, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.LeaningExtremeThreshold, PsoDataType.Float, 60, 0, 0) - ); - case MetaName.CTaskMotionInTurret__Tunables: - return new PsoStructureInfo(MetaName.CTaskMotionInTurret__Tunables, 0, 0, 248, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)4093217060, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)4102381397, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2540703340, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3512769803, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo((MetaName)171275597, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)2073783636, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)1235675432, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)2737439830, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)1027124968, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2183745831, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3114603561, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)943989780, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2556074717, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1811862646, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)216639291, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)1460193378, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)3098186043, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)1012095486, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)1934656831, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)2982819675, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)2624331049, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo((MetaName)1324859893, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo((MetaName)1057562451, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo((MetaName)1546988642, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo((MetaName)3067513344, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo((MetaName)1707713717, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo((MetaName)2395321832, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)1059545904, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)3062906436, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo((MetaName)2949666078, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo((MetaName)705780320, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo((MetaName)459162028, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo((MetaName)1797630730, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo((MetaName)1465756410, PsoDataType.String, 148, 7, 0), - new PsoStructureEntryInfo((MetaName)1144665981, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo((MetaName)790728667, PsoDataType.String, 156, 7, 0), - new PsoStructureEntryInfo((MetaName)2997429282, PsoDataType.String, 160, 7, 0), - new PsoStructureEntryInfo((MetaName)2148334725, PsoDataType.String, 164, 7, 0), - new PsoStructureEntryInfo((MetaName)356569692, PsoDataType.String, 168, 7, 0), - new PsoStructureEntryInfo((MetaName)2567235955, PsoDataType.String, 172, 7, 0), - new PsoStructureEntryInfo((MetaName)3042448153, PsoDataType.String, 176, 7, 0), - new PsoStructureEntryInfo(MetaName.TurnLeftSlowClipId, PsoDataType.String, 180, 7, 0), - new PsoStructureEntryInfo(MetaName.TurnLeftFastClipId, PsoDataType.String, 184, 7, 0), - new PsoStructureEntryInfo((MetaName)1206230540, PsoDataType.String, 188, 7, 0), - new PsoStructureEntryInfo((MetaName)3713053450, PsoDataType.String, 192, 7, 0), - new PsoStructureEntryInfo((MetaName)2463362878, PsoDataType.String, 196, 7, 0), - new PsoStructureEntryInfo((MetaName)3874294070, PsoDataType.String, 200, 7, 0), - new PsoStructureEntryInfo(MetaName.TurnRightSlowClipId, PsoDataType.String, 204, 7, 0), - new PsoStructureEntryInfo(MetaName.TurnRightFastClipId, PsoDataType.String, 208, 7, 0), - new PsoStructureEntryInfo((MetaName)1611862735, PsoDataType.String, 212, 7, 0), - new PsoStructureEntryInfo((MetaName)413072568, PsoDataType.String, 216, 7, 0), - new PsoStructureEntryInfo((MetaName)1114189303, PsoDataType.String, 220, 7, 0), - new PsoStructureEntryInfo((MetaName)531096295, PsoDataType.String, 224, 7, 0), - new PsoStructureEntryInfo((MetaName)2077576253, PsoDataType.String, 228, 7, 0), - new PsoStructureEntryInfo((MetaName)3278999439, PsoDataType.String, 232, 7, 0), - new PsoStructureEntryInfo((MetaName)4038706223, PsoDataType.String, 236, 7, 0), - new PsoStructureEntryInfo((MetaName)1558752243, PsoDataType.String, 240, 7, 0), - new PsoStructureEntryInfo((MetaName)4031618294, PsoDataType.String, 244, 7, 0) - ); - case MetaName.CWanted__Tunables: - return new PsoStructureInfo(MetaName.CWanted__Tunables, 0, 0, 2696, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.WantedClean, PsoDataType.Structure, 16, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.WantedLevel1, PsoDataType.Structure, 128, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.WantedLevel2, PsoDataType.Structure, 240, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.WantedLevel3, PsoDataType.Structure, 352, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.WantedLevel4, PsoDataType.Structure, 464, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.WantedLevel5, PsoDataType.Structure, 576, 0, MetaName.CWanted__Tunables__WantedLevel), - new PsoStructureEntryInfo(MetaName.Difficulty, PsoDataType.Structure, 688, 0, (MetaName)2685546187), - new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 2640, 0, (MetaName)1581603972), - new PsoStructureEntryInfo(MetaName.Timers, PsoDataType.Structure, 2656, 0, (MetaName)4245193745), - new PsoStructureEntryInfo(MetaName.MaxTimeTargetVehicleMoving, PsoDataType.UInt, 2672, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultAmnestyTime, PsoDataType.UInt, 2676, 0, 0), - new PsoStructureEntryInfo(MetaName.DefaultHiddenEvasionTimeReduction, PsoDataType.UInt, 2680, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialAreaTimeoutWhenSeen, PsoDataType.UInt, 2684, 0, 0), - new PsoStructureEntryInfo(MetaName.InitialAreaTimeoutWhenCrimeReported, PsoDataType.UInt, 2688, 0, 0), - new PsoStructureEntryInfo((MetaName)2940774268, PsoDataType.Float, 2692, 0, 0) - ); - case MetaName.CWanted__Tunables__WantedLevel: - return new PsoStructureInfo(MetaName.CWanted__Tunables__WantedLevel, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Difficulty, PsoDataType.Structure, 8, 0, (MetaName)3660423994) - ); - case (MetaName)3660423994: - return new PsoStructureInfo((MetaName)3660423994, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Calculation, PsoDataType.Structure, 8, 0, (MetaName)1037717481), - new PsoStructureEntryInfo(MetaName.Helis, PsoDataType.Structure, 72, 0, (MetaName)3986648608) - ); - case (MetaName)1037717481: - return new PsoStructureInfo((MetaName)1037717481, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.FromWantedLevel, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 16, 0, (MetaName)1310408174), - new PsoStructureEntryInfo(MetaName.Decay, PsoDataType.Structure, 40, 0, (MetaName)3442100148) - ); - case (MetaName)1310408174: - return new PsoStructureInfo((MetaName)1310408174, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.WantedLevel, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.LastSpottedDistance, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Randomness, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)3442100148: - return new PsoStructureInfo((MetaName)3442100148, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.TimeEvadingForMaxValue, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxValue, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableWhenOffMission, PsoDataType.Bool, 16, 0, 0) - ); - case (MetaName)3986648608: - return new PsoStructureInfo((MetaName)3986648608, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Refuel, PsoDataType.Structure, 8, 0, (MetaName)2123007699) - ); - case (MetaName)2123007699: - return new PsoStructureInfo((MetaName)2123007699, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBefore, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.Float, 16, 0, 0) - ); - case (MetaName)2685546187: - return new PsoStructureInfo((MetaName)2685546187, 0, 0, 1952, - new PsoStructureEntryInfo(MetaName.Spawning, PsoDataType.Structure, 8, 0, (MetaName)2145739988), - new PsoStructureEntryInfo(MetaName.Despawning, PsoDataType.Structure, 152, 0, (MetaName)1602748523), - new PsoStructureEntryInfo(MetaName.Peds, PsoDataType.Structure, 280, 0, (MetaName)3209293959), - new PsoStructureEntryInfo(MetaName.Dispatch, PsoDataType.Structure, 1920, 0, (MetaName)3840146119) - ); - case (MetaName)2145739988: - return new PsoStructureInfo((MetaName)2145739988, 0, 0, 144, - new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 8, 0, (MetaName)3801009121), - new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Structure, 96, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.ChancesToForceWaitInFront, PsoDataType.Structure, 120, 0, (MetaName)2528332511) - ); - case (MetaName)3801009121: - return new PsoStructureInfo((MetaName)3801009121, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)2379615087) - ); - case (MetaName)2379615087: - return new PsoStructureInfo((MetaName)2379615087, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Distance, PsoDataType.Structure, 8, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.Direction, PsoDataType.Structure, 32, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.Randomness, PsoDataType.Structure, 56, 0, (MetaName)2528332511) - ); - case (MetaName)2528332511: - return new PsoStructureInfo((MetaName)2528332511, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 20, 0, 0) - ); - case (MetaName)1602748523: - return new PsoStructureInfo((MetaName)1602748523, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.MaxFacingThreshold, PsoDataType.Structure, 8, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.MaxMovingThreshold, PsoDataType.Structure, 32, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.MinDistanceToBeConsideredLaggingBehind, PsoDataType.Structure, 56, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.MinDistanceToCheckClumped, PsoDataType.Structure, 80, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.MaxDistanceToBeConsideredClumped, PsoDataType.Structure, 104, 0, (MetaName)2528332511) - ); - case (MetaName)3209293959: - return new PsoStructureInfo((MetaName)3209293959, 0, 0, 1640, - new PsoStructureEntryInfo(MetaName.Cops, PsoDataType.Structure, 8, 0, (MetaName)2022711333), - new PsoStructureEntryInfo(MetaName.Swat, PsoDataType.Structure, 552, 0, (MetaName)2022711333), - new PsoStructureEntryInfo(MetaName.Army, PsoDataType.Structure, 1096, 0, (MetaName)2022711333) - ); - case (MetaName)2022711333: - return new PsoStructureInfo((MetaName)2022711333, 0, 0, 544, - new PsoStructureEntryInfo(MetaName.Situations, PsoDataType.Structure, 8, 0, (MetaName)1181208064), - new PsoStructureEntryInfo(MetaName.AutomobileSpeedModifier, PsoDataType.Structure, 496, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.HeliSpeedModifier, PsoDataType.Structure, 520, 0, (MetaName)2528332511) - ); - case (MetaName)1181208064: - return new PsoStructureInfo((MetaName)1181208064, 0, 0, 488, - new PsoStructureEntryInfo(MetaName.Default, PsoDataType.Structure, 8, 0, (MetaName)3795144262), - new PsoStructureEntryInfo(MetaName.InVehicle, PsoDataType.Structure, 128, 0, (MetaName)3795144262), - new PsoStructureEntryInfo(MetaName.InHeli, PsoDataType.Structure, 248, 0, (MetaName)3795144262), - new PsoStructureEntryInfo(MetaName.InBoat, PsoDataType.Structure, 368, 0, (MetaName)3795144262) - ); - case (MetaName)3795144262: - return new PsoStructureInfo((MetaName)3795144262, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.SensesRange, PsoDataType.Structure, 8, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.IdentificationRange, PsoDataType.Structure, 32, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.ShootRateModifier, PsoDataType.Structure, 56, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.WeaponAccuracy, PsoDataType.Structure, 80, 0, (MetaName)2528332511), - new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForEvasiveMovement, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForOffScreen, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForAimedAt, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinForDrivebys, PsoDataType.Float, 116, 0, 0) - ); - case (MetaName)3840146119: - return new PsoStructureInfo((MetaName)3840146119, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttemptsModifier, PsoDataType.Structure, 8, 0, (MetaName)2528332511) - ); - case (MetaName)1581603972: - return new PsoStructureInfo((MetaName)1581603972, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.Witnesses, PsoDataType.Bool, 9, 0, 0), - new PsoStructureEntryInfo(MetaName.Crimes, PsoDataType.Bool, 10, 0, 0) - ); - case (MetaName)4245193745: - return new PsoStructureInfo((MetaName)4245193745, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.TimeBetweenDifficultyUpdates, PsoDataType.Float, 8, 0, 0) - ); - case MetaName.CEventGunAimedAt__Tunables: - return new PsoStructureInfo(MetaName.CEventGunAimedAt__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CEventGunShot__Tunables: - return new PsoStructureInfo(MetaName.CEventGunShot__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.GunShotThresholdDistance, PsoDataType.Float, 24, 0, 0) - ); - case MetaName.CEventMeleeAction__Tunables: - return new PsoStructureInfo(MetaName.CEventMeleeAction__Tunables, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.CTaskAimAndThrowProjectile__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimAndThrowProjectile__Tunables, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.bEnableGaitAdditive, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinHoldThrowPitch, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxRandomExplosionTime, PsoDataType.UInt, 24, 0, 0) - ); - case MetaName.CTaskSwapWeapon__Tunables: - return new PsoStructureInfo(MetaName.CTaskSwapWeapon__Tunables, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.OnFootClipRate, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.OnFootBlendInDuration, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.LowCoverClipRate, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.LowCoverBlendInDuration, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.HighCoverClipRate, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.HighCoverBlendInDuration, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.ActionClipRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.ActionBlendInDuration, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.BlendOutDuration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2181619027, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DebugSwapInstantly, PsoDataType.Bool, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.SkipHolsterWeapon, PsoDataType.Bool, 57, 0, 0) - ); - case MetaName.CTaskAimGunOnFoot__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimGunOnFoot__Tunables, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenFiringVariations, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.IdealPitchForFiringVariation, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxPitchDifferenceForFiringVariation, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.AssistedAimOutroTime, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.RunAndGunOutroTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AimOutroTime, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AimOutroTimeIfAimingOnStick, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AimOutroMinTaskTimeWhenRunPressed, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AimingOnStickExitCooldown, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeForRunAndGunOutroDelays, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.DampenRootTargetWeight, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.DampenRootTargetHeight, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.AlternativeAnimBlockedHeight, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.CoverAimOffsetFromBlocked, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.DelayTimeWhenOutOfAmmoInScope, PsoDataType.UInt, 96, 0, 0) - ); - case MetaName.CTaskGun__Tunables: - return new PsoStructureInfo(MetaName.CTaskGun__Tunables, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.iMinLookAtTime, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.iMaxLookAtTime, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeBetweenBulletReactions, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenBulletReactions, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxDistForOverheadReactions, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxAboveHeadForOverheadReactions, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fBulletReactionPosAdjustmentZ, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fMinTimeBetweenLookAt, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenLookAt, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.bDisable2HandedGetups, PsoDataType.Bool, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeForEyeIk, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenEyeIkProcesses, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToPointGunAtPositionWhenUnableToTurn, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.AssistedAimCamera, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.RunAndGunAimCamera, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.AssistedAimInterpolateInDuration, PsoDataType.UInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.RunAndGunInterpolateInDuration, PsoDataType.UInt, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenOverheadBulletReactions, PsoDataType.UInt, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxTimeInBulletReactionState, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo((MetaName)3228655867, PsoDataType.UInt, 92, 0, 0), - new PsoStructureEntryInfo((MetaName)270252777, PsoDataType.UInt, 96, 0, 0) - ); - case MetaName.CTaskAimGunVehicleDriveBy__Tunables: - return new PsoStructureInfo(MetaName.CTaskAimGunVehicleDriveBy__Tunables, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenInsults, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToInsult, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDotToInsult, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.MinAimTimeMs, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxAimTimeOnStickMs, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.AimingOnStickCooldownMs, PsoDataType.UInt, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.BicycleDrivebyFilterId, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.BikeDrivebyFilterId, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.JetskiDrivebyFilterId, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.ParachutingFilterId, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo((MetaName)2221302483, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo((MetaName)3323392529, PsoDataType.String, 60, 7, 0), - new PsoStructureEntryInfo((MetaName)2684719351, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo((MetaName)4246561663, PsoDataType.String, 68, 7, 0) - ); - case MetaName.CWildlifeManager__Tunables: - return new PsoStructureInfo(MetaName.CWildlifeManager__Tunables, 0, 0, 136, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BirdHeightMapDeltaMin, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.BirdHeightMapDeltaMax, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.BirdSpawnXYRangeMin, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.BirdSpawnXYRangeMax, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.IncreasedAerialSpawningFactor, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToSearchForGroundWildlifePoints, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToSearchForGroundWildlifePoints, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenGroundProbes, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundMaterialProbeDepth, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundMaterialProbeOffset, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.GroundMaterialSpawnCoordNormalZTolerance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.MinDistanceToSearchForAquaticPoints, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxDistanceToSearchForAquaticPoints, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenWaterHeightMapChecks, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.TimeBetweenWaterProbes, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.WaterProbeDepth, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.WaterProbeOffset, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.AquaticSpawnDepth, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.AquaticSpawnMaxHeightAbovePlayer, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.IncreasedAquaticSpawningFactor, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.CloseSpawningViewMultiplier, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.IncreasedGroundWildlifeSpawningFactor, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.SharkModelName, PsoDataType.String, 104, 7, 0), - new PsoStructureEntryInfo(MetaName.DeepWaterThreshold, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.PlayerSwimTimeThreshold, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.MinTimeBetweenSharkDispatches, PsoDataType.UInt, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.SharkAddRangeInViewMin, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo((MetaName)3653722296, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo((MetaName)1235067475, PsoDataType.Float, 128, 0, 0) - ); - case MetaName.CPopGroupList: - return new PsoStructureInfo(MetaName.CPopGroupList, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPopulationGroup), - new PsoStructureEntryInfo(MetaName.pedGroups, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPopulationGroup), - new PsoStructureEntryInfo(MetaName.vehGroups, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.wildlifeHabitats, PsoDataType.Array, 40, 0, (MetaName)4) - ); - case MetaName.CPopulationGroup: - return new PsoStructureInfo(MetaName.CPopulationGroup, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3852980612), - new PsoStructureEntryInfo(MetaName.models, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)4186696686), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 32, 0, (MetaName)2097155) - ); - case MetaName.CDoorTuningFile: - return new PsoStructureInfo(MetaName.CDoorTuningFile, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)607870603), - new PsoStructureEntryInfo(MetaName.NamedTuningArray, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)934147895), - new PsoStructureEntryInfo(MetaName.ModelToTuneMapping, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)607870603: - return new PsoStructureInfo((MetaName)607870603, 0, 0, 144, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Structure, 16, 0, (MetaName)2175119364) - ); - case (MetaName)2175119364: - return new PsoStructureInfo((MetaName)2175119364, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.AutoOpenVolumeOffset, PsoDataType.Float3a, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2809332931), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 32, 0, (MetaName)2097153), - new PsoStructureEntryInfo(MetaName.AutoOpenRadiusModifier, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AutoOpenRate, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.AutoOpenCosineAngleBetweenThreshold, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.AutoOpenCloseRateTaper, PsoDataType.Bool, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.UseAutoOpenTriggerBox, PsoDataType.Bool, 49, 0, 0), - new PsoStructureEntryInfo(MetaName.CustomTriggerBox, PsoDataType.Bool, 50, 0, 0), - new PsoStructureEntryInfo(MetaName.TriggerBoxMinMax, PsoDataType.Structure, 64, 0, MetaName.rage__spdAABB), - new PsoStructureEntryInfo(MetaName.BreakableByVehicle, PsoDataType.Bool, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.BreakingImpulse, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.ShouldLatchShut, PsoDataType.Bool, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.MassMultiplier, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.WeaponImpulseMultiplier, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.RotationLimitAngle, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.TorqueAngularVelocityLimit, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.StdDoorRotDir, PsoDataType.Enum, 124, 0, MetaName.StdDoorRotDir) - ); - case (MetaName)934147895: - return new PsoStructureInfo((MetaName)934147895, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.TuningName, PsoDataType.String, 16, 2, 0) - ); - case (MetaName)3852980612: - return new PsoStructureInfo((MetaName)3852980612, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Structure, 16, 3, 0) - ); - case MetaName.CAmbientPedModelVariations: - return new PsoStructureInfo(MetaName.CAmbientPedModelVariations, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3553377863), - new PsoStructureEntryInfo(MetaName.CompRestrictions, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3159204365), - new PsoStructureEntryInfo(MetaName.PropRestrictions, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.LoadOut, PsoDataType.String, 40, 7, 0) - ); - case (MetaName)3553377863: - return new PsoStructureInfo((MetaName)3553377863, 0, 0, 12, - new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 0, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo(MetaName.DrawableIndex, PsoDataType.SInt, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.Restriction, PsoDataType.Enum, 8, 0, (MetaName)2065671281) - ); - case MetaName.CSlownessZoneManager: - return new PsoStructureInfo(MetaName.CSlownessZoneManager, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1778476350), - new PsoStructureEntryInfo(MetaName.aSlownessZone, PsoDataType.Array, 8, 0, 0) - ); - case (MetaName)1778476350: - return new PsoStructureInfo((MetaName)1778476350, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.bBox, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB) - ); - case MetaName.CScenarioPointManifest: - return new PsoStructureInfo(MetaName.CScenarioPointManifest, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.VersionNumber, PsoDataType.SInt, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.RegionDefs, PsoDataType.Array, 8, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Groups, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.InteriorNames, PsoDataType.Array, 40, 0, (MetaName)5) - ); - case MetaName.CScenarioPointRegionDef: - return new PsoStructureInfo(MetaName.CScenarioPointRegionDef, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 8, 0), - new PsoStructureEntryInfo(MetaName.AABB, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB) - ); - case MetaName.CScenarioPointGroup: - return new PsoStructureInfo(MetaName.CScenarioPointGroup, 0, 0, 8, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.EnabledByDefault, PsoDataType.Bool, 4, 0, 0) - ); - case MetaName.strRequestRecording: - return new PsoStructureInfo(MetaName.strRequestRecording, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.strRecordedRequest), - new PsoStructureEntryInfo(MetaName.Requests, PsoDataType.Array, 0, 0, 0) - ); - case MetaName.strRecordedRequest: - return new PsoStructureInfo(MetaName.strRecordedRequest, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Resource, PsoDataType.Structure, 0, 0, MetaName.strResourceReference), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.SInt, 24, 0, 0) - ); - case MetaName.strResourceReference: - return new PsoStructureInfo(MetaName.strResourceReference, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.AssetName, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Extension, PsoDataType.String, 16, 0, (MetaName)524288) - ); - case (MetaName)62557530: - return new PsoStructureInfo((MetaName)62557530, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3112305802), - new PsoStructureEntryInfo(MetaName.zones, PsoDataType.Array, 0, 0, 0) - ); - case (MetaName)3112305802: - return new PsoStructureInfo((MetaName)3112305802, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.zoneName, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.spName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.mpName, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.vfxRegion, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)1896983690, PsoDataType.UByte, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)1856972365, PsoDataType.Enum, 24, 0, (MetaName)1756502932), - new PsoStructureEntryInfo(MetaName.lawResponseTime, PsoDataType.Enum, 28, 0, (MetaName)3204395397), - new PsoStructureEntryInfo(MetaName.lawResponseType, PsoDataType.Enum, 32, 0, (MetaName)4286852891), - new PsoStructureEntryInfo(MetaName.specialZoneAttribute, PsoDataType.Enum, 36, 0, (MetaName)4095090001), - new PsoStructureEntryInfo(MetaName.vehDirtMin, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.vehDirtMax, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.vehDirtGrowScale, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.pedDirtMin, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.pedDirtMax, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.dirtRed, PsoDataType.UByte, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.dirtGreen, PsoDataType.UByte, 61, 0, 0), - new PsoStructureEntryInfo(MetaName.dirtBlue, PsoDataType.UByte, 62, 0, 0), - new PsoStructureEntryInfo((MetaName)1430479029, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)2056852733, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo((MetaName)1457405649, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo((MetaName)2304154060, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo((MetaName)1018913504, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)9361713, PsoDataType.Bool, 84, 0, 0), - new PsoStructureEntryInfo((MetaName)2931752685, PsoDataType.Bool, 85, 0, 0) - ); - case MetaName.CCoverTuningFile: - return new PsoStructureInfo(MetaName.CCoverTuningFile, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)912106952), - new PsoStructureEntryInfo(MetaName.NamedTuningArray, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3821651387), - new PsoStructureEntryInfo(MetaName.ModelToTuneMapping, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case (MetaName)912106952: - return new PsoStructureInfo((MetaName)912106952, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Structure, 16, 0, (MetaName)61864478) - ); - case (MetaName)61864478: - return new PsoStructureInfo((MetaName)61864478, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)98189892), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 0, (MetaName)2097152) - ); - case (MetaName)3821651387: - return new PsoStructureInfo((MetaName)3821651387, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 2, 0), - new PsoStructureEntryInfo(MetaName.TuningName, PsoDataType.String, 16, 2, 0) - ); - case MetaName.CScenarioPointRegion: - return new PsoStructureInfo(MetaName.CScenarioPointRegion, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.VersionNumber, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), - new PsoStructureEntryInfo(MetaName.ScenarioPoints, PsoDataType.Array, 16, 0, (MetaName)1), - new PsoStructureEntryInfo(MetaName.ChainingGraph, PsoDataType.Structure, 32, 0, MetaName.CScenarioChainingGraph) - ); - case MetaName.CExtensionDefSpawnPoint: - return new PsoStructureInfo(MetaName.CExtensionDefSpawnPoint, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.offsetPosition, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.offsetRotation, PsoDataType.Float4, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.spawnType, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.pedType, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo(MetaName.group, PsoDataType.String, 56, 7, 0), - new PsoStructureEntryInfo(MetaName.availableInMpSp, PsoDataType.Enum, 60, 0, MetaName.CSpawnPoint__AvailabilityMpSp), - new PsoStructureEntryInfo(MetaName.timeTillPedLeaves, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.start, PsoDataType.UByte, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.end, PsoDataType.UByte, 69, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.CScenarioPointFlags__Flags), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 72, 0, (MetaName)196618), - new PsoStructureEntryInfo(MetaName.highPri, PsoDataType.Bool, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.extendedRange, PsoDataType.Bool, 77, 0, 0) - ); - case MetaName.CScenarioChainingGraph: - return new PsoStructureInfo(MetaName.CScenarioChainingGraph, 0, 0, 40, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CScenarioChainingNode), - new PsoStructureEntryInfo(MetaName.Nodes, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CScenarioChainingEdge), - new PsoStructureEntryInfo(MetaName.Edges, PsoDataType.Array, 24, 0, (MetaName)2) - ); - case MetaName.CScenarioChainingNode: - return new PsoStructureInfo(MetaName.CScenarioChainingNode, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Float3a, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2602393771, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.ScenarioType, PsoDataType.String, 36, 7, 0), - new PsoStructureEntryInfo(MetaName.HasIncomingEdges, PsoDataType.Bool, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.HasOutgoingEdges, PsoDataType.Bool, 41, 0, 0) - ); - case MetaName.CScenarioChainingEdge: - return new PsoStructureInfo(MetaName.CScenarioChainingEdge, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.NodeIndexFrom, PsoDataType.UShort, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.NodeIndexTo, PsoDataType.UShort, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.NavMode, PsoDataType.Enum, 12, 2, MetaName.CScenarioChainingEdge__eNavMode), - new PsoStructureEntryInfo(MetaName.NavSpeed, PsoDataType.Enum, 13, 2, MetaName.CScenarioChainingEdge__eNavSpeed) - ); - case MetaName.CPedVariationInfo: - return new PsoStructureInfo(MetaName.CPedVariationInfo, 0, 0, 112, - new PsoStructureEntryInfo(MetaName.bHasTexVariations, PsoDataType.Bool, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.bHasDrawblVariations, PsoDataType.Bool, 1, 0, 0), - new PsoStructureEntryInfo(MetaName.bHasLowLODs, PsoDataType.Bool, 2, 0, 0), - new PsoStructureEntryInfo(MetaName.bIsSuperLOD, PsoDataType.Bool, 3, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.availComp, PsoDataType.Array, 4, 4, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVComponentData), - new PsoStructureEntryInfo(MetaName.aComponentData3, PsoDataType.Array, 16, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedSelectionSet), - new PsoStructureEntryInfo(MetaName.aSelectionSets, PsoDataType.Array, 32, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CComponentInfo), - new PsoStructureEntryInfo(MetaName.compInfos, PsoDataType.Array, 48, 0, (MetaName)10), - new PsoStructureEntryInfo(MetaName.propInfo, PsoDataType.Structure, 64, 0, MetaName.CPedPropInfo), - new PsoStructureEntryInfo(MetaName.dlcName, PsoDataType.String, 104, 8, 0) - ); - case MetaName.CPedPropInfo: - return new PsoStructureInfo(MetaName.CPedPropInfo, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.numAvailProps, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedPropMetaData), - new PsoStructureEntryInfo(MetaName.aPropMetaData, PsoDataType.Array, 8, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CAnchorProps), - new PsoStructureEntryInfo(MetaName.aAnchors, PsoDataType.Array, 24, 0, (MetaName)3) - ); - case MetaName.CPVComponentData: - return new PsoStructureInfo(MetaName.CPVComponentData, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.numAvailTex, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVDrawblData), - new PsoStructureEntryInfo(MetaName.aDrawblData3, PsoDataType.Array, 8, 0, (MetaName)1) - ); - case MetaName.CPVDrawblData: - return new PsoStructureInfo(MetaName.CPVDrawblData, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.propMask, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.numAlternatives, PsoDataType.UByte, 1, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVTextureData), - new PsoStructureEntryInfo(MetaName.aTexData, PsoDataType.Array, 8, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.clothData, PsoDataType.Structure, 24, 0, MetaName.CPVDrawblData__CPVClothComponentData) - ); - case MetaName.CPVDrawblData__CPVClothComponentData: - return new PsoStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ownsCloth, PsoDataType.Bool, 0, 0, 0) - ); - case MetaName.CPVTextureData: - return new PsoStructureInfo(MetaName.CPVTextureData, 0, 0, 3, - new PsoStructureEntryInfo(MetaName.texId, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.distribution, PsoDataType.UByte, 1, 0, 0) - ); - case MetaName.CComponentInfo: - return new PsoStructureInfo(MetaName.CComponentInfo, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)802196719, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)4233133352, PsoDataType.String, 4, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)128864925, PsoDataType.Array, 8, 4, (MetaName)327682), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.inclusions, PsoDataType.Flags, 32, 0, (MetaName)2101247), - new PsoStructureEntryInfo(MetaName.exclusions, PsoDataType.Flags, 36, 0, (MetaName)2101247), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.ePedVarComp), - new PsoStructureEntryInfo((MetaName)1613922652, PsoDataType.Flags, 40, 1, (MetaName)1048583), - new PsoStructureEntryInfo((MetaName)2114993291, PsoDataType.UShort, 42, 0, 0), - new PsoStructureEntryInfo((MetaName)3509540765, PsoDataType.UByte, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)4196345791, PsoDataType.UByte, 45, 0, 0) - ); - case MetaName.CCreatureMetaData: - return new PsoStructureInfo(MetaName.CCreatureMetaData, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CShaderVariableComponent), - new PsoStructureEntryInfo(MetaName.shaderVariableComponents, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedPropExpressionData), - new PsoStructureEntryInfo(MetaName.pedPropExpressions, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedCompExpressionData), - new PsoStructureEntryInfo(MetaName.pedCompExpressions, PsoDataType.Array, 40, 0, (MetaName)4) - ); - case MetaName.CShaderVariableComponent: - return new PsoStructureInfo(MetaName.CShaderVariableComponent, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.pedcompID, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.maskID, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.shaderVariableHashString, PsoDataType.String, 16, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER) - ); - case MetaName.CPedPropExpressionData: - return new PsoStructureInfo(MetaName.CPedPropExpressionData, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.pedPropID, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.pedPropVarIndex, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.pedPropExpressionIndex, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.types, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 72, 0, (MetaName)9) - ); - case MetaName.CPedCompExpressionData: - return new PsoStructureInfo(MetaName.CPedCompExpressionData, 0, 0, 88, - new PsoStructureEntryInfo(MetaName.pedCompID, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.pedCompVarIndex, PsoDataType.SInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.pedCompExpressionIndex, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.types, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 72, 0, (MetaName)9) - ); - case MetaName.rage__cutfCutsceneFile2: - return new PsoStructureInfo(MetaName.rage__cutfCutsceneFile2, 0, 0, 3360, - new PsoStructureEntryInfo(MetaName.fTotalDuration, PsoDataType.Float, 268, 0, 0), - new PsoStructureEntryInfo(MetaName.cFaceDir, PsoDataType.String, 272, 0, (MetaName)16777216), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iCutsceneFlags, PsoDataType.Array, 528, 4, (MetaName)262146), - new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 544, 0, 0), - new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 560, 0, 0), - new PsoStructureEntryInfo(MetaName.vTriggerOffset, PsoDataType.Float3, 576, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.pCutsceneObjects, PsoDataType.Array, 592, 0, (MetaName)7), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.pCutsceneLoadEventList, PsoDataType.Array, 608, 0, (MetaName)9), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.pCutsceneEventList, PsoDataType.Array, 624, 0, (MetaName)11), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.pCutsceneEventArgsList, PsoDataType.Array, 640, 0, (MetaName)13), - new PsoStructureEntryInfo(MetaName.attributes, PsoDataType.Structure, 656, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 672, 4, 0), - new PsoStructureEntryInfo(MetaName.iRangeStart, PsoDataType.SInt, 680, 0, 0), - new PsoStructureEntryInfo(MetaName.iRangeEnd, PsoDataType.SInt, 684, 0, 0), - new PsoStructureEntryInfo(MetaName.iAltRangeEnd, PsoDataType.SInt, 688, 0, 0), - new PsoStructureEntryInfo(MetaName.fSectionByTimeSliceDuration, PsoDataType.Float, 692, 0, 0), - new PsoStructureEntryInfo(MetaName.fFadeOutCutsceneDuration, PsoDataType.Float, 696, 0, 0), - new PsoStructureEntryInfo(MetaName.fFadeInGameDuration, PsoDataType.Float, 700, 0, 0), - new PsoStructureEntryInfo(MetaName.fadeInColor, PsoDataType.UInt, 704, 1, 0), - new PsoStructureEntryInfo(MetaName.iBlendOutCutsceneDuration, PsoDataType.SInt, 708, 0, 0), - new PsoStructureEntryInfo(MetaName.iBlendOutCutsceneOffset, PsoDataType.SInt, 712, 0, 0), - new PsoStructureEntryInfo(MetaName.fFadeOutGameDuration, PsoDataType.Float, 716, 0, 0), - new PsoStructureEntryInfo(MetaName.fFadeInCutsceneDuration, PsoDataType.Float, 720, 0, 0), - new PsoStructureEntryInfo(MetaName.fadeOutColor, PsoDataType.UInt, 724, 1, 0), - new PsoStructureEntryInfo(MetaName.DayCoCHours, PsoDataType.UInt, 728, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.cameraCutList, PsoDataType.Array, 736, 0, (MetaName)30), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.sectionSplitList, PsoDataType.Array, 752, 0, (MetaName)32), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__cutfCutsceneFile2__SConcatData), - new PsoStructureEntryInfo(MetaName.concatDataList, PsoDataType.Array, 768, 1, (MetaName)2621474), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.vHaltFrequency), - new PsoStructureEntryInfo(MetaName.discardFrameList, PsoDataType.Array, 3344, 0, (MetaName)36) - ); - case MetaName.rage__parAttributeList: - return new PsoStructureInfo(MetaName.rage__parAttributeList, 0, 0, 12, - new PsoStructureEntryInfo(MetaName.UserData1, PsoDataType.UByte, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.UserData2, PsoDataType.UByte, 9, 0, 0) - ); - case MetaName.rage__cutfCutsceneFile2__SConcatData: - return new PsoStructureInfo(MetaName.rage__cutfCutsceneFile2__SConcatData, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.cSceneName, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fStartTime, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.fPitch, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.fRoll, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.iRangeStart, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.iRangeEnd, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.bValidForPlayBack, PsoDataType.Bool, 56, 0, 0) - ); - case MetaName.rage__cutfAssetManagerObject: - return new PsoStructureInfo(MetaName.rage__cutfAssetManagerObject, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0) - ); - case MetaName.rage__cutfAnimationManagerObject: - return new PsoStructureInfo(MetaName.rage__cutfAnimationManagerObject, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0) - ); - case MetaName.rage__cutfCameraObject: - return new PsoStructureInfo(MetaName.rage__cutfCameraObject, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fNearDrawDistance, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fFarDrawDistance, PsoDataType.Float, 60, 0, 0) - ); - case MetaName.rage__cutfPedModelObject: - return new PsoStructureInfo(MetaName.rage__cutfPedModelObject, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo(MetaName.overrideFaceAnimationFilename, PsoDataType.String, 96, 7, 0), - new PsoStructureEntryInfo(MetaName.bFoundFaceAnimation, PsoDataType.Bool, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.bFaceAndBodyAreMerged, PsoDataType.Bool, 105, 0, 0), - new PsoStructureEntryInfo(MetaName.bOverrideFaceAnimation, PsoDataType.Bool, 106, 0, 0), - new PsoStructureEntryInfo(MetaName.faceAnimationNodeName, PsoDataType.String, 108, 7, 0), - new PsoStructureEntryInfo(MetaName.faceAttributesFilename, PsoDataType.String, 112, 7, 0) - ); - case MetaName.rage__cutfPropModelObject: - return new PsoStructureInfo(MetaName.rage__cutfPropModelObject, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0) - ); - case MetaName.rage__cutfBlockingBoundsObject: - return new PsoStructureInfo(MetaName.rage__cutfBlockingBoundsObject, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float3, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.vCorners, PsoDataType.Array, 48, 4, (MetaName)262148), - new PsoStructureEntryInfo(MetaName.fHeight, PsoDataType.Float, 112, 0, 0) - ); - case MetaName.rage__cutfAudioObject: - return new PsoStructureInfo(MetaName.rage__cutfAudioObject, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 3, 0), - new PsoStructureEntryInfo(MetaName.fOffset, PsoDataType.Float, 56, 0, 0) - ); - case MetaName.rage__cutfHiddenModelObject: - return new PsoStructureInfo(MetaName.rage__cutfHiddenModelObject, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fRadius, PsoDataType.Float, 64, 0, 0) - ); - case MetaName.rage__cutfOverlayObject: - return new PsoStructureInfo(MetaName.rage__cutfOverlayObject, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 3, 0), - new PsoStructureEntryInfo(MetaName.cRenderTargetName, PsoDataType.String, 56, 3, 0), - new PsoStructureEntryInfo(MetaName.iOverlayType, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.modelHashName, PsoDataType.String, 76, 7, 0) - ); - case MetaName.rage__cutfSubtitleObject: - return new PsoStructureInfo(MetaName.rage__cutfSubtitleObject, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) - ); - case MetaName.rage__cutfLightObject: - return new PsoStructureInfo(MetaName.rage__cutfLightObject, 0, 0, 192, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.fFallOff, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.fConeAngle, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.fVolumeIntensity, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.fVolumeSizeScale, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaSize, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaIntensity, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaZBias, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.fInnerConeAngle, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.fExponentialFallOff, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.fShadowBlur, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.iLightType, PsoDataType.SInt, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.iLightProperty, PsoDataType.SInt, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.TextureDictID, PsoDataType.SInt, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.TextureKey, PsoDataType.SInt, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.uLightFlags, PsoDataType.UInt, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.uHourFlags, PsoDataType.UInt, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.bStatic, PsoDataType.Bool, 186, 0, 0) - ); - case MetaName.rage__cutfAnimatedLightObject: - return new PsoStructureInfo(MetaName.rage__cutfAnimatedLightObject, 0, 0, 208, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.fFallOff, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.fConeAngle, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.fVolumeIntensity, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.fVolumeSizeScale, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaSize, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaIntensity, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.fCoronaZBias, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.fInnerConeAngle, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.fExponentialFallOff, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.fShadowBlur, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.iLightType, PsoDataType.SInt, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.iLightProperty, PsoDataType.SInt, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.TextureDictID, PsoDataType.SInt, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.TextureKey, PsoDataType.SInt, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.uLightFlags, PsoDataType.UInt, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.uHourFlags, PsoDataType.UInt, 180, 0, 0), - new PsoStructureEntryInfo(MetaName.bStatic, PsoDataType.Bool, 186, 0, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 192, 0, 0) - ); - case MetaName.rage__cutfObjectIdEvent: - return new PsoStructureInfo(MetaName.rage__cutfObjectIdEvent, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.fTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.iEventId, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.iEventArgsIndex, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.pChildEvents, PsoDataType.Structure, 32, 3, 0), - new PsoStructureEntryInfo(MetaName.StickyId, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.IsChild, PsoDataType.Bool, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 48, 0, 0) - ); - case MetaName.rage__cutfObjectVariationEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfObjectVariationEventArgs, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.iComponent, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.iDrawable, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.iTexture, PsoDataType.SInt, 48, 0, 0) - ); - case MetaName.rage__cutfEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfEventArgs, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0) - ); - case MetaName.rage__cutfAttributeList: - return new PsoStructureInfo(MetaName.rage__cutfAttributeList, 0, 0, 16, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.Items, PsoDataType.Array, 0, 0, 0) - ); - case MetaName.cutf_int: - return new PsoStructureInfo(MetaName.cutf_int, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.SInt, 16, 0, 0) - ); - case MetaName.cutf_float: - return new PsoStructureInfo(MetaName.cutf_float, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float, 16, 0, 0) - ); - case MetaName.rage__cutfLoadSceneEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfLoadSceneEventArgs, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fPitch, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.fRoll, PsoDataType.Float, 72, 0, 0) - ); - case MetaName.rage__cutfObjectIdEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfObjectIdEventArgs, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0) - ); - case MetaName.rage__cutfObjectIdListEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfObjectIdListEventArgs, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iObjectIdList, PsoDataType.Array, 32, 0, (MetaName)2) - ); - case MetaName.rage__cutfNameEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfNameEventArgs, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0) - ); - case MetaName.rage__cutfCameraCutEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfCameraCutEventArgs, 0, 0, 272, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.vRotationQuaternion, PsoDataType.Float4, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fNearDrawDistance, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.fFarDrawDistance, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.fMapLodScale, PsoDataType.Float, 88, 0, 0), - new PsoStructureEntryInfo(MetaName.ReflectionLodRangeStart, PsoDataType.Float, 92, 0, 0), - new PsoStructureEntryInfo(MetaName.ReflectionLodRangeEnd, PsoDataType.Float, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.ReflectionSLodRangeStart, PsoDataType.Float, 100, 0, 0), - new PsoStructureEntryInfo(MetaName.ReflectionSLodRangeEnd, PsoDataType.Float, 104, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultHD, PsoDataType.Float, 108, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultOrphanedHD, PsoDataType.Float, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultLod, PsoDataType.Float, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultSLod1, PsoDataType.Float, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultSLod2, PsoDataType.Float, 124, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultSLod3, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.LodMultSLod4, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.WaterReflectionFarClip, PsoDataType.Float, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.SSAOLightInten, PsoDataType.Float, 140, 0, 0), - new PsoStructureEntryInfo(MetaName.ExposurePush, PsoDataType.Float, 144, 0, 0), - new PsoStructureEntryInfo(MetaName.LightFadeDistanceMult, PsoDataType.Float, 148, 0, 0), - new PsoStructureEntryInfo(MetaName.LightShadowFadeDistanceMult, PsoDataType.Float, 152, 0, 0), - new PsoStructureEntryInfo(MetaName.LightSpecularFadeDistMult, PsoDataType.Float, 156, 0, 0), - new PsoStructureEntryInfo(MetaName.LightVolumetricFadeDistanceMult, PsoDataType.Float, 160, 0, 0), - new PsoStructureEntryInfo(MetaName.DirectionalLightMultiplier, PsoDataType.Float, 164, 0, 0), - new PsoStructureEntryInfo(MetaName.LensArtefactMultiplier, PsoDataType.Float, 168, 0, 0), - new PsoStructureEntryInfo(MetaName.BloomMax, PsoDataType.Float, 172, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableHighQualityDof, PsoDataType.Bool, 176, 0, 0), - new PsoStructureEntryInfo(MetaName.FreezeReflectionMap, PsoDataType.Bool, 177, 0, 0), - new PsoStructureEntryInfo(MetaName.DisableDirectionalLighting, PsoDataType.Bool, 178, 0, 0), - new PsoStructureEntryInfo(MetaName.AbsoluteIntensityEnabled, PsoDataType.Bool, 179, 0, 0), - new PsoStructureEntryInfo(MetaName.CharacterLight, PsoDataType.Structure, 192, 0, MetaName.rage__cutfCameraCutCharacterLightParams), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__cutfCameraCutTimeOfDayDofModifier), - new PsoStructureEntryInfo(MetaName.TimeOfDayDofModifers, PsoDataType.Array, 256, 0, (MetaName)34) - ); - case MetaName.rage__cutfCameraCutCharacterLightParams: - return new PsoStructureInfo(MetaName.rage__cutfCameraCutCharacterLightParams, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.bUseTimeCycleValues, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 48, 0, 0) - ); - case MetaName.rage__cutfSubtitleEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfSubtitleEventArgs, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.iLanguageID, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.iTransitionIn, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.fTransitionInDuration, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.iTransitionOut, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.fTransitionOutDuration, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.fSubtitleDuration, PsoDataType.Float, 60, 0, 0) - ); - case MetaName.rage__cutfFinalNameEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfFinalNameEventArgs, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 3, 0) - ); - case MetaName.rage__cutfObjectIdNameEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfObjectIdNameEventArgs, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) - ); - case MetaName.vHaltFrequency: - return new PsoStructureInfo(MetaName.vHaltFrequency, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.cSceneName, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.frames, PsoDataType.Array, 8, 0, (MetaName)1) - ); - case MetaName.rage__cutfVehicleModelObject: - return new PsoStructureInfo(MetaName.rage__cutfVehicleModelObject, 0, 0, 120, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.cRemoveBoneNameList, PsoDataType.Array, 96, 0, (MetaName)11), - new PsoStructureEntryInfo(MetaName.bCanApplyRealDamage, PsoDataType.Bool, 112, 0, 0) - ); - case MetaName.rage__cutfEvent: - return new PsoStructureInfo(MetaName.rage__cutfEvent, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.fTime, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.iEventId, PsoDataType.SInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.iEventArgsIndex, PsoDataType.SInt, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.pChildEvents, PsoDataType.Structure, 32, 3, 0), - new PsoStructureEntryInfo(MetaName.StickyId, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.IsChild, PsoDataType.Bool, 44, 0, 0) - ); - case MetaName.rage__cutfCascadeShadowEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfCascadeShadowEventArgs, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.cameraCutHashName, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.radius, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.interpTime, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.cascadeIndex, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.enabled, PsoDataType.Bool, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.interpolateToDisabled, PsoDataType.Bool, 77, 0, 0) - ); - case MetaName.rage__cutfFloatValueEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfFloatValueEventArgs, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.fValue, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.rage__cutfAnimatedParticleEffectObject: - return new PsoStructureInfo(MetaName.rage__cutfAnimatedParticleEffectObject, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.athFxListHash, PsoDataType.String, 64, 7, 0) - ); - case MetaName.rage__cutfWeaponModelObject: - return new PsoStructureInfo(MetaName.rage__cutfWeaponModelObject, 0, 0, 104, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), - new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), - new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), - new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), - new PsoStructureEntryInfo(MetaName.GenericWeaponType, PsoDataType.UInt, 96, 0, 0) - ); - case MetaName.rage__cutfPlayParticleEffectEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfPlayParticleEffectEventArgs, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.vInitialBoneRotation, PsoDataType.Float4, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.vInitialBoneOffset, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.iAttachParentId, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.iAttachBoneHash, PsoDataType.UShort, 68, 0, 0) - ); - case MetaName.rage__cutfBoolValueEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfBoolValueEventArgs, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.bValue, PsoDataType.Bool, 32, 0, 0) - ); - case MetaName.rage__cutfRayfireObject: - return new PsoStructureInfo(MetaName.rage__cutfRayfireObject, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.vStartPosition, PsoDataType.Float3, 64, 0, 0) - ); - case MetaName.rage__cutfParticleEffectObject: - return new PsoStructureInfo(MetaName.rage__cutfParticleEffectObject, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.athFxListHash, PsoDataType.String, 56, 7, 0) - ); - case MetaName.rage__cutfDecalObject: - return new PsoStructureInfo(MetaName.rage__cutfDecalObject, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo(MetaName.RenderId, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.rage__cutfDecalEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfDecalEventArgs, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.vRotation, PsoDataType.Float4, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fWidth, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fHeight, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.Colour, PsoDataType.UInt, 72, 1, 0), - new PsoStructureEntryInfo(MetaName.fLifeTime, PsoDataType.Float, 76, 0, 0) - ); - case MetaName.rage__cutfScreenFadeObject: - return new PsoStructureInfo(MetaName.rage__cutfScreenFadeObject, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) - ); - case MetaName.rage__cutfVehicleVariationEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfVehicleVariationEventArgs, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.iMainBodyColour, PsoDataType.SInt, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.iSecondBodyColour, PsoDataType.SInt, 44, 0, 0), - new PsoStructureEntryInfo(MetaName.iSpecularColour, PsoDataType.SInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.iWheelTrimColour, PsoDataType.SInt, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)2747538743, PsoDataType.SInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.iLivery, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.iLivery2, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.fDirtLevel, PsoDataType.Float, 68, 0, 0) - ); - case MetaName.cutf_string: - return new PsoStructureInfo(MetaName.cutf_string, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), - new PsoStructureEntryInfo(MetaName.Value, PsoDataType.String, 16, 3, 0) - ); - case MetaName.rage__cutfScreenFadeEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfScreenFadeEventArgs, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.fValue, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 40, 1, 0) - ); - case MetaName.rage__cutfTriggerLightEffectEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfTriggerLightEffectEventArgs, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iAttachParentId, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.iAttachBoneHash, PsoDataType.UShort, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.AttachedParentName, PsoDataType.String, 40, 7, 0) - ); - case MetaName.rage__cutfVehicleExtraEventArgs: - return new PsoStructureInfo(MetaName.rage__cutfVehicleExtraEventArgs, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.pExtraBoneIds, PsoDataType.Array, 40, 0, (MetaName)3) - ); - case MetaName.rage__cutfFixupModelObject: - return new PsoStructureInfo(MetaName.rage__cutfFixupModelObject, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), - new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), - new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.fRadius, PsoDataType.Float, 64, 0, 0) - ); - case MetaName.CPackFileMetaData: - return new PsoStructureInfo(MetaName.CPackFileMetaData, 0, 0, 96, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CMapDataGroup), - new PsoStructureEntryInfo(MetaName.MapDataGroups, PsoDataType.Array, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CHDTxdAssetBinding), - new PsoStructureEntryInfo(MetaName.HDTxdBindingArray, PsoDataType.Array, 16, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CImapDependency), - new PsoStructureEntryInfo(MetaName.imapDependencies, PsoDataType.Array, 32, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CImapDependencies), - new PsoStructureEntryInfo(MetaName.imapDependencies_2, PsoDataType.Array, 48, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CItypDependencies), - new PsoStructureEntryInfo(MetaName.itypDependencies_2, PsoDataType.Array, 64, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CInteriorBoundsFiles), - new PsoStructureEntryInfo(MetaName.Interiors, PsoDataType.Array, 80, 0, (MetaName)10) - ); - case MetaName.CMapDataGroup: - return new PsoStructureInfo(MetaName.CMapDataGroup, 0, 0, 56, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Bounds, PsoDataType.Array, 8, 0, (MetaName)1), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1193003611), - new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097155), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.WeatherTypes, PsoDataType.Array, 32, 0, (MetaName)5), - new PsoStructureEntryInfo(MetaName.HoursOnOff, PsoDataType.UInt, 48, 0, 0) - ); - case MetaName.CHDTxdAssetBinding: - return new PsoStructureInfo(MetaName.CHDTxdAssetBinding, 0, 0, 132, - new PsoStructureEntryInfo(MetaName.assetType, PsoDataType.Enum, 0, 0, (MetaName)3387532954), - new PsoStructureEntryInfo(MetaName.targetAsset, PsoDataType.String, 4, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.HDTxd, PsoDataType.String, 68, 0, (MetaName)4194304) - ); - case MetaName.CImapDependencies: - return new PsoStructureInfo(MetaName.CImapDependencies, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.imapName, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.manifestFlags), - new PsoStructureEntryInfo(MetaName.manifestFlags, PsoDataType.Flags, 4, 0, (MetaName)2097153), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.itypDepArray, PsoDataType.Array, 8, 0, (MetaName)3) - ); - case MetaName.CItypDependencies: - return new PsoStructureInfo(MetaName.CItypDependencies, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.itypName, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.manifestFlags), - new PsoStructureEntryInfo(MetaName.manifestFlags, PsoDataType.Flags, 4, 0, (MetaName)2097153), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.itypDepArray, PsoDataType.Array, 8, 0, (MetaName)3) - ); - case MetaName.CInteriorBoundsFiles: - return new PsoStructureInfo(MetaName.CInteriorBoundsFiles, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.Bounds, PsoDataType.Array, 8, 0, (MetaName)1) - ); - case MetaName.CMapTypes: - return new PsoStructureInfo(MetaName.CMapTypes, 0, 0, 96, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.archetypes, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 40, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.dependencies, PsoDataType.Array, 48, 0, (MetaName)5), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTxdRelationship), - new PsoStructureEntryInfo(MetaName.txdRelationships, PsoDataType.Array, 64, 0, (MetaName)MetaTypeName.POINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompositeEntityType), - new PsoStructureEntryInfo(MetaName.compositeEntityTypes, PsoDataType.Array, 80, 0, (MetaName)9) - ); - case MetaName.CTxdRelationship: - return new PsoStructureInfo(MetaName.CTxdRelationship, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo(MetaName.child, PsoDataType.String, 24, 3, 0) - ); - case MetaName.CCompositeEntityType: - return new PsoStructureInfo(MetaName.CCompositeEntityType, 0, 0, 336, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.specialAttribute, PsoDataType.UInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.bbMin, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.bbMax, PsoDataType.Float3, 96, 0, 0), - new PsoStructureEntryInfo(MetaName.bsCentre, PsoDataType.Float3, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.bsRadius, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.StartModel, PsoDataType.String, 136, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.EndModel, PsoDataType.String, 200, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.StartImapFile, PsoDataType.String, 264, 3, 0), - new PsoStructureEntryInfo(MetaName.EndImapFile, PsoDataType.String, 280, 3, 0), - new PsoStructureEntryInfo(MetaName.PtFxAssetName, PsoDataType.String, 296, 3, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompEntityAnims), - new PsoStructureEntryInfo(MetaName.Animations, PsoDataType.Array, 312, 0, (MetaName)13) - ); - case MetaName.CCompEntityAnims: - return new PsoStructureInfo(MetaName.CCompEntityAnims, 0, 0, 216, - new PsoStructureEntryInfo(MetaName.AnimDict, PsoDataType.String, 0, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.AnimName, PsoDataType.String, 64, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.AnimatedModel, PsoDataType.String, 128, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.punchInPhase, PsoDataType.Float, 192, 0, 0), - new PsoStructureEntryInfo(MetaName.punchOutPhase, PsoDataType.Float, 196, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompEntityEffectsData), - new PsoStructureEntryInfo(MetaName.effectsData, PsoDataType.Array, 200, 0, (MetaName)5) - ); - case MetaName.CCompEntityEffectsData: - return new PsoStructureInfo(MetaName.CCompEntityEffectsData, 0, 0, 160, - new PsoStructureEntryInfo(MetaName.fxType, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.fxOffsetPos, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.fxOffsetRot, PsoDataType.Float4, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.boneTag, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.startPhase, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.endPhase, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxIsTriggered, PsoDataType.Bool, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxTag, PsoDataType.String, 61, 0, (MetaName)4194304), - new PsoStructureEntryInfo(MetaName.ptFxScale, PsoDataType.Float, 128, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxProbability, PsoDataType.Float, 132, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxHasTint, PsoDataType.Bool, 136, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxTintR, PsoDataType.UByte, 137, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxTintG, PsoDataType.UByte, 138, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxTintB, PsoDataType.UByte, 139, 0, 0), - new PsoStructureEntryInfo(MetaName.ptFxSize, PsoDataType.Float3, 144, 0, 0) - ); - case MetaName.CExtensionDefParticleEffect: - return new PsoStructureInfo(MetaName.CExtensionDefParticleEffect, 0, 0, 96, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.offsetPosition, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.offsetRotation, PsoDataType.Float4, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.fxName, PsoDataType.String, 48, 3, 0), - new PsoStructureEntryInfo(MetaName.fxType, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.boneTag, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.probability, PsoDataType.SInt, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.SInt, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 84, 1, 0) - ); - case MetaName.CBaseArchetypeDef: - return new PsoStructureInfo(MetaName.CBaseArchetypeDef, 0, 0, 176, - new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.specialAttribute, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.bbMin, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.bbMax, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.bsCentre, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.bsRadius, PsoDataType.Float, 80, 0, 0), - new PsoStructureEntryInfo(MetaName.hdTextureDist, PsoDataType.Float, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 88, 3, 0), - new PsoStructureEntryInfo(MetaName.textureDictionary, PsoDataType.String, 104, 3, 0), - new PsoStructureEntryInfo(MetaName.clipDictionary, PsoDataType.String, 120, 3, 0), - new PsoStructureEntryInfo(MetaName.drawableDictionary, PsoDataType.String, 136, 3, 0), - new PsoStructureEntryInfo(MetaName.physicsDictionary, PsoDataType.String, 152, 7, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 160, 0, (MetaName)13) - ); - case MetaName.CImapDependency: - return new PsoStructureInfo(MetaName.CImapDependency, 0, 0, 12, - new PsoStructureEntryInfo(MetaName.imapName, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.itypName, PsoDataType.String, 4, 7, 0), - new PsoStructureEntryInfo(MetaName.packFileName, PsoDataType.String, 8, 7, 0) - ); - case MetaName.CMapData: - return new PsoStructureInfo(MetaName.CMapData, 0, 0, 304, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 12, 7, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.contentFlags, PsoDataType.UInt, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.streamingExtentsMin, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.streamingExtentsMax, PsoDataType.Float3, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.entitiesExtentsMin, PsoDataType.Float3, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.entitiesExtentsMax, PsoDataType.Float3, 80, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.entities, PsoDataType.Array, 96, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__fwContainerLodDef), - new PsoStructureEntryInfo(MetaName.containerLods, PsoDataType.Array, 112, 0, (MetaName)10), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.BoxOccluder), - new PsoStructureEntryInfo(MetaName.boxOccluders, PsoDataType.Array, 128, 0, (MetaName)MetaTypeName.PsoPOINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.OccludeModel), - new PsoStructureEntryInfo(MetaName.occludeModels, PsoDataType.Array, 144, 0, (MetaName)14), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.physicsDictionaries, PsoDataType.Array, 160, 0, (MetaName)MetaTypeName.STRING), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTimeCycleModifier), - new PsoStructureEntryInfo(MetaName.timeCycleModifiers, PsoDataType.Array, 176, 0, (MetaName)18), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCarGen), - new PsoStructureEntryInfo(MetaName.carGenerators, PsoDataType.Array, 192, 0, (MetaName)20), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CLODLight), - new PsoStructureEntryInfo(MetaName.LODLights, PsoDataType.Array, 208, 0, (MetaName)22), - new PsoStructureEntryInfo(MetaName.block, PsoDataType.Structure, 224, 0, MetaName.CBlockDesc) - ); - case MetaName.rage__fwContainerLodDef: - return new PsoStructureInfo(MetaName.rage__fwContainerLodDef, 0, 0, 8, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 0, 7, 0), - new PsoStructureEntryInfo(MetaName.parentIndex, PsoDataType.UInt, 4, 0, 0) - ); - case MetaName.BoxOccluder: - return new PsoStructureInfo(MetaName.BoxOccluder, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.iCenterX, PsoDataType.SShort, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.iCenterY, PsoDataType.SShort, 2, 0, 0), - new PsoStructureEntryInfo(MetaName.iCenterZ, PsoDataType.SShort, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.iCosZ, PsoDataType.SShort, 6, 0, 0), - new PsoStructureEntryInfo(MetaName.iLength, PsoDataType.SShort, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.iWidth, PsoDataType.SShort, 10, 0, 0), - new PsoStructureEntryInfo(MetaName.iHeight, PsoDataType.SShort, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.iSinZ, PsoDataType.SShort, 14, 0, 0) - ); - case MetaName.OccludeModel: - return new PsoStructureInfo(MetaName.OccludeModel, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.bmin, PsoDataType.Float3a, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.bmax, PsoDataType.Float3a, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.dataSize, PsoDataType.UInt, 32, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.verts, PsoDataType.Array, 40, 6, (MetaName)2097155), - new PsoStructureEntryInfo(MetaName.numVertsInBytes, PsoDataType.UShort, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.numTris, PsoDataType.UShort, 50, 0, 0) - ); - case MetaName.CTimeCycleModifier: - return new PsoStructureInfo(MetaName.CTimeCycleModifier, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.minExtents, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.maxExtents, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.percentage, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.range, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo(MetaName.startHour, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.endHour, PsoDataType.UInt, 60, 0, 0) - ); - case MetaName.CCarGen: - return new PsoStructureInfo(MetaName.CCarGen, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.orientX, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.orientY, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.perpendicularLength, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.carModel, PsoDataType.String, 44, 7, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)2431193454, PsoDataType.UInt, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)379378343, PsoDataType.UInt, 56, 0, 0), - new PsoStructureEntryInfo(MetaName.bodyColorRemap1, PsoDataType.SInt, 60, 0, 0), - new PsoStructureEntryInfo(MetaName.bodyColorRemap2, PsoDataType.SInt, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.bodyColorRemap3, PsoDataType.SInt, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.bodyColorRemap4, PsoDataType.SInt, 72, 0, 0) - ); - case MetaName.CLODLight: - return new PsoStructureInfo(MetaName.CLODLight, 0, 0, 136, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.FloatXYZ), - new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.falloff, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.falloffExponent, PsoDataType.Array, 40, 0, (MetaName)4), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.timeAndStateFlags, PsoDataType.Array, 56, 0, (MetaName)6), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.hash, PsoDataType.Array, 72, 0, (MetaName)8), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.coneInnerAngle, PsoDataType.Array, 88, 0, (MetaName)10), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.coneOuterAngleOrCapExt, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.coronaIntensity, PsoDataType.Array, 120, 0, (MetaName)14) - ); - case MetaName.CBlockDesc: - return new PsoStructureInfo(MetaName.CBlockDesc, 0, 0, 72, - new PsoStructureEntryInfo(MetaName.version, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 3, 0), - new PsoStructureEntryInfo(MetaName.exportedBy, PsoDataType.String, 24, 3, 0), - new PsoStructureEntryInfo(MetaName.owner, PsoDataType.String, 40, 3, 0), - new PsoStructureEntryInfo(MetaName.time, PsoDataType.String, 56, 3, 0) - ); - case MetaName.CEntityDef: - return new PsoStructureInfo(MetaName.CEntityDef, 0, 0, 128, - new PsoStructureEntryInfo(MetaName.archetypeName, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.guid, PsoDataType.UInt, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Float4, 48, 0, 0), - new PsoStructureEntryInfo(MetaName.scaleXY, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo(MetaName.scaleZ, PsoDataType.Float, 68, 0, 0), - new PsoStructureEntryInfo(MetaName.parentIndex, PsoDataType.SInt, 72, 0, 0), - new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 76, 0, 0), - new PsoStructureEntryInfo(MetaName.lodLevel, PsoDataType.Enum, 80, 0, MetaName.rage__eLodType), - new PsoStructureEntryInfo(MetaName.numChildren, PsoDataType.UInt, 84, 0, 0), - new PsoStructureEntryInfo(MetaName.priorityLevel, PsoDataType.Enum, 88, 0, MetaName.rage__ePriorityLevel), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), - new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 96, 0, (MetaName)MetaTypeName.PsoPOINTER), - new PsoStructureEntryInfo(MetaName.ambientOcclusionMultiplier, PsoDataType.SInt, 112, 0, 0), - new PsoStructureEntryInfo(MetaName.artificialAmbientOcclusion, PsoDataType.SInt, 116, 0, 0), - new PsoStructureEntryInfo(MetaName.tintValue, PsoDataType.UInt, 120, 0, 0), - new PsoStructureEntryInfo(MetaName.lightGroup, PsoDataType.UInt, 124, 0, 0) - ); - case MetaName.CDistantLODLight: - return new PsoStructureInfo(MetaName.CDistantLODLight, 0, 0, 48, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.FloatXYZ), - new PsoStructureEntryInfo(MetaName.position, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.RGBI, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo(MetaName.numStreetLights, PsoDataType.UShort, 40, 0, 0), - new PsoStructureEntryInfo(MetaName.category, PsoDataType.UShort, 42, 0, 0) - ); - case (MetaName)3730683074: - return new PsoStructureInfo((MetaName)3730683074, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2166096847), - new PsoStructureEntryInfo(MetaName.PortalInfoList, PsoDataType.Array, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1998468471), - new PsoStructureEntryInfo(MetaName.PathNodeList, PsoDataType.Array, 16, 0, (MetaName)2) - ); - case (MetaName)2166096847: - return new PsoStructureInfo((MetaName)2166096847, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.InteriorProxyHash, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.PortalIdx, PsoDataType.SInt, 4, 0, 0), - new PsoStructureEntryInfo(MetaName.RoomIdx, PsoDataType.SInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.DestInteriorHash, PsoDataType.UInt, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.DestRoomIdx, PsoDataType.SInt, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4133637881), - new PsoStructureEntryInfo(MetaName.PortalEntityList, PsoDataType.Array, 24, 0, (MetaName)5) - ); - case (MetaName)4133637881: - return new PsoStructureInfo((MetaName)4133637881, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.LinkType, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.MaxOcclusion, PsoDataType.Float, 4, 0, 0), - new PsoStructureEntryInfo((MetaName)3815194629, PsoDataType.UInt, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.IsDoor, PsoDataType.Bool, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.IsGlass, PsoDataType.Bool, 13, 0, 0) - ); - case (MetaName)1998468471: - return new PsoStructureInfo((MetaName)1998468471, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.Key, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2301425487), - new PsoStructureEntryInfo(MetaName.PathNodeChildList, PsoDataType.Array, 8, 0, (MetaName)1) - ); - case (MetaName)2301425487: - return new PsoStructureInfo((MetaName)2301425487, 0, 0, 8, - new PsoStructureEntryInfo(MetaName.PathNodeKey, PsoDataType.UInt, 0, 0, 0), - new PsoStructureEntryInfo(MetaName.PortalInfoIdx, PsoDataType.SInt, 4, 0, 0) - ); - case MetaName.camMotionBlurSettingsMetadata: - return new PsoStructureInfo(MetaName.camMotionBlurSettingsMetadata, 0, 0, 64, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.MovementMotionBlurMinSpeed, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.MovementMotionBlurMaxSpeed, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.MovementMotionBlurMaxStrength, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.DamageMotionBlurMinDamage, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.DamageMotionBlurMaxDamage, PsoDataType.Float, 32, 0, 0), - new PsoStructureEntryInfo(MetaName.DamageMotionBlurMaxStrength, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo(MetaName.DamageMotionBlurDuration, PsoDataType.UInt, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)3109021193, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)2711268798, PsoDataType.Float, 48, 0, 0), - new PsoStructureEntryInfo((MetaName)960288180, PsoDataType.Float, 52, 0, 0), - new PsoStructureEntryInfo((MetaName)3693477470, PsoDataType.UInt, 56, 0, 0) - ); - case MetaName.camVehicleRocketSettings: - return new PsoStructureInfo(MetaName.camVehicleRocketSettings, 0, 0, 16, - new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.ShakeAmplitude, PsoDataType.Float, 12, 0, 0) - ); - case MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring: - return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring, 0, 0, 24, - new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 12, 0, 0), - new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)1065492607, PsoDataType.Float, 20, 0, 0) - ); - case MetaName.camInterpolatorMetadata: - return new PsoStructureInfo(MetaName.camInterpolatorMetadata, 0, 0, 40, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo(MetaName.EaseIn, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo(MetaName.EaseOut, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Float, 28, 0, 0), - new PsoStructureEntryInfo(MetaName.End, PsoDataType.Float, 32, 0, 0) - ); - case MetaName.camAnimSceneDirectorMetadata: - return new PsoStructureInfo(MetaName.camAnimSceneDirectorMetadata, 0, 0, 32, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)2406434970, PsoDataType.String, 24, 7, 0) - ); - case MetaName.NonFlyableAreaArray: - return new PsoStructureInfo(MetaName.NonFlyableAreaArray, 0, 0, 24, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.NonFlyableArea), - new PsoStructureEntryInfo(MetaName.areas, PsoDataType.Array, 8, 0, 0) - ); - case MetaName.NonFlyableArea: - return new PsoStructureInfo(MetaName.NonFlyableArea, 0, 0, 32, - new PsoStructureEntryInfo((MetaName)2473579981, PsoDataType.Float4, 16, 0, 0) - ); - case MetaName.CAssassinsDispatch__Tunables: - return new PsoStructureInfo(MetaName.CAssassinsDispatch__Tunables, 0, 0, 80, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo((MetaName)2394623568, PsoDataType.Float, 16, 0, 0), - new PsoStructureEntryInfo((MetaName)3368196277, PsoDataType.Float, 20, 0, 0), - new PsoStructureEntryInfo((MetaName)2477967991, PsoDataType.Float, 24, 0, 0), - new PsoStructureEntryInfo((MetaName)3376433583, PsoDataType.String, 28, 7, 0), - new PsoStructureEntryInfo((MetaName)689054964, PsoDataType.String, 32, 7, 0), - new PsoStructureEntryInfo((MetaName)147587300, PsoDataType.Float, 36, 0, 0), - new PsoStructureEntryInfo((MetaName)201820320, PsoDataType.Float, 40, 0, 0), - new PsoStructureEntryInfo((MetaName)4035657267, PsoDataType.Float, 44, 0, 0), - new PsoStructureEntryInfo((MetaName)3058832678, PsoDataType.String, 48, 7, 0), - new PsoStructureEntryInfo((MetaName)2649613364, PsoDataType.String, 52, 7, 0), - new PsoStructureEntryInfo((MetaName)4282874513, PsoDataType.Float, 56, 0, 0), - new PsoStructureEntryInfo((MetaName)969882415, PsoDataType.Float, 60, 0, 0), - new PsoStructureEntryInfo((MetaName)2143223731, PsoDataType.Float, 64, 0, 0), - new PsoStructureEntryInfo((MetaName)1149455399, PsoDataType.String, 68, 7, 0), - new PsoStructureEntryInfo((MetaName)835576115, PsoDataType.String, 72, 7, 0) - ); - case MetaName.CTaskNMBuoyancy__Tunables: - return new PsoStructureInfo(MetaName.CTaskNMBuoyancy__Tunables, 0, 0, 48, - new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), - new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 16, 0, (MetaName)3749122641) - ); - case MetaName.fwProfanityFilter: - return new PsoStructureInfo(MetaName.fwProfanityFilter, 0, 0, 56, - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.profaneTerms, PsoDataType.Array, 8, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.reservedTerms, PsoDataType.Array, 24, 0, (MetaName)2), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), - new PsoStructureEntryInfo(MetaName.reservedFSCharacters, PsoDataType.Array, 40, 0, (MetaName)4) - ); - default: - return null; - } - } - public static PsoEnumInfo GetEnumInfo(MetaName name) - { - //to generate enuminfos - switch (name) - { - case (MetaName)360458334: //vehicle mod color metallic id - return new PsoEnumInfo((MetaName)360458334, 1, - new PsoEnumEntryInfo(MetaName.none, -1), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_normal, 0), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_1, 1), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_2, 2), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_3, 3), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_4, 4), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_5, 5), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_6, 6), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_7, 7), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_8, 8), - new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_9, 9) - ); - case (MetaName)544262540: //vehicle mod color audio color - return new PsoEnumInfo((MetaName)544262540, 1, - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_black, 0), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_blue, 1), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_brown, 2), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_beige, 3), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_graphite, 4), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_green, 5), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_grey, 6), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_orange, 7), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_pink, 8), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_red, 9), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_silver, 10), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_white, 11), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_yellow, 12) - ); - case (MetaName)2065815796: //vehicle mod color audio prefix - return new PsoEnumInfo((MetaName)2065815796, 1, - new PsoEnumEntryInfo(MetaName.none, 0), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_bright, 1), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_light, 2), - new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_dark, 3) - ); - case MetaName.eModKitType: //vehicle mod kit type - return new PsoEnumInfo(MetaName.eModKitType, 1, - new PsoEnumEntryInfo(MetaName.MKT_STANDARD, 0), - new PsoEnumEntryInfo(MetaName.MKT_SPORT, 1), - new PsoEnumEntryInfo(MetaName.MKT_SUV, 2), - new PsoEnumEntryInfo(MetaName.MKT_SPECIAL, 3) - ); - case MetaName.eVehicleModType: //vehicle mod type - return new PsoEnumInfo(MetaName.eVehicleModType, 1, - new PsoEnumEntryInfo(MetaName.VMT_SPOILER, 0), - new PsoEnumEntryInfo(MetaName.VMT_BUMPER_F, 1), - new PsoEnumEntryInfo(MetaName.VMT_BUMPER_R, 2), - new PsoEnumEntryInfo(MetaName.VMT_SKIRT, 3), - new PsoEnumEntryInfo(MetaName.VMT_EXHAUST, 4), - new PsoEnumEntryInfo(MetaName.VMT_CHASSIS, 5), - new PsoEnumEntryInfo(MetaName.VMT_GRILL, 6), - new PsoEnumEntryInfo(MetaName.VMT_BONNET, 7), - new PsoEnumEntryInfo(MetaName.VMT_WING_L, 8), - new PsoEnumEntryInfo(MetaName.VMT_WING_R, 9), - new PsoEnumEntryInfo(MetaName.VMT_ROOF, 10), - new PsoEnumEntryInfo(MetaName.VMT_PLTHOLDER, 11), - new PsoEnumEntryInfo(MetaName.VMT_PLTVANITY, 12), - new PsoEnumEntryInfo(MetaName.VMT_INTERIOR1, 13), - new PsoEnumEntryInfo(MetaName.VMT_INTERIOR2, 14), - new PsoEnumEntryInfo(MetaName.VMT_INTERIOR3, 15), - new PsoEnumEntryInfo(MetaName.VMT_INTERIOR4, 16), - new PsoEnumEntryInfo(MetaName.VMT_INTERIOR5, 17), - new PsoEnumEntryInfo(MetaName.VMT_SEATS, 18), - new PsoEnumEntryInfo(MetaName.VMT_STEERING, 19), - new PsoEnumEntryInfo(MetaName.VMT_KNOB, 20), - new PsoEnumEntryInfo(MetaName.VMT_PLAQUE, 21), - new PsoEnumEntryInfo(MetaName.VMT_ICE, 22), - new PsoEnumEntryInfo(MetaName.VMT_TRUNK, 23), - new PsoEnumEntryInfo(MetaName.VMT_HYDRO, 24), - new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY1, 25), - new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY2, 26), - new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY3, 27), - new PsoEnumEntryInfo(MetaName.VMT_CHASSIS2, 28), - new PsoEnumEntryInfo(MetaName.VMT_CHASSIS3, 29), - new PsoEnumEntryInfo(MetaName.VMT_CHASSIS4, 30), - new PsoEnumEntryInfo(MetaName.VMT_CHASSIS5, 31), - new PsoEnumEntryInfo(MetaName.VMT_DOOR_L, 32), - new PsoEnumEntryInfo(MetaName.VMT_DOOR_R, 33), - new PsoEnumEntryInfo(MetaName.VMT_LIVERY_MOD, 34), - new PsoEnumEntryInfo((MetaName)3409280882, 35), - new PsoEnumEntryInfo(MetaName.VMT_ENGINE, 36), - new PsoEnumEntryInfo(MetaName.VMT_BRAKES, 37), - new PsoEnumEntryInfo(MetaName.VMT_GEARBOX, 38), - new PsoEnumEntryInfo(MetaName.VMT_HORN, 39), - new PsoEnumEntryInfo(MetaName.VMT_SUSPENSION, 40), - new PsoEnumEntryInfo(MetaName.VMT_ARMOUR, 41), - new PsoEnumEntryInfo((MetaName)3278520444, 42), - new PsoEnumEntryInfo(MetaName.VMT_TURBO, 43), - new PsoEnumEntryInfo((MetaName)1675686396, 44), - new PsoEnumEntryInfo(MetaName.VMT_TYRE_SMOKE, 45), - new PsoEnumEntryInfo(MetaName.VMT_HYDRAULICS, 46), - new PsoEnumEntryInfo(MetaName.VMT_XENON_LIGHTS, 47), - new PsoEnumEntryInfo(MetaName.VMT_WHEELS, 48), - new PsoEnumEntryInfo(MetaName.VMT_WHEELS_REAR_OR_HYDRAULICS, 49) - ); - case (MetaName)3635907608: //vehicle mod bone - return new PsoEnumInfo((MetaName)3635907608, 1, - new PsoEnumEntryInfo(MetaName.none, -1), - new PsoEnumEntryInfo(MetaName.chassis, 0), - new PsoEnumEntryInfo(MetaName.bodyshell, 48), - new PsoEnumEntryInfo(MetaName.bumper_f, 49), - new PsoEnumEntryInfo(MetaName.bumper_r, 50), - new PsoEnumEntryInfo(MetaName.wing_rf, 51), - new PsoEnumEntryInfo(MetaName.wing_lf, 52), - new PsoEnumEntryInfo(MetaName.bonnet, 53), - new PsoEnumEntryInfo(MetaName.boot, 54), - new PsoEnumEntryInfo(MetaName.exhaust, 56), - new PsoEnumEntryInfo(MetaName.exhaust_2, 57), - new PsoEnumEntryInfo(MetaName.exhaust_3, 58), - new PsoEnumEntryInfo(MetaName.exhaust_4, 59), - new PsoEnumEntryInfo(MetaName.exhaust_5, 60), - new PsoEnumEntryInfo(MetaName.exhaust_6, 61), - new PsoEnumEntryInfo(MetaName.exhaust_7, 62), - new PsoEnumEntryInfo(MetaName.exhaust_8, 63), - new PsoEnumEntryInfo(MetaName.exhaust_9, 64), - new PsoEnumEntryInfo(MetaName.exhaust_10, 65), - new PsoEnumEntryInfo(MetaName.exhaust_11, 66), - new PsoEnumEntryInfo(MetaName.exhaust_12, 67), - new PsoEnumEntryInfo(MetaName.exhaust_13, 68), - new PsoEnumEntryInfo(MetaName.exhaust_14, 69), - new PsoEnumEntryInfo(MetaName.exhaust_15, 70), - new PsoEnumEntryInfo(MetaName.exhaust_16, 71), - new PsoEnumEntryInfo(MetaName.extra_1, 401), - new PsoEnumEntryInfo(MetaName.extra_2, 402), - new PsoEnumEntryInfo(MetaName.extra_3, 403), - new PsoEnumEntryInfo(MetaName.extra_4, 404), - new PsoEnumEntryInfo(MetaName.extra_5, 405), - new PsoEnumEntryInfo(MetaName.extra_6, 406), - new PsoEnumEntryInfo(MetaName.extra_7, 407), - new PsoEnumEntryInfo(MetaName.extra_8, 408), - new PsoEnumEntryInfo(MetaName.extra_9, 409), - new PsoEnumEntryInfo(MetaName.extra_10, 410), - new PsoEnumEntryInfo(MetaName.extra_11, 411), - new PsoEnumEntryInfo(MetaName.extra_12, 412), - new PsoEnumEntryInfo(MetaName.extra_13, 413), - new PsoEnumEntryInfo(MetaName.extra_14, 414), - new PsoEnumEntryInfo(MetaName.break_extra_1, 417), - new PsoEnumEntryInfo(MetaName.break_extra_2, 418), - new PsoEnumEntryInfo(MetaName.break_extra_3, 419), - new PsoEnumEntryInfo(MetaName.break_extra_4, 420), - new PsoEnumEntryInfo(MetaName.break_extra_5, 421), - new PsoEnumEntryInfo(MetaName.break_extra_6, 422), - new PsoEnumEntryInfo(MetaName.break_extra_7, 423), - new PsoEnumEntryInfo(MetaName.break_extra_8, 424), - new PsoEnumEntryInfo(MetaName.break_extra_9, 425), - new PsoEnumEntryInfo(MetaName.break_extra_10, 426), - new PsoEnumEntryInfo(MetaName.mod_col_1, 427), - new PsoEnumEntryInfo(MetaName.mod_col_2, 428), - new PsoEnumEntryInfo(MetaName.mod_col_3, 429), - new PsoEnumEntryInfo(MetaName.mod_col_4, 430), - new PsoEnumEntryInfo(MetaName.mod_col_5, 431), - new PsoEnumEntryInfo(MetaName.mod_col_6, 432), - new PsoEnumEntryInfo(MetaName.mod_col_7, 433), - new PsoEnumEntryInfo(MetaName.mod_col_8, 434), - new PsoEnumEntryInfo(MetaName.mod_col_9, 435), - new PsoEnumEntryInfo(MetaName.mod_col_10, 436), - new PsoEnumEntryInfo(MetaName.mod_col_11, 437), - new PsoEnumEntryInfo(MetaName.mod_col_12, 438), - new PsoEnumEntryInfo(MetaName.mod_col_13, 439), - new PsoEnumEntryInfo(MetaName.mod_col_14, 440), - new PsoEnumEntryInfo(MetaName.mod_col_15, 441), - new PsoEnumEntryInfo(MetaName.mod_col_16, 442), - new PsoEnumEntryInfo(MetaName.misc_a, 369), - new PsoEnumEntryInfo(MetaName.misc_b, 370), - new PsoEnumEntryInfo(MetaName.misc_c, 371), - new PsoEnumEntryInfo(MetaName.misc_d, 372), - new PsoEnumEntryInfo(MetaName.misc_e, 373), - new PsoEnumEntryInfo(MetaName.misc_f, 374), - new PsoEnumEntryInfo(MetaName.misc_g, 375), - new PsoEnumEntryInfo(MetaName.misc_h, 376), - new PsoEnumEntryInfo(MetaName.misc_i, 377), - new PsoEnumEntryInfo(MetaName.misc_j, 378), - new PsoEnumEntryInfo(MetaName.misc_k, 379), - new PsoEnumEntryInfo(MetaName.misc_l, 380), - new PsoEnumEntryInfo(MetaName.misc_m, 381), - new PsoEnumEntryInfo(MetaName.misc_n, 382), - new PsoEnumEntryInfo(MetaName.misc_o, 383), - new PsoEnumEntryInfo(MetaName.misc_p, 384), - new PsoEnumEntryInfo(MetaName.misc_q, 385), - new PsoEnumEntryInfo(MetaName.misc_r, 386), - new PsoEnumEntryInfo(MetaName.misc_s, 387), - new PsoEnumEntryInfo(MetaName.misc_t, 388), - new PsoEnumEntryInfo(MetaName.misc_u, 389), - new PsoEnumEntryInfo(MetaName.misc_v, 390), - new PsoEnumEntryInfo(MetaName.misc_w, 391), - new PsoEnumEntryInfo(MetaName.misc_x, 392), - new PsoEnumEntryInfo(MetaName.misc_y, 393), - new PsoEnumEntryInfo(MetaName.misc_z, 394), - new PsoEnumEntryInfo(MetaName.misc_1, 395), - new PsoEnumEntryInfo(MetaName.misc_2, 396), - new PsoEnumEntryInfo(MetaName.handlebars, 79), - new PsoEnumEntryInfo(MetaName.steeringwheel, 80), - new PsoEnumEntryInfo(MetaName.swingarm, 29), - new PsoEnumEntryInfo(MetaName.forks_u, 21), - new PsoEnumEntryInfo(MetaName.forks_l, 22), - new PsoEnumEntryInfo(MetaName.headlight_l, 91), - new PsoEnumEntryInfo(MetaName.headlight_r, 92), - new PsoEnumEntryInfo(MetaName.indicator_lr, 97), - new PsoEnumEntryInfo(MetaName.indicator_lf, 95), - new PsoEnumEntryInfo(MetaName.indicator_rr, 98), - new PsoEnumEntryInfo(MetaName.indicator_rf, 96), - new PsoEnumEntryInfo(MetaName.taillight_l, 93), - new PsoEnumEntryInfo(MetaName.taillight_r, 94), - new PsoEnumEntryInfo(MetaName.window_lf, 42), - new PsoEnumEntryInfo(MetaName.window_rf, 43), - new PsoEnumEntryInfo(MetaName.window_rr, 45), - new PsoEnumEntryInfo(MetaName.window_lr, 44), - new PsoEnumEntryInfo(MetaName.window_lm, 46), - new PsoEnumEntryInfo(MetaName.window_rm, 47), - new PsoEnumEntryInfo(MetaName.hub_lf, 30), - new PsoEnumEntryInfo(MetaName.hub_rf, 31), - new PsoEnumEntryInfo(MetaName.windscreen_r, 41), - new PsoEnumEntryInfo(MetaName.neon_l, 104), - new PsoEnumEntryInfo(MetaName.neon_r, 105), - new PsoEnumEntryInfo(MetaName.neon_f, 106), - new PsoEnumEntryInfo(MetaName.neon_b, 107), - new PsoEnumEntryInfo(MetaName.door_dside_f, 3), - new PsoEnumEntryInfo(MetaName.door_dside_r, 4), - new PsoEnumEntryInfo(MetaName.door_pside_f, 5), - new PsoEnumEntryInfo(MetaName.door_pside_r, 6), - new PsoEnumEntryInfo(MetaName.bobble_head, 361), - new PsoEnumEntryInfo(MetaName.bobble_base, 362), - new PsoEnumEntryInfo(MetaName.bobble_hand, 363), - new PsoEnumEntryInfo(MetaName.engineblock, 364), - new PsoEnumEntryInfo(MetaName.mod_a, 474), - new PsoEnumEntryInfo(MetaName.mod_b, 475), - new PsoEnumEntryInfo(MetaName.mod_c, 476), - new PsoEnumEntryInfo(MetaName.mod_d, 477), - new PsoEnumEntryInfo(MetaName.mod_e, 478), - new PsoEnumEntryInfo(MetaName.mod_f, 479), - new PsoEnumEntryInfo(MetaName.mod_g, 480), - new PsoEnumEntryInfo(MetaName.mod_h, 481), - new PsoEnumEntryInfo(MetaName.mod_i, 482), - new PsoEnumEntryInfo(MetaName.mod_j, 483), - new PsoEnumEntryInfo(MetaName.mod_k, 484), - new PsoEnumEntryInfo(MetaName.mod_l, 485), - new PsoEnumEntryInfo(MetaName.mod_m, 486), - new PsoEnumEntryInfo(MetaName.mod_n, 487), - new PsoEnumEntryInfo(MetaName.mod_o, 488), - new PsoEnumEntryInfo(MetaName.mod_p, 489), - new PsoEnumEntryInfo(MetaName.mod_q, 490), - new PsoEnumEntryInfo(MetaName.mod_r, 491), - new PsoEnumEntryInfo(MetaName.mod_s, 492), - new PsoEnumEntryInfo(MetaName.mod_t, 493), - new PsoEnumEntryInfo(MetaName.mod_u, 494), - new PsoEnumEntryInfo(MetaName.mod_v, 495), - new PsoEnumEntryInfo(MetaName.mod_w, 496), - new PsoEnumEntryInfo(MetaName.mod_x, 497), - new PsoEnumEntryInfo(MetaName.mod_y, 498), - new PsoEnumEntryInfo(MetaName.mod_z, 499), - new PsoEnumEntryInfo(MetaName.mod_aa, 500), - new PsoEnumEntryInfo(MetaName.mod_ab, 501), - new PsoEnumEntryInfo(MetaName.mod_ac, 502), - new PsoEnumEntryInfo(MetaName.mod_ad, 503), - new PsoEnumEntryInfo(MetaName.mod_ae, 504), - new PsoEnumEntryInfo(MetaName.mod_af, 505), - new PsoEnumEntryInfo(MetaName.mod_ag, 506), - new PsoEnumEntryInfo(MetaName.mod_ah, 507), - new PsoEnumEntryInfo(MetaName.mod_ai, 508), - new PsoEnumEntryInfo(MetaName.mod_aj, 509), - new PsoEnumEntryInfo(MetaName.mod_ak, 510), - new PsoEnumEntryInfo(MetaName.turret_a1, 511), - new PsoEnumEntryInfo(MetaName.turret_a2, 512), - new PsoEnumEntryInfo(MetaName.turret_a3, 513), - new PsoEnumEntryInfo(MetaName.turret_a4, 514), - new PsoEnumEntryInfo(MetaName.turret_b1, 524), - new PsoEnumEntryInfo(MetaName.turret_b2, 525), - new PsoEnumEntryInfo(MetaName.turret_b3, 526), - new PsoEnumEntryInfo(MetaName.turret_b4, 527), - new PsoEnumEntryInfo(MetaName.rblade_1mod, 560), - new PsoEnumEntryInfo(MetaName.rblade_1fast, 561), - new PsoEnumEntryInfo(MetaName.rblade_2mod, 562), - new PsoEnumEntryInfo(MetaName.rblade_2fast, 563), - new PsoEnumEntryInfo(MetaName.rblade_3mod, 564), - new PsoEnumEntryInfo(MetaName.rblade_3fast, 565), - new PsoEnumEntryInfo(MetaName.fblade_1mod, 566), - new PsoEnumEntryInfo(MetaName.fblade_1fast, 567), - new PsoEnumEntryInfo(MetaName.fblade_2mod, 568), - new PsoEnumEntryInfo(MetaName.fblade_2fast, 569), - new PsoEnumEntryInfo(MetaName.fblade_3mod, 570), - new PsoEnumEntryInfo(MetaName.fblade_3fast, 571), - new PsoEnumEntryInfo((MetaName)1086719913, 572), - new PsoEnumEntryInfo((MetaName)3237490897, 573), - new PsoEnumEntryInfo((MetaName)3375838140, 574), - new PsoEnumEntryInfo((MetaName)2381840182, 575), - new PsoEnumEntryInfo((MetaName)3607058940, 576), - new PsoEnumEntryInfo((MetaName)3607058940, 577), - new PsoEnumEntryInfo((MetaName)1208798824, 578), - new PsoEnumEntryInfo((MetaName)303656220, 579), - new PsoEnumEntryInfo((MetaName)660207018, 580), - new PsoEnumEntryInfo(MetaName.spike_1mod, 581), - new PsoEnumEntryInfo((MetaName)3045655218, 582), - new PsoEnumEntryInfo((MetaName)2017296145, 583), - new PsoEnumEntryInfo(MetaName.spike_2mod, 584), - new PsoEnumEntryInfo((MetaName)1122332083, 585), - new PsoEnumEntryInfo((MetaName)1123212214, 586), - new PsoEnumEntryInfo(MetaName.spike_3mod, 587), - new PsoEnumEntryInfo((MetaName)4011591561, 588), - new PsoEnumEntryInfo((MetaName)2320654166, 589), - new PsoEnumEntryInfo(MetaName.scoop_1mod, 590), - new PsoEnumEntryInfo(MetaName.scoop_2mod, 591), - new PsoEnumEntryInfo(MetaName.scoop_3mod, 592) - ); - case MetaName.eVehicleModCameraPos: //vehicle mod camera position - return new PsoEnumInfo(MetaName.eVehicleModCameraPos, 1, - new PsoEnumEntryInfo(MetaName.VMCP_DEFAULT, 0), - new PsoEnumEntryInfo(MetaName.VMCP_FRONT, 1), - new PsoEnumEntryInfo(MetaName.VMCP_FRONT_LEFT, 2), - new PsoEnumEntryInfo(MetaName.VMCP_FRONT_RIGHT, 3), - new PsoEnumEntryInfo(MetaName.VMCP_REAR, 4), - new PsoEnumEntryInfo(MetaName.VMCP_REAR_LEFT, 5), - new PsoEnumEntryInfo(MetaName.VMCP_REAR_RIGHT, 6), - new PsoEnumEntryInfo(MetaName.VMCP_LEFT, 7), - new PsoEnumEntryInfo(MetaName.VMCP_RIGHT, 8), - new PsoEnumEntryInfo(MetaName.VMCP_TOP, 9), - new PsoEnumEntryInfo(MetaName.VMCP_BOTTOM, 10) - ); - case (MetaName)1795685103: //credit item job line type - return new PsoEnumInfo((MetaName)1795685103, 1, - new PsoEnumEntryInfo(MetaName.JOB_BIG, 0), - new PsoEnumEntryInfo(MetaName.JOB_MED, 1), - new PsoEnumEntryInfo(MetaName.JOB_SMALL, 2), - new PsoEnumEntryInfo(MetaName.NAME_BIG, 3), - new PsoEnumEntryInfo(MetaName.NAME_MED, 4), - new PsoEnumEntryInfo(MetaName.NAME_SMALL, 5), - new PsoEnumEntryInfo(MetaName.SPACE_BIG, 6), - new PsoEnumEntryInfo(MetaName.SPACE_MED, 7), - new PsoEnumEntryInfo(MetaName.SPACE_SMALL, 8), - new PsoEnumEntryInfo(MetaName.SPACE_END, 9), - new PsoEnumEntryInfo(MetaName.SPRITE_1, 10), - new PsoEnumEntryInfo(MetaName.LEGALS, 11), - new PsoEnumEntryInfo(MetaName.AUDIO_NAME, 12), - new PsoEnumEntryInfo(MetaName.AUDIO_LEGALS, 13), - new PsoEnumEntryInfo(MetaName.JOB_AND_NAME_MED, 14) - ); - case MetaName.DataFileType: - return new PsoEnumInfo(MetaName.DataFileType, 1, - new PsoEnumEntryInfo(MetaName.RPF_FILE, 0), - new PsoEnumEntryInfo(MetaName.IDE_FILE, 1), - new PsoEnumEntryInfo(MetaName.DELAYED_IDE_FILE, 2), - new PsoEnumEntryInfo(MetaName.IPL_FILE, 3), - new PsoEnumEntryInfo(MetaName.PERMANENT_ITYP_FILE, 4), - new PsoEnumEntryInfo((MetaName)4175147664, 5), - new PsoEnumEntryInfo(MetaName.HANDLING_FILE, 6), - new PsoEnumEntryInfo(MetaName.VEHICLEEXTRAS_FILE, 7), - new PsoEnumEntryInfo(MetaName.CHINESE_SHUFFLING_CHECKS_FILE, 8), - new PsoEnumEntryInfo(MetaName.PEDSTREAM_FILE, 9), - new PsoEnumEntryInfo(MetaName.CARCOLS_FILE, 10), - new PsoEnumEntryInfo(MetaName.POPGRP_FILE, 11), - new PsoEnumEntryInfo((MetaName)337231870, 12), - new PsoEnumEntryInfo((MetaName)3783701680, 13), - new PsoEnumEntryInfo(MetaName.POPSCHED_FILE, 14), - new PsoEnumEntryInfo(MetaName.ZONEBIND_FILE, 15), - new PsoEnumEntryInfo(MetaName.RADIO_FILE, 16), - new PsoEnumEntryInfo(MetaName.EXTRAMAP_CONVERSION_OCC_FILE, 17), - new PsoEnumEntryInfo(MetaName.THROWNWEAPONINFO_FILE, 18), - new PsoEnumEntryInfo(MetaName.RMPTFX_FILE, 19), - new PsoEnumEntryInfo(MetaName.PED_PERSONALITY_FILE, 20), - new PsoEnumEntryInfo(MetaName.PED_PERCEPTION_FILE, 21), - new PsoEnumEntryInfo(MetaName.VEHICLE_CAMERA_OFFSETS_FILE, 22), - new PsoEnumEntryInfo(MetaName.FRONTEND_MENU_FILE, 23), - new PsoEnumEntryInfo(MetaName.LEADERBOARD_DATA_FILE, 24), - new PsoEnumEntryInfo(MetaName.LEADERBOARD_ICONS_FILE, 25), - new PsoEnumEntryInfo(MetaName.NETWORKOPTIONS_FILE, 26), - new PsoEnumEntryInfo(MetaName.TIMECYCLE_FILE, 27), - new PsoEnumEntryInfo(MetaName.TIMECYCLEMOD_FILE, 28), - new PsoEnumEntryInfo(MetaName.WEATHER_FILE, 29), - new PsoEnumEntryInfo((MetaName)2403189033, 30), - new PsoEnumEntryInfo((MetaName)2431127142, 31), - new PsoEnumEntryInfo(MetaName.PROCOBJ_FILE, 32), - new PsoEnumEntryInfo(MetaName.PROC_META_FILE, 33), - new PsoEnumEntryInfo(MetaName.VFX_SETTINGS_FILE, 34), - new PsoEnumEntryInfo(MetaName.SP_STATS_DISPLAY_LIST_FILE, 35), - new PsoEnumEntryInfo(MetaName.MP_STATS_DISPLAY_LIST_FILE, 36), - new PsoEnumEntryInfo(MetaName.PED_VARS_FILE, 37), - new PsoEnumEntryInfo(MetaName.DISABLE_FILE, 38), - new PsoEnumEntryInfo(MetaName.BUILDING_META_DISPLACEMENT_FILE, 39), - new PsoEnumEntryInfo(MetaName.HUD_TXD_FILE, 40), - new PsoEnumEntryInfo(MetaName.FRONTEND_DAT_FILE, 41), - new PsoEnumEntryInfo(MetaName.SCROLLBARS_FILE, 42), - new PsoEnumEntryInfo(MetaName.TIME_FILE, 43), - new PsoEnumEntryInfo(MetaName.BLOODFX_FILE, 44), - new PsoEnumEntryInfo(MetaName.ENTITYFX_FILE, 45), - new PsoEnumEntryInfo(MetaName.EXPLOSIONFX_FILE, 46), - new PsoEnumEntryInfo(MetaName.MATERIALFX_FILE, 47), - new PsoEnumEntryInfo(MetaName.MOTION_TASK_DATA_FILE, 48), - new PsoEnumEntryInfo(MetaName.DEFAULT_TASK_DATA_FILE, 49), - new PsoEnumEntryInfo(MetaName.MOUNT_TUNE_FILE, 50), - new PsoEnumEntryInfo(MetaName.PED_BOUNDS_FILE, 51), - new PsoEnumEntryInfo(MetaName.PED_HEALTH_FILE, 52), - new PsoEnumEntryInfo(MetaName.PED_COMPONENT_SETS_FILE, 53), - new PsoEnumEntryInfo(MetaName.PED_IK_SETTINGS_FILE, 54), - new PsoEnumEntryInfo(MetaName.PED_TASK_DATA_FILE, 55), - new PsoEnumEntryInfo(MetaName.PED_SPECIAL_ABILITIES_FILE, 56), - new PsoEnumEntryInfo(MetaName.WHEELFX_FILE, 57), - new PsoEnumEntryInfo(MetaName.WEAPONFX_FILE, 58), - new PsoEnumEntryInfo(MetaName.DECALS_FILE, 59), - new PsoEnumEntryInfo(MetaName.NAVMESH_INDEXREMAPPING_FILE, 60), - new PsoEnumEntryInfo(MetaName.NAVNODE_INDEXREMAPPING_FILE, 61), - new PsoEnumEntryInfo(MetaName.AUDIOMESH_INDEXREMAPPING_FILE, 62), - new PsoEnumEntryInfo(MetaName.JUNCTION_TEMPLATES_FILE, 63), - new PsoEnumEntryInfo(MetaName.PATH_ZONES_FILE, 64), - new PsoEnumEntryInfo(MetaName.DISTANT_LIGHTS_FILE, 65), - new PsoEnumEntryInfo(MetaName.DISTANT_LIGHTS_HD_FILE, 66), - new PsoEnumEntryInfo(MetaName.FLIGHTZONES_FILE, 67), - new PsoEnumEntryInfo(MetaName.WATER_FILE, 68), - new PsoEnumEntryInfo(MetaName.TRAINCONFIGS_FILE, 69), - new PsoEnumEntryInfo(MetaName.TRAINTRACK_FILE, 70), - new PsoEnumEntryInfo(MetaName.PED_METADATA_FILE, 71), - new PsoEnumEntryInfo(MetaName.WEAPON_METADATA_FILE, 72), - new PsoEnumEntryInfo(MetaName.VEHICLE_METADATA_FILE, 73), - new PsoEnumEntryInfo(MetaName.DISPATCH_DATA_FILE, 74), - new PsoEnumEntryInfo(MetaName.DEFORMABLE_OBJECTS_FILE, 75), - new PsoEnumEntryInfo(MetaName.TUNABLE_OBJECTS_FILE, 76), - new PsoEnumEntryInfo(MetaName.PED_NAV_CAPABILITES_FILE, 77), - new PsoEnumEntryInfo(MetaName.WEAPONINFO_FILE, 78), - new PsoEnumEntryInfo(MetaName.WEAPONCOMPONENTSINFO_FILE, 79), - new PsoEnumEntryInfo(MetaName.LOADOUTS_FILE, 80), - new PsoEnumEntryInfo(MetaName.FIRINGPATTERNS_FILE, 81), - new PsoEnumEntryInfo(MetaName.MOTIVATIONS_FILE, 82), - new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_FILE, 83), - new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_PSO_FILE, 84), - new PsoEnumEntryInfo(MetaName.STREAMING_FILE, 85), - new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_PS3, 86), - new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_XENON, 87), - new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_OTHER, 88), - new PsoEnumEntryInfo(MetaName.PED_BRAWLING_STYLE_FILE, 89), - new PsoEnumEntryInfo(MetaName.AMBIENT_PED_MODEL_SET_FILE, 90), - new PsoEnumEntryInfo(MetaName.AMBIENT_PROP_MODEL_SET_FILE, 91), - new PsoEnumEntryInfo(MetaName.AMBIENT_VEHICLE_MODEL_SET_FILE, 92), - new PsoEnumEntryInfo(MetaName.LADDER_METADATA_FILE, 93), - new PsoEnumEntryInfo((MetaName)4108615940, 94), - new PsoEnumEntryInfo(MetaName.SLOWNESS_ZONES_FILE, 95), - new PsoEnumEntryInfo(MetaName.LIQUIDFX_FILE, 96), - new PsoEnumEntryInfo(MetaName.VFXVEHICLEINFO_FILE, 97), - new PsoEnumEntryInfo(MetaName.VFXPEDINFO_FILE, 98), - new PsoEnumEntryInfo(MetaName.DOOR_TUNING_FILE, 99), - new PsoEnumEntryInfo(MetaName.PTFXASSETINFO_FILE, 100), - new PsoEnumEntryInfo(MetaName.SCRIPTFX_FILE, 101), - new PsoEnumEntryInfo(MetaName.VFXREGIONINFO_FILE, 102), - new PsoEnumEntryInfo(MetaName.VFXINTERIORINFO_FILE, 103), - new PsoEnumEntryInfo(MetaName.CAMERA_METADATA_FILE, 104), - new PsoEnumEntryInfo(MetaName.STREET_VEHICLE_ASSOCIATION_FILE, 105), - new PsoEnumEntryInfo(MetaName.VFXWEAPONINFO_FILE, 106), - new PsoEnumEntryInfo(MetaName.EXPLOSION_INFO_FILE, 107), - new PsoEnumEntryInfo(MetaName.JUNCTION_TEMPLATES_PSO_FILE, 108), - new PsoEnumEntryInfo(MetaName.MAPZONES_FILE, 109), - new PsoEnumEntryInfo(MetaName.SP_STATS_UI_LIST_FILE, 110), - new PsoEnumEntryInfo(MetaName.MP_STATS_UI_LIST_FILE, 111), - new PsoEnumEntryInfo(MetaName.OBJ_COVER_TUNING_FILE, 112), - new PsoEnumEntryInfo(MetaName.STREAMING_REQUEST_LISTS_FILE, 113), - new PsoEnumEntryInfo(MetaName.PLAYER_CARD_SETUP, 114), - new PsoEnumEntryInfo(MetaName.WORLD_HEIGHTMAP_FILE, 115), - new PsoEnumEntryInfo(MetaName.WORLD_WATERHEIGHT_FILE, 116), - new PsoEnumEntryInfo(MetaName.PED_OVERLAY_FILE, 117), - new PsoEnumEntryInfo(MetaName.WEAPON_ANIMATIONS_FILE, 118), - new PsoEnumEntryInfo(MetaName.VEHICLE_POPULATION_FILE, 119), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_DEFINITIONS, 120), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_RESULTS, 121), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_IMPULSES, 122), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_RUMBLES, 123), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_INTERRELATIONS, 124), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_HOMINGS, 125), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_DAMAGES, 126), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_STRIKE_BONES, 127), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_BRANCHES, 128), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_STEALTH_KILLS, 129), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_VFX, 130), - new PsoEnumEntryInfo(MetaName.ACTION_TABLE_FACIAL_ANIM_SETS, 131), - new PsoEnumEntryInfo(MetaName.VEHGEN_MARKUP_FILE, 132), - new PsoEnumEntryInfo(MetaName.PED_COMPONENT_CLOTH_FILE, 133), - new PsoEnumEntryInfo(MetaName.TATTOO_SHOP_DLC_FILE, 134), - new PsoEnumEntryInfo(MetaName.VEHICLE_VARIATION_FILE, 135), - new PsoEnumEntryInfo(MetaName.CONTENT_UNLOCKING_META_FILE, 136), - new PsoEnumEntryInfo(MetaName.SHOP_PED_APPAREL_META_FILE, 137), - new PsoEnumEntryInfo(MetaName.AUDIO_SOUNDDATA, 138), - new PsoEnumEntryInfo(MetaName.AUDIO_CURVEDATA, 139), - new PsoEnumEntryInfo(MetaName.AUDIO_GAMEDATA, 140), - new PsoEnumEntryInfo(MetaName.AUDIO_DYNAMIXDATA, 141), - new PsoEnumEntryInfo(MetaName.AUDIO_SPEECHDATA, 142), - new PsoEnumEntryInfo(MetaName.AUDIO_SYNTHDATA, 143), - new PsoEnumEntryInfo(MetaName.AUDIO_WAVEPACK, 144), - new PsoEnumEntryInfo(MetaName.CLIP_SETS_FILE, 145), - new PsoEnumEntryInfo(MetaName.EXPRESSION_SETS_FILE, 146), - new PsoEnumEntryInfo(MetaName.FACIAL_CLIPSET_GROUPS_FILE, 147), - new PsoEnumEntryInfo((MetaName)1603688191, 148), - new PsoEnumEntryInfo(MetaName.VEHICLE_SHOP_DLC_FILE, 149), - new PsoEnumEntryInfo(MetaName.WEAPON_SHOP_INFO_METADATA_FILE, 150), - new PsoEnumEntryInfo(MetaName.SCALEFORM_PREALLOC_FILE, 151), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE, 152), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_360, 153), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_PS3, 154), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_PS3_JPN, 155), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_ORBIS, 156), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_ORBIS_JPN, 157), - new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_DURANGO, 158), - new PsoEnumEntryInfo((MetaName)25671749, 159), - new PsoEnumEntryInfo(MetaName.TEXTFILE_METAFILE, 160), - new PsoEnumEntryInfo(MetaName.NM_TUNING_FILE, 161), - new PsoEnumEntryInfo(MetaName.MOVE_NETWORK_DEFS, 162), - new PsoEnumEntryInfo(MetaName.WEAPONINFO_FILE_PATCH, 163), - new PsoEnumEntryInfo(MetaName.DLC_SCRIPT_METAFILE, 164), - new PsoEnumEntryInfo(MetaName.VEHICLE_LAYOUTS_FILE, 165), - new PsoEnumEntryInfo(MetaName.DLC_WEAPON_PICKUPS, 166), - new PsoEnumEntryInfo(MetaName.EXTRA_TITLE_UPDATE_DATA, 167), - new PsoEnumEntryInfo(MetaName.SCALEFORM_DLC_FILE, 168), - new PsoEnumEntryInfo(MetaName.OVERLAY_INFO_FILE, 169), - new PsoEnumEntryInfo(MetaName.ALTERNATE_VARIATIONS_FILE, 170), - new PsoEnumEntryInfo(MetaName.HORSE_REINS_FILE, 171), - new PsoEnumEntryInfo(MetaName.FIREFX_FILE, 172), - new PsoEnumEntryInfo(MetaName.INTERIOR_PROXY_ORDER_FILE, 173), - new PsoEnumEntryInfo(MetaName.DLC_ITYP_REQUEST, 174), - new PsoEnumEntryInfo(MetaName.EXTRA_FOLDER_MOUNT_DATA, 175), - new PsoEnumEntryInfo(MetaName.AMB_PROCEDURAL_BLOOD_FILE, 176), - new PsoEnumEntryInfo(MetaName.SCRIPT_BRAIN_FILE, 177), - new PsoEnumEntryInfo(MetaName.SCALEFORM_VALID_METHODS_FILE, 178), - new PsoEnumEntryInfo(MetaName.DLC_POP_GROUPS, 179), - new PsoEnumEntryInfo((MetaName)2145817864, 180), - new PsoEnumEntryInfo(MetaName.SCENARIO_INFO_FILE, 181), - new PsoEnumEntryInfo(MetaName.CONDITIONAL_ANIMS_FILE, 182), - new PsoEnumEntryInfo(MetaName.STATS_METADATA_PSO_FILE, 183), - new PsoEnumEntryInfo(MetaName.VFXFOGVOLUMEINFO_FILE, 184), - new PsoEnumEntryInfo(MetaName.RPF_FILE_PRE_INSTALL, 185), - new PsoEnumEntryInfo((MetaName)341493400, 186), - new PsoEnumEntryInfo(MetaName.LEVEL_STREAMING_FILE, 187), - new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_OVERRIDE_FILE, 188), - new PsoEnumEntryInfo((MetaName)2800880346, 189), - new PsoEnumEntryInfo(MetaName.DRIVER_RULES_STD_FILE, 190), - new PsoEnumEntryInfo(MetaName.PED_FIRST_PERSON_ASSET_DATA, 191), - new PsoEnumEntryInfo(MetaName.GTXD_PARENTING_DATA, 192), - new PsoEnumEntryInfo(MetaName.COMBAT_BEHAVIOUR_OVERRIDE_FILE, 193), - new PsoEnumEntryInfo(MetaName.EVENTS_OVERRIDE_FILE, 194), - new PsoEnumEntryInfo(MetaName.PED_DAMAGE_OVERRIDE_FILE, 195), - new PsoEnumEntryInfo(MetaName.PED_DAMAGE_APPEND_FILE, 196), - new PsoEnumEntryInfo(MetaName.BACKGROUND_SCRIPT_FILE, 197), - new PsoEnumEntryInfo(MetaName.PS3_SCRIPT_RPF, 198), - new PsoEnumEntryInfo(MetaName.X360_SCRIPT_RPF, 199), - new PsoEnumEntryInfo(MetaName.PED_FIRST_PERSON_ALTERNATE_DATA, 200) - ); - case MetaName.DataFileContents: - return new PsoEnumInfo(MetaName.DataFileContents, 1, - new PsoEnumEntryInfo(MetaName.CONTENTS_DEFAULT, 0), - new PsoEnumEntryInfo(MetaName.CONTENTS_PROPS, 1), - new PsoEnumEntryInfo(MetaName.CONTENTS_MAP, 2), - new PsoEnumEntryInfo(MetaName.CONTENTS_LODS, 3), - new PsoEnumEntryInfo(MetaName.CONTENTS_PEDS, 4), - new PsoEnumEntryInfo(MetaName.CONTENTS_VEHICLES, 5), - new PsoEnumEntryInfo(MetaName.CONTENTS_ANIMATION, 6), - new PsoEnumEntryInfo(MetaName.CONTENTS_CUTSCENE, 7), - new PsoEnumEntryInfo(MetaName.CONTENTS_DLC_MAP_DATA, 8), - new PsoEnumEntryInfo(MetaName.CONTENTS_DEBUG_ONLY, 9), - new PsoEnumEntryInfo(MetaName.CONTENTS_MAX, 10) - ); - case MetaName.InstallPartition: - return new PsoEnumInfo(MetaName.InstallPartition, 1, - new PsoEnumEntryInfo(MetaName.PARTITION_NONE, -1), - new PsoEnumEntryInfo(MetaName.PARTITION_0, 0), - new PsoEnumEntryInfo(MetaName.PARTITION_1, 1), - new PsoEnumEntryInfo(MetaName.PARTITION_2, 2), - new PsoEnumEntryInfo(MetaName.PARTITION_MAX, 3) - ); - case MetaName.ePedRadioGenre: - return new PsoEnumInfo(MetaName.ePedRadioGenre, 1, - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_OFF, 0), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MODERN_ROCK, 1), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_CLASSIC_ROCK, 2), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_POP, 3), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MODERN_HIPHOP, 4), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_CLASSIC_HIPHOP, 5), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_PUNK, 6), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_LEFT_WING_TALK, 7), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_RIGHT_WING_TALK, 8), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_COUNTRY, 9), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_DANCE, 10), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MEXICAN, 11), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_REGGAE, 12), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_JAZZ, 13), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MOTOWN, 14), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_SURF, 15), - new PsoEnumEntryInfo(MetaName.RADIO_GENRE_UNSPECIFIED, 16) - ); - case MetaName.eSexinessFlags: - return new PsoEnumInfo(MetaName.eSexinessFlags, 1, - new PsoEnumEntryInfo(MetaName.SF_JEER_AT_HOT_PED, 0), - new PsoEnumEntryInfo((MetaName)296569367, 1), - new PsoEnumEntryInfo(MetaName.SF_HOT_PERSON, 2) - ); - case MetaName.eExternallyDrivenDOFs: - return new PsoEnumInfo(MetaName.eExternallyDrivenDOFs, 1, - new PsoEnumEntryInfo(MetaName.EMPTY, 0), - new PsoEnumEntryInfo(MetaName.HIGH_HEELS, 1), - new PsoEnumEntryInfo(MetaName.COLLAR, 2) - ); - case MetaName.SpecialAbilityType: //CPedModelInfo__InitData AbilityType - return new PsoEnumInfo(MetaName.SpecialAbilityType, 1, - new PsoEnumEntryInfo(MetaName.SAT_NONE, -1), - new PsoEnumEntryInfo(MetaName.SAT_CAR_SLOWDOWN, 0), - new PsoEnumEntryInfo(MetaName.SAT_RAGE, 1), - new PsoEnumEntryInfo(MetaName.SAT_BULLET_TIME, 2), - new PsoEnumEntryInfo(MetaName.SAT_SNAPSHOT, 3), - new PsoEnumEntryInfo(MetaName.SAT_INSULT, 4) - ); - case MetaName.ThermalBehaviour: - return new PsoEnumInfo(MetaName.ThermalBehaviour, 1, - new PsoEnumEntryInfo(MetaName.TB_DEAD, 0), - new PsoEnumEntryInfo(MetaName.TB_COLD, 1), - new PsoEnumEntryInfo(MetaName.TB_WARM, 2), - new PsoEnumEntryInfo(MetaName.TB_HOT, 3) - ); - case MetaName.eSuperlodType: - return new PsoEnumInfo(MetaName.eSuperlodType, 1, - new PsoEnumEntryInfo(MetaName.SLOD_HUMAN, 0), - new PsoEnumEntryInfo(MetaName.SLOD_SMALL_QUADPED, 1), - new PsoEnumEntryInfo(MetaName.SLOD_LARGE_QUADPED, 2), - new PsoEnumEntryInfo(MetaName.SLOD_NULL, 3), - new PsoEnumEntryInfo(MetaName.SLOD_KEEP_LOWEST, 4) - ); - case MetaName.eScenarioPopStreamingSlot: //CPedModelInfo__InitData ScenarioPopStreamingSlot - return new PsoEnumInfo(MetaName.eScenarioPopStreamingSlot, 1, - new PsoEnumEntryInfo(MetaName.SCENARIO_POP_STREAMING_NORMAL, 0), - new PsoEnumEntryInfo(MetaName.SCENARIO_POP_STREAMING_SMALL, 1) - ); - case MetaName.DefaultSpawnPreference: //CPedModelInfo__InitData DefaultSpawningPreference - return new PsoEnumInfo(MetaName.DefaultSpawnPreference, 1, - new PsoEnumEntryInfo(MetaName.DSP_AERIAL, 0), - new PsoEnumEntryInfo(MetaName.DSP_AQUATIC, 1), - new PsoEnumEntryInfo(MetaName.DSP_GROUND_WILDLIFE, 2), - new PsoEnumEntryInfo(MetaName.DSP_NORMAL, 3) - ); - case MetaName.eFadeCurveType: - return new PsoEnumInfo(MetaName.eFadeCurveType, 1, - new PsoEnumEntryInfo(MetaName.FCT_NONE, 0), - new PsoEnumEntryInfo(MetaName.FCT_LINEAR, 1), - new PsoEnumEntryInfo(MetaName.FCT_HALF_SIGMOID, 2), - new PsoEnumEntryInfo(MetaName.FCT_SIGMOID, 3) - ); - case MetaName.eAnimPlayerFlag: //animation clip flags - return new PsoEnumInfo(MetaName.eAnimPlayerFlag, 1, - new PsoEnumEntryInfo(MetaName.APF_USE_SECONDARY_SLOT, 0), - new PsoEnumEntryInfo((MetaName)892548521, 1), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_3, 2), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_4, 3), - new PsoEnumEntryInfo(MetaName.APF_ISPLAYING, 4), - new PsoEnumEntryInfo(MetaName.APF_ISLOOPED, 5), - new PsoEnumEntryInfo((MetaName)2715402776, 6), - new PsoEnumEntryInfo((MetaName)2559750026, 7), - new PsoEnumEntryInfo((MetaName)334669388, 8), - new PsoEnumEntryInfo(MetaName.APF_SCRIPT, 9), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_6, 10), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_7, 11), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_8, 12), - new PsoEnumEntryInfo((MetaName)3730225937, 13), - new PsoEnumEntryInfo(MetaName.APF_ISBLENDAUTOREMOVE, 14), - new PsoEnumEntryInfo(MetaName.APF_ISFINISHAUTOREMOVE, 15), - new PsoEnumEntryInfo((MetaName)1984129772, 16), - new PsoEnumEntryInfo(MetaName.APF_ADDITIVE, 17), - new PsoEnumEntryInfo(MetaName.APF_FACIAL, 18), - new PsoEnumEntryInfo((MetaName)1964664646, 19), - new PsoEnumEntryInfo((MetaName)46138343, 20), - new PsoEnumEntryInfo(MetaName.APF_UPPERBODYONLY, 21), - new PsoEnumEntryInfo((MetaName)28056044, 22), - new PsoEnumEntryInfo((MetaName)2237335835, 23), - new PsoEnumEntryInfo((MetaName)1604795828, 24), - new PsoEnumEntryInfo((MetaName)1772376494, 25), - new PsoEnumEntryInfo(MetaName.APF_BLOCK_IK, 26), - new PsoEnumEntryInfo((MetaName)2310486390, 27), - new PsoEnumEntryInfo(MetaName.APF_BLOCK_HEAD_IK, 28), - new PsoEnumEntryInfo((MetaName)98009864, 29), - new PsoEnumEntryInfo(MetaName.APF_UNUSED_9, 30), - new PsoEnumEntryInfo((MetaName)3765996064, 31) - ); - case MetaName.eAnimPriority: //animation clip priority - return new PsoEnumInfo(MetaName.eAnimPriority, 1, - new PsoEnumEntryInfo(MetaName.AP_LOW, 0), - new PsoEnumEntryInfo(MetaName.AP_MEDIUM, 1), - new PsoEnumEntryInfo(MetaName.AP_HIGH, 2), - new PsoEnumEntryInfo(MetaName.AP_FACE_LOW, 3), - new PsoEnumEntryInfo(MetaName.AP_FACE_MEDIUM, 4), - new PsoEnumEntryInfo(MetaName.AP_FACE_HIGH, 5) - ); - case MetaName.eStreamingPolicy: //anim clip dictionary streaming policy - return new PsoEnumInfo(MetaName.eStreamingPolicy, 1, - new PsoEnumEntryInfo(MetaName.SP_STREAMING, 0), - new PsoEnumEntryInfo(MetaName.SP_SINGLEPLAYER_RESIDENT, 1), - new PsoEnumEntryInfo(MetaName.SP_MULTIPLAYER_RESIDENT, 2) - ); - case MetaName.eStreamingPriority: //anim clip dictionary streaming priority - return new PsoEnumInfo(MetaName.eStreamingPriority, 1, - new PsoEnumEntryInfo(MetaName.SP_Variation, 0), - new PsoEnumEntryInfo(MetaName.SP_Low, 1), - new PsoEnumEntryInfo(MetaName.SP_Medium, 2), - new PsoEnumEntryInfo(MetaName.SP_High, 3) - ); - case (MetaName)2476021071: - return new PsoEnumInfo((MetaName)2476021071, 1, - new PsoEnumEntryInfo(MetaName.POSTFX_IN_HOLD_OUT, 0), - new PsoEnumEntryInfo(MetaName.POSTFX_EASE_IN_HOLD_EASE_OUT, 1), - new PsoEnumEntryInfo(MetaName.POSTFX_EASE_IN, 2), - new PsoEnumEntryInfo(MetaName.POSTFX_EASE_OUT, 3) - ); - case (MetaName)3696221852: - return new PsoEnumInfo((MetaName)3696221852, 1, - new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_ALL, 0), - new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_HOLD_ONLY, 1), - new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_NONE, 2) - ); - case (MetaName)2168155209: - return new PsoEnumInfo((MetaName)2168155209, 1, - new PsoEnumEntryInfo((MetaName)133697287, -1), - new PsoEnumEntryInfo((MetaName)3954742285, 0), - new PsoEnumEntryInfo((MetaName)201802975, 1), - new PsoEnumEntryInfo((MetaName)1916954442, 2), - new PsoEnumEntryInfo((MetaName)507840474, 3), - new PsoEnumEntryInfo((MetaName)1919284445, 4), - new PsoEnumEntryInfo((MetaName)4132752489, 5), - new PsoEnumEntryInfo((MetaName)499113587, 6) - ); - case (MetaName)3261591327: - return new PsoEnumInfo((MetaName)3261591327, 1, - new PsoEnumEntryInfo((MetaName)2736859683, 0), - new PsoEnumEntryInfo((MetaName)856837195, 1), - new PsoEnumEntryInfo((MetaName)1505659915, 2), - new PsoEnumEntryInfo((MetaName)2834501937, 3), - new PsoEnumEntryInfo((MetaName)373586892, 4) - ); - case (MetaName)516897642: - return new PsoEnumInfo((MetaName)516897642, 1, - new PsoEnumEntryInfo((MetaName)165337364, 0), - new PsoEnumEntryInfo((MetaName)385965901, 1), - new PsoEnumEntryInfo((MetaName)3779370608, 2) - ); - case (MetaName)2665868448: - return new PsoEnumInfo((MetaName)2665868448, 1, - new PsoEnumEntryInfo((MetaName)2470279016, 0), - new PsoEnumEntryInfo((MetaName)2411291289, 1), - new PsoEnumEntryInfo((MetaName)2103152910, 2), - new PsoEnumEntryInfo((MetaName)3535879124, 3), - new PsoEnumEntryInfo((MetaName)3456440271, 4) - ); - case (MetaName)2628996780: - return new PsoEnumInfo((MetaName)2628996780, 1, - new PsoEnumEntryInfo((MetaName)3708927680, 0), - new PsoEnumEntryInfo((MetaName)2136499167, 1), - new PsoEnumEntryInfo((MetaName)3568072118, 2) - ); - case MetaName.eAnimBoneTag: - return new PsoEnumInfo(MetaName.eAnimBoneTag, 1, - new PsoEnumEntryInfo(MetaName.BONETAG_INVALID, -1), - new PsoEnumEntryInfo(MetaName.BONETAG_ROOT, 0), - new PsoEnumEntryInfo((MetaName)1724691876, 17916), - new PsoEnumEntryInfo(MetaName.BONETAG_PELVIS, 11816), - new PsoEnumEntryInfo(MetaName.BONETAG_PELVIS1, 53251), - new PsoEnumEntryInfo(MetaName.BONETAG_SPINE_ROOT, 57597), - new PsoEnumEntryInfo(MetaName.BONETAG_SPINE0, 23553), - new PsoEnumEntryInfo(MetaName.BONETAG_SPINE1, 24816), - new PsoEnumEntryInfo(MetaName.BONETAG_SPINE2, 24817), - new PsoEnumEntryInfo(MetaName.BONETAG_SPINE3, 24818), - new PsoEnumEntryInfo(MetaName.BONETAG_NECK, 39317), - new PsoEnumEntryInfo(MetaName.BONETAG_NECK2, 24532), - new PsoEnumEntryInfo(MetaName.BONETAG_HEAD, 31086), - new PsoEnumEntryInfo(MetaName.BONETAG_R_CLAVICLE, 10706), - new PsoEnumEntryInfo(MetaName.BONETAG_R_UPPERARM, 40269), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FOREARM, 28252), - new PsoEnumEntryInfo(MetaName.BONETAG_R_HAND, 57005), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER0, 58866), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER01, 64016), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER02, 64017), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER1, 58867), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER11, 64096), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER12, 64097), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER2, 58868), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER21, 64112), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER22, 64113), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER3, 58869), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER31, 64064), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER32, 64065), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER4, 58870), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER41, 64080), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER42, 64081), - new PsoEnumEntryInfo(MetaName.BONETAG_L_CLAVICLE, 64729), - new PsoEnumEntryInfo(MetaName.BONETAG_L_UPPERARM, 45509), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FOREARM, 61163), - new PsoEnumEntryInfo(MetaName.BONETAG_L_HAND, 18905), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER0, 26610), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER01, 4089), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER02, 4090), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER1, 26611), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER11, 4169), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER12, 4170), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER2, 26612), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER21, 4185), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER22, 4186), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER3, 26613), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER31, 4137), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER32, 4138), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER4, 26614), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER41, 4153), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER42, 4154), - new PsoEnumEntryInfo(MetaName.BONETAG_L_THIGH, 58271), - new PsoEnumEntryInfo(MetaName.BONETAG_L_CALF, 63931), - new PsoEnumEntryInfo(MetaName.BONETAG_L_FOOT, 14201), - new PsoEnumEntryInfo(MetaName.BONETAG_L_TOE, 2108), - new PsoEnumEntryInfo(MetaName.BONETAG_L_TOE1, 7531), - new PsoEnumEntryInfo(MetaName.BONETAG_R_THIGH, 51826), - new PsoEnumEntryInfo(MetaName.BONETAG_R_CALF, 36864), - new PsoEnumEntryInfo(MetaName.BONETAG_R_FOOT, 52301), - new PsoEnumEntryInfo(MetaName.BONETAG_R_TOE, 20781), - new PsoEnumEntryInfo(MetaName.BONETAG_R_TOE1, 45631), - new PsoEnumEntryInfo((MetaName)1914315501, 35731), - new PsoEnumEntryInfo((MetaName)1648548119, 5232), - new PsoEnumEntryInfo((MetaName)533252846, 37119), - new PsoEnumEntryInfo((MetaName)2013152691, 61007), - new PsoEnumEntryInfo((MetaName)1274264606, 43810), - new PsoEnumEntryInfo((MetaName)2720329662, 23639), - new PsoEnumEntryInfo((MetaName)2841566254, 6442), - new PsoEnumEntryInfo(MetaName.BONETAG_L_PH_HAND, 60309), - new PsoEnumEntryInfo(MetaName.BONETAG_R_PH_HAND, 28422), - new PsoEnumEntryInfo((MetaName)3721004313, 41922), - new PsoEnumEntryInfo((MetaName)1646663439, 18212), - new PsoEnumEntryInfo((MetaName)2650851428, 33399), - new PsoEnumEntryInfo((MetaName)4289658079, 38180), - new PsoEnumEntryInfo((MetaName)2379061275, 39126), - new PsoEnumEntryInfo((MetaName)176026430, 39638), - new PsoEnumEntryInfo((MetaName)3870648046, 36029), - new PsoEnumEntryInfo((MetaName)3398180204, 6286), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL0, 838), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL1, 839), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL2, 840), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL3, 841), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL4, 842), - new PsoEnumEntryInfo(MetaName.BONETAG_TAIL5, 843), - new PsoEnumEntryInfo((MetaName)1109140959, 30992), - new PsoEnumEntryInfo((MetaName)803570034, 30993), - new PsoEnumEntryInfo((MetaName)631663860, 30994), - new PsoEnumEntryInfo((MetaName)322488345, 30995), - new PsoEnumEntryInfo((MetaName)5907036, 30996), - new PsoEnumEntryInfo((MetaName)4136373952, 30997), - new PsoEnumEntryInfo((MetaName)2411152202, 6986), - new PsoEnumEntryInfo((MetaName)2717247431, 6987), - new PsoEnumEntryInfo((MetaName)1883898992, 6988), - new PsoEnumEntryInfo((MetaName)601675397, 16351), - new PsoEnumEntryInfo((MetaName)62423933, 1805), - new PsoEnumEntryInfo((MetaName)2641889475, 39905), - new PsoEnumEntryInfo((MetaName)1949780854, 5956), - new PsoEnumEntryInfo((MetaName)3296017019, 6468), - new PsoEnumEntryInfo((MetaName)1556908436, 25260), - new PsoEnumEntryInfo((MetaName)3030868822, 27474), - new PsoEnumEntryInfo((MetaName)3452992357, 56604), - new PsoEnumEntryInfo((MetaName)3473614855, 12844), - new PsoEnumEntryInfo((MetaName)633057706, 57717), - new PsoEnumEntryInfo((MetaName)3570968304, 24806), - new PsoEnumEntryInfo((MetaName)2034893792, 65245), - new PsoEnumEntryInfo((MetaName)974447640, 35502), - new PsoEnumEntryInfo((MetaName)2263842006, 15570), - new PsoEnumEntryInfo((MetaName)1882359409, 28462), - new PsoEnumEntryInfo((MetaName)2421563540, 13201), - new PsoEnumEntryInfo((MetaName)2644806883, 48472), - new PsoEnumEntryInfo((MetaName)4089752637, 5930), - new PsoEnumEntryInfo((MetaName)1473028002, 44297), - new PsoEnumEntryInfo((MetaName)1823061586, 47158), - new PsoEnumEntryInfo((MetaName)3875905388, 19729), - new PsoEnumEntryInfo((MetaName)2560977519, 43885), - new PsoEnumEntryInfo((MetaName)4050972607, 2359), - new PsoEnumEntryInfo((MetaName)1028261740, 2449), - new PsoEnumEntryInfo((MetaName)3159424443, 19336), - new PsoEnumEntryInfo((MetaName)1939403075, 64744), - new PsoEnumEntryInfo((MetaName)1097108699, 64745), - new PsoEnumEntryInfo((MetaName)428522884, 64746), - new PsoEnumEntryInfo((MetaName)3131540134, 56194), - new PsoEnumEntryInfo((MetaName)1217317825, 45733), - new PsoEnumEntryInfo((MetaName)4198936370, 45734), - new PsoEnumEntryInfo((MetaName)1977853546, 45735), - new PsoEnumEntryInfo((MetaName)2601253047, 48389), - new PsoEnumEntryInfo((MetaName)2181973692, 48390), - new PsoEnumEntryInfo((MetaName)3140860170, 48391), - new PsoEnumEntryInfo((MetaName)455142432, 30929), - new PsoEnumEntryInfo((MetaName)3803060301, 33869), - new PsoEnumEntryInfo((MetaName)746815866, 4126) - ); - case MetaName.eVfxGroup: - return new PsoEnumInfo(MetaName.eVfxGroup, 1, - new PsoEnumEntryInfo(MetaName.VFXGROUP_UNDEFINED, -1), - new PsoEnumEntryInfo(MetaName.VFXGROUP_VOID, 0), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GENERIC, 1), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CONCRETE, 2), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CONCRETE_DUSTY, 3), - new PsoEnumEntryInfo(MetaName.VFXGROUP_TARMAC, 4), - new PsoEnumEntryInfo(MetaName.VFXGROUP_TARMAC_BRITTLE, 5), - new PsoEnumEntryInfo(MetaName.VFXGROUP_STONE, 6), - new PsoEnumEntryInfo(MetaName.VFXGROUP_BRICK, 7), - new PsoEnumEntryInfo(MetaName.VFXGROUP_MARBLE, 8), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PAVING, 9), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SANDSTONE, 10), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SANDSTONE_BRITTLE, 11), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_LOOSE, 12), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_COMPACT, 13), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_WET, 14), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_UNDERWATER, 15), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_DEEP, 16), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_WET_DEEP, 17), - new PsoEnumEntryInfo(MetaName.VFXGROUP_ICE, 18), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SNOW_LOOSE, 19), - new PsoEnumEntryInfo(MetaName.VFXGROUP_SNOW_COMPACT, 20), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GRAVEL, 21), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GRAVEL_DEEP, 22), - new PsoEnumEntryInfo(MetaName.VFXGROUP_DIRT_DRY, 23), - new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_SOFT, 24), - new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_DEEP, 25), - new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_UNDERWATER, 26), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CLAY, 27), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GRASS, 28), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GRASS_SHORT, 29), - new PsoEnumEntryInfo(MetaName.VFXGROUP_HAY, 30), - new PsoEnumEntryInfo(MetaName.VFXGROUP_BUSHES, 31), - new PsoEnumEntryInfo(MetaName.VFXGROUP_TREE_BARK, 32), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LEAVES, 33), - new PsoEnumEntryInfo(MetaName.VFXGROUP_METAL, 34), - new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD, 35), - new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD_DUSTY, 36), - new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD_SPLINTER, 37), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CERAMIC, 38), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CARPET_FABRIC, 39), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CARPET_FABRIC_DUSTY, 40), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTIC, 41), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTIC_HOLLOW, 42), - new PsoEnumEntryInfo(MetaName.VFXGROUP_RUBBER, 43), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LINOLEUM, 44), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTER_BRITTLE, 45), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CARDBOARD, 46), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PAPER, 47), - new PsoEnumEntryInfo(MetaName.VFXGROUP_FOAM, 48), - new PsoEnumEntryInfo(MetaName.VFXGROUP_FEATHERS, 49), - new PsoEnumEntryInfo(MetaName.VFXGROUP_TVSCREEN, 50), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GLASS, 51), - new PsoEnumEntryInfo(MetaName.VFXGROUP_GLASS_BULLETPROOF, 52), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_METAL, 53), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_PLASTIC, 54), - new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_GLASS, 55), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PUDDLE, 56), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_WATER, 57), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_BLOOD, 58), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_OIL, 59), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_PETROL, 60), - new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_MUD, 61), - new PsoEnumEntryInfo(MetaName.VFXGROUP_FRESH_MEAT, 62), - new PsoEnumEntryInfo(MetaName.VFXGROUP_DRIED_MEAT, 63), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_HEAD, 64), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_TORSO, 65), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_LIMB, 66), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_FOOT, 67), - new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_CAPSULE, 68) - ); - case (MetaName)726948528: - return new PsoEnumInfo((MetaName)726948528, 1, - new PsoEnumEntryInfo((MetaName)2375349691, 0), - new PsoEnumEntryInfo((MetaName)978806254, 1), - new PsoEnumEntryInfo((MetaName)345174417, 2), - new PsoEnumEntryInfo((MetaName)2719994633, 3), - new PsoEnumEntryInfo((MetaName)1055203807, 4) - ); - case (MetaName)1599521754: - return new PsoEnumInfo((MetaName)1599521754, 1, - new PsoEnumEntryInfo((MetaName)1546538473, 0) - ); - case (MetaName)956281369: - return new PsoEnumInfo((MetaName)956281369, 1, - new PsoEnumEntryInfo(MetaName.PROCOBJ_ALIGN_OBJ, 0), - new PsoEnumEntryInfo(MetaName.PROCOBJ_USE_GRID, 1), - new PsoEnumEntryInfo(MetaName.PROCOBJ_USE_SEED, 2), - new PsoEnumEntryInfo(MetaName.PROCOBJ_IS_FLOATING, 3), - new PsoEnumEntryInfo(MetaName.PROCOBJ_CAST_SHADOW, 4), - new PsoEnumEntryInfo(MetaName.PROCOBJ_NETWORK_GAME, 5) - ); - case (MetaName)1247137385: - return new PsoEnumInfo((MetaName)1247137385, 1, - new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD0, 0), - new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD1, 1), - new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD2, 2), - new PsoEnumEntryInfo(MetaName.PROCPLANT_FURGRASS, 3), - new PsoEnumEntryInfo(MetaName.PROCPLANT_CAMERADONOTCULL, 4), - new PsoEnumEntryInfo(MetaName.PROCPLANT_UNDERWATER, 5), - new PsoEnumEntryInfo(MetaName.PROCPLANT_GROUNDSCALE1VERT, 6), - new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD0, 7), - new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD1, 8), - new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD2, 9), - new PsoEnumEntryInfo(MetaName.PROCPLANT_NOSHADOW, 10) - ); - case (MetaName)2782414211: - return new PsoEnumInfo((MetaName)2782414211, 1, - new PsoEnumEntryInfo((MetaName)3117886768, 0), - new PsoEnumEntryInfo((MetaName)361913441, 1), - new PsoEnumEntryInfo((MetaName)1673907105, 2) - ); - case (MetaName)3404480226: - return new PsoEnumInfo((MetaName)3404480226, 1, - new PsoEnumEntryInfo((MetaName)643717225, 0), - new PsoEnumEntryInfo((MetaName)1755526414, 1), - new PsoEnumEntryInfo(MetaName.CVA_WHEEL_REAR_LEFT, 2), - new PsoEnumEntryInfo((MetaName)1950121897, 3), - new PsoEnumEntryInfo((MetaName)2065407336, 4), - new PsoEnumEntryInfo((MetaName)1249738073, 5), - new PsoEnumEntryInfo((MetaName)3037431481, 6), - new PsoEnumEntryInfo((MetaName)2009750623, 7), - new PsoEnumEntryInfo((MetaName)3659952659, 8), - new PsoEnumEntryInfo((MetaName)4024787971, 9), - new PsoEnumEntryInfo((MetaName)4081041159, 10), - new PsoEnumEntryInfo((MetaName)3123586287, 11), - new PsoEnumEntryInfo((MetaName)1678048274, 12), - new PsoEnumEntryInfo((MetaName)1275607205, 13), - new PsoEnumEntryInfo(MetaName.DEVINS_SNOWLIGHT, 14), - new PsoEnumEntryInfo((MetaName)2276229539, 15), - new PsoEnumEntryInfo((MetaName)493733281, 16), - new PsoEnumEntryInfo((MetaName)1037540057, 17), - new PsoEnumEntryInfo((MetaName)1162901510, 18), - new PsoEnumEntryInfo((MetaName)739467989, 19), - new PsoEnumEntryInfo((MetaName)677568593, 20), - new PsoEnumEntryInfo((MetaName)1739703625, 21), - new PsoEnumEntryInfo((MetaName)2932239149, 22), - new PsoEnumEntryInfo((MetaName)1612186711, 23), - new PsoEnumEntryInfo((MetaName)629489585, 24), - new PsoEnumEntryInfo((MetaName)3531030925, 25), - new PsoEnumEntryInfo((MetaName)1769219469, 26), - new PsoEnumEntryInfo((MetaName)1816463715, 27), - new PsoEnumEntryInfo((MetaName)3449512558, 28) - ); - case (MetaName)2136742399: - return new PsoEnumInfo((MetaName)2136742399, 1, - new PsoEnumEntryInfo(MetaName.LOOK_FORWARD_RELATIVE_TO_ATTACH, 0), - new PsoEnumEntryInfo((MetaName)4067031256, 1), - new PsoEnumEntryInfo((MetaName)3668340720, 2) - ); - case (MetaName)513957198: - return new PsoEnumInfo((MetaName)513957198, 1, - new PsoEnumEntryInfo(MetaName.ON_FOOT, 0), - new PsoEnumEntryInfo(MetaName.IN_VEHICLE, 1), - new PsoEnumEntryInfo(MetaName.ON_BIKE, 2), - new PsoEnumEntryInfo(MetaName.IN_BOAT, 3), - new PsoEnumEntryInfo(MetaName.IN_AIRCRAFT, 4), - new PsoEnumEntryInfo(MetaName.IN_SUBMARINE, 5), - new PsoEnumEntryInfo(MetaName.IN_HELI, 6), - new PsoEnumEntryInfo(MetaName.IN_TURRET, 7) - ); - case (MetaName)2703064232: - return new PsoEnumInfo((MetaName)2703064232, 1, - new PsoEnumEntryInfo(MetaName.THIRD_PERSON_NEAR, 0), - new PsoEnumEntryInfo(MetaName.THIRD_PERSON_MEDIUM, 1), - new PsoEnumEntryInfo(MetaName.THIRD_PERSON_FAR, 2), - new PsoEnumEntryInfo(MetaName.CINEMATIC, 3), - new PsoEnumEntryInfo(MetaName.FIRST_PERSON, 4) - ); - case MetaName.eCurveType: - return new PsoEnumInfo(MetaName.eCurveType, 1, - new PsoEnumEntryInfo((MetaName)3099024980, 0), - new PsoEnumEntryInfo((MetaName)3810146036, 1), - new PsoEnumEntryInfo((MetaName)1812191173, 2), - new PsoEnumEntryInfo((MetaName)2081939217, 3), - new PsoEnumEntryInfo((MetaName)2879490434, 4), - new PsoEnumEntryInfo((MetaName)3899422166, 5), - new PsoEnumEntryInfo((MetaName)4202435238, 6), - new PsoEnumEntryInfo((MetaName)1924959165, 7), - new PsoEnumEntryInfo((MetaName)2394366735, 8), - new PsoEnumEntryInfo((MetaName)2691765069, 9), - new PsoEnumEntryInfo((MetaName)3782218410, 10), - new PsoEnumEntryInfo((MetaName)1054471073, 11), - new PsoEnumEntryInfo((MetaName)3232508014, 12), - new PsoEnumEntryInfo((MetaName)3268408636, 13), - new PsoEnumEntryInfo((MetaName)156483360, 14), - new PsoEnumEntryInfo((MetaName)610568483, 15), - new PsoEnumEntryInfo((MetaName)1031574247, 16), - new PsoEnumEntryInfo((MetaName)1817346630, 17), - new PsoEnumEntryInfo((MetaName)3038768594, 18), - new PsoEnumEntryInfo((MetaName)3433776656, 19), - new PsoEnumEntryInfo((MetaName)3224106151, 20), - new PsoEnumEntryInfo((MetaName)3781585750, 21), - new PsoEnumEntryInfo((MetaName)728471947, 22), - new PsoEnumEntryInfo((MetaName)2868857018, 23), - new PsoEnumEntryInfo((MetaName)3394937778, 24), - new PsoEnumEntryInfo((MetaName)1572642455, 25), - new PsoEnumEntryInfo((MetaName)4148234847, 26) - ); - case (MetaName)4206293824: - return new PsoEnumInfo((MetaName)4206293824, 1, - new PsoEnumEntryInfo((MetaName)3090781844, 0), - new PsoEnumEntryInfo((MetaName)714439506, 1), - new PsoEnumEntryInfo((MetaName)3541453901, 2), - new PsoEnumEntryInfo((MetaName)3420181340, 3), - new PsoEnumEntryInfo((MetaName)3785293538, 4), - new PsoEnumEntryInfo((MetaName)2987466695, 5), - new PsoEnumEntryInfo((MetaName)2089898957, 6), - new PsoEnumEntryInfo((MetaName)776877896, 7), - new PsoEnumEntryInfo((MetaName)1192126664, 8), - new PsoEnumEntryInfo((MetaName)1989206149, 9), - new PsoEnumEntryInfo((MetaName)2132778492, 10), - new PsoEnumEntryInfo((MetaName)1459749185, 11), - new PsoEnumEntryInfo((MetaName)769806680, 12), - new PsoEnumEntryInfo((MetaName)344800761, 13), - new PsoEnumEntryInfo((MetaName)2607259232, 14) - ); - case (MetaName)902027429: - return new PsoEnumInfo((MetaName)902027429, 1, - new PsoEnumEntryInfo((MetaName)1166188847, 0), - new PsoEnumEntryInfo((MetaName)899750670, 1) - ); - case (MetaName)3529626013: - return new PsoEnumInfo((MetaName)3529626013, 1, - new PsoEnumEntryInfo(MetaName.CAR, 0), - new PsoEnumEntryInfo(MetaName.PLANE, 1), - new PsoEnumEntryInfo(MetaName.TRAILER, 2), - new PsoEnumEntryInfo(MetaName.QUADBIKE, 3), - new PsoEnumEntryInfo(MetaName.HELI, 4), - new PsoEnumEntryInfo(MetaName.AUTOGYRO, 5), - new PsoEnumEntryInfo(MetaName.BIKE, 6), - new PsoEnumEntryInfo(MetaName.BICYCLE, 7), - new PsoEnumEntryInfo(MetaName.BOAT, 8), - new PsoEnumEntryInfo(MetaName.TRAIN, 9), - new PsoEnumEntryInfo(MetaName.SUBMARINE, 10), - new PsoEnumEntryInfo(MetaName.ALL, 11) - ); - case (MetaName)3889593720: - return new PsoEnumInfo((MetaName)3889593720, 1, - new PsoEnumEntryInfo((MetaName)2388118614, 0), - new PsoEnumEntryInfo((MetaName)1309321028, 1), - new PsoEnumEntryInfo((MetaName)2409045263, 2), - new PsoEnumEntryInfo((MetaName)1405307635, 3), - new PsoEnumEntryInfo((MetaName)3183067451, 4) - ); - case (MetaName)2675594832: - return new PsoEnumInfo((MetaName)2675594832, 1, - new PsoEnumEntryInfo(MetaName.AF_CAN_DIVE, 0), - new PsoEnumEntryInfo((MetaName)665056449, 1), - new PsoEnumEntryInfo((MetaName)1838090773, 2), - new PsoEnumEntryInfo((MetaName)1429252732, 3), - new PsoEnumEntryInfo((MetaName)335156894, 4), - new PsoEnumEntryInfo((MetaName)1995789406, 5), - new PsoEnumEntryInfo((MetaName)301163182, 6), - new PsoEnumEntryInfo((MetaName)2727636155, 7), - new PsoEnumEntryInfo((MetaName)2154274359, 8), - new PsoEnumEntryInfo((MetaName)3233981661, 9), - new PsoEnumEntryInfo((MetaName)3036600251, 10) - ); - case (MetaName)2920442291: - return new PsoEnumInfo((MetaName)2920442291, 1, - new PsoEnumEntryInfo(MetaName.PED_DRIVES_POOR_CAR, 0), - new PsoEnumEntryInfo(MetaName.PED_DRIVES_AVERAGE_CAR, 1), - new PsoEnumEntryInfo(MetaName.PED_DRIVES_RICH_CAR, 2), - new PsoEnumEntryInfo(MetaName.PED_DRIVES_BIG_CAR, 3), - new PsoEnumEntryInfo(MetaName.PED_DRIVES_MOTORCYCLE, 4), - new PsoEnumEntryInfo(MetaName.PED_DRIVES_BOAT, 5) - ); - case MetaName.Affluence: - return new PsoEnumInfo(MetaName.Affluence, 1, - new PsoEnumEntryInfo(MetaName.AFF_POOR, 0), - new PsoEnumEntryInfo(MetaName.AFF_AVERAGE, 1), - new PsoEnumEntryInfo(MetaName.AFF_RICH, 2) - ); - case MetaName.TechSavvy: - return new PsoEnumInfo(MetaName.TechSavvy, 1, - new PsoEnumEntryInfo(MetaName.TS_LOW, 0), - new PsoEnumEntryInfo(MetaName.TS_HIGH, 1) - ); - case (MetaName)3079935216: - return new PsoEnumInfo((MetaName)3079935216, 1, - new PsoEnumEntryInfo(MetaName.BF_INTERVENE_ON_MELEE_ACTION, 0), - new PsoEnumEntryInfo(MetaName.BF_DONT_RUN_ON_MELEE_ATTACK, 1), - new PsoEnumEntryInfo(MetaName.BF_WATCH_ON_CAR_STOLEN, 2), - new PsoEnumEntryInfo(MetaName.BF_INTIMIDATE_PLAYER, 3), - new PsoEnumEntryInfo(MetaName.BF_GET_PISSED_WHEN_HIT_BY_CAR, 4), - new PsoEnumEntryInfo((MetaName)2870992946, 5), - new PsoEnumEntryInfo(MetaName.BF_DONT_SAY_PANIC_ON_FLEE, 6), - new PsoEnumEntryInfo(MetaName.BF_REACT_ON_COMBAT, 7), - new PsoEnumEntryInfo(MetaName.BF_PLAY_CAR_HORN, 8), - new PsoEnumEntryInfo(MetaName.BF_ARGUMENTATIVE, 9), - new PsoEnumEntryInfo(MetaName.BF_CONFRONTATIONAL, 10), - new PsoEnumEntryInfo(MetaName.BF_LIMIT_COMBATANTS, 11), - new PsoEnumEntryInfo(MetaName.BF_PURSUE_WHEN_HIT_BY_CAR, 12), - new PsoEnumEntryInfo(MetaName.BF_COWARDLY_FOR_SHOCKING_EVENTS, 13), - new PsoEnumEntryInfo(MetaName.BF_BOOST_BRAVERY_IN_GROUP, 14), - new PsoEnumEntryInfo(MetaName.BF_CAN_ACCELERATE_IN_CAR, 15), - new PsoEnumEntryInfo(MetaName.BF_CAN_GET_OUT_WHEN_HIT_BY_CAR, 16), - new PsoEnumEntryInfo(MetaName.BF_AGGRESSIVE_AFTER_RUNNING_PED_OVER, 17), - new PsoEnumEntryInfo(MetaName.BF_CAN_FLEE_WHEN_HIT_BY_CAR, 18), - new PsoEnumEntryInfo(MetaName.BF_ALLOW_CONFRONT_FOR_TERRITORY_REACTIONS, 19), - new PsoEnumEntryInfo(MetaName.BF_DONT_FORCE_FLEE_COMBAT, 20) - ); - case (MetaName)1639628591: - return new PsoEnumInfo((MetaName)1639628591, 1, - new PsoEnumEntryInfo(MetaName.CF_JACKING, 0), - new PsoEnumEntryInfo(MetaName.CF_ALLOWED_COP_PURSUIT, 1) - ); - case (MetaName)1559228487: - return new PsoEnumInfo((MetaName)1559228487, 1, - new PsoEnumEntryInfo(MetaName.AF_Low, 0), - new PsoEnumEntryInfo(MetaName.AF_EnterLeft, 1), - new PsoEnumEntryInfo(MetaName.AF_FaceLeft, 2), - new PsoEnumEntryInfo(MetaName.AF_AtEdge, 3), - new PsoEnumEntryInfo(MetaName.AF_ToLow, 4), - new PsoEnumEntryInfo(MetaName.AF_AimDirect, 5), - new PsoEnumEntryInfo(MetaName.AF_Center, 6), - new PsoEnumEntryInfo(MetaName.AF_ToPeek, 7), - new PsoEnumEntryInfo(MetaName.AF_Scope, 8) - ); - case (MetaName)966624441: - return new PsoEnumInfo((MetaName)966624441, 1, - new PsoEnumEntryInfo(MetaName.OnlyUseForReactions, 0), - new PsoEnumEntryInfo(MetaName.CanUseForReactions, 1), - new PsoEnumEntryInfo(MetaName.Urgent, 2), - new PsoEnumEntryInfo(MetaName.OnlyUseForLawEnforcementPeds, 3), - new PsoEnumEntryInfo(MetaName.OnlyUseForGangPeds, 4) - ); - case MetaName.LookIkTurnRate: - return new PsoEnumInfo(MetaName.LookIkTurnRate, 1, - new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_SLOW, 0), - new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_NORMAL, 1), - new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_FAST, 2) - ); - case MetaName.LookIkBlendRate: - return new PsoEnumInfo(MetaName.LookIkBlendRate, 1, - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_SLOWEST, 0), - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_SLOW, 1), - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_NORMAL, 2), - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_FAST, 3), - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_FASTEST, 4), - new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_INSTANT, 5) - ); - case MetaName.LookIkRotationLimit: - return new PsoEnumInfo(MetaName.LookIkRotationLimit, 1, - new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_OFF, 0), - new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_NARROWEST, 1), - new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_NARROW, 2), - new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_WIDE, 3), - new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_WIDEST, 4) - ); - case (MetaName)4002001992: - return new PsoEnumInfo((MetaName)4002001992, 1, - new PsoEnumEntryInfo((MetaName)4238595643, 0) - ); - case MetaName.AmbientEventType: - return new PsoEnumInfo(MetaName.AmbientEventType, 1, - new PsoEnumEntryInfo((MetaName)1637555008, 0), - new PsoEnumEntryInfo(MetaName.AET_Interesting, 1), - new PsoEnumEntryInfo(MetaName.AET_Threatening, 2), - new PsoEnumEntryInfo(MetaName.AET_Threatened, 3), - new PsoEnumEntryInfo(MetaName.AET_In_Place, 4), - new PsoEnumEntryInfo(MetaName.AET_Directed_In_Place, 5), - new PsoEnumEntryInfo(MetaName.AET_Flinch, 6) - ); - case (MetaName)1049598006: - return new PsoEnumInfo((MetaName)1049598006, 1, - new PsoEnumEntryInfo((MetaName)1600411487, 0), - new PsoEnumEntryInfo((MetaName)3999177563, 1), - new PsoEnumEntryInfo((MetaName)3250863043, 2) - ); - case MetaName.ePedVarComp: - return new PsoEnumInfo(MetaName.ePedVarComp, 1, - new PsoEnumEntryInfo(MetaName.PV_COMP_INVALID, -1), - new PsoEnumEntryInfo(MetaName.PV_COMP_HEAD, 0), - new PsoEnumEntryInfo(MetaName.PV_COMP_BERD, 1), - new PsoEnumEntryInfo(MetaName.PV_COMP_HAIR, 2), - new PsoEnumEntryInfo(MetaName.PV_COMP_UPPR, 3), - new PsoEnumEntryInfo(MetaName.PV_COMP_LOWR, 4), - new PsoEnumEntryInfo(MetaName.PV_COMP_HAND, 5), - new PsoEnumEntryInfo(MetaName.PV_COMP_FEET, 6), - new PsoEnumEntryInfo(MetaName.PV_COMP_TEEF, 7), - new PsoEnumEntryInfo(MetaName.PV_COMP_ACCS, 8), - new PsoEnumEntryInfo(MetaName.PV_COMP_TASK, 9), - new PsoEnumEntryInfo(MetaName.PV_COMP_DECL, 10), - new PsoEnumEntryInfo(MetaName.PV_COMP_JBIB, 11), - new PsoEnumEntryInfo(MetaName.PV_COMP_MAX, 12) - ); - case (MetaName)3509057257: - return new PsoEnumInfo((MetaName)3509057257, 1, - new PsoEnumEntryInfo(MetaName.RAGDOLL_BUTTOCKS, 0), - new PsoEnumEntryInfo(MetaName.RAGDOLL_THIGH_LEFT, 1), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SHIN_LEFT, 2), - new PsoEnumEntryInfo(MetaName.RAGDOLL_FOOT_LEFT, 3), - new PsoEnumEntryInfo(MetaName.RAGDOLL_THIGH_RIGHT, 4), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SHIN_RIGHT, 5), - new PsoEnumEntryInfo(MetaName.RAGDOLL_FOOT_RIGHT, 6), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE0, 7), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE1, 8), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE2, 9), - new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE3, 10), - new PsoEnumEntryInfo(MetaName.RAGDOLL_CLAVICLE_LEFT, 11), - new PsoEnumEntryInfo(MetaName.RAGDOLL_UPPER_ARM_LEFT, 12), - new PsoEnumEntryInfo(MetaName.RAGDOLL_LOWER_ARM_LEFT, 13), - new PsoEnumEntryInfo(MetaName.RAGDOLL_HAND_LEFT, 14), - new PsoEnumEntryInfo(MetaName.RAGDOLL_CLAVICLE_RIGHT, 15), - new PsoEnumEntryInfo(MetaName.RAGDOLL_UPPER_ARM_RIGHT, 16), - new PsoEnumEntryInfo((MetaName)937951079, 17), - new PsoEnumEntryInfo(MetaName.RAGDOLL_HAND_RIGHT, 18), - new PsoEnumEntryInfo(MetaName.RAGDOLL_NECK, 19), - new PsoEnumEntryInfo(MetaName.RAGDOLL_HEAD, 20) - ); - case MetaName.LockType: - return new PsoEnumInfo(MetaName.LockType, 1, - new PsoEnumEntryInfo((MetaName)40312212, 0), - new PsoEnumEntryInfo((MetaName)2263813480, 1), - new PsoEnumEntryInfo((MetaName)1924092278, 2) - ); - case (MetaName)3799765345: - return new PsoEnumInfo((MetaName)3799765345, 1, - new PsoEnumEntryInfo(MetaName.ET_INVALID, -1), - new PsoEnumEntryInfo(MetaName.ET_CRIME, 0), - new PsoEnumEntryInfo(MetaName.ET_JAYWALKING, 1), - new PsoEnumEntryInfo(MetaName.ET_COP_PURSUIT, 2), - new PsoEnumEntryInfo(MetaName.ET_SPAWNED_COP_PURSUIT, 3), - new PsoEnumEntryInfo(MetaName.ET_AMBIENT_COP, 4), - new PsoEnumEntryInfo(MetaName.ET_INTERESTING_DRIVER, 5), - new PsoEnumEntryInfo(MetaName.ET_AGGRESSIVE_DRIVER, 6) - ); - case (MetaName)1809724872: - return new PsoEnumInfo((MetaName)1809724872, 1, - new PsoEnumEntryInfo(MetaName.NO_REACTION, 0), - new PsoEnumEntryInfo(MetaName.SMALL_REACTION, 1), - new PsoEnumEntryInfo(MetaName.BIG_REACTION, 2) - ); - case (MetaName)888350649: - return new PsoEnumInfo((MetaName)888350649, 1, - new PsoEnumEntryInfo(MetaName.SAC_Retain, 0), - new PsoEnumEntryInfo((MetaName)485311651, 1), - new PsoEnumEntryInfo((MetaName)1413720671, 2), - new PsoEnumEntryInfo(MetaName.SAC_Randomize, 3) - ); - case (MetaName)2055586340: - return new PsoEnumInfo((MetaName)2055586340, 1, - new PsoEnumEntryInfo(MetaName.TC_Retain, 0), - new PsoEnumEntryInfo((MetaName)1410481380, 1), - new PsoEnumEntryInfo((MetaName)1541573135, 2), - new PsoEnumEntryInfo(MetaName.TC_Randomize, 3) - ); - case (MetaName)3374036042: - return new PsoEnumInfo((MetaName)3374036042, 1, - new PsoEnumEntryInfo(MetaName.BC_Retain, 0), - new PsoEnumEntryInfo((MetaName)1834753809, 1), - new PsoEnumEntryInfo((MetaName)2650352944, 2), - new PsoEnumEntryInfo(MetaName.BC_Randomize, 3) - ); - case (MetaName)4001255574: - return new PsoEnumInfo((MetaName)4001255574, 1, - new PsoEnumEntryInfo(MetaName.HBC_Retain, 0), - new PsoEnumEntryInfo((MetaName)2508718569, 1), - new PsoEnumEntryInfo((MetaName)1024930189, 2), - new PsoEnumEntryInfo(MetaName.HBC_Randomize, 3) - ); - case (MetaName)894416699: - return new PsoEnumInfo((MetaName)894416699, 1, - new PsoEnumEntryInfo(MetaName.SF_FrontDriverSide, 0), - new PsoEnumEntryInfo(MetaName.SF_FrontPassengerSide, 1), - new PsoEnumEntryInfo(MetaName.SF_BackDriverSide, 2), - new PsoEnumEntryInfo(MetaName.SF_BackPassengerSide, 3), - new PsoEnumEntryInfo(MetaName.SF_AltFrontDriverSide, 4), - new PsoEnumEntryInfo(MetaName.SF_AltFrontPassengerSide, 5), - new PsoEnumEntryInfo(MetaName.SF_AltBackDriverSide, 6), - new PsoEnumEntryInfo(MetaName.SF_AltBackPassengerSide, 7) - ); - case (MetaName)4186696686: - return new PsoEnumInfo((MetaName)4186696686, 1, - new PsoEnumEntryInfo(MetaName.POPGROUP_IS_GANG, 0), - new PsoEnumEntryInfo(MetaName.POPGROUP_AMBIENT, 1), - new PsoEnumEntryInfo(MetaName.POPGROUP_SCENARIO, 2), - new PsoEnumEntryInfo(MetaName.POPGROUP_RARE, 3), - new PsoEnumEntryInfo(MetaName.POPGROUP_NETWORK_COMMON, 4), - new PsoEnumEntryInfo(MetaName.POPGROUP_AERIAL, 5), - new PsoEnumEntryInfo(MetaName.POPGROUP_AQUATIC, 6), - new PsoEnumEntryInfo(MetaName.POPGROUP_WILDLIFE, 7), - new PsoEnumEntryInfo(MetaName.POPGROUP_IN_VEHICLE, 8) - ); - case (MetaName)2809332931: - return new PsoEnumInfo((MetaName)2809332931, 1, - new PsoEnumEntryInfo(MetaName.DontCloseWhenTouched, 0), - new PsoEnumEntryInfo(MetaName.AutoOpensForSPVehicleWithPedsOnly, 1), - new PsoEnumEntryInfo(MetaName.AutoOpensForSPPlayerPedsOnly, 2), - new PsoEnumEntryInfo(MetaName.AutoOpensForMPVehicleWithPedsOnly, 3), - new PsoEnumEntryInfo(MetaName.AutoOpensForMPPlayerPedsOnly, 4), - new PsoEnumEntryInfo(MetaName.DelayDoorClosingForPlayer, 5), - new PsoEnumEntryInfo(MetaName.AutoOpensForAllVehicles, 6), - new PsoEnumEntryInfo(MetaName.IgnoreOpenDoorTaskEdgeLerp, 7), - new PsoEnumEntryInfo(MetaName.AutoOpensForLawEnforcement, 8) - ); - case MetaName.StdDoorRotDir: - return new PsoEnumInfo(MetaName.StdDoorRotDir, 1, - new PsoEnumEntryInfo(MetaName.StdDoorOpenBothDir, 0), - new PsoEnumEntryInfo(MetaName.StdDoorOpenNegDir, 1), - new PsoEnumEntryInfo(MetaName.StdDoorOpenPosDir, 2) - ); - case (MetaName)2065671281: - return new PsoEnumInfo((MetaName)2065671281, 1, - new PsoEnumEntryInfo(MetaName.CantUse, 0), - new PsoEnumEntryInfo(MetaName.MustUse, 1) - ); - case (MetaName)1756502932: - return new PsoEnumInfo((MetaName)1756502932, 1, - new PsoEnumEntryInfo((MetaName)1618156912, 0), - new PsoEnumEntryInfo((MetaName)325739119, 1), - new PsoEnumEntryInfo((MetaName)1129710621, 2), - new PsoEnumEntryInfo((MetaName)2784202857, 3), - new PsoEnumEntryInfo((MetaName)3198877297, 4), - new PsoEnumEntryInfo((MetaName)2664559559, 5) - ); - case (MetaName)3204395397: - return new PsoEnumInfo((MetaName)3204395397, 1, - new PsoEnumEntryInfo((MetaName)3124669982, 0), - new PsoEnumEntryInfo((MetaName)1679254647, 1), - new PsoEnumEntryInfo((MetaName)1875723229, 2) - ); - case (MetaName)4286852891: - return new PsoEnumInfo((MetaName)4286852891, 1, - new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_DEFAULT, 0), - new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_COUNTRYSIDE, 1), - new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_ARMY_BASE, 2), - new PsoEnumEntryInfo((MetaName)2910242310, 3) - ); - case (MetaName)4095090001: - return new PsoEnumInfo((MetaName)4095090001, 1, - new PsoEnumEntryInfo(MetaName.SPECIAL_NONE, 0), - new PsoEnumEntryInfo(MetaName.SPECIAL_AIRPORT, 1) - ); - case (MetaName)98189892: - return new PsoEnumInfo((MetaName)98189892, 1, - new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceEast, 0), - new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceWest, 1), - new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceCenter, 2), - new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceEast, 3), - new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceWest, 4), - new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceCenter, 5), - new PsoEnumEntryInfo(MetaName.NoCoverEastFaceNorth, 6), - new PsoEnumEntryInfo(MetaName.NoCoverEastFaceSouth, 7), - new PsoEnumEntryInfo(MetaName.NoCoverEastFaceCenter, 8), - new PsoEnumEntryInfo(MetaName.NoCoverWestFaceNorth, 9), - new PsoEnumEntryInfo(MetaName.NoCoverWestFaceSouth, 10), - new PsoEnumEntryInfo(MetaName.NoCoverWestFaceCenter, 11), - new PsoEnumEntryInfo(MetaName.ForceLowCornerNorthFaceEast, 12), - new PsoEnumEntryInfo(MetaName.ForceLowCornerNorthFaceWest, 13), - new PsoEnumEntryInfo(MetaName.ForceLowCornerSouthFaceEast, 14), - new PsoEnumEntryInfo(MetaName.ForceLowCornerSouthFaceWest, 15), - new PsoEnumEntryInfo(MetaName.ForceLowCornerEastFaceNorth, 16), - new PsoEnumEntryInfo(MetaName.ForceLowCornerEastFaceSouth, 17), - new PsoEnumEntryInfo(MetaName.ForceLowCornerWestFaceNorth, 18), - new PsoEnumEntryInfo(MetaName.ForceLowCornerWestFaceSouth, 19), - new PsoEnumEntryInfo(MetaName.NoCoverVehicleDoors, 20) - ); - case MetaName.CSpawnPoint__AvailabilityMpSp: - return new PsoEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp, 1, - new PsoEnumEntryInfo(MetaName.kBoth, 0), - new PsoEnumEntryInfo(MetaName.kOnlySp, 1), - new PsoEnumEntryInfo(MetaName.kOnlyMp, 2) - ); - case MetaName.CScenarioPointFlags__Flags: - return new PsoEnumInfo(MetaName.CScenarioPointFlags__Flags, 1, - new PsoEnumEntryInfo(MetaName.IgnoreMaxInRange, 0), - new PsoEnumEntryInfo(MetaName.NoSpawn, 1), - new PsoEnumEntryInfo(MetaName.StationaryReactions, 2) - ); - case MetaName.CScenarioChainingEdge__eNavMode: - return new PsoEnumInfo(MetaName.CScenarioChainingEdge__eNavMode, 1, - new PsoEnumEntryInfo(MetaName.Direct, 0), - new PsoEnumEntryInfo(MetaName.NavMesh, 1), - new PsoEnumEntryInfo(MetaName.Roads, 2) - ); - case MetaName.CScenarioChainingEdge__eNavSpeed: - return new PsoEnumInfo(MetaName.CScenarioChainingEdge__eNavSpeed, 1, - new PsoEnumEntryInfo((MetaName)3279574318, 0), - new PsoEnumEntryInfo((MetaName)2212923970, 1), - new PsoEnumEntryInfo((MetaName)4022799658, 2), - new PsoEnumEntryInfo((MetaName)1425672334, 3), - new PsoEnumEntryInfo((MetaName)957720931, 4), - new PsoEnumEntryInfo((MetaName)3795195414, 5), - new PsoEnumEntryInfo((MetaName)2834622009, 6), - new PsoEnumEntryInfo((MetaName)1876554076, 7), - new PsoEnumEntryInfo((MetaName)698543797, 8), - new PsoEnumEntryInfo((MetaName)3911005380, 9), - new PsoEnumEntryInfo((MetaName)3717649022, 10), - new PsoEnumEntryInfo((MetaName)3356026130, 11) - ); - case (MetaName)1193003611: - return new PsoEnumInfo((MetaName)1193003611, 1, - new PsoEnumEntryInfo(MetaName.TIME_DEPENDENT, 0), - new PsoEnumEntryInfo(MetaName.WEATHER_DEPENDENT, 1) - ); - case (MetaName)3387532954: - return new PsoEnumInfo((MetaName)3387532954, 1, - new PsoEnumEntryInfo(MetaName.AT_TXD, 0), - new PsoEnumEntryInfo(MetaName.AT_DRB, 1), - new PsoEnumEntryInfo(MetaName.AT_DWD, 2), - new PsoEnumEntryInfo(MetaName.AT_FRG, 3) - ); - case MetaName.manifestFlags: - return new PsoEnumInfo(MetaName.manifestFlags, 1, - new PsoEnumEntryInfo(MetaName.INTERIOR_DATA, 0) - ); - case MetaName.rage__eLodType: - return new PsoEnumInfo(MetaName.rage__eLodType, 1, - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_HD, 0), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_LOD, 1), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD1, 2), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD2, 3), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD3, 4), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_ORPHANHD, 5), - new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD4, 6) - ); - case MetaName.rage__ePriorityLevel: - return new PsoEnumInfo(MetaName.rage__ePriorityLevel, 1, - new PsoEnumEntryInfo(MetaName.PRI_REQUIRED, 0), - new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_HIGH, 1), - new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_MEDIUM, 2), - new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_LOW, 3) - ); - default: - return null; - } - } - - - - - private static string GetSafeName(MetaName namehash, uint key) - { - string name = namehash.ToString(); - if (string.IsNullOrEmpty(name)) - { - name = "Unk_" + key; - } - if (!char.IsLetter(name[0])) - { - name = "Unk_" + name; - } - return name; - } - - - - public static T ConvertDataRaw(byte[] data) where T : struct - { - GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); - var h = handle.AddrOfPinnedObject(); - var r = Marshal.PtrToStructure(h); - handle.Free(); - return r; - } - public static T ConvertDataRawOld(byte[] data, int offset) where T : struct - { - GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); - var h = handle.AddrOfPinnedObject(); - var r = Marshal.PtrToStructure(h + offset); - handle.Free(); - return r; - } - - public static T ConvertDataRaw(byte[] data, int offset) where T : struct - { - MemoryMarshal.TryRead(data.AsSpan(offset), out var value); - return value; - } - - public static T ConvertData(byte[] data, int offset) where T : struct, IPsoSwapEnd - { - GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); - var h = handle.AddrOfPinnedObject(); - var r = Marshal.PtrToStructure(h + offset); - handle.Free(); - r.SwapEnd(); - return r; - } - public static Span ConvertDataArrayRaw(byte[] data, int offset, int count) where T : struct - { - T[] items = new T[count]; - int itemsize = Marshal.SizeOf(typeof(T)); - //for (int i = 0; i < count; i++) - //{ - // int off = offset + i * itemsize; - // items[i] = ConvertDataRaw(data, off); - //} - - GCHandle handle = GCHandle.Alloc(items, GCHandleType.Pinned); - var h = handle.AddrOfPinnedObject(); - Marshal.Copy(data, offset, h, itemsize * count); - handle.Free(); - - return items; - } - - - public static T GetItem(PsoFile pso, int offset) where T : struct, IPsoSwapEnd - { - return ConvertData(pso.DataSection.Data, offset); - } - public static T GetRootItem(PsoFile pso) where T : struct, IPsoSwapEnd - { - var i = pso.DataMapSection.RootId - 1; - var e = pso.DataMapSection.Entries[i]; - return GetItem(pso, e.Offset); - } - public static PsoDataMappingEntry GetRootEntry(PsoFile pso) - { - var i = pso.DataMapSection.RootId - 1; - var e = pso.DataMapSection.Entries[i]; - return e; - } - - public static Span GetItemArrayRaw(PsoFile pso, Array_Structure arr) where T : struct - { - if ((arr.Count1 > 0) && (arr.Pointer > 0)) - { - var entry = pso.DataMapSection.Entries[arr.PointerDataIndex]; - return ConvertDataArrayRaw(pso.DataSection.Data, entry.Offset, arr.Count1); - } - return null; - } - public static Span GetItemArray(PsoFile pso, Array_Structure arr) where T : struct, IPsoSwapEnd - { - if ((arr.Count1 > 0) && (arr.Pointer > 0)) - { - var entry = pso.DataMapSection.Entries[arr.PointerDataIndex]; - var res = ConvertDataArrayRaw(pso.DataSection.Data, entry.Offset, arr.Count1); - if (res != null) - { - for (int i = 0; i < res.Length; i++) + else if (entry.Type == PsoDataType.Structure) { - res[i].SwapEnd(); + var typename = GetSafeName((MetaName)entry.ReferenceKey, entry.ReferenceKey); + sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry.ToString()); + sbs.AppendLine(); + } + else + { + var typename = PsoDataTypes.GetCSharpTypeName(entry.Type); + sbs.AppendFormat(fmt, typename, sename, entry.DataOffset, entry); + sbs.AppendLine(); } } - return res; } - return null; + sbs.AppendLine("}"); + sbs.AppendLine(); } - public static Span GetUintArrayRaw(PsoFile pso, Array_uint arr) + sbe.AppendLine(); + sbe.AppendLine(); + sbe.AppendLine(); + sbe.AppendLine(); + sbe.AppendLine(); + sbe.Append(sbs.ToString()); + + string result = sbe.ToString(); + + return result; + } + + + public static string GetTypesInitString() + { + StringBuilder sb = new StringBuilder(); + + foreach (var si in StructDict.Values) { - byte[] data = pso.DataSection.Data; - var entryid = arr.PointerDataId; - if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) + AddStructureInfoString(si, sb); + } + + sb.AppendLine(); + + foreach (var ei in EnumDict.Values) + { + AddEnumInfoString(ei, sb); + } + + string str = sb.ToString(); + return str; + } + private static void AddStructureInfoString(PsoStructureInfo si, StringBuilder sb) + { + var ns = GetMetaNameString(si.IndexInfo.NameHash); + sb.AppendFormat("case " + ns + ":"); + sb.AppendLine(); + sb.AppendFormat("return new PsoStructureInfo({0}, {1}, {2}, {3},", ns, si.Type, si.Unk, si.StructureLength); + sb.AppendLine(); + for (int i = 0; i < si.Entries.Length; i++) + { + var e = si.Entries[i]; + string refkey = "0"; + if (e.ReferenceKey != 0) { - return null; + refkey = GetMetaNameString((MetaName)e.ReferenceKey); } - var entryoffset = arr.PointerDataOffset; - var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; - int totoffset = arrentry.Offset + (int)entryoffset; - var readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1); - return readdata; + sb.AppendFormat(" new PsoStructureEntryInfo({0}, PsoDataType.{1}, {2}, {3}, {4})", GetMetaNameString(e.EntryNameHash), e.Type, e.DataOffset, e.Unk_5h, refkey); + if (i < si.Entries.Length - 1) sb.Append(','); + sb.AppendLine(); } - public static Span GetUintArray(PsoFile pso, Array_uint arr) + sb.AppendFormat(");"); + sb.AppendLine(); + } + private static void AddEnumInfoString(PsoEnumInfo ei, StringBuilder sb) + { + var ns = GetMetaNameString(ei.IndexInfo.NameHash); + sb.AppendFormat("case " + ns + ":"); + sb.AppendLine(); + sb.AppendFormat("return new PsoEnumInfo({0}, {1},", ns, ei.Type); + sb.AppendLine(); + for (int i = 0; i < ei.Entries.Length; i++) { - var uints = GetUintArrayRaw(pso, arr); - if (uints == null) return null; - for (int i = 0; i < uints.Length; i++) + var e = ei.Entries[i]; + sb.AppendFormat(" new PsoEnumEntryInfo({0}, {1})", GetMetaNameString(e.EntryNameHash), e.EntryKey); + if (i < ei.Entries.Length - 1) sb.Append(','); + sb.AppendLine(); + } + sb.AppendFormat(");"); + sb.AppendLine(); + } + private static string GetMetaNameString(MetaName n) + { + if (Enum.IsDefined(typeof(MetaName), n)) + { + return "MetaName." + n.ToString(); + } + else + { + return "(MetaName)" + n.ToString(); + } + } + + + + + private static string GetSafeName(MetaName namehash, uint key) + { + string? name = Enum.GetName(namehash); + if (string.IsNullOrEmpty(name)) + { + name = $"Unk_{key}"; + } + if (!char.IsLetter(name[0])) + { + name = $"Unk_{name}"; + } + return name; + } + + + + public static T ConvertDataRaw(byte[] data) where T : struct + { + GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); + var h = handle.AddrOfPinnedObject(); + var r = Marshal.PtrToStructure(h); + handle.Free(); + return r; + } + public static T ConvertDataRawOld(byte[] data, int offset) where T : struct + { + GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); + var h = handle.AddrOfPinnedObject(); + var r = Marshal.PtrToStructure(h + offset); + handle.Free(); + return r; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryConvertDataRaw(byte[] data, int offset, out T value) where T : struct + { + return MemoryMarshal.TryRead(data.AsSpan(offset), out value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryConvertDataRaw(Span data, out T value) where T : struct + { + return MemoryMarshal.TryRead(data, out value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ConvertDataRaw(byte[] data, int offset) where T : struct + { + MemoryMarshal.TryRead(data.AsSpan(offset), out var value); + return value; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ConvertData(byte[] data, int offset) where T : struct, IPsoSwapEnd + { + TryConvertData(data.AsSpan(offset), out var value); + + return value; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryConvertData(byte[] data, int offset, out T value) where T : struct, IPsoSwapEnd + { + return TryConvertData(data.AsSpan(offset), out value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryConvertData(Span data, out T value) where T : struct, IPsoSwapEnd + { + MemoryMarshal.TryRead(data, out value); + value = value.SwapEnd(); + return true; + } + + public static T[] ConvertDataArrayRaw(byte[] data, int offset, int count, T[]? buffer = null) where T : struct + { + if (count == 0) + { + return []; + } + int itemsize = Marshal.SizeOf(typeof(T)); + var result = MemoryMarshal.Cast(data.AsSpan(offset, count * itemsize)); + + var resultArr = buffer ?? new T[result.Length]; + + result.CopyTo(resultArr.AsSpan()); + + return resultArr; + } + + + public static T GetItem(PsoFile pso, int offset) where T : struct, IPsoSwapEnd + { + return ConvertData(pso.DataSection.Data, offset); + } + public static T GetRootItem(PsoFile pso) where T : struct, IPsoSwapEnd + { + var i = pso.DataMapSection.RootId - 1; + var e = pso.DataMapSection.Entries[i]; + return GetItem(pso, e.Offset); + } + public static PsoDataMappingEntry GetRootEntry(PsoFile pso) + { + var i = pso.DataMapSection.RootId - 1; + var e = pso.DataMapSection.Entries[i]; + return e; + } + + public static Span GetItemArrayRaw(PsoFile pso, Array_Structure arr) where T : struct + { + if ((arr.Count1 > 0) && (arr.Pointer > 0)) + { + var entry = pso.DataMapSection.Entries[arr.PointerDataIndex]; + return ConvertDataArrayRaw(pso.DataSection.Data, entry.Offset, arr.Count1); + } + return null; + } + public static T[] GetItemArray(PsoFile pso, in Array_Structure arr) where T : struct, IPsoSwapEnd + { + if ((arr.Count1 > 0) && (arr.Pointer > 0)) + { + var entry = pso.DataMapSection.Entries[arr.PointerDataIndex]; + var res = ConvertDataArrayRaw(pso.DataSection.Data, entry.Offset, arr.Count1); + if (res != null) { - uints[i] = MetaTypes.SwapBytes(uints[i]); - } - return uints; - } - - public static MetaHash[] GetHashArray(PsoFile pso, Array_uint arr) - { - var uints = GetUintArrayRaw(pso, arr); - if (uints == null) return null; - MetaHash[] hashes = new MetaHash[uints.Length]; - for (int n = 0; n < uints.Length; n++) - { - hashes[n].Hash = MetaTypes.SwapBytes(uints[n]); - } - return hashes; - } - - - - - public static Span GetFloatArrayRaw(PsoFile pso, Array_float arr) - { - byte[] data = pso.DataSection.Data; - var entryid = arr.PointerDataId; - if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) - { - return null; - } - var entryoffset = arr.PointerDataOffset; - var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; - int totoffset = arrentry.Offset + (int)entryoffset; - var readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1); - return readdata; - } - public static Span GetFloatArray(PsoFile pso, Array_float arr) - { - var floats = GetFloatArrayRaw(pso, arr); - if (floats == null) return null; - for (int i = 0; i < floats.Length; i++) - { - floats[i] = MetaTypes.SwapBytes(floats[i]); - } - return floats; - } - - - - - - public static Span GetUShortArrayRaw(PsoFile pso, Array_Structure arr) - { - byte[] data = pso.DataSection.Data; - var entryid = arr.PointerDataId; - if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) - { - return null; - } - var entryoffset = arr.PointerDataOffset; - var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; - int totoffset = arrentry.Offset + (int)entryoffset; - Span readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1); - return readdata; - } - public static Span GetUShortArray(PsoFile pso, Array_Structure arr) - { - var ushorts = GetUShortArrayRaw(pso, arr); - if (ushorts == null) return null; - for (int i = 0; i < ushorts.Length; i++) - { - ushorts[i] = MetaTypes.SwapBytes(ushorts[i]); - } - return ushorts; - } - - - - - - - public static T[] GetObjectArray(PsoFile pso, Array_Structure arr) where U : struct, IPsoSwapEnd where T : PsoClass, new() - { - Span items = GetItemArray(pso, arr); - if (items == null) return null; - if (items.Length == 0) return null; - T[] result = new T[items.Length]; - for (int i = 0; i < items.Length; i++) - { - T newitem = new T(); - newitem.Init(pso, ref items[i]); - result[i] = newitem; - } - return result; - } - - - public static byte[] GetByteArray(PsoFile pso, PsoStructureEntryInfo entry, int offset) - { - var aCount = (entry.ReferenceKey >> 16) & 0x0000FFFF; - var aBlockId = (int)entry.ReferenceKey & 0x0000FFFF; - var block = pso.GetBlock(aBlockId); - if (block == null) return null; - - //block.Offset - - return null; - } - - - - - - - public static Span GetPointerArray(PsoFile pso, Array_StructurePointer array) - { - uint count = array.Count1; - if (count == 0) return null; - - uint ptrindex = array.PointerDataIndex; - uint ptroffset = array.PointerDataOffset; - var ptrblock = (ptrindex < pso.DataMapSection.EntriesCount) ? pso.DataMapSection.Entries[ptrindex] : null; - if ((ptrblock == null) || (ptrblock.NameHash != (MetaName)MetaTypeName.PsoPOINTER)) - { return null; } - - var offset = ptrblock.Offset; - int boffset = (int)(offset + ptroffset); - - var ptrs = ConvertDataArrayRaw(pso.DataSection.Data, boffset, (int)count); - if (ptrs != null) - { - for (int i = 0; i < ptrs.Length; i++) + for (int i = 0; i < res.Length; i++) { - ptrs[i].SwapEnd(); + res[i] = res[i].SwapEnd(); } } + return res; + } + return null; + } - return ptrs; + + public static uint[]? GetUintArrayRaw(PsoFile pso, in Array_uint arr, uint[]? buffer = null) + { + byte[] data = pso.DataSection.Data; + var entryid = arr.PointerDataId; + if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) + { + return null; + } + var entryoffset = arr.PointerDataOffset; + var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; + int totoffset = arrentry.Offset + (int)entryoffset; + var readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1, buffer); + return readdata; + } + + public static uint[]? GetUintArray(PsoFile pso, in Array_uint arr) + { + var uints = GetUintArrayRaw(pso, in arr); + if (uints == null) + return null; + + BinaryPrimitives.ReverseEndianness(uints, uints); + + return uints; + } + + public static MetaHash[]? GetHashArray(PsoFile pso, in Array_uint arr) + { + var uints = ArrayPool.Shared.Rent((int)arr.Count1); + try + { + GetUintArrayRaw(pso, in arr, uints); + if (uints is null) + return null; + + BinaryPrimitives.ReverseEndianness(uints, uints); + + return MemoryMarshal.Cast(uints).ToArray(); + } + finally + { + ArrayPool.Shared.Return(uints); + } + } + + + + + public static float[] GetFloatArrayRaw(PsoFile pso, in Array_float arr) + { + byte[] data = pso.DataSection.Data; + var entryid = arr.PointerDataId; + if ((entryid == 0) || (entryid > pso.DataMapSection.EntriesCount)) + { + return null; + } + var entryoffset = arr.PointerDataOffset; + var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; + int totoffset = arrentry.Offset + (int)entryoffset; + var readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1); + return readdata; + } + public static float[] GetFloatArray(PsoFile pso, in Array_float arr) + { + var floats = GetFloatArrayRaw(pso, in arr); + if (floats == null) + return null; + + var uints = MemoryMarshal.Cast(floats); + BinaryPrimitives.ReverseEndianness(uints, uints); + return floats; + } + + + + + + public static ushort[] GetUShortArrayRaw(PsoFile pso, in Array_Structure arr) + { + byte[] data = pso.DataSection.Data; + var entryid = arr.PointerDataId; + if (entryid == 0 || entryid > pso.DataMapSection.EntriesCount) + { + return null; + } + var entryoffset = arr.PointerDataOffset; + var arrentry = pso.DataMapSection.Entries[(int)entryid - 1]; + int totoffset = arrentry.Offset + (int)entryoffset; + ushort[] readdata = ConvertDataArrayRaw(data, totoffset, arr.Count1); + return readdata; + } + + public static ushort[] GetUShortArray(PsoFile pso, in Array_Structure arr) + { + var ushorts = GetUShortArrayRaw(pso, in arr); + if (ushorts == null) + return null; + + BinaryPrimitives.ReverseEndianness(ushorts, ushorts); + return ushorts; + } + + + + + + + public static T[]? GetObjectArray(PsoFile pso, in Array_Structure arr) where U : struct, IPsoSwapEnd where T : PsoClass, new() + { + U[] items = GetItemArray(pso, in arr); + if (items == null) + return null; + + if (items.Length == 0) + return null; + + T[] result = new T[items.Length]; + for (int i = 0; i < items.Length; i++) + { + T newitem = new T(); + newitem.Init(pso, in items[i]); + result[i] = newitem; + } + return result; + } + + + public static byte[]? GetByteArray(PsoFile pso, PsoStructureEntryInfo entry, int offset) + { + var aCount = (entry.ReferenceKey >> 16) & 0x0000FFFF; + var aBlockId = (int)entry.ReferenceKey & 0x0000FFFF; + var block = pso.GetBlock(aBlockId); + if (block == null) + return null; + + //block.Offset + + return null; + } + + + + + + + public static PsoPOINTER[]? GetPointerArray(PsoFile pso, in Array_StructurePointer array, PsoPOINTER[]? buffer = null) + { + uint count = array.Count1; + if (count == 0) + return null; + + uint ptrindex = array.PointerDataIndex; + uint ptroffset = array.PointerDataOffset; + + if (ptrindex >= pso.DataMapSection.EntriesCount) + { + return null; } - - public static T[] ConvertDataArray(PsoFile pso, Array_StructurePointer array) where T : struct, IPsoSwapEnd + var ptrblock = pso.DataMapSection.Entries[ptrindex]; + if (ptrblock.NameHash != (MetaName)MetaTypeName.PsoPOINTER) { - uint count = array.Count1; - if (count == 0) return null; - var ptrs = GetPointerArray(pso, array); - if (ptrs == null) return null; - if (ptrs.Length < count) - { return null; } + return null; + } - T[] items = new T[count]; + var offset = ptrblock.Offset; + int boffset = (int)(offset + ptroffset); - for (int i = 0; i < count; i++) + var ptrs = ConvertDataArrayRaw(pso.DataSection.Data, boffset, (int)count); + if (ptrs != null) + { + for (int i = 0; i < ptrs.Length; i++) { - var sptr = ptrs[i]; - int blocki = sptr.BlockID - 1; - int offset = (int)sptr.ItemOffset;// * 16;//block data size... - if (blocki >= pso.DataMapSection.EntriesCount) - { continue; } - var block = pso.DataMapSection.Entries[blocki]; + ptrs[i] = ptrs[i].SwapEnd(); + } + } - if ((offset < 0) || (offset >= block.Length)) - { continue; } + return ptrs; + } - int boffset = block.Offset + offset; - items[i] = ConvertData(pso.DataSection.Data, boffset); + public static T[]? ConvertDataArray(PsoFile pso, in Array_StructurePointer array) where T : struct, IPsoSwapEnd + { + uint count = array.Count1; + if (count == 0) + { + Console.WriteLine($"count is 0"); + return null; + } + + var ptrs = GetPointerArray(pso, in array); + if (ptrs == null) + { + Console.WriteLine($"ptrs is null"); + return null; + } + if (ptrs.Length < count || ptrs.Length == 0) + { + Console.WriteLine($"ptrs.Length smaller than count or ptrs.Length == 0; ptrs.Length = {ptrs.Length}; count = {count}"); + return null; + } + + T[] items = new T[count]; + + for (int i = 0; i < count; i++) + { + var sptr = ptrs[i]; + int blocki = sptr.BlockID - 1; + int offset = (int)sptr.ItemOffset;// * 16;//block data size... + if (blocki >= pso.DataMapSection.EntriesCount) + { + continue; + } + var block = pso.DataMapSection.Entries[blocki]; + + if (offset < 0 || offset >= block.Length) + { + continue; } - return items; + int boffset = block.Offset + offset; + + TryConvertData(pso.DataSection.Data, boffset, out items[i]); } - - - public static string GetString(PsoFile pso, CharPointer ptr) - { - if (ptr.Count1 == 0) return null; - - var blocki = (int)ptr.PointerDataId;// (ptr.Pointer & 0xFFF) - 1; - var offset = (int)ptr.PointerDataOffset;// (ptr.Pointer >> 12) & 0xFFFFF; - - var block = pso.GetBlock(blocki); //nameHash = 1 - if (block == null) - { return null; } - - //if (block.NameHash != (MetaName)1) - //{ } - - var length = ptr.Count1; - var lastbyte = offset + length; - if (lastbyte >= block.Length) - { return null; } - - var data = pso.DataSection?.Data; - if (data == null) - { return null; } - - var doffset = block.Offset + offset; - - string s = Encoding.ASCII.GetString(data, doffset, length); - - //if (meta.Strings == null) return null; - //if (offset < 0) return null; - //if (offset >= meta.Strings.Length) return null; - //string s = meta.Strings[offset]; - - return s; - } - public static string GetString(PsoFile pso, DataBlockPointer ptr) - { - var blocki = (int)ptr.PointerDataId;// (ptr.Pointer & 0xFFF) - 1; - var offset = (int)ptr.PointerDataOffset;// (ptr.Pointer >> 12) & 0xFFFFF; - - var block = pso.GetBlock(blocki); //nameHash = 1 - if (block == null) - { return null; } - - //if (block.NameHash != (MetaName)1) - //{ } - - //var length = ptr.Count1; - //var lastbyte = offset + length; - //if (lastbyte >= block.Length) - //{ return null; } - - var data = pso.DataSection?.Data; - if (data == null) - { return null; } - - //var doffset = block.Offset + offset; - - //string s = Encoding.ASCII.GetString(data, doffset, length); - - StringBuilder sb = new StringBuilder(); - var o = block.Offset + offset; - char c = (char)data[o]; - while (c != 0) - { - sb.Append(c); - o++; - c = (char)data[o]; - } - var s = sb.ToString(); - - return s; - } - - + return items; } - public interface IPsoSwapEnd + + public static string GetString(PsoFile pso, in CharPointer ptr) { - void SwapEnd(); - } + if (ptr.Count1 == 0) + return string.Empty; - public abstract class PsoClass where T : struct, IPsoSwapEnd - { - public abstract void Init(PsoFile pso, ref T v); - } + var blocki = (int)ptr.PointerDataId;// (ptr.Pointer & 0xFFF) - 1; + var offset = (int)ptr.PointerDataOffset;// (ptr.Pointer >> 12) & 0xFFFFF; - - public struct PsoChar64 - { - public byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, - b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, - b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, - b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, - b40, b41, b42, b43, b44, b45, b46, b47, b48, b49, - b50, b51, b52, b53, b54, b55, b56, b57, b58, b59, - b60, b61, b62, b63; - - public override string ToString() + if (!pso.TryGetBlock(blocki, out var block)) { - byte[] bytes = new byte[] - { - b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, + return string.Empty; + } + + //if (block.NameHash != (MetaName)1) + //{ } + + var length = ptr.Count1; + var lastbyte = offset + length; + if (lastbyte >= block.Length) + { + return string.Empty; + } + + var data = pso.DataSection?.Data; + if (data == null) + { + return string.Empty; + } + + var doffset = block.Offset + offset; + + string s = Encoding.ASCII.GetString(data, doffset, length); + + return s; + } + public static string? GetString(PsoFile pso, in DataBlockPointer ptr) + { + var blocki = (int)ptr.PointerDataId;// (ptr.Pointer & 0xFFF) - 1; + var offset = (int)ptr.PointerDataOffset;// (ptr.Pointer >> 12) & 0xFFFFF; + + if (!pso.TryGetBlock(blocki, out var block)) + { + return null; + } + + //if (block.NameHash != (MetaName)1) + //{ } + + //var length = ptr.Count1; + //var lastbyte = offset + length; + //if (lastbyte >= block.Length) + //{ return null; } + + var data = pso.DataSection?.Data; + if (data == null) + { + return null; + } + + //var doffset = block.Offset + offset; + + //string s = Encoding.ASCII.GetString(data, doffset, length); + + var o = block.Offset + offset; + + char c = (char)data[o]; + + var strData = data.AsSpan(o); + var index = strData.IndexOf((byte)'\0'); + + if (index == -1) + { + return Encoding.ASCII.GetString(strData); + } + + return Encoding.ASCII.GetString(strData.Slice(0, index)); + } +} + + +public interface IPsoSwapEnd +{ + T SwapEnd(); +} + +public abstract class PsoClass where T : struct, IPsoSwapEnd +{ + public abstract void Init(PsoFile pso, in T v); +} + +public readonly struct PsoChar64 +{ + public readonly byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49, b50, b51, b52, b53, b54, b55, b56, b57, b58, b59, - b60, b61, b62, b63 - }; - return Encoding.ASCII.GetString(bytes).Replace("\0", string.Empty); - } - } - public struct PsoChar32 - { - public byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, - b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, - b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, - b30, b31; + b60, b61, b62, b63; - public PsoChar32(string s) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan GetBytes() + { + return MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(in this, 1)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan GetBytesNullTerminated() + { + var bytes = GetBytes(); + + var index = bytes.IndexOf((byte)0); + + if (index == -1) { - s = s.PadRight(32, '\0'); - b00 = (byte)s[0]; - b01 = (byte)s[1]; - b02 = (byte)s[2]; - b03 = (byte)s[3]; - b04 = (byte)s[4]; - b05 = (byte)s[5]; - b06 = (byte)s[6]; - b07 = (byte)s[7]; - b08 = (byte)s[8]; - b09 = (byte)s[9]; - b10 = (byte)s[10]; - b11 = (byte)s[11]; - b12 = (byte)s[12]; - b13 = (byte)s[13]; - b14 = (byte)s[14]; - b15 = (byte)s[15]; - b16 = (byte)s[16]; - b17 = (byte)s[17]; - b18 = (byte)s[18]; - b19 = (byte)s[19]; - b20 = (byte)s[20]; - b21 = (byte)s[21]; - b22 = (byte)s[22]; - b23 = (byte)s[23]; - b24 = (byte)s[24]; - b25 = (byte)s[25]; - b26 = (byte)s[26]; - b27 = (byte)s[27]; - b28 = (byte)s[28]; - b29 = (byte)s[29]; - b30 = (byte)s[30]; - b31 = (byte)s[31]; + return bytes; } - public override string ToString() - { - byte[] bytes = new byte[] - { - b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, + + return bytes.Slice(0, index); + } + + public override string ToString() + { + var byteArr = GetBytesNullTerminated(); + + return Encoding.ASCII.GetString(byteArr); + } +} +public readonly struct PsoChar32 +{ + public readonly byte b00, b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, - b30, b31 - }; - return Encoding.ASCII.GetString(bytes).Replace("\0", string.Empty); - } - } + b30, b31; - - - - [TC(typeof(EXP))] public struct PsoPOINTER : IPsoSwapEnd //8 bytes - pointer to data item + public PsoChar32(string s) { - public ulong Pointer { get; set; } - - public ushort BlockID { get { return (ushort)(Pointer & 0xFFF); } } //1-based ID - public uint ItemOffset { get { return (uint)((Pointer>>12) & 0xFFFFF); } } //byte offset - public uint Unk0 { get { return (uint)((Pointer>>32) & 0xFFFFFFFF); } } - - - public PsoPOINTER(int blockID, int itemOffset) - { - Pointer = (((uint)itemOffset << 12) & 0xFFFFF000) + ((uint)blockID & 0xFFF); - } - - - public override string ToString() - { - return BlockID.ToString() + ", " + ItemOffset.ToString();// + ", " + Unk2.ToString(); - } - - public void SwapEnd() - { - Pointer = MetaTypes.SwapBytes(Pointer); - } + s = s.PadRight(32, '\0'); + b00 = (byte)s[0]; + b01 = (byte)s[1]; + b02 = (byte)s[2]; + b03 = (byte)s[3]; + b04 = (byte)s[4]; + b05 = (byte)s[5]; + b06 = (byte)s[6]; + b07 = (byte)s[7]; + b08 = (byte)s[8]; + b09 = (byte)s[9]; + b10 = (byte)s[10]; + b11 = (byte)s[11]; + b12 = (byte)s[12]; + b13 = (byte)s[13]; + b14 = (byte)s[14]; + b15 = (byte)s[15]; + b16 = (byte)s[16]; + b17 = (byte)s[17]; + b18 = (byte)s[18]; + b19 = (byte)s[19]; + b20 = (byte)s[20]; + b21 = (byte)s[21]; + b22 = (byte)s[22]; + b23 = (byte)s[23]; + b24 = (byte)s[24]; + b25 = (byte)s[25]; + b26 = (byte)s[26]; + b27 = (byte)s[27]; + b28 = (byte)s[28]; + b29 = (byte)s[29]; + b30 = (byte)s[30]; + b31 = (byte)s[31]; } - - - - - - - - - //Struct infos - [TC(typeof(EXP))] public struct CPackFileMetaData : IPsoSwapEnd //96 bytes, Type:0 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan GetBytes() { - public Array_Structure MapDataGroups; //0 MapDataGroups: Array: 0 {256: Structure: 0: 3260758307} - public Array_Structure HDTxdBindingArray; //16 HDTxdBindingArray: Array: 16: 2 {256: Structure: 0: CHDTxdAssetBinding} - public Array_Structure imapDependencies; //32 imapDependencies: Array: 32: 4 {256: Structure: 0: 3501026914} - public Array_Structure imapDependencies_2; //48 imapDependencies_2: Array: 48: 6 {256: Structure: 0: 3240050401} - public Array_Structure itypDependencies_2; //64 itypDependencies_2: Array: 64: 8 {256: Structure: 0: 1515605584} - public Array_Structure Interiors; //80 Interiors: Array: 80: 10 {256: Structure: 0: 741495440} - - public void SwapEnd() - { - MapDataGroups.SwapEnd(); - HDTxdBindingArray.SwapEnd(); - imapDependencies.SwapEnd(); - imapDependencies_2.SwapEnd(); - itypDependencies_2.SwapEnd(); - Interiors.SwapEnd(); - } + return MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(in this, 1)); } - [TC(typeof(EXP))] public struct CMapDataGroup : IPsoSwapEnd //56 bytes, Type:0 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ReadOnlySpan GetBytesNullTerminated() { - public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 - public uint Unused0 { get; set; } //4 - public Array_uint Bounds { get; set; } //8 Bounds: Array: 8: 1 {256: INT_0Bh: 0} - public ushort Flags { get; set; } //24 Flags: SHORT_0Fh: 24: 2097155 - public ushort Unused1 { get; set; }//26 - public uint Unused2 { get; set; }//28 - public Array_uint WeatherTypes { get; set; } //32 WeatherTypes: Array: 32: 5 {256: INT_0Bh: 0} - public uint HoursOnOff { get; set; } //48 HoursOnOff//4190815249: INT_06h: 48 - public uint Unused3 { get; set; }//52 + var bytes = GetBytes(); - public override string ToString() + var index = bytes.IndexOf((byte)0); + + if (index == -1) { - return Name.ToString() + ": ybn:" + Bounds.Count1.ToString() + ", wt:" + WeatherTypes.Count1.ToString() + ", flags:" + Flags.ToString() + ", hours:" + HoursOnOff.ToString(); + return bytes; } - public void SwapEnd() - { - Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)); - var b = Bounds; b.SwapEnd(); Bounds = b; - var w = WeatherTypes; w.SwapEnd(); WeatherTypes = w; - HoursOnOff = MetaTypes.SwapBytes(HoursOnOff); - Flags = MetaTypes.SwapBytes(Flags); - } + return bytes.Slice(0, index); } - [TC(typeof(EXP))] public struct CHDTxdAssetBinding : IPsoSwapEnd //132 bytes, Type:0 + public override string ToString() { - public byte assetType { get; set; } //0 assetType: BYTE_ENUM_VALUE: 0: 3387532954 - public byte Unused01 { get; set; }//1 - public ushort Unused02 { get; set; }//2 - public PsoChar64 targetAsset { get; set; } //4 targetAsset: INT_0Bh: 4: 4194304 - public PsoChar64 HDTxd { get; set; } //68 HDTxd: INT_0Bh: 68: 4194304 + var byteArr = GetBytesNullTerminated(); - public override string ToString() - { - return assetType.ToString() + ": " + targetAsset.ToString() + ": " + HDTxd.ToString(); - } - public void SwapEnd() - { - //targetAsset.Hash = MetaTypes.SwapBytes(targetAsset.Hash); - //HDTxd.Hash = MetaTypes.SwapBytes(HDTxd.Hash); - } + return Encoding.ASCII.GetString(byteArr); + } +} + + +[TC(typeof(EXP))] +public readonly struct PsoPOINTER : IPsoSwapEnd //8 bytes - pointer to data item +{ + public ulong Pointer { get; init; } + + public ushort BlockID => (ushort)(Pointer & 0xFFF); //1-based ID + public uint ItemOffset => (uint)((Pointer>>12) & 0xFFFFF); //byte offset + public uint Unk0 => (uint)((Pointer>>32) & 0xFFFFFFFF); + + + public PsoPOINTER(int blockID, int itemOffset) + { + Pointer = (((uint)itemOffset << 12) & 0xFFFFF000) + ((uint)blockID & 0xFFF); + } + + + public override string ToString() => $"{BlockID}, {ItemOffset}"; + + public PsoPOINTER SwapEnd() + { + return this with + { + Pointer = MetaTypes.SwapBytes(Pointer), + }; + } +} + +//Struct infos +[TC(typeof(EXP))] +public readonly struct CPackFileMetaData : IPsoSwapEnd //96 bytes, Type:0 +{ + public readonly Array_Structure _MapDataGroups; //0 MapDataGroups: Array: 0 {256: Structure: 0: 3260758307} + public Array_Structure MapDataGroups { get => _MapDataGroups; init => _MapDataGroups = value; } + + public readonly Array_Structure _HDTxdBindingArray; //16 HDTxdBindingArray: Array: 16: 2 {256: Structure: 0: CHDTxdAssetBinding} + public Array_Structure HDTxdBindingArray { get => _HDTxdBindingArray; init => _HDTxdBindingArray = value; } + + public readonly Array_Structure _imapDependencies; //32 imapDependencies: Array: 32: 4 {256: Structure: 0: 3501026914} + public Array_Structure imapDependencies { get => _imapDependencies; init => _imapDependencies = value; } + + public readonly Array_Structure _imapDependencies_2; //48 imapDependencies_2: Array: 48: 6 {256: Structure: 0: 3240050401} + public Array_Structure imapDependencies_2 { get => _imapDependencies_2; init => _imapDependencies_2 = value; } + + public readonly Array_Structure _itypDependencies_2; //64 itypDependencies_2: Array: 64: 8 {256: Structure: 0: 1515605584} + public Array_Structure itypDependencies_2 { get => _itypDependencies_2; init => _itypDependencies_2 = value; } + + public readonly Array_Structure _Interiors; //80 Interiors: Array: 80: 10 {256: Structure: 0: 741495440} + public Array_Structure Interiors { get => _Interiors; init => _Interiors = value; } + + public CPackFileMetaData SwapEnd() + { + return this with + { + MapDataGroups = _MapDataGroups.SwapEnd(), + HDTxdBindingArray = _HDTxdBindingArray.SwapEnd(), + imapDependencies = _imapDependencies.SwapEnd(), + imapDependencies_2 = _imapDependencies_2.SwapEnd(), + itypDependencies_2 = _itypDependencies_2.SwapEnd(), + Interiors = _Interiors.SwapEnd(), + }; + } +} + +[TC(typeof(EXP))] public struct CMapDataGroup : IPsoSwapEnd //56 bytes, Type:0 +{ + public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 + public uint Unused0 { get; set; } //4 + public Array_uint Bounds { get; set; } //8 Bounds: Array: 8: 1 {256: INT_0Bh: 0} + public ushort Flags { get; set; } //24 Flags: SHORT_0Fh: 24: 2097155 + public ushort Unused1 { get; set; }//26 + public uint Unused2 { get; set; }//28 + public Array_uint WeatherTypes { get; set; } //32 WeatherTypes: Array: 32: 5 {256: INT_0Bh: 0} + public uint HoursOnOff { get; set; } //48 HoursOnOff//4190815249: INT_06h: 48 + public uint Unused3 { get; set; }//52 + + public override readonly string ToString() + { + return $"{Name}: ybn:{Bounds.Count1}, wt:{WeatherTypes.Count1}, flags:{Flags}, hours:{HoursOnOff}"; + } + + public CMapDataGroup SwapEnd() + { + return this with + { + Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)), + Bounds = Bounds.SwapEnd(), + WeatherTypes = WeatherTypes.SwapEnd(), + HoursOnOff = MetaTypes.SwapBytes(HoursOnOff), + Flags = MetaTypes.SwapBytes(Flags), + }; + } +} + +[TC(typeof(EXP))] +public readonly struct CHDTxdAssetBinding : IPsoSwapEnd //132 bytes, Type:0 +{ + public byte assetType { get; init; } //0 assetType: BYTE_ENUM_VALUE: 0: 3387532954 + public byte Unused01 { get; init; }//1 + public ushort Unused02 { get; init; }//2 + + public readonly PsoChar64 _targetAsset; + public PsoChar64 targetAsset { get => _targetAsset; init => _targetAsset = value; } //4 targetAsset: INT_0Bh: 4: 4194304 + + public readonly PsoChar64 _HDTxd; + public PsoChar64 HDTxd { get => _HDTxd; init => _HDTxd = value; } //68 HDTxd: INT_0Bh: 68: 4194304 + + public override string ToString() + { + return $"{assetType}: {_targetAsset}: {_HDTxd}"; + } + public readonly CHDTxdAssetBinding SwapEnd() + { + return this; + //targetAsset.Hash = MetaTypes.SwapBytes(targetAsset.Hash); + //HDTxd.Hash = MetaTypes.SwapBytes(HDTxd.Hash); + } +} + +[TC(typeof(EXP))] public struct CImapDependency : IPsoSwapEnd //12 bytes, Type:0 // CImapDependency//3501026914 +{ + public MetaHash imapName { get; set; } //0 imapName: INT_0Bh: 0 + public MetaHash itypName { get; set; } //4 itypName//2890158180: INT_0Bh: 4 + public MetaHash packFileName { get; set; } //8 packFileName//4216494073: INT_0Bh: 8 + + public override string ToString() + { + return $"{imapName}, {itypName}, {packFileName}"; + } + public CImapDependency SwapEnd() + { + return this with + { + imapName = new MetaHash(MetaTypes.SwapBytes(imapName.Hash)), + itypName = new MetaHash(MetaTypes.SwapBytes(itypName.Hash)), + packFileName = new MetaHash(MetaTypes.SwapBytes(packFileName.Hash)), + }; + } +} + +[TC(typeof(EXP))] +public struct CImapDependencies : IPsoSwapEnd //24 bytes, Type:0 // CImapDependencies//3240050401 imapDependencies_2 +{ + public MetaHash imapName { get; set; } //0 imapName: INT_0Bh: 0 //name hash + public ushort manifestFlags { get; set; } //4 manifestFlags//1683136603: SHORT_0Fh: 4: 2097153 + public ushort Unused0 { get; set; } //6 + public Array_uint itypDepArray { get; set; } //8 itypDepArray//2410949350: Array: 8: 3 {256: INT_0Bh: 0} //children... + + + public override string ToString() + { + return $"{imapName}: {manifestFlags}: {itypDepArray}"; + } + public CImapDependencies SwapEnd() + { + return this with + { + imapName = new MetaHash(MetaTypes.SwapBytes(imapName.Hash)), + manifestFlags = MetaTypes.SwapBytes(manifestFlags), + itypDepArray = itypDepArray.SwapEnd(), + }; + } +} + +[TC(typeof(EXP))] +public struct CItypDependencies : IPsoSwapEnd //24 bytes, Type:0 // CItypDependencies//1515605584 itypDependencies_2 +{ + public MetaHash itypName { get; set; } //0 itypName//2890158180: INT_0Bh: 0 + public ushort manifestFlags { get; set; } //4 manifestFlags//1683136603: SHORT_0Fh: 4: 2097153 + public ushort Unused0 { get; set; } //6 + public Array_uint itypDepArray { get; set; } //8 itypDepArray//2410949350: Array: 8: 3 {256: INT_0Bh: 0} + + public override string ToString() + { + return $"{itypName}: {manifestFlags}: {itypDepArray}"; + } + public CItypDependencies SwapEnd() + { + return this with + { + itypName = new MetaHash(MetaTypes.SwapBytes(itypName.Hash)), + manifestFlags = MetaTypes.SwapBytes(manifestFlags), + itypDepArray = itypDepArray.SwapEnd(), + }; + } +} + +[TC(typeof(EXP))] +public struct CInteriorBoundsFiles : IPsoSwapEnd //24 bytes, Type:0 // Interiors +{ + public MetaHash Name { get; init; } //0 Name: INT_0Bh: 0 + public uint Unused0 { get; init; } //4 + public readonly Array_uint _Bounds; //8 Bounds: Array: 8: 1 {256: INT_0Bh: 0} + public Array_uint Bounds { get => _Bounds; init => _Bounds = value; } + + public override string ToString() => JenkIndex.GetString(Name); + public CInteriorBoundsFiles SwapEnd() + { + return this with + { + Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)), + Bounds = Bounds.SwapEnd(), + }; + } +} + + + + + + +[TC(typeof(EXP))] +public readonly struct CScenarioPointManifest : IPsoSwapEnd //56 bytes, Type:0 +{ + public readonly int _VersionNumber; + public int VersionNumber { get => _VersionNumber; init => _VersionNumber = value; } //0 VersionNumber: INT_05h: 0 + + public readonly uint _Unused0; + public uint Unused0 { get => _Unused0; init => _Unused0 = value; } //4 + + public readonly Array_StructurePointer _RegionDefs; + public Array_StructurePointer RegionDefs { get => _RegionDefs; init => _RegionDefs = value; } //8 RegionDefs: Array: 8: 1 {ARRAYINFO: Structure: 0} + + public readonly Array_StructurePointer _Groups; + public Array_StructurePointer Groups { get => _Groups; init => _Groups = value; } //24 Groups: Array: 24: 3 {ARRAYINFO: Structure: 0} + + public readonly Array_uint _InteriorNames; + public Array_uint InteriorNames { get => _InteriorNames; init => _InteriorNames = value; } //40 InteriorNames: Array: 40: 5 {ARRAYINFO: INT_0Bh: 0} + + public override readonly string ToString() => VersionNumber.ToString(); + public CScenarioPointManifest SwapEnd() + { + return this with + { + VersionNumber = MetaTypes.SwapBytes(VersionNumber), + RegionDefs = RegionDefs.SwapEnd(), + Groups = Groups.SwapEnd(), + InteriorNames = InteriorNames.SwapEnd(), + }; + } +} + +[TC(typeof(EXP))] +public readonly struct CScenarioPointRegionDef : IPsoSwapEnd //64 bytes, Type:0 +{ + public MetaHash Name { get; init; } //0 Name: INT_0Bh: 0 + public uint Unused0 { get; init; } //4 + public uint Unused1 { get; init; } //8 + public uint Unused2 { get; init; } //12 + public rage__spdAABB AABB { get; init; } //16 AABB: Structure: 16: rage__spdAABB + public uint Unused3 { get; init; } //48 + public uint Unused4 { get; init; } //52 + public uint Unused5 { get; init; } //56 + public uint Unused6 { get; init; } //60 + + public override readonly string ToString() => $"{Name}, {AABB}"; + public CScenarioPointRegionDef SwapEnd() + { + return this with + { + Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)), + AABB = AABB.SwapEnd(), + }; + } +} + +[TC(typeof(EXP))] public struct CScenarioPointGroup : IPsoSwapEnd //8 bytes, Type:0 +{ + public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 + public byte EnabledByDefault { get; set; } //4 EnabledByDefault: BYTE_00h: 4 + public byte Unused0 { get; set; } //5 + public ushort Unused1 { get; set; } //6 + + public override string ToString() => Name.ToString(); + public CScenarioPointGroup SwapEnd() + { + return this with + { + Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)), + }; } - - [TC(typeof(EXP))] public struct CImapDependency : IPsoSwapEnd //12 bytes, Type:0 // CImapDependency//3501026914 - { - public MetaHash imapName { get; set; } //0 imapName: INT_0Bh: 0 - public MetaHash itypName { get; set; } //4 itypName//2890158180: INT_0Bh: 4 - public MetaHash packFileName { get; set; } //8 packFileName//4216494073: INT_0Bh: 8 - - public override string ToString() - { - return imapName.ToString() + ", " + itypName.ToString() + ", " + packFileName.ToString(); - } - public void SwapEnd() - { - imapName = new MetaHash(MetaTypes.SwapBytes(imapName.Hash)); - itypName = new MetaHash(MetaTypes.SwapBytes(itypName.Hash)); - packFileName = new MetaHash(MetaTypes.SwapBytes(packFileName.Hash)); - } - } - - [TC(typeof(EXP))] public struct CImapDependencies : IPsoSwapEnd //24 bytes, Type:0 // CImapDependencies//3240050401 imapDependencies_2 - { - public MetaHash imapName { get; set; } //0 imapName: INT_0Bh: 0 //name hash - public ushort manifestFlags { get; set; } //4 manifestFlags//1683136603: SHORT_0Fh: 4: 2097153 - public ushort Unused0 { get; set; } //6 - public Array_uint itypDepArray { get; set; } //8 itypDepArray//2410949350: Array: 8: 3 {256: INT_0Bh: 0} //children... - - - public override string ToString() - { - return imapName.ToString() + ": " + manifestFlags.ToString() + ": " + itypDepArray.ToString(); - } - public void SwapEnd() - { - imapName = new MetaHash(MetaTypes.SwapBytes(imapName.Hash)); - manifestFlags = MetaTypes.SwapBytes(manifestFlags); - var d = itypDepArray; d.SwapEnd(); itypDepArray = d; - } - } - - [TC(typeof(EXP))] public struct CItypDependencies : IPsoSwapEnd //24 bytes, Type:0 // CItypDependencies//1515605584 itypDependencies_2 - { - public MetaHash itypName { get; set; } //0 itypName//2890158180: INT_0Bh: 0 - public ushort manifestFlags { get; set; } //4 manifestFlags//1683136603: SHORT_0Fh: 4: 2097153 - public ushort Unused0 { get; set; } //6 - public Array_uint itypDepArray { get; set; } //8 itypDepArray//2410949350: Array: 8: 3 {256: INT_0Bh: 0} - - public override string ToString() - { - return itypName.ToString() + ": " + manifestFlags.ToString() + ": " + itypDepArray.ToString(); - } - public void SwapEnd() - { - itypName = new MetaHash(MetaTypes.SwapBytes(itypName.Hash)); - manifestFlags = MetaTypes.SwapBytes(manifestFlags); - var d = itypDepArray; d.SwapEnd(); itypDepArray = d; - } - } - - [TC(typeof(EXP))] public struct CInteriorBoundsFiles : IPsoSwapEnd //24 bytes, Type:0 // Interiors - { - public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 - public uint Unused0 { get; set; } //4 - public Array_uint Bounds { get; set; } //8 Bounds: Array: 8: 1 {256: INT_0Bh: 0} - - public override string ToString() - { - return JenkIndex.GetString(Name); - } - public void SwapEnd() - { - Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)); - var b = Bounds; b.SwapEnd(); Bounds = b; - } - } - - - - - - - [TC(typeof(EXP))] public struct CScenarioPointManifest : IPsoSwapEnd //56 bytes, Type:0 - { - public int VersionNumber { get; set; } //0 VersionNumber: INT_05h: 0 - public uint Unused0 { get; set; } //4 - public Array_StructurePointer RegionDefs { get; set; } //8 RegionDefs: Array: 8: 1 {ARRAYINFO: Structure: 0} - public Array_StructurePointer Groups { get; set; } //24 Groups: Array: 24: 3 {ARRAYINFO: Structure: 0} - public Array_uint InteriorNames { get; set; } //40 InteriorNames: Array: 40: 5 {ARRAYINFO: INT_0Bh: 0} - - public override string ToString() - { - return VersionNumber.ToString(); - } - public void SwapEnd() - { - VersionNumber = MetaTypes.SwapBytes(VersionNumber); - var r = RegionDefs; r.SwapEnd(); RegionDefs = r; - var g = Groups; g.SwapEnd(); Groups = g; - var i = InteriorNames; i.SwapEnd(); InteriorNames = i; - } - } - - [TC(typeof(EXP))] public struct CScenarioPointRegionDef : IPsoSwapEnd //64 bytes, Type:0 - { - public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 - public uint Unused0 { get; set; } //4 - public uint Unused1 { get; set; } //8 - public uint Unused2 { get; set; } //12 - public rage__spdAABB AABB { get; set; } //16 AABB: Structure: 16: rage__spdAABB - public uint Unused3 { get; set; } //48 - public uint Unused4 { get; set; } //52 - public uint Unused5 { get; set; } //56 - public uint Unused6 { get; set; } //60 - - public override string ToString() - { - return Name.ToString() + ", " + AABB.ToString(); - } - public void SwapEnd() - { - Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)); - var aabb = AABB; aabb.SwapEnd(); AABB = aabb; - } - } - - [TC(typeof(EXP))] public struct CScenarioPointGroup : IPsoSwapEnd //8 bytes, Type:0 - { - public MetaHash Name { get; set; } //0 Name: INT_0Bh: 0 - public byte EnabledByDefault { get; set; } //4 EnabledByDefault: BYTE_00h: 4 - public byte Unused0 { get; set; } //5 - public ushort Unused1 { get; set; } //6 - - public override string ToString() - { - return Name.ToString(); - } - public void SwapEnd() - { - Name = new MetaHash(MetaTypes.SwapBytes(Name.Hash)); - } - } - - - - } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetEnumInfo.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetEnumInfo.cs new file mode 100644 index 0000000..fae5f57 --- /dev/null +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetEnumInfo.cs @@ -0,0 +1,1453 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.GameFiles; +public static class PsoTypesEnumInfo +{ + public static PsoEnumInfo? GetEnumInfo(MetaName name) + { + //to generate enuminfos + return name switch + { + //vehicle mod color metallic id + (MetaName)360458334 => new PsoEnumInfo((MetaName)360458334, 1, + new PsoEnumEntryInfo(MetaName.none, -1), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_normal, 0), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_1, 1), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_2, 2), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_3, 3), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_4, 4), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_5, 5), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_6, 6), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_7, 7), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_8, 8), + new PsoEnumEntryInfo(MetaName.EVehicleModelColorMetallic_9, 9) + ), + //vehicle mod color audio color + (MetaName)544262540 => new PsoEnumInfo((MetaName)544262540, 1, + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_black, 0), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_blue, 1), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_brown, 2), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_beige, 3), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_graphite, 4), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_green, 5), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_grey, 6), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_orange, 7), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_pink, 8), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_red, 9), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_silver, 10), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_white, 11), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_COLOUR_yellow, 12) + ), + //vehicle mod color audio prefix + (MetaName)2065815796 => new PsoEnumInfo((MetaName)2065815796, 1, + new PsoEnumEntryInfo(MetaName.none, 0), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_bright, 1), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_light, 2), + new PsoEnumEntryInfo(MetaName.POLICE_SCANNER_PREFIX_dark, 3) + ), + //vehicle mod kit type + MetaName.eModKitType => new PsoEnumInfo(MetaName.eModKitType, 1, + new PsoEnumEntryInfo(MetaName.MKT_STANDARD, 0), + new PsoEnumEntryInfo(MetaName.MKT_SPORT, 1), + new PsoEnumEntryInfo(MetaName.MKT_SUV, 2), + new PsoEnumEntryInfo(MetaName.MKT_SPECIAL, 3) + ), + //vehicle mod type + MetaName.eVehicleModType => new PsoEnumInfo(MetaName.eVehicleModType, 1, + new PsoEnumEntryInfo(MetaName.VMT_SPOILER, 0), + new PsoEnumEntryInfo(MetaName.VMT_BUMPER_F, 1), + new PsoEnumEntryInfo(MetaName.VMT_BUMPER_R, 2), + new PsoEnumEntryInfo(MetaName.VMT_SKIRT, 3), + new PsoEnumEntryInfo(MetaName.VMT_EXHAUST, 4), + new PsoEnumEntryInfo(MetaName.VMT_CHASSIS, 5), + new PsoEnumEntryInfo(MetaName.VMT_GRILL, 6), + new PsoEnumEntryInfo(MetaName.VMT_BONNET, 7), + new PsoEnumEntryInfo(MetaName.VMT_WING_L, 8), + new PsoEnumEntryInfo(MetaName.VMT_WING_R, 9), + new PsoEnumEntryInfo(MetaName.VMT_ROOF, 10), + new PsoEnumEntryInfo(MetaName.VMT_PLTHOLDER, 11), + new PsoEnumEntryInfo(MetaName.VMT_PLTVANITY, 12), + new PsoEnumEntryInfo(MetaName.VMT_INTERIOR1, 13), + new PsoEnumEntryInfo(MetaName.VMT_INTERIOR2, 14), + new PsoEnumEntryInfo(MetaName.VMT_INTERIOR3, 15), + new PsoEnumEntryInfo(MetaName.VMT_INTERIOR4, 16), + new PsoEnumEntryInfo(MetaName.VMT_INTERIOR5, 17), + new PsoEnumEntryInfo(MetaName.VMT_SEATS, 18), + new PsoEnumEntryInfo(MetaName.VMT_STEERING, 19), + new PsoEnumEntryInfo(MetaName.VMT_KNOB, 20), + new PsoEnumEntryInfo(MetaName.VMT_PLAQUE, 21), + new PsoEnumEntryInfo(MetaName.VMT_ICE, 22), + new PsoEnumEntryInfo(MetaName.VMT_TRUNK, 23), + new PsoEnumEntryInfo(MetaName.VMT_HYDRO, 24), + new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY1, 25), + new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY2, 26), + new PsoEnumEntryInfo(MetaName.VMT_ENGINEBAY3, 27), + new PsoEnumEntryInfo(MetaName.VMT_CHASSIS2, 28), + new PsoEnumEntryInfo(MetaName.VMT_CHASSIS3, 29), + new PsoEnumEntryInfo(MetaName.VMT_CHASSIS4, 30), + new PsoEnumEntryInfo(MetaName.VMT_CHASSIS5, 31), + new PsoEnumEntryInfo(MetaName.VMT_DOOR_L, 32), + new PsoEnumEntryInfo(MetaName.VMT_DOOR_R, 33), + new PsoEnumEntryInfo(MetaName.VMT_LIVERY_MOD, 34), + new PsoEnumEntryInfo((MetaName)3409280882, 35), + new PsoEnumEntryInfo(MetaName.VMT_ENGINE, 36), + new PsoEnumEntryInfo(MetaName.VMT_BRAKES, 37), + new PsoEnumEntryInfo(MetaName.VMT_GEARBOX, 38), + new PsoEnumEntryInfo(MetaName.VMT_HORN, 39), + new PsoEnumEntryInfo(MetaName.VMT_SUSPENSION, 40), + new PsoEnumEntryInfo(MetaName.VMT_ARMOUR, 41), + new PsoEnumEntryInfo((MetaName)3278520444, 42), + new PsoEnumEntryInfo(MetaName.VMT_TURBO, 43), + new PsoEnumEntryInfo((MetaName)1675686396, 44), + new PsoEnumEntryInfo(MetaName.VMT_TYRE_SMOKE, 45), + new PsoEnumEntryInfo(MetaName.VMT_HYDRAULICS, 46), + new PsoEnumEntryInfo(MetaName.VMT_XENON_LIGHTS, 47), + new PsoEnumEntryInfo(MetaName.VMT_WHEELS, 48), + new PsoEnumEntryInfo(MetaName.VMT_WHEELS_REAR_OR_HYDRAULICS, 49) + ), + //vehicle mod bone + (MetaName)3635907608 => new PsoEnumInfo((MetaName)3635907608, 1, + new PsoEnumEntryInfo(MetaName.none, -1), + new PsoEnumEntryInfo(MetaName.chassis, 0), + new PsoEnumEntryInfo(MetaName.bodyshell, 48), + new PsoEnumEntryInfo(MetaName.bumper_f, 49), + new PsoEnumEntryInfo(MetaName.bumper_r, 50), + new PsoEnumEntryInfo(MetaName.wing_rf, 51), + new PsoEnumEntryInfo(MetaName.wing_lf, 52), + new PsoEnumEntryInfo(MetaName.bonnet, 53), + new PsoEnumEntryInfo(MetaName.boot, 54), + new PsoEnumEntryInfo(MetaName.exhaust, 56), + new PsoEnumEntryInfo(MetaName.exhaust_2, 57), + new PsoEnumEntryInfo(MetaName.exhaust_3, 58), + new PsoEnumEntryInfo(MetaName.exhaust_4, 59), + new PsoEnumEntryInfo(MetaName.exhaust_5, 60), + new PsoEnumEntryInfo(MetaName.exhaust_6, 61), + new PsoEnumEntryInfo(MetaName.exhaust_7, 62), + new PsoEnumEntryInfo(MetaName.exhaust_8, 63), + new PsoEnumEntryInfo(MetaName.exhaust_9, 64), + new PsoEnumEntryInfo(MetaName.exhaust_10, 65), + new PsoEnumEntryInfo(MetaName.exhaust_11, 66), + new PsoEnumEntryInfo(MetaName.exhaust_12, 67), + new PsoEnumEntryInfo(MetaName.exhaust_13, 68), + new PsoEnumEntryInfo(MetaName.exhaust_14, 69), + new PsoEnumEntryInfo(MetaName.exhaust_15, 70), + new PsoEnumEntryInfo(MetaName.exhaust_16, 71), + new PsoEnumEntryInfo(MetaName.extra_1, 401), + new PsoEnumEntryInfo(MetaName.extra_2, 402), + new PsoEnumEntryInfo(MetaName.extra_3, 403), + new PsoEnumEntryInfo(MetaName.extra_4, 404), + new PsoEnumEntryInfo(MetaName.extra_5, 405), + new PsoEnumEntryInfo(MetaName.extra_6, 406), + new PsoEnumEntryInfo(MetaName.extra_7, 407), + new PsoEnumEntryInfo(MetaName.extra_8, 408), + new PsoEnumEntryInfo(MetaName.extra_9, 409), + new PsoEnumEntryInfo(MetaName.extra_10, 410), + new PsoEnumEntryInfo(MetaName.extra_11, 411), + new PsoEnumEntryInfo(MetaName.extra_12, 412), + new PsoEnumEntryInfo(MetaName.extra_13, 413), + new PsoEnumEntryInfo(MetaName.extra_14, 414), + new PsoEnumEntryInfo(MetaName.break_extra_1, 417), + new PsoEnumEntryInfo(MetaName.break_extra_2, 418), + new PsoEnumEntryInfo(MetaName.break_extra_3, 419), + new PsoEnumEntryInfo(MetaName.break_extra_4, 420), + new PsoEnumEntryInfo(MetaName.break_extra_5, 421), + new PsoEnumEntryInfo(MetaName.break_extra_6, 422), + new PsoEnumEntryInfo(MetaName.break_extra_7, 423), + new PsoEnumEntryInfo(MetaName.break_extra_8, 424), + new PsoEnumEntryInfo(MetaName.break_extra_9, 425), + new PsoEnumEntryInfo(MetaName.break_extra_10, 426), + new PsoEnumEntryInfo(MetaName.mod_col_1, 427), + new PsoEnumEntryInfo(MetaName.mod_col_2, 428), + new PsoEnumEntryInfo(MetaName.mod_col_3, 429), + new PsoEnumEntryInfo(MetaName.mod_col_4, 430), + new PsoEnumEntryInfo(MetaName.mod_col_5, 431), + new PsoEnumEntryInfo(MetaName.mod_col_6, 432), + new PsoEnumEntryInfo(MetaName.mod_col_7, 433), + new PsoEnumEntryInfo(MetaName.mod_col_8, 434), + new PsoEnumEntryInfo(MetaName.mod_col_9, 435), + new PsoEnumEntryInfo(MetaName.mod_col_10, 436), + new PsoEnumEntryInfo(MetaName.mod_col_11, 437), + new PsoEnumEntryInfo(MetaName.mod_col_12, 438), + new PsoEnumEntryInfo(MetaName.mod_col_13, 439), + new PsoEnumEntryInfo(MetaName.mod_col_14, 440), + new PsoEnumEntryInfo(MetaName.mod_col_15, 441), + new PsoEnumEntryInfo(MetaName.mod_col_16, 442), + new PsoEnumEntryInfo(MetaName.misc_a, 369), + new PsoEnumEntryInfo(MetaName.misc_b, 370), + new PsoEnumEntryInfo(MetaName.misc_c, 371), + new PsoEnumEntryInfo(MetaName.misc_d, 372), + new PsoEnumEntryInfo(MetaName.misc_e, 373), + new PsoEnumEntryInfo(MetaName.misc_f, 374), + new PsoEnumEntryInfo(MetaName.misc_g, 375), + new PsoEnumEntryInfo(MetaName.misc_h, 376), + new PsoEnumEntryInfo(MetaName.misc_i, 377), + new PsoEnumEntryInfo(MetaName.misc_j, 378), + new PsoEnumEntryInfo(MetaName.misc_k, 379), + new PsoEnumEntryInfo(MetaName.misc_l, 380), + new PsoEnumEntryInfo(MetaName.misc_m, 381), + new PsoEnumEntryInfo(MetaName.misc_n, 382), + new PsoEnumEntryInfo(MetaName.misc_o, 383), + new PsoEnumEntryInfo(MetaName.misc_p, 384), + new PsoEnumEntryInfo(MetaName.misc_q, 385), + new PsoEnumEntryInfo(MetaName.misc_r, 386), + new PsoEnumEntryInfo(MetaName.misc_s, 387), + new PsoEnumEntryInfo(MetaName.misc_t, 388), + new PsoEnumEntryInfo(MetaName.misc_u, 389), + new PsoEnumEntryInfo(MetaName.misc_v, 390), + new PsoEnumEntryInfo(MetaName.misc_w, 391), + new PsoEnumEntryInfo(MetaName.misc_x, 392), + new PsoEnumEntryInfo(MetaName.misc_y, 393), + new PsoEnumEntryInfo(MetaName.misc_z, 394), + new PsoEnumEntryInfo(MetaName.misc_1, 395), + new PsoEnumEntryInfo(MetaName.misc_2, 396), + new PsoEnumEntryInfo(MetaName.handlebars, 79), + new PsoEnumEntryInfo(MetaName.steeringwheel, 80), + new PsoEnumEntryInfo(MetaName.swingarm, 29), + new PsoEnumEntryInfo(MetaName.forks_u, 21), + new PsoEnumEntryInfo(MetaName.forks_l, 22), + new PsoEnumEntryInfo(MetaName.headlight_l, 91), + new PsoEnumEntryInfo(MetaName.headlight_r, 92), + new PsoEnumEntryInfo(MetaName.indicator_lr, 97), + new PsoEnumEntryInfo(MetaName.indicator_lf, 95), + new PsoEnumEntryInfo(MetaName.indicator_rr, 98), + new PsoEnumEntryInfo(MetaName.indicator_rf, 96), + new PsoEnumEntryInfo(MetaName.taillight_l, 93), + new PsoEnumEntryInfo(MetaName.taillight_r, 94), + new PsoEnumEntryInfo(MetaName.window_lf, 42), + new PsoEnumEntryInfo(MetaName.window_rf, 43), + new PsoEnumEntryInfo(MetaName.window_rr, 45), + new PsoEnumEntryInfo(MetaName.window_lr, 44), + new PsoEnumEntryInfo(MetaName.window_lm, 46), + new PsoEnumEntryInfo(MetaName.window_rm, 47), + new PsoEnumEntryInfo(MetaName.hub_lf, 30), + new PsoEnumEntryInfo(MetaName.hub_rf, 31), + new PsoEnumEntryInfo(MetaName.windscreen_r, 41), + new PsoEnumEntryInfo(MetaName.neon_l, 104), + new PsoEnumEntryInfo(MetaName.neon_r, 105), + new PsoEnumEntryInfo(MetaName.neon_f, 106), + new PsoEnumEntryInfo(MetaName.neon_b, 107), + new PsoEnumEntryInfo(MetaName.door_dside_f, 3), + new PsoEnumEntryInfo(MetaName.door_dside_r, 4), + new PsoEnumEntryInfo(MetaName.door_pside_f, 5), + new PsoEnumEntryInfo(MetaName.door_pside_r, 6), + new PsoEnumEntryInfo(MetaName.bobble_head, 361), + new PsoEnumEntryInfo(MetaName.bobble_base, 362), + new PsoEnumEntryInfo(MetaName.bobble_hand, 363), + new PsoEnumEntryInfo(MetaName.engineblock, 364), + new PsoEnumEntryInfo(MetaName.mod_a, 474), + new PsoEnumEntryInfo(MetaName.mod_b, 475), + new PsoEnumEntryInfo(MetaName.mod_c, 476), + new PsoEnumEntryInfo(MetaName.mod_d, 477), + new PsoEnumEntryInfo(MetaName.mod_e, 478), + new PsoEnumEntryInfo(MetaName.mod_f, 479), + new PsoEnumEntryInfo(MetaName.mod_g, 480), + new PsoEnumEntryInfo(MetaName.mod_h, 481), + new PsoEnumEntryInfo(MetaName.mod_i, 482), + new PsoEnumEntryInfo(MetaName.mod_j, 483), + new PsoEnumEntryInfo(MetaName.mod_k, 484), + new PsoEnumEntryInfo(MetaName.mod_l, 485), + new PsoEnumEntryInfo(MetaName.mod_m, 486), + new PsoEnumEntryInfo(MetaName.mod_n, 487), + new PsoEnumEntryInfo(MetaName.mod_o, 488), + new PsoEnumEntryInfo(MetaName.mod_p, 489), + new PsoEnumEntryInfo(MetaName.mod_q, 490), + new PsoEnumEntryInfo(MetaName.mod_r, 491), + new PsoEnumEntryInfo(MetaName.mod_s, 492), + new PsoEnumEntryInfo(MetaName.mod_t, 493), + new PsoEnumEntryInfo(MetaName.mod_u, 494), + new PsoEnumEntryInfo(MetaName.mod_v, 495), + new PsoEnumEntryInfo(MetaName.mod_w, 496), + new PsoEnumEntryInfo(MetaName.mod_x, 497), + new PsoEnumEntryInfo(MetaName.mod_y, 498), + new PsoEnumEntryInfo(MetaName.mod_z, 499), + new PsoEnumEntryInfo(MetaName.mod_aa, 500), + new PsoEnumEntryInfo(MetaName.mod_ab, 501), + new PsoEnumEntryInfo(MetaName.mod_ac, 502), + new PsoEnumEntryInfo(MetaName.mod_ad, 503), + new PsoEnumEntryInfo(MetaName.mod_ae, 504), + new PsoEnumEntryInfo(MetaName.mod_af, 505), + new PsoEnumEntryInfo(MetaName.mod_ag, 506), + new PsoEnumEntryInfo(MetaName.mod_ah, 507), + new PsoEnumEntryInfo(MetaName.mod_ai, 508), + new PsoEnumEntryInfo(MetaName.mod_aj, 509), + new PsoEnumEntryInfo(MetaName.mod_ak, 510), + new PsoEnumEntryInfo(MetaName.turret_a1, 511), + new PsoEnumEntryInfo(MetaName.turret_a2, 512), + new PsoEnumEntryInfo(MetaName.turret_a3, 513), + new PsoEnumEntryInfo(MetaName.turret_a4, 514), + new PsoEnumEntryInfo(MetaName.turret_b1, 524), + new PsoEnumEntryInfo(MetaName.turret_b2, 525), + new PsoEnumEntryInfo(MetaName.turret_b3, 526), + new PsoEnumEntryInfo(MetaName.turret_b4, 527), + new PsoEnumEntryInfo(MetaName.rblade_1mod, 560), + new PsoEnumEntryInfo(MetaName.rblade_1fast, 561), + new PsoEnumEntryInfo(MetaName.rblade_2mod, 562), + new PsoEnumEntryInfo(MetaName.rblade_2fast, 563), + new PsoEnumEntryInfo(MetaName.rblade_3mod, 564), + new PsoEnumEntryInfo(MetaName.rblade_3fast, 565), + new PsoEnumEntryInfo(MetaName.fblade_1mod, 566), + new PsoEnumEntryInfo(MetaName.fblade_1fast, 567), + new PsoEnumEntryInfo(MetaName.fblade_2mod, 568), + new PsoEnumEntryInfo(MetaName.fblade_2fast, 569), + new PsoEnumEntryInfo(MetaName.fblade_3mod, 570), + new PsoEnumEntryInfo(MetaName.fblade_3fast, 571), + new PsoEnumEntryInfo((MetaName)1086719913, 572), + new PsoEnumEntryInfo((MetaName)3237490897, 573), + new PsoEnumEntryInfo((MetaName)3375838140, 574), + new PsoEnumEntryInfo((MetaName)2381840182, 575), + new PsoEnumEntryInfo((MetaName)3607058940, 576), + new PsoEnumEntryInfo((MetaName)3607058940, 577), + new PsoEnumEntryInfo((MetaName)1208798824, 578), + new PsoEnumEntryInfo((MetaName)303656220, 579), + new PsoEnumEntryInfo((MetaName)660207018, 580), + new PsoEnumEntryInfo(MetaName.spike_1mod, 581), + new PsoEnumEntryInfo((MetaName)3045655218, 582), + new PsoEnumEntryInfo((MetaName)2017296145, 583), + new PsoEnumEntryInfo(MetaName.spike_2mod, 584), + new PsoEnumEntryInfo((MetaName)1122332083, 585), + new PsoEnumEntryInfo((MetaName)1123212214, 586), + new PsoEnumEntryInfo(MetaName.spike_3mod, 587), + new PsoEnumEntryInfo((MetaName)4011591561, 588), + new PsoEnumEntryInfo((MetaName)2320654166, 589), + new PsoEnumEntryInfo(MetaName.scoop_1mod, 590), + new PsoEnumEntryInfo(MetaName.scoop_2mod, 591), + new PsoEnumEntryInfo(MetaName.scoop_3mod, 592) + ), + //vehicle mod camera position + MetaName.eVehicleModCameraPos => new PsoEnumInfo(MetaName.eVehicleModCameraPos, 1, + new PsoEnumEntryInfo(MetaName.VMCP_DEFAULT, 0), + new PsoEnumEntryInfo(MetaName.VMCP_FRONT, 1), + new PsoEnumEntryInfo(MetaName.VMCP_FRONT_LEFT, 2), + new PsoEnumEntryInfo(MetaName.VMCP_FRONT_RIGHT, 3), + new PsoEnumEntryInfo(MetaName.VMCP_REAR, 4), + new PsoEnumEntryInfo(MetaName.VMCP_REAR_LEFT, 5), + new PsoEnumEntryInfo(MetaName.VMCP_REAR_RIGHT, 6), + new PsoEnumEntryInfo(MetaName.VMCP_LEFT, 7), + new PsoEnumEntryInfo(MetaName.VMCP_RIGHT, 8), + new PsoEnumEntryInfo(MetaName.VMCP_TOP, 9), + new PsoEnumEntryInfo(MetaName.VMCP_BOTTOM, 10) + ), + //credit item job line type + (MetaName)1795685103 => new PsoEnumInfo((MetaName)1795685103, 1, + new PsoEnumEntryInfo(MetaName.JOB_BIG, 0), + new PsoEnumEntryInfo(MetaName.JOB_MED, 1), + new PsoEnumEntryInfo(MetaName.JOB_SMALL, 2), + new PsoEnumEntryInfo(MetaName.NAME_BIG, 3), + new PsoEnumEntryInfo(MetaName.NAME_MED, 4), + new PsoEnumEntryInfo(MetaName.NAME_SMALL, 5), + new PsoEnumEntryInfo(MetaName.SPACE_BIG, 6), + new PsoEnumEntryInfo(MetaName.SPACE_MED, 7), + new PsoEnumEntryInfo(MetaName.SPACE_SMALL, 8), + new PsoEnumEntryInfo(MetaName.SPACE_END, 9), + new PsoEnumEntryInfo(MetaName.SPRITE_1, 10), + new PsoEnumEntryInfo(MetaName.LEGALS, 11), + new PsoEnumEntryInfo(MetaName.AUDIO_NAME, 12), + new PsoEnumEntryInfo(MetaName.AUDIO_LEGALS, 13), + new PsoEnumEntryInfo(MetaName.JOB_AND_NAME_MED, 14) + ), + MetaName.DataFileType => new PsoEnumInfo(MetaName.DataFileType, 1, + new PsoEnumEntryInfo(MetaName.RPF_FILE, 0), + new PsoEnumEntryInfo(MetaName.IDE_FILE, 1), + new PsoEnumEntryInfo(MetaName.DELAYED_IDE_FILE, 2), + new PsoEnumEntryInfo(MetaName.IPL_FILE, 3), + new PsoEnumEntryInfo(MetaName.PERMANENT_ITYP_FILE, 4), + new PsoEnumEntryInfo((MetaName)4175147664, 5), + new PsoEnumEntryInfo(MetaName.HANDLING_FILE, 6), + new PsoEnumEntryInfo(MetaName.VEHICLEEXTRAS_FILE, 7), + new PsoEnumEntryInfo(MetaName.CHINESE_SHUFFLING_CHECKS_FILE, 8), + new PsoEnumEntryInfo(MetaName.PEDSTREAM_FILE, 9), + new PsoEnumEntryInfo(MetaName.CARCOLS_FILE, 10), + new PsoEnumEntryInfo(MetaName.POPGRP_FILE, 11), + new PsoEnumEntryInfo((MetaName)337231870, 12), + new PsoEnumEntryInfo((MetaName)3783701680, 13), + new PsoEnumEntryInfo(MetaName.POPSCHED_FILE, 14), + new PsoEnumEntryInfo(MetaName.ZONEBIND_FILE, 15), + new PsoEnumEntryInfo(MetaName.RADIO_FILE, 16), + new PsoEnumEntryInfo(MetaName.EXTRAMAP_CONVERSION_OCC_FILE, 17), + new PsoEnumEntryInfo(MetaName.THROWNWEAPONINFO_FILE, 18), + new PsoEnumEntryInfo(MetaName.RMPTFX_FILE, 19), + new PsoEnumEntryInfo(MetaName.PED_PERSONALITY_FILE, 20), + new PsoEnumEntryInfo(MetaName.PED_PERCEPTION_FILE, 21), + new PsoEnumEntryInfo(MetaName.VEHICLE_CAMERA_OFFSETS_FILE, 22), + new PsoEnumEntryInfo(MetaName.FRONTEND_MENU_FILE, 23), + new PsoEnumEntryInfo(MetaName.LEADERBOARD_DATA_FILE, 24), + new PsoEnumEntryInfo(MetaName.LEADERBOARD_ICONS_FILE, 25), + new PsoEnumEntryInfo(MetaName.NETWORKOPTIONS_FILE, 26), + new PsoEnumEntryInfo(MetaName.TIMECYCLE_FILE, 27), + new PsoEnumEntryInfo(MetaName.TIMECYCLEMOD_FILE, 28), + new PsoEnumEntryInfo(MetaName.WEATHER_FILE, 29), + new PsoEnumEntryInfo((MetaName)2403189033, 30), + new PsoEnumEntryInfo((MetaName)2431127142, 31), + new PsoEnumEntryInfo(MetaName.PROCOBJ_FILE, 32), + new PsoEnumEntryInfo(MetaName.PROC_META_FILE, 33), + new PsoEnumEntryInfo(MetaName.VFX_SETTINGS_FILE, 34), + new PsoEnumEntryInfo(MetaName.SP_STATS_DISPLAY_LIST_FILE, 35), + new PsoEnumEntryInfo(MetaName.MP_STATS_DISPLAY_LIST_FILE, 36), + new PsoEnumEntryInfo(MetaName.PED_VARS_FILE, 37), + new PsoEnumEntryInfo(MetaName.DISABLE_FILE, 38), + new PsoEnumEntryInfo(MetaName.BUILDING_META_DISPLACEMENT_FILE, 39), + new PsoEnumEntryInfo(MetaName.HUD_TXD_FILE, 40), + new PsoEnumEntryInfo(MetaName.FRONTEND_DAT_FILE, 41), + new PsoEnumEntryInfo(MetaName.SCROLLBARS_FILE, 42), + new PsoEnumEntryInfo(MetaName.TIME_FILE, 43), + new PsoEnumEntryInfo(MetaName.BLOODFX_FILE, 44), + new PsoEnumEntryInfo(MetaName.ENTITYFX_FILE, 45), + new PsoEnumEntryInfo(MetaName.EXPLOSIONFX_FILE, 46), + new PsoEnumEntryInfo(MetaName.MATERIALFX_FILE, 47), + new PsoEnumEntryInfo(MetaName.MOTION_TASK_DATA_FILE, 48), + new PsoEnumEntryInfo(MetaName.DEFAULT_TASK_DATA_FILE, 49), + new PsoEnumEntryInfo(MetaName.MOUNT_TUNE_FILE, 50), + new PsoEnumEntryInfo(MetaName.PED_BOUNDS_FILE, 51), + new PsoEnumEntryInfo(MetaName.PED_HEALTH_FILE, 52), + new PsoEnumEntryInfo(MetaName.PED_COMPONENT_SETS_FILE, 53), + new PsoEnumEntryInfo(MetaName.PED_IK_SETTINGS_FILE, 54), + new PsoEnumEntryInfo(MetaName.PED_TASK_DATA_FILE, 55), + new PsoEnumEntryInfo(MetaName.PED_SPECIAL_ABILITIES_FILE, 56), + new PsoEnumEntryInfo(MetaName.WHEELFX_FILE, 57), + new PsoEnumEntryInfo(MetaName.WEAPONFX_FILE, 58), + new PsoEnumEntryInfo(MetaName.DECALS_FILE, 59), + new PsoEnumEntryInfo(MetaName.NAVMESH_INDEXREMAPPING_FILE, 60), + new PsoEnumEntryInfo(MetaName.NAVNODE_INDEXREMAPPING_FILE, 61), + new PsoEnumEntryInfo(MetaName.AUDIOMESH_INDEXREMAPPING_FILE, 62), + new PsoEnumEntryInfo(MetaName.JUNCTION_TEMPLATES_FILE, 63), + new PsoEnumEntryInfo(MetaName.PATH_ZONES_FILE, 64), + new PsoEnumEntryInfo(MetaName.DISTANT_LIGHTS_FILE, 65), + new PsoEnumEntryInfo(MetaName.DISTANT_LIGHTS_HD_FILE, 66), + new PsoEnumEntryInfo(MetaName.FLIGHTZONES_FILE, 67), + new PsoEnumEntryInfo(MetaName.WATER_FILE, 68), + new PsoEnumEntryInfo(MetaName.TRAINCONFIGS_FILE, 69), + new PsoEnumEntryInfo(MetaName.TRAINTRACK_FILE, 70), + new PsoEnumEntryInfo(MetaName.PED_METADATA_FILE, 71), + new PsoEnumEntryInfo(MetaName.WEAPON_METADATA_FILE, 72), + new PsoEnumEntryInfo(MetaName.VEHICLE_METADATA_FILE, 73), + new PsoEnumEntryInfo(MetaName.DISPATCH_DATA_FILE, 74), + new PsoEnumEntryInfo(MetaName.DEFORMABLE_OBJECTS_FILE, 75), + new PsoEnumEntryInfo(MetaName.TUNABLE_OBJECTS_FILE, 76), + new PsoEnumEntryInfo(MetaName.PED_NAV_CAPABILITES_FILE, 77), + new PsoEnumEntryInfo(MetaName.WEAPONINFO_FILE, 78), + new PsoEnumEntryInfo(MetaName.WEAPONCOMPONENTSINFO_FILE, 79), + new PsoEnumEntryInfo(MetaName.LOADOUTS_FILE, 80), + new PsoEnumEntryInfo(MetaName.FIRINGPATTERNS_FILE, 81), + new PsoEnumEntryInfo(MetaName.MOTIVATIONS_FILE, 82), + new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_FILE, 83), + new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_PSO_FILE, 84), + new PsoEnumEntryInfo(MetaName.STREAMING_FILE, 85), + new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_PS3, 86), + new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_XENON, 87), + new PsoEnumEntryInfo(MetaName.STREAMING_FILE_PLATFORM_OTHER, 88), + new PsoEnumEntryInfo(MetaName.PED_BRAWLING_STYLE_FILE, 89), + new PsoEnumEntryInfo(MetaName.AMBIENT_PED_MODEL_SET_FILE, 90), + new PsoEnumEntryInfo(MetaName.AMBIENT_PROP_MODEL_SET_FILE, 91), + new PsoEnumEntryInfo(MetaName.AMBIENT_VEHICLE_MODEL_SET_FILE, 92), + new PsoEnumEntryInfo(MetaName.LADDER_METADATA_FILE, 93), + new PsoEnumEntryInfo((MetaName)4108615940, 94), + new PsoEnumEntryInfo(MetaName.SLOWNESS_ZONES_FILE, 95), + new PsoEnumEntryInfo(MetaName.LIQUIDFX_FILE, 96), + new PsoEnumEntryInfo(MetaName.VFXVEHICLEINFO_FILE, 97), + new PsoEnumEntryInfo(MetaName.VFXPEDINFO_FILE, 98), + new PsoEnumEntryInfo(MetaName.DOOR_TUNING_FILE, 99), + new PsoEnumEntryInfo(MetaName.PTFXASSETINFO_FILE, 100), + new PsoEnumEntryInfo(MetaName.SCRIPTFX_FILE, 101), + new PsoEnumEntryInfo(MetaName.VFXREGIONINFO_FILE, 102), + new PsoEnumEntryInfo(MetaName.VFXINTERIORINFO_FILE, 103), + new PsoEnumEntryInfo(MetaName.CAMERA_METADATA_FILE, 104), + new PsoEnumEntryInfo(MetaName.STREET_VEHICLE_ASSOCIATION_FILE, 105), + new PsoEnumEntryInfo(MetaName.VFXWEAPONINFO_FILE, 106), + new PsoEnumEntryInfo(MetaName.EXPLOSION_INFO_FILE, 107), + new PsoEnumEntryInfo(MetaName.JUNCTION_TEMPLATES_PSO_FILE, 108), + new PsoEnumEntryInfo(MetaName.MAPZONES_FILE, 109), + new PsoEnumEntryInfo(MetaName.SP_STATS_UI_LIST_FILE, 110), + new PsoEnumEntryInfo(MetaName.MP_STATS_UI_LIST_FILE, 111), + new PsoEnumEntryInfo(MetaName.OBJ_COVER_TUNING_FILE, 112), + new PsoEnumEntryInfo(MetaName.STREAMING_REQUEST_LISTS_FILE, 113), + new PsoEnumEntryInfo(MetaName.PLAYER_CARD_SETUP, 114), + new PsoEnumEntryInfo(MetaName.WORLD_HEIGHTMAP_FILE, 115), + new PsoEnumEntryInfo(MetaName.WORLD_WATERHEIGHT_FILE, 116), + new PsoEnumEntryInfo(MetaName.PED_OVERLAY_FILE, 117), + new PsoEnumEntryInfo(MetaName.WEAPON_ANIMATIONS_FILE, 118), + new PsoEnumEntryInfo(MetaName.VEHICLE_POPULATION_FILE, 119), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_DEFINITIONS, 120), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_RESULTS, 121), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_IMPULSES, 122), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_RUMBLES, 123), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_INTERRELATIONS, 124), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_HOMINGS, 125), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_DAMAGES, 126), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_STRIKE_BONES, 127), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_BRANCHES, 128), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_STEALTH_KILLS, 129), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_VFX, 130), + new PsoEnumEntryInfo(MetaName.ACTION_TABLE_FACIAL_ANIM_SETS, 131), + new PsoEnumEntryInfo(MetaName.VEHGEN_MARKUP_FILE, 132), + new PsoEnumEntryInfo(MetaName.PED_COMPONENT_CLOTH_FILE, 133), + new PsoEnumEntryInfo(MetaName.TATTOO_SHOP_DLC_FILE, 134), + new PsoEnumEntryInfo(MetaName.VEHICLE_VARIATION_FILE, 135), + new PsoEnumEntryInfo(MetaName.CONTENT_UNLOCKING_META_FILE, 136), + new PsoEnumEntryInfo(MetaName.SHOP_PED_APPAREL_META_FILE, 137), + new PsoEnumEntryInfo(MetaName.AUDIO_SOUNDDATA, 138), + new PsoEnumEntryInfo(MetaName.AUDIO_CURVEDATA, 139), + new PsoEnumEntryInfo(MetaName.AUDIO_GAMEDATA, 140), + new PsoEnumEntryInfo(MetaName.AUDIO_DYNAMIXDATA, 141), + new PsoEnumEntryInfo(MetaName.AUDIO_SPEECHDATA, 142), + new PsoEnumEntryInfo(MetaName.AUDIO_SYNTHDATA, 143), + new PsoEnumEntryInfo(MetaName.AUDIO_WAVEPACK, 144), + new PsoEnumEntryInfo(MetaName.CLIP_SETS_FILE, 145), + new PsoEnumEntryInfo(MetaName.EXPRESSION_SETS_FILE, 146), + new PsoEnumEntryInfo(MetaName.FACIAL_CLIPSET_GROUPS_FILE, 147), + new PsoEnumEntryInfo((MetaName)1603688191, 148), + new PsoEnumEntryInfo(MetaName.VEHICLE_SHOP_DLC_FILE, 149), + new PsoEnumEntryInfo(MetaName.WEAPON_SHOP_INFO_METADATA_FILE, 150), + new PsoEnumEntryInfo(MetaName.SCALEFORM_PREALLOC_FILE, 151), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE, 152), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_360, 153), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_PS3, 154), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_PS3_JPN, 155), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_ORBIS, 156), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_ORBIS_JPN, 157), + new PsoEnumEntryInfo(MetaName.CONTROLLER_LABELS_FILE_DURANGO, 158), + new PsoEnumEntryInfo((MetaName)25671749, 159), + new PsoEnumEntryInfo(MetaName.TEXTFILE_METAFILE, 160), + new PsoEnumEntryInfo(MetaName.NM_TUNING_FILE, 161), + new PsoEnumEntryInfo(MetaName.MOVE_NETWORK_DEFS, 162), + new PsoEnumEntryInfo(MetaName.WEAPONINFO_FILE_PATCH, 163), + new PsoEnumEntryInfo(MetaName.DLC_SCRIPT_METAFILE, 164), + new PsoEnumEntryInfo(MetaName.VEHICLE_LAYOUTS_FILE, 165), + new PsoEnumEntryInfo(MetaName.DLC_WEAPON_PICKUPS, 166), + new PsoEnumEntryInfo(MetaName.EXTRA_TITLE_UPDATE_DATA, 167), + new PsoEnumEntryInfo(MetaName.SCALEFORM_DLC_FILE, 168), + new PsoEnumEntryInfo(MetaName.OVERLAY_INFO_FILE, 169), + new PsoEnumEntryInfo(MetaName.ALTERNATE_VARIATIONS_FILE, 170), + new PsoEnumEntryInfo(MetaName.HORSE_REINS_FILE, 171), + new PsoEnumEntryInfo(MetaName.FIREFX_FILE, 172), + new PsoEnumEntryInfo(MetaName.INTERIOR_PROXY_ORDER_FILE, 173), + new PsoEnumEntryInfo(MetaName.DLC_ITYP_REQUEST, 174), + new PsoEnumEntryInfo(MetaName.EXTRA_FOLDER_MOUNT_DATA, 175), + new PsoEnumEntryInfo(MetaName.AMB_PROCEDURAL_BLOOD_FILE, 176), + new PsoEnumEntryInfo(MetaName.SCRIPT_BRAIN_FILE, 177), + new PsoEnumEntryInfo(MetaName.SCALEFORM_VALID_METHODS_FILE, 178), + new PsoEnumEntryInfo(MetaName.DLC_POP_GROUPS, 179), + new PsoEnumEntryInfo((MetaName)2145817864, 180), + new PsoEnumEntryInfo(MetaName.SCENARIO_INFO_FILE, 181), + new PsoEnumEntryInfo(MetaName.CONDITIONAL_ANIMS_FILE, 182), + new PsoEnumEntryInfo(MetaName.STATS_METADATA_PSO_FILE, 183), + new PsoEnumEntryInfo(MetaName.VFXFOGVOLUMEINFO_FILE, 184), + new PsoEnumEntryInfo(MetaName.RPF_FILE_PRE_INSTALL, 185), + new PsoEnumEntryInfo((MetaName)341493400, 186), + new PsoEnumEntryInfo(MetaName.LEVEL_STREAMING_FILE, 187), + new PsoEnumEntryInfo(MetaName.SCENARIO_POINTS_OVERRIDE_FILE, 188), + new PsoEnumEntryInfo((MetaName)2800880346, 189), + new PsoEnumEntryInfo(MetaName.DRIVER_RULES_STD_FILE, 190), + new PsoEnumEntryInfo(MetaName.PED_FIRST_PERSON_ASSET_DATA, 191), + new PsoEnumEntryInfo(MetaName.GTXD_PARENTING_DATA, 192), + new PsoEnumEntryInfo(MetaName.COMBAT_BEHAVIOUR_OVERRIDE_FILE, 193), + new PsoEnumEntryInfo(MetaName.EVENTS_OVERRIDE_FILE, 194), + new PsoEnumEntryInfo(MetaName.PED_DAMAGE_OVERRIDE_FILE, 195), + new PsoEnumEntryInfo(MetaName.PED_DAMAGE_APPEND_FILE, 196), + new PsoEnumEntryInfo(MetaName.BACKGROUND_SCRIPT_FILE, 197), + new PsoEnumEntryInfo(MetaName.PS3_SCRIPT_RPF, 198), + new PsoEnumEntryInfo(MetaName.X360_SCRIPT_RPF, 199), + new PsoEnumEntryInfo(MetaName.PED_FIRST_PERSON_ALTERNATE_DATA, 200) + ), + MetaName.DataFileContents => new PsoEnumInfo(MetaName.DataFileContents, 1, + new PsoEnumEntryInfo(MetaName.CONTENTS_DEFAULT, 0), + new PsoEnumEntryInfo(MetaName.CONTENTS_PROPS, 1), + new PsoEnumEntryInfo(MetaName.CONTENTS_MAP, 2), + new PsoEnumEntryInfo(MetaName.CONTENTS_LODS, 3), + new PsoEnumEntryInfo(MetaName.CONTENTS_PEDS, 4), + new PsoEnumEntryInfo(MetaName.CONTENTS_VEHICLES, 5), + new PsoEnumEntryInfo(MetaName.CONTENTS_ANIMATION, 6), + new PsoEnumEntryInfo(MetaName.CONTENTS_CUTSCENE, 7), + new PsoEnumEntryInfo(MetaName.CONTENTS_DLC_MAP_DATA, 8), + new PsoEnumEntryInfo(MetaName.CONTENTS_DEBUG_ONLY, 9), + new PsoEnumEntryInfo(MetaName.CONTENTS_MAX, 10) + ), + MetaName.InstallPartition => new PsoEnumInfo(MetaName.InstallPartition, 1, + new PsoEnumEntryInfo(MetaName.PARTITION_NONE, -1), + new PsoEnumEntryInfo(MetaName.PARTITION_0, 0), + new PsoEnumEntryInfo(MetaName.PARTITION_1, 1), + new PsoEnumEntryInfo(MetaName.PARTITION_2, 2), + new PsoEnumEntryInfo(MetaName.PARTITION_MAX, 3) + ), + MetaName.ePedRadioGenre => new PsoEnumInfo(MetaName.ePedRadioGenre, 1, + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_OFF, 0), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MODERN_ROCK, 1), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_CLASSIC_ROCK, 2), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_POP, 3), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MODERN_HIPHOP, 4), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_CLASSIC_HIPHOP, 5), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_PUNK, 6), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_LEFT_WING_TALK, 7), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_RIGHT_WING_TALK, 8), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_COUNTRY, 9), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_DANCE, 10), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MEXICAN, 11), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_REGGAE, 12), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_JAZZ, 13), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_MOTOWN, 14), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_SURF, 15), + new PsoEnumEntryInfo(MetaName.RADIO_GENRE_UNSPECIFIED, 16) + ), + MetaName.eSexinessFlags => new PsoEnumInfo(MetaName.eSexinessFlags, 1, + new PsoEnumEntryInfo(MetaName.SF_JEER_AT_HOT_PED, 0), + new PsoEnumEntryInfo((MetaName)296569367, 1), + new PsoEnumEntryInfo(MetaName.SF_HOT_PERSON, 2) + ), + MetaName.eExternallyDrivenDOFs => new PsoEnumInfo(MetaName.eExternallyDrivenDOFs, 1, + new PsoEnumEntryInfo(MetaName.EMPTY, 0), + new PsoEnumEntryInfo(MetaName.HIGH_HEELS, 1), + new PsoEnumEntryInfo(MetaName.COLLAR, 2) + ), + //CPedModelInfo__InitData AbilityType + MetaName.SpecialAbilityType => new PsoEnumInfo(MetaName.SpecialAbilityType, 1, + new PsoEnumEntryInfo(MetaName.SAT_NONE, -1), + new PsoEnumEntryInfo(MetaName.SAT_CAR_SLOWDOWN, 0), + new PsoEnumEntryInfo(MetaName.SAT_RAGE, 1), + new PsoEnumEntryInfo(MetaName.SAT_BULLET_TIME, 2), + new PsoEnumEntryInfo(MetaName.SAT_SNAPSHOT, 3), + new PsoEnumEntryInfo(MetaName.SAT_INSULT, 4) + ), + MetaName.ThermalBehaviour => new PsoEnumInfo(MetaName.ThermalBehaviour, 1, + new PsoEnumEntryInfo(MetaName.TB_DEAD, 0), + new PsoEnumEntryInfo(MetaName.TB_COLD, 1), + new PsoEnumEntryInfo(MetaName.TB_WARM, 2), + new PsoEnumEntryInfo(MetaName.TB_HOT, 3) + ), + MetaName.eSuperlodType => new PsoEnumInfo(MetaName.eSuperlodType, 1, + new PsoEnumEntryInfo(MetaName.SLOD_HUMAN, 0), + new PsoEnumEntryInfo(MetaName.SLOD_SMALL_QUADPED, 1), + new PsoEnumEntryInfo(MetaName.SLOD_LARGE_QUADPED, 2), + new PsoEnumEntryInfo(MetaName.SLOD_NULL, 3), + new PsoEnumEntryInfo(MetaName.SLOD_KEEP_LOWEST, 4) + ), + //CPedModelInfo__InitData ScenarioPopStreamingSlot + MetaName.eScenarioPopStreamingSlot => new PsoEnumInfo(MetaName.eScenarioPopStreamingSlot, 1, + new PsoEnumEntryInfo(MetaName.SCENARIO_POP_STREAMING_NORMAL, 0), + new PsoEnumEntryInfo(MetaName.SCENARIO_POP_STREAMING_SMALL, 1) + ), + //CPedModelInfo__InitData DefaultSpawningPreference + MetaName.DefaultSpawnPreference => new PsoEnumInfo(MetaName.DefaultSpawnPreference, 1, + new PsoEnumEntryInfo(MetaName.DSP_AERIAL, 0), + new PsoEnumEntryInfo(MetaName.DSP_AQUATIC, 1), + new PsoEnumEntryInfo(MetaName.DSP_GROUND_WILDLIFE, 2), + new PsoEnumEntryInfo(MetaName.DSP_NORMAL, 3) + ), + MetaName.eFadeCurveType => new PsoEnumInfo(MetaName.eFadeCurveType, 1, + new PsoEnumEntryInfo(MetaName.FCT_NONE, 0), + new PsoEnumEntryInfo(MetaName.FCT_LINEAR, 1), + new PsoEnumEntryInfo(MetaName.FCT_HALF_SIGMOID, 2), + new PsoEnumEntryInfo(MetaName.FCT_SIGMOID, 3) + ), + //animation clip flags + MetaName.eAnimPlayerFlag => new PsoEnumInfo(MetaName.eAnimPlayerFlag, 1, + new PsoEnumEntryInfo(MetaName.APF_USE_SECONDARY_SLOT, 0), + new PsoEnumEntryInfo((MetaName)892548521, 1), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_3, 2), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_4, 3), + new PsoEnumEntryInfo(MetaName.APF_ISPLAYING, 4), + new PsoEnumEntryInfo(MetaName.APF_ISLOOPED, 5), + new PsoEnumEntryInfo((MetaName)2715402776, 6), + new PsoEnumEntryInfo((MetaName)2559750026, 7), + new PsoEnumEntryInfo((MetaName)334669388, 8), + new PsoEnumEntryInfo(MetaName.APF_SCRIPT, 9), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_6, 10), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_7, 11), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_8, 12), + new PsoEnumEntryInfo((MetaName)3730225937, 13), + new PsoEnumEntryInfo(MetaName.APF_ISBLENDAUTOREMOVE, 14), + new PsoEnumEntryInfo(MetaName.APF_ISFINISHAUTOREMOVE, 15), + new PsoEnumEntryInfo((MetaName)1984129772, 16), + new PsoEnumEntryInfo(MetaName.APF_ADDITIVE, 17), + new PsoEnumEntryInfo(MetaName.APF_FACIAL, 18), + new PsoEnumEntryInfo((MetaName)1964664646, 19), + new PsoEnumEntryInfo((MetaName)46138343, 20), + new PsoEnumEntryInfo(MetaName.APF_UPPERBODYONLY, 21), + new PsoEnumEntryInfo((MetaName)28056044, 22), + new PsoEnumEntryInfo((MetaName)2237335835, 23), + new PsoEnumEntryInfo((MetaName)1604795828, 24), + new PsoEnumEntryInfo((MetaName)1772376494, 25), + new PsoEnumEntryInfo(MetaName.APF_BLOCK_IK, 26), + new PsoEnumEntryInfo((MetaName)2310486390, 27), + new PsoEnumEntryInfo(MetaName.APF_BLOCK_HEAD_IK, 28), + new PsoEnumEntryInfo((MetaName)98009864, 29), + new PsoEnumEntryInfo(MetaName.APF_UNUSED_9, 30), + new PsoEnumEntryInfo((MetaName)3765996064, 31) + ), + //animation clip priority + MetaName.eAnimPriority => new PsoEnumInfo(MetaName.eAnimPriority, 1, + new PsoEnumEntryInfo(MetaName.AP_LOW, 0), + new PsoEnumEntryInfo(MetaName.AP_MEDIUM, 1), + new PsoEnumEntryInfo(MetaName.AP_HIGH, 2), + new PsoEnumEntryInfo(MetaName.AP_FACE_LOW, 3), + new PsoEnumEntryInfo(MetaName.AP_FACE_MEDIUM, 4), + new PsoEnumEntryInfo(MetaName.AP_FACE_HIGH, 5) + ), + //anim clip dictionary streaming policy + MetaName.eStreamingPolicy => new PsoEnumInfo(MetaName.eStreamingPolicy, 1, + new PsoEnumEntryInfo(MetaName.SP_STREAMING, 0), + new PsoEnumEntryInfo(MetaName.SP_SINGLEPLAYER_RESIDENT, 1), + new PsoEnumEntryInfo(MetaName.SP_MULTIPLAYER_RESIDENT, 2) + ), + //anim clip dictionary streaming priority + MetaName.eStreamingPriority => new PsoEnumInfo(MetaName.eStreamingPriority, 1, + new PsoEnumEntryInfo(MetaName.SP_Variation, 0), + new PsoEnumEntryInfo(MetaName.SP_Low, 1), + new PsoEnumEntryInfo(MetaName.SP_Medium, 2), + new PsoEnumEntryInfo(MetaName.SP_High, 3) + ), + (MetaName)2476021071 => new PsoEnumInfo((MetaName)2476021071, 1, + new PsoEnumEntryInfo(MetaName.POSTFX_IN_HOLD_OUT, 0), + new PsoEnumEntryInfo(MetaName.POSTFX_EASE_IN_HOLD_EASE_OUT, 1), + new PsoEnumEntryInfo(MetaName.POSTFX_EASE_IN, 2), + new PsoEnumEntryInfo(MetaName.POSTFX_EASE_OUT, 3) + ), + (MetaName)3696221852 => new PsoEnumInfo((MetaName)3696221852, 1, + new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_ALL, 0), + new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_HOLD_ONLY, 1), + new PsoEnumEntryInfo(MetaName.POSTFX_LOOP_NONE, 2) + ), + (MetaName)2168155209 => new PsoEnumInfo((MetaName)2168155209, 1, + new PsoEnumEntryInfo((MetaName)133697287, -1), + new PsoEnumEntryInfo((MetaName)3954742285, 0), + new PsoEnumEntryInfo((MetaName)201802975, 1), + new PsoEnumEntryInfo((MetaName)1916954442, 2), + new PsoEnumEntryInfo((MetaName)507840474, 3), + new PsoEnumEntryInfo((MetaName)1919284445, 4), + new PsoEnumEntryInfo((MetaName)4132752489, 5), + new PsoEnumEntryInfo((MetaName)499113587, 6) + ), + (MetaName)3261591327 => new PsoEnumInfo((MetaName)3261591327, 1, + new PsoEnumEntryInfo((MetaName)2736859683, 0), + new PsoEnumEntryInfo((MetaName)856837195, 1), + new PsoEnumEntryInfo((MetaName)1505659915, 2), + new PsoEnumEntryInfo((MetaName)2834501937, 3), + new PsoEnumEntryInfo((MetaName)373586892, 4) + ), + (MetaName)516897642 => new PsoEnumInfo((MetaName)516897642, 1, + new PsoEnumEntryInfo((MetaName)165337364, 0), + new PsoEnumEntryInfo((MetaName)385965901, 1), + new PsoEnumEntryInfo((MetaName)3779370608, 2) + ), + (MetaName)2665868448 => new PsoEnumInfo((MetaName)2665868448, 1, + new PsoEnumEntryInfo((MetaName)2470279016, 0), + new PsoEnumEntryInfo((MetaName)2411291289, 1), + new PsoEnumEntryInfo((MetaName)2103152910, 2), + new PsoEnumEntryInfo((MetaName)3535879124, 3), + new PsoEnumEntryInfo((MetaName)3456440271, 4) + ), + (MetaName)2628996780 => new PsoEnumInfo((MetaName)2628996780, 1, + new PsoEnumEntryInfo((MetaName)3708927680, 0), + new PsoEnumEntryInfo((MetaName)2136499167, 1), + new PsoEnumEntryInfo((MetaName)3568072118, 2) + ), + MetaName.eAnimBoneTag => new PsoEnumInfo(MetaName.eAnimBoneTag, 1, + new PsoEnumEntryInfo(MetaName.BONETAG_INVALID, -1), + new PsoEnumEntryInfo(MetaName.BONETAG_ROOT, 0), + new PsoEnumEntryInfo((MetaName)1724691876, 17916), + new PsoEnumEntryInfo(MetaName.BONETAG_PELVIS, 11816), + new PsoEnumEntryInfo(MetaName.BONETAG_PELVIS1, 53251), + new PsoEnumEntryInfo(MetaName.BONETAG_SPINE_ROOT, 57597), + new PsoEnumEntryInfo(MetaName.BONETAG_SPINE0, 23553), + new PsoEnumEntryInfo(MetaName.BONETAG_SPINE1, 24816), + new PsoEnumEntryInfo(MetaName.BONETAG_SPINE2, 24817), + new PsoEnumEntryInfo(MetaName.BONETAG_SPINE3, 24818), + new PsoEnumEntryInfo(MetaName.BONETAG_NECK, 39317), + new PsoEnumEntryInfo(MetaName.BONETAG_NECK2, 24532), + new PsoEnumEntryInfo(MetaName.BONETAG_HEAD, 31086), + new PsoEnumEntryInfo(MetaName.BONETAG_R_CLAVICLE, 10706), + new PsoEnumEntryInfo(MetaName.BONETAG_R_UPPERARM, 40269), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FOREARM, 28252), + new PsoEnumEntryInfo(MetaName.BONETAG_R_HAND, 57005), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER0, 58866), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER01, 64016), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER02, 64017), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER1, 58867), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER11, 64096), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER12, 64097), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER2, 58868), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER21, 64112), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER22, 64113), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER3, 58869), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER31, 64064), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER32, 64065), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER4, 58870), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER41, 64080), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FINGER42, 64081), + new PsoEnumEntryInfo(MetaName.BONETAG_L_CLAVICLE, 64729), + new PsoEnumEntryInfo(MetaName.BONETAG_L_UPPERARM, 45509), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FOREARM, 61163), + new PsoEnumEntryInfo(MetaName.BONETAG_L_HAND, 18905), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER0, 26610), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER01, 4089), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER02, 4090), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER1, 26611), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER11, 4169), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER12, 4170), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER2, 26612), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER21, 4185), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER22, 4186), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER3, 26613), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER31, 4137), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER32, 4138), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER4, 26614), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER41, 4153), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FINGER42, 4154), + new PsoEnumEntryInfo(MetaName.BONETAG_L_THIGH, 58271), + new PsoEnumEntryInfo(MetaName.BONETAG_L_CALF, 63931), + new PsoEnumEntryInfo(MetaName.BONETAG_L_FOOT, 14201), + new PsoEnumEntryInfo(MetaName.BONETAG_L_TOE, 2108), + new PsoEnumEntryInfo(MetaName.BONETAG_L_TOE1, 7531), + new PsoEnumEntryInfo(MetaName.BONETAG_R_THIGH, 51826), + new PsoEnumEntryInfo(MetaName.BONETAG_R_CALF, 36864), + new PsoEnumEntryInfo(MetaName.BONETAG_R_FOOT, 52301), + new PsoEnumEntryInfo(MetaName.BONETAG_R_TOE, 20781), + new PsoEnumEntryInfo(MetaName.BONETAG_R_TOE1, 45631), + new PsoEnumEntryInfo((MetaName)1914315501, 35731), + new PsoEnumEntryInfo((MetaName)1648548119, 5232), + new PsoEnumEntryInfo((MetaName)533252846, 37119), + new PsoEnumEntryInfo((MetaName)2013152691, 61007), + new PsoEnumEntryInfo((MetaName)1274264606, 43810), + new PsoEnumEntryInfo((MetaName)2720329662, 23639), + new PsoEnumEntryInfo((MetaName)2841566254, 6442), + new PsoEnumEntryInfo(MetaName.BONETAG_L_PH_HAND, 60309), + new PsoEnumEntryInfo(MetaName.BONETAG_R_PH_HAND, 28422), + new PsoEnumEntryInfo((MetaName)3721004313, 41922), + new PsoEnumEntryInfo((MetaName)1646663439, 18212), + new PsoEnumEntryInfo((MetaName)2650851428, 33399), + new PsoEnumEntryInfo((MetaName)4289658079, 38180), + new PsoEnumEntryInfo((MetaName)2379061275, 39126), + new PsoEnumEntryInfo((MetaName)176026430, 39638), + new PsoEnumEntryInfo((MetaName)3870648046, 36029), + new PsoEnumEntryInfo((MetaName)3398180204, 6286), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL0, 838), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL1, 839), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL2, 840), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL3, 841), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL4, 842), + new PsoEnumEntryInfo(MetaName.BONETAG_TAIL5, 843), + new PsoEnumEntryInfo((MetaName)1109140959, 30992), + new PsoEnumEntryInfo((MetaName)803570034, 30993), + new PsoEnumEntryInfo((MetaName)631663860, 30994), + new PsoEnumEntryInfo((MetaName)322488345, 30995), + new PsoEnumEntryInfo((MetaName)5907036, 30996), + new PsoEnumEntryInfo((MetaName)4136373952, 30997), + new PsoEnumEntryInfo((MetaName)2411152202, 6986), + new PsoEnumEntryInfo((MetaName)2717247431, 6987), + new PsoEnumEntryInfo((MetaName)1883898992, 6988), + new PsoEnumEntryInfo((MetaName)601675397, 16351), + new PsoEnumEntryInfo((MetaName)62423933, 1805), + new PsoEnumEntryInfo((MetaName)2641889475, 39905), + new PsoEnumEntryInfo((MetaName)1949780854, 5956), + new PsoEnumEntryInfo((MetaName)3296017019, 6468), + new PsoEnumEntryInfo((MetaName)1556908436, 25260), + new PsoEnumEntryInfo((MetaName)3030868822, 27474), + new PsoEnumEntryInfo((MetaName)3452992357, 56604), + new PsoEnumEntryInfo((MetaName)3473614855, 12844), + new PsoEnumEntryInfo((MetaName)633057706, 57717), + new PsoEnumEntryInfo((MetaName)3570968304, 24806), + new PsoEnumEntryInfo((MetaName)2034893792, 65245), + new PsoEnumEntryInfo((MetaName)974447640, 35502), + new PsoEnumEntryInfo((MetaName)2263842006, 15570), + new PsoEnumEntryInfo((MetaName)1882359409, 28462), + new PsoEnumEntryInfo((MetaName)2421563540, 13201), + new PsoEnumEntryInfo((MetaName)2644806883, 48472), + new PsoEnumEntryInfo((MetaName)4089752637, 5930), + new PsoEnumEntryInfo((MetaName)1473028002, 44297), + new PsoEnumEntryInfo((MetaName)1823061586, 47158), + new PsoEnumEntryInfo((MetaName)3875905388, 19729), + new PsoEnumEntryInfo((MetaName)2560977519, 43885), + new PsoEnumEntryInfo((MetaName)4050972607, 2359), + new PsoEnumEntryInfo((MetaName)1028261740, 2449), + new PsoEnumEntryInfo((MetaName)3159424443, 19336), + new PsoEnumEntryInfo((MetaName)1939403075, 64744), + new PsoEnumEntryInfo((MetaName)1097108699, 64745), + new PsoEnumEntryInfo((MetaName)428522884, 64746), + new PsoEnumEntryInfo((MetaName)3131540134, 56194), + new PsoEnumEntryInfo((MetaName)1217317825, 45733), + new PsoEnumEntryInfo((MetaName)4198936370, 45734), + new PsoEnumEntryInfo((MetaName)1977853546, 45735), + new PsoEnumEntryInfo((MetaName)2601253047, 48389), + new PsoEnumEntryInfo((MetaName)2181973692, 48390), + new PsoEnumEntryInfo((MetaName)3140860170, 48391), + new PsoEnumEntryInfo((MetaName)455142432, 30929), + new PsoEnumEntryInfo((MetaName)3803060301, 33869), + new PsoEnumEntryInfo((MetaName)746815866, 4126) + ), + MetaName.eVfxGroup => new PsoEnumInfo(MetaName.eVfxGroup, 1, + new PsoEnumEntryInfo(MetaName.VFXGROUP_UNDEFINED, -1), + new PsoEnumEntryInfo(MetaName.VFXGROUP_VOID, 0), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GENERIC, 1), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CONCRETE, 2), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CONCRETE_DUSTY, 3), + new PsoEnumEntryInfo(MetaName.VFXGROUP_TARMAC, 4), + new PsoEnumEntryInfo(MetaName.VFXGROUP_TARMAC_BRITTLE, 5), + new PsoEnumEntryInfo(MetaName.VFXGROUP_STONE, 6), + new PsoEnumEntryInfo(MetaName.VFXGROUP_BRICK, 7), + new PsoEnumEntryInfo(MetaName.VFXGROUP_MARBLE, 8), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PAVING, 9), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SANDSTONE, 10), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SANDSTONE_BRITTLE, 11), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_LOOSE, 12), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_COMPACT, 13), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_WET, 14), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_UNDERWATER, 15), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_DEEP, 16), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SAND_WET_DEEP, 17), + new PsoEnumEntryInfo(MetaName.VFXGROUP_ICE, 18), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SNOW_LOOSE, 19), + new PsoEnumEntryInfo(MetaName.VFXGROUP_SNOW_COMPACT, 20), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GRAVEL, 21), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GRAVEL_DEEP, 22), + new PsoEnumEntryInfo(MetaName.VFXGROUP_DIRT_DRY, 23), + new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_SOFT, 24), + new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_DEEP, 25), + new PsoEnumEntryInfo(MetaName.VFXGROUP_MUD_UNDERWATER, 26), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CLAY, 27), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GRASS, 28), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GRASS_SHORT, 29), + new PsoEnumEntryInfo(MetaName.VFXGROUP_HAY, 30), + new PsoEnumEntryInfo(MetaName.VFXGROUP_BUSHES, 31), + new PsoEnumEntryInfo(MetaName.VFXGROUP_TREE_BARK, 32), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LEAVES, 33), + new PsoEnumEntryInfo(MetaName.VFXGROUP_METAL, 34), + new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD, 35), + new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD_DUSTY, 36), + new PsoEnumEntryInfo(MetaName.VFXGROUP_WOOD_SPLINTER, 37), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CERAMIC, 38), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CARPET_FABRIC, 39), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CARPET_FABRIC_DUSTY, 40), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTIC, 41), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTIC_HOLLOW, 42), + new PsoEnumEntryInfo(MetaName.VFXGROUP_RUBBER, 43), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LINOLEUM, 44), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PLASTER_BRITTLE, 45), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CARDBOARD, 46), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PAPER, 47), + new PsoEnumEntryInfo(MetaName.VFXGROUP_FOAM, 48), + new PsoEnumEntryInfo(MetaName.VFXGROUP_FEATHERS, 49), + new PsoEnumEntryInfo(MetaName.VFXGROUP_TVSCREEN, 50), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GLASS, 51), + new PsoEnumEntryInfo(MetaName.VFXGROUP_GLASS_BULLETPROOF, 52), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_METAL, 53), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_PLASTIC, 54), + new PsoEnumEntryInfo(MetaName.VFXGROUP_CAR_GLASS, 55), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PUDDLE, 56), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_WATER, 57), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_BLOOD, 58), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_OIL, 59), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_PETROL, 60), + new PsoEnumEntryInfo(MetaName.VFXGROUP_LIQUID_MUD, 61), + new PsoEnumEntryInfo(MetaName.VFXGROUP_FRESH_MEAT, 62), + new PsoEnumEntryInfo(MetaName.VFXGROUP_DRIED_MEAT, 63), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_HEAD, 64), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_TORSO, 65), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_LIMB, 66), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_FOOT, 67), + new PsoEnumEntryInfo(MetaName.VFXGROUP_PED_CAPSULE, 68) + ), + (MetaName)726948528 => new PsoEnumInfo((MetaName)726948528, 1, + new PsoEnumEntryInfo((MetaName)2375349691, 0), + new PsoEnumEntryInfo((MetaName)978806254, 1), + new PsoEnumEntryInfo((MetaName)345174417, 2), + new PsoEnumEntryInfo((MetaName)2719994633, 3), + new PsoEnumEntryInfo((MetaName)1055203807, 4) + ), + (MetaName)1599521754 => new PsoEnumInfo((MetaName)1599521754, 1, + new PsoEnumEntryInfo((MetaName)1546538473, 0) + ), + (MetaName)956281369 => new PsoEnumInfo((MetaName)956281369, 1, + new PsoEnumEntryInfo(MetaName.PROCOBJ_ALIGN_OBJ, 0), + new PsoEnumEntryInfo(MetaName.PROCOBJ_USE_GRID, 1), + new PsoEnumEntryInfo(MetaName.PROCOBJ_USE_SEED, 2), + new PsoEnumEntryInfo(MetaName.PROCOBJ_IS_FLOATING, 3), + new PsoEnumEntryInfo(MetaName.PROCOBJ_CAST_SHADOW, 4), + new PsoEnumEntryInfo(MetaName.PROCOBJ_NETWORK_GAME, 5) + ), + (MetaName)1247137385 => new PsoEnumInfo((MetaName)1247137385, 1, + new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD0, 0), + new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD1, 1), + new PsoEnumEntryInfo(MetaName.PROCPLANT_LOD2, 2), + new PsoEnumEntryInfo(MetaName.PROCPLANT_FURGRASS, 3), + new PsoEnumEntryInfo(MetaName.PROCPLANT_CAMERADONOTCULL, 4), + new PsoEnumEntryInfo(MetaName.PROCPLANT_UNDERWATER, 5), + new PsoEnumEntryInfo(MetaName.PROCPLANT_GROUNDSCALE1VERT, 6), + new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD0, 7), + new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD1, 8), + new PsoEnumEntryInfo(MetaName.PROCPLANT_NOGROUNDSKEW_LOD2, 9), + new PsoEnumEntryInfo(MetaName.PROCPLANT_NOSHADOW, 10) + ), + (MetaName)2782414211 => new PsoEnumInfo((MetaName)2782414211, 1, + new PsoEnumEntryInfo((MetaName)3117886768, 0), + new PsoEnumEntryInfo((MetaName)361913441, 1), + new PsoEnumEntryInfo((MetaName)1673907105, 2) + ), + (MetaName)3404480226 => new PsoEnumInfo((MetaName)3404480226, 1, + new PsoEnumEntryInfo((MetaName)643717225, 0), + new PsoEnumEntryInfo((MetaName)1755526414, 1), + new PsoEnumEntryInfo(MetaName.CVA_WHEEL_REAR_LEFT, 2), + new PsoEnumEntryInfo((MetaName)1950121897, 3), + new PsoEnumEntryInfo((MetaName)2065407336, 4), + new PsoEnumEntryInfo((MetaName)1249738073, 5), + new PsoEnumEntryInfo((MetaName)3037431481, 6), + new PsoEnumEntryInfo((MetaName)2009750623, 7), + new PsoEnumEntryInfo((MetaName)3659952659, 8), + new PsoEnumEntryInfo((MetaName)4024787971, 9), + new PsoEnumEntryInfo((MetaName)4081041159, 10), + new PsoEnumEntryInfo((MetaName)3123586287, 11), + new PsoEnumEntryInfo((MetaName)1678048274, 12), + new PsoEnumEntryInfo((MetaName)1275607205, 13), + new PsoEnumEntryInfo(MetaName.DEVINS_SNOWLIGHT, 14), + new PsoEnumEntryInfo((MetaName)2276229539, 15), + new PsoEnumEntryInfo((MetaName)493733281, 16), + new PsoEnumEntryInfo((MetaName)1037540057, 17), + new PsoEnumEntryInfo((MetaName)1162901510, 18), + new PsoEnumEntryInfo((MetaName)739467989, 19), + new PsoEnumEntryInfo((MetaName)677568593, 20), + new PsoEnumEntryInfo((MetaName)1739703625, 21), + new PsoEnumEntryInfo((MetaName)2932239149, 22), + new PsoEnumEntryInfo((MetaName)1612186711, 23), + new PsoEnumEntryInfo((MetaName)629489585, 24), + new PsoEnumEntryInfo((MetaName)3531030925, 25), + new PsoEnumEntryInfo((MetaName)1769219469, 26), + new PsoEnumEntryInfo((MetaName)1816463715, 27), + new PsoEnumEntryInfo((MetaName)3449512558, 28) + ), + (MetaName)2136742399 => new PsoEnumInfo((MetaName)2136742399, 1, + new PsoEnumEntryInfo(MetaName.LOOK_FORWARD_RELATIVE_TO_ATTACH, 0), + new PsoEnumEntryInfo((MetaName)4067031256, 1), + new PsoEnumEntryInfo((MetaName)3668340720, 2) + ), + (MetaName)513957198 => new PsoEnumInfo((MetaName)513957198, 1, + new PsoEnumEntryInfo(MetaName.ON_FOOT, 0), + new PsoEnumEntryInfo(MetaName.IN_VEHICLE, 1), + new PsoEnumEntryInfo(MetaName.ON_BIKE, 2), + new PsoEnumEntryInfo(MetaName.IN_BOAT, 3), + new PsoEnumEntryInfo(MetaName.IN_AIRCRAFT, 4), + new PsoEnumEntryInfo(MetaName.IN_SUBMARINE, 5), + new PsoEnumEntryInfo(MetaName.IN_HELI, 6), + new PsoEnumEntryInfo(MetaName.IN_TURRET, 7) + ), + (MetaName)2703064232 => new PsoEnumInfo((MetaName)2703064232, 1, + new PsoEnumEntryInfo(MetaName.THIRD_PERSON_NEAR, 0), + new PsoEnumEntryInfo(MetaName.THIRD_PERSON_MEDIUM, 1), + new PsoEnumEntryInfo(MetaName.THIRD_PERSON_FAR, 2), + new PsoEnumEntryInfo(MetaName.CINEMATIC, 3), + new PsoEnumEntryInfo(MetaName.FIRST_PERSON, 4) + ), + MetaName.eCurveType => new PsoEnumInfo(MetaName.eCurveType, 1, + new PsoEnumEntryInfo((MetaName)3099024980, 0), + new PsoEnumEntryInfo((MetaName)3810146036, 1), + new PsoEnumEntryInfo((MetaName)1812191173, 2), + new PsoEnumEntryInfo((MetaName)2081939217, 3), + new PsoEnumEntryInfo((MetaName)2879490434, 4), + new PsoEnumEntryInfo((MetaName)3899422166, 5), + new PsoEnumEntryInfo((MetaName)4202435238, 6), + new PsoEnumEntryInfo((MetaName)1924959165, 7), + new PsoEnumEntryInfo((MetaName)2394366735, 8), + new PsoEnumEntryInfo((MetaName)2691765069, 9), + new PsoEnumEntryInfo((MetaName)3782218410, 10), + new PsoEnumEntryInfo((MetaName)1054471073, 11), + new PsoEnumEntryInfo((MetaName)3232508014, 12), + new PsoEnumEntryInfo((MetaName)3268408636, 13), + new PsoEnumEntryInfo((MetaName)156483360, 14), + new PsoEnumEntryInfo((MetaName)610568483, 15), + new PsoEnumEntryInfo((MetaName)1031574247, 16), + new PsoEnumEntryInfo((MetaName)1817346630, 17), + new PsoEnumEntryInfo((MetaName)3038768594, 18), + new PsoEnumEntryInfo((MetaName)3433776656, 19), + new PsoEnumEntryInfo((MetaName)3224106151, 20), + new PsoEnumEntryInfo((MetaName)3781585750, 21), + new PsoEnumEntryInfo((MetaName)728471947, 22), + new PsoEnumEntryInfo((MetaName)2868857018, 23), + new PsoEnumEntryInfo((MetaName)3394937778, 24), + new PsoEnumEntryInfo((MetaName)1572642455, 25), + new PsoEnumEntryInfo((MetaName)4148234847, 26) + ), + (MetaName)4206293824 => new PsoEnumInfo((MetaName)4206293824, 1, + new PsoEnumEntryInfo((MetaName)3090781844, 0), + new PsoEnumEntryInfo((MetaName)714439506, 1), + new PsoEnumEntryInfo((MetaName)3541453901, 2), + new PsoEnumEntryInfo((MetaName)3420181340, 3), + new PsoEnumEntryInfo((MetaName)3785293538, 4), + new PsoEnumEntryInfo((MetaName)2987466695, 5), + new PsoEnumEntryInfo((MetaName)2089898957, 6), + new PsoEnumEntryInfo((MetaName)776877896, 7), + new PsoEnumEntryInfo((MetaName)1192126664, 8), + new PsoEnumEntryInfo((MetaName)1989206149, 9), + new PsoEnumEntryInfo((MetaName)2132778492, 10), + new PsoEnumEntryInfo((MetaName)1459749185, 11), + new PsoEnumEntryInfo((MetaName)769806680, 12), + new PsoEnumEntryInfo((MetaName)344800761, 13), + new PsoEnumEntryInfo((MetaName)2607259232, 14) + ), + (MetaName)902027429 => new PsoEnumInfo((MetaName)902027429, 1, + new PsoEnumEntryInfo((MetaName)1166188847, 0), + new PsoEnumEntryInfo((MetaName)899750670, 1) + ), + (MetaName)3529626013 => new PsoEnumInfo((MetaName)3529626013, 1, + new PsoEnumEntryInfo(MetaName.CAR, 0), + new PsoEnumEntryInfo(MetaName.PLANE, 1), + new PsoEnumEntryInfo(MetaName.TRAILER, 2), + new PsoEnumEntryInfo(MetaName.QUADBIKE, 3), + new PsoEnumEntryInfo(MetaName.HELI, 4), + new PsoEnumEntryInfo(MetaName.AUTOGYRO, 5), + new PsoEnumEntryInfo(MetaName.BIKE, 6), + new PsoEnumEntryInfo(MetaName.BICYCLE, 7), + new PsoEnumEntryInfo(MetaName.BOAT, 8), + new PsoEnumEntryInfo(MetaName.TRAIN, 9), + new PsoEnumEntryInfo(MetaName.SUBMARINE, 10), + new PsoEnumEntryInfo(MetaName.ALL, 11) + ), + (MetaName)3889593720 => new PsoEnumInfo((MetaName)3889593720, 1, + new PsoEnumEntryInfo((MetaName)2388118614, 0), + new PsoEnumEntryInfo((MetaName)1309321028, 1), + new PsoEnumEntryInfo((MetaName)2409045263, 2), + new PsoEnumEntryInfo((MetaName)1405307635, 3), + new PsoEnumEntryInfo((MetaName)3183067451, 4) + ), + (MetaName)2675594832 => new PsoEnumInfo((MetaName)2675594832, 1, + new PsoEnumEntryInfo(MetaName.AF_CAN_DIVE, 0), + new PsoEnumEntryInfo((MetaName)665056449, 1), + new PsoEnumEntryInfo((MetaName)1838090773, 2), + new PsoEnumEntryInfo((MetaName)1429252732, 3), + new PsoEnumEntryInfo((MetaName)335156894, 4), + new PsoEnumEntryInfo((MetaName)1995789406, 5), + new PsoEnumEntryInfo((MetaName)301163182, 6), + new PsoEnumEntryInfo((MetaName)2727636155, 7), + new PsoEnumEntryInfo((MetaName)2154274359, 8), + new PsoEnumEntryInfo((MetaName)3233981661, 9), + new PsoEnumEntryInfo((MetaName)3036600251, 10) + ), + (MetaName)2920442291 => new PsoEnumInfo((MetaName)2920442291, 1, + new PsoEnumEntryInfo(MetaName.PED_DRIVES_POOR_CAR, 0), + new PsoEnumEntryInfo(MetaName.PED_DRIVES_AVERAGE_CAR, 1), + new PsoEnumEntryInfo(MetaName.PED_DRIVES_RICH_CAR, 2), + new PsoEnumEntryInfo(MetaName.PED_DRIVES_BIG_CAR, 3), + new PsoEnumEntryInfo(MetaName.PED_DRIVES_MOTORCYCLE, 4), + new PsoEnumEntryInfo(MetaName.PED_DRIVES_BOAT, 5) + ), + MetaName.Affluence => new PsoEnumInfo(MetaName.Affluence, 1, + new PsoEnumEntryInfo(MetaName.AFF_POOR, 0), + new PsoEnumEntryInfo(MetaName.AFF_AVERAGE, 1), + new PsoEnumEntryInfo(MetaName.AFF_RICH, 2) + ), + MetaName.TechSavvy => new PsoEnumInfo(MetaName.TechSavvy, 1, + new PsoEnumEntryInfo(MetaName.TS_LOW, 0), + new PsoEnumEntryInfo(MetaName.TS_HIGH, 1) + ), + (MetaName)3079935216 => new PsoEnumInfo((MetaName)3079935216, 1, + new PsoEnumEntryInfo(MetaName.BF_INTERVENE_ON_MELEE_ACTION, 0), + new PsoEnumEntryInfo(MetaName.BF_DONT_RUN_ON_MELEE_ATTACK, 1), + new PsoEnumEntryInfo(MetaName.BF_WATCH_ON_CAR_STOLEN, 2), + new PsoEnumEntryInfo(MetaName.BF_INTIMIDATE_PLAYER, 3), + new PsoEnumEntryInfo(MetaName.BF_GET_PISSED_WHEN_HIT_BY_CAR, 4), + new PsoEnumEntryInfo((MetaName)2870992946, 5), + new PsoEnumEntryInfo(MetaName.BF_DONT_SAY_PANIC_ON_FLEE, 6), + new PsoEnumEntryInfo(MetaName.BF_REACT_ON_COMBAT, 7), + new PsoEnumEntryInfo(MetaName.BF_PLAY_CAR_HORN, 8), + new PsoEnumEntryInfo(MetaName.BF_ARGUMENTATIVE, 9), + new PsoEnumEntryInfo(MetaName.BF_CONFRONTATIONAL, 10), + new PsoEnumEntryInfo(MetaName.BF_LIMIT_COMBATANTS, 11), + new PsoEnumEntryInfo(MetaName.BF_PURSUE_WHEN_HIT_BY_CAR, 12), + new PsoEnumEntryInfo(MetaName.BF_COWARDLY_FOR_SHOCKING_EVENTS, 13), + new PsoEnumEntryInfo(MetaName.BF_BOOST_BRAVERY_IN_GROUP, 14), + new PsoEnumEntryInfo(MetaName.BF_CAN_ACCELERATE_IN_CAR, 15), + new PsoEnumEntryInfo(MetaName.BF_CAN_GET_OUT_WHEN_HIT_BY_CAR, 16), + new PsoEnumEntryInfo(MetaName.BF_AGGRESSIVE_AFTER_RUNNING_PED_OVER, 17), + new PsoEnumEntryInfo(MetaName.BF_CAN_FLEE_WHEN_HIT_BY_CAR, 18), + new PsoEnumEntryInfo(MetaName.BF_ALLOW_CONFRONT_FOR_TERRITORY_REACTIONS, 19), + new PsoEnumEntryInfo(MetaName.BF_DONT_FORCE_FLEE_COMBAT, 20) + ), + (MetaName)1639628591 => new PsoEnumInfo((MetaName)1639628591, 1, + new PsoEnumEntryInfo(MetaName.CF_JACKING, 0), + new PsoEnumEntryInfo(MetaName.CF_ALLOWED_COP_PURSUIT, 1) + ), + (MetaName)1559228487 => new PsoEnumInfo((MetaName)1559228487, 1, + new PsoEnumEntryInfo(MetaName.AF_Low, 0), + new PsoEnumEntryInfo(MetaName.AF_EnterLeft, 1), + new PsoEnumEntryInfo(MetaName.AF_FaceLeft, 2), + new PsoEnumEntryInfo(MetaName.AF_AtEdge, 3), + new PsoEnumEntryInfo(MetaName.AF_ToLow, 4), + new PsoEnumEntryInfo(MetaName.AF_AimDirect, 5), + new PsoEnumEntryInfo(MetaName.AF_Center, 6), + new PsoEnumEntryInfo(MetaName.AF_ToPeek, 7), + new PsoEnumEntryInfo(MetaName.AF_Scope, 8) + ), + (MetaName)966624441 => new PsoEnumInfo((MetaName)966624441, 1, + new PsoEnumEntryInfo(MetaName.OnlyUseForReactions, 0), + new PsoEnumEntryInfo(MetaName.CanUseForReactions, 1), + new PsoEnumEntryInfo(MetaName.Urgent, 2), + new PsoEnumEntryInfo(MetaName.OnlyUseForLawEnforcementPeds, 3), + new PsoEnumEntryInfo(MetaName.OnlyUseForGangPeds, 4) + ), + MetaName.LookIkTurnRate => new PsoEnumInfo(MetaName.LookIkTurnRate, 1, + new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_SLOW, 0), + new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_NORMAL, 1), + new PsoEnumEntryInfo(MetaName.LOOKIK_TURN_RATE_FAST, 2) + ), + MetaName.LookIkBlendRate => new PsoEnumInfo(MetaName.LookIkBlendRate, 1, + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_SLOWEST, 0), + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_SLOW, 1), + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_NORMAL, 2), + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_FAST, 3), + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_FASTEST, 4), + new PsoEnumEntryInfo(MetaName.LOOKIK_BLEND_RATE_INSTANT, 5) + ), + MetaName.LookIkRotationLimit => new PsoEnumInfo(MetaName.LookIkRotationLimit, 1, + new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_OFF, 0), + new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_NARROWEST, 1), + new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_NARROW, 2), + new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_WIDE, 3), + new PsoEnumEntryInfo(MetaName.LOOKIK_ROT_LIM_WIDEST, 4) + ), + (MetaName)4002001992 => new PsoEnumInfo((MetaName)4002001992, 1, + new PsoEnumEntryInfo((MetaName)4238595643, 0) + ), + MetaName.AmbientEventType => new PsoEnumInfo(MetaName.AmbientEventType, 1, + new PsoEnumEntryInfo((MetaName)1637555008, 0), + new PsoEnumEntryInfo(MetaName.AET_Interesting, 1), + new PsoEnumEntryInfo(MetaName.AET_Threatening, 2), + new PsoEnumEntryInfo(MetaName.AET_Threatened, 3), + new PsoEnumEntryInfo(MetaName.AET_In_Place, 4), + new PsoEnumEntryInfo(MetaName.AET_Directed_In_Place, 5), + new PsoEnumEntryInfo(MetaName.AET_Flinch, 6) + ), + (MetaName)1049598006 => new PsoEnumInfo((MetaName)1049598006, 1, + new PsoEnumEntryInfo((MetaName)1600411487, 0), + new PsoEnumEntryInfo((MetaName)3999177563, 1), + new PsoEnumEntryInfo((MetaName)3250863043, 2) + ), + MetaName.ePedVarComp => new PsoEnumInfo(MetaName.ePedVarComp, 1, + new PsoEnumEntryInfo(MetaName.PV_COMP_INVALID, -1), + new PsoEnumEntryInfo(MetaName.PV_COMP_HEAD, 0), + new PsoEnumEntryInfo(MetaName.PV_COMP_BERD, 1), + new PsoEnumEntryInfo(MetaName.PV_COMP_HAIR, 2), + new PsoEnumEntryInfo(MetaName.PV_COMP_UPPR, 3), + new PsoEnumEntryInfo(MetaName.PV_COMP_LOWR, 4), + new PsoEnumEntryInfo(MetaName.PV_COMP_HAND, 5), + new PsoEnumEntryInfo(MetaName.PV_COMP_FEET, 6), + new PsoEnumEntryInfo(MetaName.PV_COMP_TEEF, 7), + new PsoEnumEntryInfo(MetaName.PV_COMP_ACCS, 8), + new PsoEnumEntryInfo(MetaName.PV_COMP_TASK, 9), + new PsoEnumEntryInfo(MetaName.PV_COMP_DECL, 10), + new PsoEnumEntryInfo(MetaName.PV_COMP_JBIB, 11), + new PsoEnumEntryInfo(MetaName.PV_COMP_MAX, 12) + ), + (MetaName)3509057257 => new PsoEnumInfo((MetaName)3509057257, 1, + new PsoEnumEntryInfo(MetaName.RAGDOLL_BUTTOCKS, 0), + new PsoEnumEntryInfo(MetaName.RAGDOLL_THIGH_LEFT, 1), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SHIN_LEFT, 2), + new PsoEnumEntryInfo(MetaName.RAGDOLL_FOOT_LEFT, 3), + new PsoEnumEntryInfo(MetaName.RAGDOLL_THIGH_RIGHT, 4), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SHIN_RIGHT, 5), + new PsoEnumEntryInfo(MetaName.RAGDOLL_FOOT_RIGHT, 6), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE0, 7), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE1, 8), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE2, 9), + new PsoEnumEntryInfo(MetaName.RAGDOLL_SPINE3, 10), + new PsoEnumEntryInfo(MetaName.RAGDOLL_CLAVICLE_LEFT, 11), + new PsoEnumEntryInfo(MetaName.RAGDOLL_UPPER_ARM_LEFT, 12), + new PsoEnumEntryInfo(MetaName.RAGDOLL_LOWER_ARM_LEFT, 13), + new PsoEnumEntryInfo(MetaName.RAGDOLL_HAND_LEFT, 14), + new PsoEnumEntryInfo(MetaName.RAGDOLL_CLAVICLE_RIGHT, 15), + new PsoEnumEntryInfo(MetaName.RAGDOLL_UPPER_ARM_RIGHT, 16), + new PsoEnumEntryInfo((MetaName)937951079, 17), + new PsoEnumEntryInfo(MetaName.RAGDOLL_HAND_RIGHT, 18), + new PsoEnumEntryInfo(MetaName.RAGDOLL_NECK, 19), + new PsoEnumEntryInfo(MetaName.RAGDOLL_HEAD, 20) + ), + MetaName.LockType => new PsoEnumInfo(MetaName.LockType, 1, + new PsoEnumEntryInfo((MetaName)40312212, 0), + new PsoEnumEntryInfo((MetaName)2263813480, 1), + new PsoEnumEntryInfo((MetaName)1924092278, 2) + ), + (MetaName)3799765345 => new PsoEnumInfo((MetaName)3799765345, 1, + new PsoEnumEntryInfo(MetaName.ET_INVALID, -1), + new PsoEnumEntryInfo(MetaName.ET_CRIME, 0), + new PsoEnumEntryInfo(MetaName.ET_JAYWALKING, 1), + new PsoEnumEntryInfo(MetaName.ET_COP_PURSUIT, 2), + new PsoEnumEntryInfo(MetaName.ET_SPAWNED_COP_PURSUIT, 3), + new PsoEnumEntryInfo(MetaName.ET_AMBIENT_COP, 4), + new PsoEnumEntryInfo(MetaName.ET_INTERESTING_DRIVER, 5), + new PsoEnumEntryInfo(MetaName.ET_AGGRESSIVE_DRIVER, 6) + ), + (MetaName)1809724872 => new PsoEnumInfo((MetaName)1809724872, 1, + new PsoEnumEntryInfo(MetaName.NO_REACTION, 0), + new PsoEnumEntryInfo(MetaName.SMALL_REACTION, 1), + new PsoEnumEntryInfo(MetaName.BIG_REACTION, 2) + ), + (MetaName)888350649 => new PsoEnumInfo((MetaName)888350649, 1, + new PsoEnumEntryInfo(MetaName.SAC_Retain, 0), + new PsoEnumEntryInfo((MetaName)485311651, 1), + new PsoEnumEntryInfo((MetaName)1413720671, 2), + new PsoEnumEntryInfo(MetaName.SAC_Randomize, 3) + ), + (MetaName)2055586340 => new PsoEnumInfo((MetaName)2055586340, 1, + new PsoEnumEntryInfo(MetaName.TC_Retain, 0), + new PsoEnumEntryInfo((MetaName)1410481380, 1), + new PsoEnumEntryInfo((MetaName)1541573135, 2), + new PsoEnumEntryInfo(MetaName.TC_Randomize, 3) + ), + (MetaName)3374036042 => new PsoEnumInfo((MetaName)3374036042, 1, + new PsoEnumEntryInfo(MetaName.BC_Retain, 0), + new PsoEnumEntryInfo((MetaName)1834753809, 1), + new PsoEnumEntryInfo((MetaName)2650352944, 2), + new PsoEnumEntryInfo(MetaName.BC_Randomize, 3) + ), + (MetaName)4001255574 => new PsoEnumInfo((MetaName)4001255574, 1, + new PsoEnumEntryInfo(MetaName.HBC_Retain, 0), + new PsoEnumEntryInfo((MetaName)2508718569, 1), + new PsoEnumEntryInfo((MetaName)1024930189, 2), + new PsoEnumEntryInfo(MetaName.HBC_Randomize, 3) + ), + (MetaName)894416699 => new PsoEnumInfo((MetaName)894416699, 1, + new PsoEnumEntryInfo(MetaName.SF_FrontDriverSide, 0), + new PsoEnumEntryInfo(MetaName.SF_FrontPassengerSide, 1), + new PsoEnumEntryInfo(MetaName.SF_BackDriverSide, 2), + new PsoEnumEntryInfo(MetaName.SF_BackPassengerSide, 3), + new PsoEnumEntryInfo(MetaName.SF_AltFrontDriverSide, 4), + new PsoEnumEntryInfo(MetaName.SF_AltFrontPassengerSide, 5), + new PsoEnumEntryInfo(MetaName.SF_AltBackDriverSide, 6), + new PsoEnumEntryInfo(MetaName.SF_AltBackPassengerSide, 7) + ), + (MetaName)4186696686 => new PsoEnumInfo((MetaName)4186696686, 1, + new PsoEnumEntryInfo(MetaName.POPGROUP_IS_GANG, 0), + new PsoEnumEntryInfo(MetaName.POPGROUP_AMBIENT, 1), + new PsoEnumEntryInfo(MetaName.POPGROUP_SCENARIO, 2), + new PsoEnumEntryInfo(MetaName.POPGROUP_RARE, 3), + new PsoEnumEntryInfo(MetaName.POPGROUP_NETWORK_COMMON, 4), + new PsoEnumEntryInfo(MetaName.POPGROUP_AERIAL, 5), + new PsoEnumEntryInfo(MetaName.POPGROUP_AQUATIC, 6), + new PsoEnumEntryInfo(MetaName.POPGROUP_WILDLIFE, 7), + new PsoEnumEntryInfo(MetaName.POPGROUP_IN_VEHICLE, 8) + ), + (MetaName)2809332931 => new PsoEnumInfo((MetaName)2809332931, 1, + new PsoEnumEntryInfo(MetaName.DontCloseWhenTouched, 0), + new PsoEnumEntryInfo(MetaName.AutoOpensForSPVehicleWithPedsOnly, 1), + new PsoEnumEntryInfo(MetaName.AutoOpensForSPPlayerPedsOnly, 2), + new PsoEnumEntryInfo(MetaName.AutoOpensForMPVehicleWithPedsOnly, 3), + new PsoEnumEntryInfo(MetaName.AutoOpensForMPPlayerPedsOnly, 4), + new PsoEnumEntryInfo(MetaName.DelayDoorClosingForPlayer, 5), + new PsoEnumEntryInfo(MetaName.AutoOpensForAllVehicles, 6), + new PsoEnumEntryInfo(MetaName.IgnoreOpenDoorTaskEdgeLerp, 7), + new PsoEnumEntryInfo(MetaName.AutoOpensForLawEnforcement, 8) + ), + MetaName.StdDoorRotDir => new PsoEnumInfo(MetaName.StdDoorRotDir, 1, + new PsoEnumEntryInfo(MetaName.StdDoorOpenBothDir, 0), + new PsoEnumEntryInfo(MetaName.StdDoorOpenNegDir, 1), + new PsoEnumEntryInfo(MetaName.StdDoorOpenPosDir, 2) + ), + (MetaName)2065671281 => new PsoEnumInfo((MetaName)2065671281, 1, + new PsoEnumEntryInfo(MetaName.CantUse, 0), + new PsoEnumEntryInfo(MetaName.MustUse, 1) + ), + (MetaName)1756502932 => new PsoEnumInfo((MetaName)1756502932, 1, + new PsoEnumEntryInfo((MetaName)1618156912, 0), + new PsoEnumEntryInfo((MetaName)325739119, 1), + new PsoEnumEntryInfo((MetaName)1129710621, 2), + new PsoEnumEntryInfo((MetaName)2784202857, 3), + new PsoEnumEntryInfo((MetaName)3198877297, 4), + new PsoEnumEntryInfo((MetaName)2664559559, 5) + ), + (MetaName)3204395397 => new PsoEnumInfo((MetaName)3204395397, 1, + new PsoEnumEntryInfo((MetaName)3124669982, 0), + new PsoEnumEntryInfo((MetaName)1679254647, 1), + new PsoEnumEntryInfo((MetaName)1875723229, 2) + ), + (MetaName)4286852891 => new PsoEnumInfo((MetaName)4286852891, 1, + new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_DEFAULT, 0), + new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_COUNTRYSIDE, 1), + new PsoEnumEntryInfo(MetaName.VEHICLE_RESPONSE_ARMY_BASE, 2), + new PsoEnumEntryInfo((MetaName)2910242310, 3) + ), + (MetaName)4095090001 => new PsoEnumInfo((MetaName)4095090001, 1, + new PsoEnumEntryInfo(MetaName.SPECIAL_NONE, 0), + new PsoEnumEntryInfo(MetaName.SPECIAL_AIRPORT, 1) + ), + (MetaName)98189892 => new PsoEnumInfo((MetaName)98189892, 1, + new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceEast, 0), + new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceWest, 1), + new PsoEnumEntryInfo(MetaName.NoCoverNorthFaceCenter, 2), + new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceEast, 3), + new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceWest, 4), + new PsoEnumEntryInfo(MetaName.NoCoverSouthFaceCenter, 5), + new PsoEnumEntryInfo(MetaName.NoCoverEastFaceNorth, 6), + new PsoEnumEntryInfo(MetaName.NoCoverEastFaceSouth, 7), + new PsoEnumEntryInfo(MetaName.NoCoverEastFaceCenter, 8), + new PsoEnumEntryInfo(MetaName.NoCoverWestFaceNorth, 9), + new PsoEnumEntryInfo(MetaName.NoCoverWestFaceSouth, 10), + new PsoEnumEntryInfo(MetaName.NoCoverWestFaceCenter, 11), + new PsoEnumEntryInfo(MetaName.ForceLowCornerNorthFaceEast, 12), + new PsoEnumEntryInfo(MetaName.ForceLowCornerNorthFaceWest, 13), + new PsoEnumEntryInfo(MetaName.ForceLowCornerSouthFaceEast, 14), + new PsoEnumEntryInfo(MetaName.ForceLowCornerSouthFaceWest, 15), + new PsoEnumEntryInfo(MetaName.ForceLowCornerEastFaceNorth, 16), + new PsoEnumEntryInfo(MetaName.ForceLowCornerEastFaceSouth, 17), + new PsoEnumEntryInfo(MetaName.ForceLowCornerWestFaceNorth, 18), + new PsoEnumEntryInfo(MetaName.ForceLowCornerWestFaceSouth, 19), + new PsoEnumEntryInfo(MetaName.NoCoverVehicleDoors, 20) + ), + MetaName.CSpawnPoint__AvailabilityMpSp => new PsoEnumInfo(MetaName.CSpawnPoint__AvailabilityMpSp, 1, + new PsoEnumEntryInfo(MetaName.kBoth, 0), + new PsoEnumEntryInfo(MetaName.kOnlySp, 1), + new PsoEnumEntryInfo(MetaName.kOnlyMp, 2) + ), + MetaName.CScenarioPointFlags__Flags => new PsoEnumInfo(MetaName.CScenarioPointFlags__Flags, 1, + new PsoEnumEntryInfo(MetaName.IgnoreMaxInRange, 0), + new PsoEnumEntryInfo(MetaName.NoSpawn, 1), + new PsoEnumEntryInfo(MetaName.StationaryReactions, 2) + ), + MetaName.CScenarioChainingEdge__eNavMode => new PsoEnumInfo(MetaName.CScenarioChainingEdge__eNavMode, 1, + new PsoEnumEntryInfo(MetaName.Direct, 0), + new PsoEnumEntryInfo(MetaName.NavMesh, 1), + new PsoEnumEntryInfo(MetaName.Roads, 2) + ), + MetaName.CScenarioChainingEdge__eNavSpeed => new PsoEnumInfo(MetaName.CScenarioChainingEdge__eNavSpeed, 1, + new PsoEnumEntryInfo((MetaName)3279574318, 0), + new PsoEnumEntryInfo((MetaName)2212923970, 1), + new PsoEnumEntryInfo((MetaName)4022799658, 2), + new PsoEnumEntryInfo((MetaName)1425672334, 3), + new PsoEnumEntryInfo((MetaName)957720931, 4), + new PsoEnumEntryInfo((MetaName)3795195414, 5), + new PsoEnumEntryInfo((MetaName)2834622009, 6), + new PsoEnumEntryInfo((MetaName)1876554076, 7), + new PsoEnumEntryInfo((MetaName)698543797, 8), + new PsoEnumEntryInfo((MetaName)3911005380, 9), + new PsoEnumEntryInfo((MetaName)3717649022, 10), + new PsoEnumEntryInfo((MetaName)3356026130, 11) + ), + (MetaName)1193003611 => new PsoEnumInfo((MetaName)1193003611, 1, + new PsoEnumEntryInfo(MetaName.TIME_DEPENDENT, 0), + new PsoEnumEntryInfo(MetaName.WEATHER_DEPENDENT, 1) + ), + (MetaName)3387532954 => new PsoEnumInfo((MetaName)3387532954, 1, + new PsoEnumEntryInfo(MetaName.AT_TXD, 0), + new PsoEnumEntryInfo(MetaName.AT_DRB, 1), + new PsoEnumEntryInfo(MetaName.AT_DWD, 2), + new PsoEnumEntryInfo(MetaName.AT_FRG, 3) + ), + MetaName.manifestFlags => new PsoEnumInfo(MetaName.manifestFlags, 1, + new PsoEnumEntryInfo(MetaName.INTERIOR_DATA, 0) + ), + MetaName.rage__eLodType => new PsoEnumInfo(MetaName.rage__eLodType, 1, + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_HD, 0), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_LOD, 1), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD1, 2), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD2, 3), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD3, 4), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_ORPHANHD, 5), + new PsoEnumEntryInfo(MetaName.LODTYPES_DEPTH_SLOD4, 6) + ), + MetaName.rage__ePriorityLevel => new PsoEnumInfo(MetaName.rage__ePriorityLevel, 1, + new PsoEnumEntryInfo(MetaName.PRI_REQUIRED, 0), + new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_HIGH, 1), + new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_MEDIUM, 2), + new PsoEnumEntryInfo(MetaName.PRI_OPTIONAL_LOW, 3) + ), + _ => null, + }; + } +} diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetStructureInfo.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetStructureInfo.cs new file mode 100644 index 0000000..b757627 --- /dev/null +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes/GetStructureInfo.cs @@ -0,0 +1,14000 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.GameFiles; +public static class PsoTypesStructureInfo +{ + public static PsoStructureInfo GetStructureInfo(MetaName name) + { + //to generate structinfos + switch (name) + { + case MetaName.CJunctionTemplateArray: + return new PsoStructureInfo(MetaName.CJunctionTemplateArray, 0, 0, 170688, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CJunctionTemplate), + new PsoStructureEntryInfo(MetaName.Entries, PsoDataType.Array, 0, 1, (MetaName)9830400), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2111264667), + new PsoStructureEntryInfo(MetaName.AutoJunctionAdjustments, PsoDataType.Array, 39344, 129, (MetaName)524290) + ); + case MetaName.CJunctionTemplate: + return new PsoStructureInfo(MetaName.CJunctionTemplate, 0, 0, 1136, + new PsoStructureEntryInfo(MetaName.iFlags, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iNumJunctionNodes, PsoDataType.SInt, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.iNumEntrances, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.iNumPhases, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.iNumTrafficLightLocations, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fSearchDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fPhaseOffset, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.vJunctionMin, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.vJunctionMax, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float3, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.vJunctionNodePositions, PsoDataType.Array, 64, 2, (MetaName)524297), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1057820426), + new PsoStructureEntryInfo(MetaName.Entrances, PsoDataType.Array, 192, 2, (MetaName)1048587), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)38018516), + new PsoStructureEntryInfo(MetaName.PhaseTimings, PsoDataType.Array, 960, 2, (MetaName)1048589), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2279781599), + new PsoStructureEntryInfo(MetaName.TrafficLightLocations, PsoDataType.Array, 1088, 2, (MetaName)524303) + ); + case (MetaName)1057820426: + return new PsoStructureInfo((MetaName)1057820426, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.vNodePosition, PsoDataType.Float3, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iPhase, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fStoppingDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fOrientation, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fAngleFromCenter, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.bCanTurnRightOnRedLight, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo(MetaName.bLeftLaneIsAheadOnly, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.bRightLaneIsRightOnly, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo(MetaName.iLeftFilterLanePhase, PsoDataType.SInt, 36, 0, 0) + ); + case (MetaName)38018516: + return new PsoStructureInfo((MetaName)38018516, 0, 0, 8, + new PsoStructureEntryInfo(MetaName.fStartTime, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fDuration, PsoDataType.Float, 4, 0, 0) + ); + case (MetaName)2279781599: + return new PsoStructureInfo((MetaName)2279781599, 0, 0, 6, + new PsoStructureEntryInfo(MetaName.iPosX, PsoDataType.SShort, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iPosY, PsoDataType.SShort, 2, 0, 0), + new PsoStructureEntryInfo(MetaName.iPosZ, PsoDataType.SShort, 4, 0, 0) + ); + case (MetaName)2111264667: + return new PsoStructureInfo((MetaName)2111264667, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.vLocation, PsoDataType.Float3a, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fCycleOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fCycleDuration, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CVehicleModelInfoVarGlobal: //carcols.ymt root + return new PsoStructureInfo(MetaName.CVehicleModelInfoVarGlobal, 0, 0, 392, + new PsoStructureEntryInfo(MetaName.VehiclePlates, PsoDataType.Structure, 8, 0, (MetaName)465922034), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModelColor), + new PsoStructureEntryInfo(MetaName.Colors, PsoDataType.Array, 48, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleMetallicSetting), + new PsoStructureEntryInfo(MetaName.MetallicSettings, PsoDataType.Array, 64, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWindowColor), + new PsoStructureEntryInfo(MetaName.WindowColors, PsoDataType.Array, 80, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.vehicleLightSettings), + new PsoStructureEntryInfo(MetaName.Lights, PsoDataType.Array, 96, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenSettings), + new PsoStructureEntryInfo(MetaName.Sirens, PsoDataType.Array, 112, 0, (MetaName)9), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleKit), + new PsoStructureEntryInfo(MetaName.Kits, PsoDataType.Array, 128, 0, (MetaName)11), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWheel), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Array, 0, 0, (MetaName)13), + new PsoStructureEntryInfo(MetaName.Wheels, PsoDataType.Array, 144, 4, (MetaName)851982), + new PsoStructureEntryInfo(MetaName.GlobalVariationData, PsoDataType.Structure, 352, 0, (MetaName)3062246906), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleXenonLightColor), + new PsoStructureEntryInfo(MetaName.XenonLightColors, PsoDataType.Array, 376, 0, (MetaName)MetaTypeName.BYTE) + ); + case (MetaName)465922034: //CVehicleModelInfoVarGlobal VehiclePlates + return new PsoStructureInfo((MetaName)465922034, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3027500557), + new PsoStructureEntryInfo(MetaName.Textures, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTexureIndex, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.NumericOffset, PsoDataType.UByte, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AlphabeticOffset, PsoDataType.UByte, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.SpaceOffset, PsoDataType.UByte, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.RandomCharOffset, PsoDataType.UByte, 31, 0, 0), + new PsoStructureEntryInfo(MetaName.NumRandomChar, PsoDataType.UByte, 32, 0, 0) + ); + case (MetaName)3027500557: //CVehicleModelInfoVarGlobal VehiclePlates Texture + return new PsoStructureInfo((MetaName)3027500557, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.TextureSetName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DiffuseMapName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.NormalMapName, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.FontExtents, PsoDataType.Float4, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLettersOnPlate, PsoDataType.Float2, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.FontColor, PsoDataType.UInt, 56, 1, 0), + new PsoStructureEntryInfo(MetaName.FontOutlineColor, PsoDataType.UInt, 60, 1, 0), + new PsoStructureEntryInfo(MetaName.IsFontOutlineEnabled, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.FontOutlineMinMaxDepth, PsoDataType.Float2, 68, 0, 0) + ); + case (MetaName)3062246906: //CVehicleModelInfoVarGlobal GlobalVariationData + return new PsoStructureInfo((MetaName)3062246906, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.xenonLightColor, PsoDataType.UInt, 8, 1, 0), + new PsoStructureEntryInfo(MetaName.xenonCoronaColor, PsoDataType.UInt, 12, 1, 0), + new PsoStructureEntryInfo(MetaName.xenonLightIntensityModifier, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.xenonCoronaIntensityModifier, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CVehicleXenonLightColor: //CVehicleModelInfoVarGlobal XenonLightColors + return new PsoStructureInfo(MetaName.CVehicleXenonLightColor, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.lightColor, PsoDataType.UInt, 8, 1, 0), + new PsoStructureEntryInfo(MetaName.coronaColor, PsoDataType.UInt, 12, 1, 0), + new PsoStructureEntryInfo(MetaName.lightIntensityModifier, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.coronaIntensityModifier, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CVehicleModelColor: //CVehicleModelInfoVarGlobal Colors + return new PsoStructureInfo(MetaName.CVehicleModelColor, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0), + new PsoStructureEntryInfo(MetaName.metallicID, PsoDataType.Enum, 12, 2, (MetaName)360458334), + new PsoStructureEntryInfo(MetaName.audioColor, PsoDataType.Enum, 13, 2, (MetaName)544262540), + new PsoStructureEntryInfo(MetaName.audioPrefix, PsoDataType.Enum, 14, 2, (MetaName)2065815796), + new PsoStructureEntryInfo(MetaName.audioColorHash, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.audioPrefixHash, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.colorName, PsoDataType.String, 24, 1, 0) + ); + case MetaName.CVehicleMetallicSetting: //CVehicleModelInfoVarGlobal MetallicSettings + return new PsoStructureInfo(MetaName.CVehicleMetallicSetting, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.specInt, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.specFalloff, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.specFresnel, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CVehicleWindowColor: //CVehicleModelInfoVarGlobal WindowColors + return new PsoStructureInfo(MetaName.CVehicleWindowColor, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 12, 7, 0) + ); + case MetaName.vehicleLightSettings: //CVehicleModelInfoVarGlobal Lights + return new PsoStructureInfo(MetaName.vehicleLightSettings, 0, 0, 552, + new PsoStructureEntryInfo(MetaName.id, PsoDataType.UByte, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.indicator, PsoDataType.Structure, 16, 0, MetaName.vehicleLight), + new PsoStructureEntryInfo(MetaName.rearIndicatorCorona, PsoDataType.Structure, 64, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.frontIndicatorCorona, PsoDataType.Structure, 120, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.tailLight, PsoDataType.Structure, 176, 0, MetaName.vehicleLight), + new PsoStructureEntryInfo(MetaName.tailLightCorona, PsoDataType.Structure, 224, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.tailLightMiddleCorona, PsoDataType.Structure, 280, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.headLight, PsoDataType.Structure, 336, 0, MetaName.vehicleLight), + new PsoStructureEntryInfo(MetaName.headLightCorona, PsoDataType.Structure, 384, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.reversingLight, PsoDataType.Structure, 440, 0, MetaName.vehicleLight), + new PsoStructureEntryInfo(MetaName.reversingLightCorona, PsoDataType.Structure, 488, 0, MetaName.vehicleCorona), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 544, 1, 0) + ); + case MetaName.vehicleLight: //CVehicleModelInfoVarGlobal Lights Light info + return new PsoStructureInfo(MetaName.vehicleLight, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.falloffMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.falloffExponent, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.innerConeAngle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.outerConeAngle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.emmissiveBoost, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 32, 1, 0), + new PsoStructureEntryInfo(MetaName.textureName, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.mirrorTexture, PsoDataType.Bool, 40, 0, 0) + ); + case MetaName.vehicleCorona: //CVehicleModelInfoVarGlobal Lights Corona info + return new PsoStructureInfo(MetaName.vehicleCorona, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.size, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.size_far, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.intensity_far, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 24, 1, 0), + new PsoStructureEntryInfo(MetaName.numCoronas, PsoDataType.UByte, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.distBetweenCoronas, PsoDataType.UByte, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.distBetweenCoronas_far, PsoDataType.UByte, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.xRotation, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.yRotation, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.zRotation, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.zBias, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.pullCoronaIn, PsoDataType.Bool, 48, 0, 0) + ); + case MetaName.sirenSettings: + return new PsoStructureInfo(MetaName.sirenSettings, 0, 0, 2376, + new PsoStructureEntryInfo(MetaName.id, PsoDataType.UByte, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 16, 1, 0), + new PsoStructureEntryInfo(MetaName.timeMultiplier, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.lightFalloffMax, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.lightFalloffExponent, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.lightInnerConeAngle, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.lightOuterConeAngle, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.lightOffset, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.textureName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.sequencerBpm, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.leftHeadLight, PsoDataType.Structure, 56, 0, (MetaName)188820339), + new PsoStructureEntryInfo(MetaName.rightHeadLight, PsoDataType.Structure, 72, 0, (MetaName)188820339), + new PsoStructureEntryInfo(MetaName.leftTailLight, PsoDataType.Structure, 88, 0, (MetaName)188820339), + new PsoStructureEntryInfo(MetaName.rightTailLight, PsoDataType.Structure, 104, 0, (MetaName)188820339), + new PsoStructureEntryInfo(MetaName.leftHeadLightMultiples, PsoDataType.UByte, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.rightHeadLightMultiples, PsoDataType.UByte, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.leftTailLightMultiples, PsoDataType.UByte, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.rightTailLightMultiples, PsoDataType.UByte, 123, 0, 0), + new PsoStructureEntryInfo(MetaName.useRealLights, PsoDataType.Bool, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenLight), + new PsoStructureEntryInfo(MetaName.sirens, PsoDataType.Array, 128, 1, (MetaName)1310739) + ); + case (MetaName)188820339: + return new PsoStructureInfo((MetaName)188820339, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.sequencer, PsoDataType.UInt, 8, 0, 0) + ); + case MetaName.sirenLight: + return new PsoStructureInfo(MetaName.sirenLight, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Structure, 8, 0, (MetaName)1356743507), + new PsoStructureEntryInfo(MetaName.flashiness, PsoDataType.Structure, 40, 0, (MetaName)1356743507), + new PsoStructureEntryInfo(MetaName.corona, PsoDataType.Structure, 72, 0, MetaName.sirenCorona), + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 96, 1, 0), + new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.lightGroup, PsoDataType.UByte, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.rotate, PsoDataType.Bool, 105, 0, 0), + new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Bool, 106, 0, 0), + new PsoStructureEntryInfo(MetaName.scaleFactor, PsoDataType.UByte, 107, 0, 0), + new PsoStructureEntryInfo(MetaName.flash, PsoDataType.Bool, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.light, PsoDataType.Bool, 109, 0, 0), + new PsoStructureEntryInfo(MetaName.spotLight, PsoDataType.Bool, 110, 0, 0), + new PsoStructureEntryInfo(MetaName.castShadows, PsoDataType.Bool, 111, 0, 0) + ); + case (MetaName)1356743507: + return new PsoStructureInfo((MetaName)1356743507, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.delta, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.start, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.speed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.sequencer, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.multiples, PsoDataType.UByte, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.syncToBpm, PsoDataType.Bool, 26, 0, 0) + ); + case MetaName.sirenCorona: + return new PsoStructureInfo(MetaName.sirenCorona, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.size, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.pull, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.faceCamera, PsoDataType.Bool, 20, 0, 0) + ); + case MetaName.CVehicleKit: + return new PsoStructureInfo(MetaName.CVehicleKit, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.kitName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.id, PsoDataType.UShort, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.kitType, PsoDataType.Enum, 16, 0, MetaName.eModKitType), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModVisible), + new PsoStructureEntryInfo(MetaName.visibleMods, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModLink), + new PsoStructureEntryInfo(MetaName.linkMods, PsoDataType.Array, 40, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModStat), + new PsoStructureEntryInfo(MetaName.statMods, PsoDataType.Array, 56, 0, (MetaName)7), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)427606548), + new PsoStructureEntryInfo(MetaName.slotNames, PsoDataType.Array, 72, 0, (MetaName)9), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.liveryNames, PsoDataType.Array, 88, 0, (MetaName)11), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.livery2Names, PsoDataType.Array, 104, 0, (MetaName)13) + ); + case MetaName.CVehicleModStat: + return new PsoStructureInfo(MetaName.CVehicleModStat, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.identifier, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.modifier, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.audioApply, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.weight, PsoDataType.UByte, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.type, PsoDataType.Enum, 24, 0, MetaName.eVehicleModType) + ); + case MetaName.CVehicleModVisible: + return new PsoStructureInfo(MetaName.CVehicleModVisible, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.modShopLabel, PsoDataType.String, 16, 2, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.linkedModels, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3635907608), + new PsoStructureEntryInfo(MetaName.turnOffBones, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo(MetaName.type, PsoDataType.Enum, 56, 0, MetaName.eVehicleModType), + new PsoStructureEntryInfo(MetaName.bone, PsoDataType.Enum, 60, 0, (MetaName)3635907608), + new PsoStructureEntryInfo(MetaName.collisionBone, PsoDataType.Enum, 64, 0, (MetaName)3635907608), + new PsoStructureEntryInfo(MetaName.cameraPos, PsoDataType.Enum, 68, 0, MetaName.eVehicleModCameraPos), + new PsoStructureEntryInfo(MetaName.audioApply, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.weight, PsoDataType.UByte, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.turnOffExtra, PsoDataType.Bool, 77, 0, 0), + new PsoStructureEntryInfo(MetaName.disableBonnetCamera, PsoDataType.Bool, 78, 0, 0), + new PsoStructureEntryInfo(MetaName.allowBonnetSlide, PsoDataType.Bool, 79, 0, 0), + new PsoStructureEntryInfo(MetaName.weaponSlot, PsoDataType.SByte, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.weaponSlotSecondary, PsoDataType.SByte, 81, 0, 0), + new PsoStructureEntryInfo(MetaName.disableProjectileDriveby, PsoDataType.Bool, 82, 0, 0), + new PsoStructureEntryInfo(MetaName.disableDriveby, PsoDataType.Bool, 83, 0, 0), + new PsoStructureEntryInfo(MetaName.disableDrivebySeat, PsoDataType.SInt, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.disableDrivebySeatSecondary, PsoDataType.SInt, 88, 0, 0) + ); + case (MetaName)427606548: + return new PsoStructureInfo((MetaName)427606548, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.slot, PsoDataType.Enum, 8, 0, MetaName.eVehicleModType), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 16, 2, 0) + ); + case MetaName.CVehicleModLink: + return new PsoStructureInfo(MetaName.CVehicleModLink, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.bone, PsoDataType.Enum, 12, 0, (MetaName)3635907608), + new PsoStructureEntryInfo(MetaName.turnOffExtra, PsoDataType.Bool, 16, 0, 0) + ); + case MetaName.CVehicleWheel: + return new PsoStructureInfo(MetaName.CVehicleWheel, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.wheelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.wheelVariation, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.modShopLabel, PsoDataType.String, 16, 2, 0), + new PsoStructureEntryInfo(MetaName.rimRadius, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.rear, PsoDataType.Bool, 28, 0, 0) + ); + case MetaName.CVehicleModColors: //carmodcols.ymt root + return new PsoStructureInfo(MetaName.CVehicleModColors, 0, 0, 128, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.metallic, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.classic, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.matte, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.metals, PsoDataType.Array, 56, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.chrome, PsoDataType.Array, 72, 0, (MetaName)8), + new PsoStructureEntryInfo(MetaName.pearlescent, PsoDataType.Structure, 88, 0, MetaName.CVehicleModPearlescentColors) + ); + case MetaName.CVehicleModPearlescentColors: + return new PsoStructureInfo(MetaName.CVehicleModPearlescentColors, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.baseCols, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor), + new PsoStructureEntryInfo(MetaName.specCols, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case MetaName.CVehicleModColor: + return new PsoStructureInfo(MetaName.CVehicleModColor, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.col, PsoDataType.UByte, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.spec, PsoDataType.UByte, 17, 0, 0) + ); + case MetaName.CVehicleModelInfoVariation: //carvariations.ymt root + return new PsoStructureInfo(MetaName.CVehicleModelInfoVariation, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)418053801), + new PsoStructureEntryInfo(MetaName.variationData, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)418053801: //CVehicleModelInfoVariation variationData + return new PsoStructureInfo((MetaName)418053801, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 1, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2575850962), + new PsoStructureEntryInfo(MetaName.colors, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.kits, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.windowsWithExposedEdges, PsoDataType.Array, 48, 0, (MetaName)5), + new PsoStructureEntryInfo(MetaName.plateProbabilities, PsoDataType.Structure, 64, 0, MetaName.PlateProbabilities), + new PsoStructureEntryInfo(MetaName.lightSettings, PsoDataType.UByte, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.sirenSettings, PsoDataType.UByte, 89, 0, 0) + ); + case (MetaName)2575850962: //CVehicleModelInfoVariation variationData colors + return new PsoStructureInfo((MetaName)2575850962, 0, 0, 44 /*40*/, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.indices, PsoDataType.Array, 8, 4, (MetaName)393216 /*262144*/), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Bool, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.liveries, PsoDataType.Array, 14 /*12*/, 4, (MetaName)1966082 /*1638402*/) + ); + case MetaName.PlateProbabilities: + return new PsoStructureInfo(MetaName.PlateProbabilities, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)938618322), + new PsoStructureEntryInfo(MetaName.Probabilities, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)938618322: + return new PsoStructureInfo((MetaName)938618322, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.UInt, 12, 0, 0) + ); + case MetaName.CCreditArray: //credits.ymt root + return new PsoStructureInfo(MetaName.CCreditArray, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCreditItem), + new PsoStructureEntryInfo(MetaName.CreditItems, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.CCreditItem: + return new PsoStructureInfo(MetaName.CCreditItem, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.LineType, PsoDataType.Enum, 8, 0, (MetaName)1795685103), + new PsoStructureEntryInfo(MetaName.cTextId1, PsoDataType.String, 16, 3, 0), + new PsoStructureEntryInfo(MetaName.cTextId2, PsoDataType.String, 32, 3, 0) + ); + case MetaName.CDataFileMgr__ContentsOfDataFileXml: + return new PsoStructureInfo(MetaName.CDataFileMgr__ContentsOfDataFileXml, 0, 0, 120, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.disabledFiles, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__DataFileArray), + new PsoStructureEntryInfo(MetaName.includedXmlFiles, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.includedDataFiles, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__DataFile), + new PsoStructureEntryInfo(MetaName.dataFiles, PsoDataType.Array, 56, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ContentChangeSet), + new PsoStructureEntryInfo(MetaName.contentChangeSets, PsoDataType.Array, 72, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.patchFiles, PsoDataType.Array, 88, 0, (MetaName)10), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.allowedFolders, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER) + ); + case MetaName.CDataFileMgr__DataFile: + return new PsoStructureInfo(MetaName.CDataFileMgr__DataFile, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.filename, PsoDataType.String, 8, 0, (MetaName)8388608), + new PsoStructureEntryInfo(MetaName.fileType, PsoDataType.Enum, 136, 0, MetaName.DataFileType), + new PsoStructureEntryInfo(MetaName.registerAs, PsoDataType.String, 144, 3, 0), + new PsoStructureEntryInfo(MetaName.locked, PsoDataType.Bool, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.loadCompletely, PsoDataType.Bool, 161, 0, 0), + new PsoStructureEntryInfo(MetaName.overlay, PsoDataType.Bool, 162, 0, 0), + new PsoStructureEntryInfo(MetaName.patchFile, PsoDataType.Bool, 163, 0, 0), + new PsoStructureEntryInfo(MetaName.disabled, PsoDataType.Bool, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.persistent, PsoDataType.Bool, 165, 0, 0), + new PsoStructureEntryInfo(MetaName.enforceLsnSorting, PsoDataType.Bool, 166, 0, 0), + new PsoStructureEntryInfo(MetaName.contents, PsoDataType.Enum, 168, 0, MetaName.DataFileContents), + new PsoStructureEntryInfo(MetaName.installPartition, PsoDataType.Enum, 172, 0, MetaName.InstallPartition) + ); + case MetaName.CLevelData: //levels.ymt root + return new PsoStructureInfo(MetaName.CLevelData, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sLevelData), + new PsoStructureEntryInfo(MetaName.aLevelsData, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.sLevelData: + return new PsoStructureInfo(MetaName.sLevelData, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.cFriendlyName, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo(MetaName.cTitle, PsoDataType.String, 24, 3, 0), + new PsoStructureEntryInfo(MetaName.cFilename, PsoDataType.String, 40, 3, 0), + new PsoStructureEntryInfo(MetaName.cBugstarName, PsoDataType.String, 56, 3, 0) + ); + case (MetaName)1056751197: //mapdatacullboxes.ymt root + return new PsoStructureInfo((MetaName)1056751197, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)322201475), + new PsoStructureEntryInfo(MetaName.entries, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)322201475: + return new PsoStructureInfo((MetaName)322201475, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.aabb, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)4022397219, PsoDataType.Array, 48, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.bEnabled, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.rage__spdAABB: + return new PsoStructureInfo(MetaName.rage__spdAABB, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.min, PsoDataType.Float4a, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.max, PsoDataType.Float4a, 16, 0, 0) + ); + case MetaName.CPedModelInfo__InitDataList: + return new PsoStructureInfo(MetaName.CPedModelInfo__InitDataList, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.residentTxd, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.residentAnims, PsoDataType.Array, 24, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedModelInfo__InitData), + new PsoStructureEntryInfo(MetaName.InitDatas, PsoDataType.Array, 40, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTxdRelationship), + new PsoStructureEntryInfo(MetaName.txdRelationships, PsoDataType.Array, 56, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CMultiTxdRelationship), + new PsoStructureEntryInfo(MetaName.multiTxdRelationships, PsoDataType.Array, 72, 0, (MetaName)7) + ); + case MetaName.CPedModelInfo__InitData: + return new PsoStructureInfo(MetaName.CPedModelInfo__InitData, 0, 0, 296, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.PropsName, PsoDataType.String, 16, 2, 0), + new PsoStructureEntryInfo(MetaName.ClipDictionaryName, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.BlendShapeFileName, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo(MetaName.ExpressionSetName, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.ExpressionDictionaryName, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.ExpressionName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.Pedtype, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.MovementClipSet, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.MovementClipSets, PsoDataType.Array, 56, 0, (MetaName)9), + new PsoStructureEntryInfo(MetaName.StrafeClipSet, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.MovementToStrafeClipSet, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo(MetaName.InjuredStrafeClipSet, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo(MetaName.FullBodyDamageClipSet, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.AdditiveDamageClipSet, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultGestureClipSet, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo(MetaName.FacialClipsetGroupName, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultVisemeClipSet, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo(MetaName.SidestepClipSet, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo(MetaName.PoseMatcherName, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.PoseMatcherProneName, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo(MetaName.GetupSetHash, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.CreatureMetadataName, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo(MetaName.DecisionMakerName, PsoDataType.String, 124, 7, 0), + new PsoStructureEntryInfo(MetaName.MotionTaskDataSetName, PsoDataType.String, 128, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultTaskDataSetName, PsoDataType.String, 132, 7, 0), + new PsoStructureEntryInfo(MetaName.PedCapsuleName, PsoDataType.String, 136, 7, 0), + new PsoStructureEntryInfo(MetaName.PedLayoutName, PsoDataType.String, 140, 7, 0), + new PsoStructureEntryInfo(MetaName.PedComponentSetName, PsoDataType.String, 144, 7, 0), + new PsoStructureEntryInfo(MetaName.PedComponentClothName, PsoDataType.String, 148, 7, 0), + new PsoStructureEntryInfo(MetaName.PedIKSettingsName, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo(MetaName.TaskDataName, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo(MetaName.IsStreamedGfx, PsoDataType.Bool, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbulanceShouldRespondTo, PsoDataType.Bool, 161, 0, 0), + new PsoStructureEntryInfo(MetaName.CanRideBikeWithNoHelmet, PsoDataType.Bool, 162, 0, 0), + new PsoStructureEntryInfo(MetaName.CanSpawnInCar, PsoDataType.Bool, 163, 0, 0), + new PsoStructureEntryInfo(MetaName.IsHeadBlendPed, PsoDataType.Bool, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.bOnlyBulkyItemVariations, PsoDataType.Bool, 165, 0, 0), + new PsoStructureEntryInfo(MetaName.RelationshipGroup, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo(MetaName.NavCapabilitiesName, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo(MetaName.PerceptionInfo, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBrawlingStyle, PsoDataType.String, 180, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultUnarmedWeapon, PsoDataType.String, 184, 7, 0), + new PsoStructureEntryInfo(MetaName.Personality, PsoDataType.String, 188, 7, 0), + new PsoStructureEntryInfo(MetaName.CombatInfo, PsoDataType.String, 192, 7, 0), + new PsoStructureEntryInfo(MetaName.VfxInfoName, PsoDataType.String, 196, 7, 0), + new PsoStructureEntryInfo(MetaName.AmbientClipsForFlee, PsoDataType.String, 200, 7, 0), + new PsoStructureEntryInfo(MetaName.Radio1, PsoDataType.Enum, 204, 0, MetaName.ePedRadioGenre), + new PsoStructureEntryInfo(MetaName.Radio2, PsoDataType.Enum, 208, 0, MetaName.ePedRadioGenre), + new PsoStructureEntryInfo(MetaName.FUpOffset, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.RUpOffset, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.FFrontOffset, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.RFrontOffset, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.MinActivationImpulse, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.Stubble, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.HDDist, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetingThreatModifier, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.KilledPerceptionRangeModifer, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eSexinessFlags), + new PsoStructureEntryInfo(MetaName.Sexiness, PsoDataType.Flags, 248, 0, (MetaName)2097211), + new PsoStructureEntryInfo(MetaName.Age, PsoDataType.UByte, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPassengersInCar, PsoDataType.UByte, 253, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eExternallyDrivenDOFs), + new PsoStructureEntryInfo(MetaName.ExternallyDrivenDOFs, PsoDataType.Flags, 254, 2, (MetaName)327743), + new PsoStructureEntryInfo(MetaName.PedVoiceGroup, PsoDataType.String, 256, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimalAudioObject, PsoDataType.String, 260, 7, 0), + new PsoStructureEntryInfo(MetaName.AbilityType, PsoDataType.Enum, 264, 0, MetaName.SpecialAbilityType), + new PsoStructureEntryInfo(MetaName.ThermalBehaviour, PsoDataType.Enum, 268, 0, MetaName.ThermalBehaviour), + new PsoStructureEntryInfo(MetaName.SuperlodType, PsoDataType.Enum, 272, 0, MetaName.eSuperlodType), + new PsoStructureEntryInfo(MetaName.ScenarioPopStreamingSlot, PsoDataType.Enum, 276, 0, MetaName.eScenarioPopStreamingSlot), + new PsoStructureEntryInfo(MetaName.DefaultSpawningPreference, PsoDataType.Enum, 280, 0, MetaName.DefaultSpawnPreference), + new PsoStructureEntryInfo(MetaName.DefaultRemoveRangeMultiplier, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowCloseSpawning, PsoDataType.Bool, 288, 0, 0) + ); + case MetaName.CMultiTxdRelationship: + return new PsoStructureInfo(MetaName.CMultiTxdRelationship, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.children, PsoDataType.Array, 24, 0, (MetaName)1) + ); + case MetaName.CPlayerSpecialAbilityManager: + return new PsoStructureInfo(MetaName.CPlayerSpecialAbilityManager, 0, 0, 64, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4125685004), + new PsoStructureEntryInfo(MetaName.specialAbilities, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.smallCharge, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.mediumCharge, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.largeCharge, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.continuousCharge, PsoDataType.SInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fadeCurveType, PsoDataType.Enum, 40, 0, MetaName.eFadeCurveType), + new PsoStructureEntryInfo(MetaName.halfSigmoidConstant, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.sigmoidConstant, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fadeInTime, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fadeOutTime, PsoDataType.Float, 56, 0, 0) + ); + case (MetaName)4125685004: + return new PsoStructureInfo((MetaName)4125685004, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.duration, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.initialUnlockedCap, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.timeWarpScale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.damageMultiplier, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.defenseMultiplier, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.depletionMultiplier, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.chargeMultiplier, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fxName, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.outFxName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.activeAnimSet, PsoDataType.String, 44, 7, 0) + ); + case MetaName.CDataFileMgr__ContentChangeSet: + return new PsoStructureInfo(MetaName.CDataFileMgr__ContentChangeSet, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.changeSetName, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ChangeSetData), + new PsoStructureEntryInfo(MetaName.mapChangeSetData, PsoDataType.Array, 24, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.filesToInvalidate, PsoDataType.Array, 40, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.filesToDisable, PsoDataType.Array, 56, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.filesToEnable, PsoDataType.Array, 72, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.txdToLoad, PsoDataType.Array, 88, 0, (MetaName)9), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.txdToUnload, PsoDataType.Array, 104, 0, (MetaName)11), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ResourceReference), + new PsoStructureEntryInfo(MetaName.residentResources, PsoDataType.Array, 120, 0, (MetaName)13), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CDataFileMgr__ResourceReference), + new PsoStructureEntryInfo(MetaName.unregisterResources, PsoDataType.Array, 136, 0, (MetaName)15), + new PsoStructureEntryInfo(MetaName.requiresLoadingScreen, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.executionConditions, PsoDataType.Structure, 160, 0, MetaName.ExecutionConditions) + ); + case MetaName.ExecutionConditions: + return new PsoStructureInfo(MetaName.ExecutionConditions, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.ExecutionCondition), + new PsoStructureEntryInfo(MetaName.activeChangesetConditions, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.fwClipSetManager: + return new PsoStructureInfo(MetaName.fwClipSetManager, 0, 0, 128, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.clipSets, PsoDataType.Map, 8, 1, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fwClipDictionaryMetadata), + new PsoStructureEntryInfo(MetaName.clipDictionaryMetadatas, PsoDataType.Map, 32, 1, (MetaName)196612), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fwMemoryGroupMetadata), + new PsoStructureEntryInfo(MetaName.memoryGroupMetadatas, PsoDataType.Map, 56, 1, (MetaName)393223), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3219912345), + new PsoStructureEntryInfo((MetaName)3532340754, PsoDataType.Map, 80, 1, (MetaName)589834),//memory group modifiers + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.clipVariationSets, PsoDataType.Map, 104, 1, (MetaName)786445)//move network flags dictionary + ); + case (MetaName)MetaTypeName.ARRAYINFO://default map node entry, with a structure pointer + return new PsoStructureInfo((MetaName)MetaTypeName.ARRAYINFO, 0, 2, 16, + new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 3, 0) + ); + case MetaName.fwClipSet: + return new PsoStructureInfo(MetaName.fwClipSet, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.fallbackId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.clipDictionaryName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.clipItems, PsoDataType.Map, 16, 1, (MetaName)131075), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.moveNetworkFlags, PsoDataType.Array, 40, 0, (MetaName)5) + ); + case MetaName.fwDirectedClipItemWithProps: + return new PsoStructureInfo(MetaName.fwDirectedClipItemWithProps, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eAnimPlayerFlag), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), + new PsoStructureEntryInfo(MetaName.priority, PsoDataType.Enum, 12, 0, MetaName.eAnimPriority), + new PsoStructureEntryInfo(MetaName.boneMask, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.fwClipItemWithProps: + return new PsoStructureInfo(MetaName.fwClipItemWithProps, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eAnimPlayerFlag), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), + new PsoStructureEntryInfo(MetaName.priority, PsoDataType.Enum, 12, 0, MetaName.eAnimPriority), + new PsoStructureEntryInfo(MetaName.boneMask, PsoDataType.String, 16, 7, 0) + ); + case MetaName.fwClipItem: + return new PsoStructureInfo(MetaName.fwClipItem, 0, 0, 8 //empty struct... possibly abstract/base class + ); + case MetaName.fwClipSetWithGetup: //creature/animal clip set? + return new PsoStructureInfo(MetaName.fwClipSetWithGetup, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.fallbackId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.clipDictionaryName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.clipItems, PsoDataType.Map, 16, 1, (MetaName)131075), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.moveNetworkFlags, PsoDataType.Array, 40, 0, (MetaName)5), + new PsoStructureEntryInfo(MetaName.GetupSet, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo(MetaName.DeadBlendOutSet, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo(MetaName.AllowAnimatedDeadFall, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AnimatedDeadFallSet, PsoDataType.String, 68, 7, 0) + ); + case MetaName.fwClipDictionaryMetadata: + return new PsoStructureInfo(MetaName.fwClipDictionaryMetadata, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.eStreamingPolicy), + new PsoStructureEntryInfo(MetaName.streamingPolicy, PsoDataType.Flags, 8, 0, (MetaName)2097152), + new PsoStructureEntryInfo(MetaName.memoryGroup, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.streamingPriority, PsoDataType.Enum, 16, 0, MetaName.eStreamingPriority) + ); + case MetaName.fwMemoryGroupMetadata: + return new PsoStructureInfo(MetaName.fwMemoryGroupMetadata, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)676191063, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1661025772, PsoDataType.UInt, 12, 0, 0) + ); + case (MetaName)3219912345://clip sets memory group modifier? + return new PsoStructureInfo((MetaName)3219912345, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2356519750), + new PsoStructureEntryInfo(MetaName.Adjustments, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)2356519750: //clip sets memory group modifier adjustment + return new PsoStructureInfo((MetaName)2356519750, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MemoryGroup, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Amount, PsoDataType.SInt, 12, 0, 0) + ); + case MetaName.fwClipVariationSet: //clip sets move network flags list/group? + return new PsoStructureInfo(MetaName.fwClipVariationSet, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.clips, PsoDataType.Array, 8, 0, 0) + ); + //case (MetaName)257://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo + // return new PsoStructureInfo((MetaName)257, 0, 2, 32, + // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), + // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, MetaName.fwClipDictionaryMetadata) + // ); + //case (MetaName)258://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo + // return new PsoStructureInfo((MetaName)258, 0, 2, 24, + // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), + // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, MetaName.fwMemoryGroupMetadata) + // ); + //case (MetaName)259://this shouldn't really be in here, because it's dynamically generated, see PsoBuilder.AddMapNodeStructureInfo + // return new PsoStructureInfo((MetaName)259, 0, 2, 32, + // new PsoStructureEntryInfo(MetaName.Key, PsoDataType.String, 0, 7, 0), + // new PsoStructureEntryInfo(MetaName.Item, PsoDataType.Structure, 8, 0, (MetaName)3219912345) + // ); + case MetaName.AnimPostFXManager: + return new PsoStructureInfo(MetaName.AnimPostFXManager, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2319197961), + new PsoStructureEntryInfo(MetaName.RegisteredStacks, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)2319197961: + return new PsoStructureInfo((MetaName)2319197961, 0, 0, 384, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FXStack, PsoDataType.Structure, 16, 0, (MetaName)2675557154), + new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.UByte, 376, 0, 0) + ); + case (MetaName)2675557154: + return new PsoStructureInfo((MetaName)2675557154, 0, 0, 360, + new PsoStructureEntryInfo(MetaName.LayerBlend, PsoDataType.Structure, 8, 0, (MetaName)2367955297), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.AnimatedPostFX), + new PsoStructureEntryInfo(MetaName.Layers, PsoDataType.Array, 48, 1, (MetaName)393217), + new PsoStructureEntryInfo(MetaName.GroupId, PsoDataType.SInt, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)1991133938, PsoDataType.UInt, 348, 0, 0), + new PsoStructureEntryInfo((MetaName)4185090704, PsoDataType.UInt, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.EventType, PsoDataType.Enum, 356, 0, (MetaName)2168155209) + ); + case (MetaName)2367955297: + return new PsoStructureInfo((MetaName)2367955297, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.LayerA, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.LayerB, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.FrequencyNoise, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AmplitudeNoise, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.Frequency, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.Bias, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.AnimatedPostFX: + return new PsoStructureInfo(MetaName.AnimatedPostFX, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.ModifierName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimMode, PsoDataType.Enum, 12, 0, (MetaName)2476021071), + new PsoStructureEntryInfo(MetaName.StartDelayDuration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.InDuration, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HoldDuration, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.OutDuration, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.LoopMode, PsoDataType.Enum, 36, 0, (MetaName)3696221852), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 40, 0, 0) + ); + case (MetaName)1300198536: + return new PsoStructureInfo((MetaName)1300198536, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.LensArtefact), + new PsoStructureEntryInfo(MetaName.layers, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.LensArtefact: + return new PsoStructureInfo(MetaName.LensArtefact, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.blurType, PsoDataType.Enum, 12, 0, (MetaName)3261591327), + new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.offset, PsoDataType.Float2, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.colorShift, PsoDataType.UInt, 32, 1, 0), + new PsoStructureEntryInfo(MetaName.opacity, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2600565536, PsoDataType.Enum, 40, 0, (MetaName)516897642), + new PsoStructureEntryInfo((MetaName)1250212400, PsoDataType.Float2, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.streakDirection, PsoDataType.Enum, 52, 0, (MetaName)2665868448), + new PsoStructureEntryInfo(MetaName.enabled, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.sortIndex, PsoDataType.SInt, 60, 0, 0) + ); + case MetaName.CPtFxAssetInfoMgr: + return new PsoStructureInfo(MetaName.CPtFxAssetInfoMgr, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.ptfxAssetDependencyInfos, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.CPtFxAssetDependencyInfo: + return new PsoStructureInfo(MetaName.CPtFxAssetDependencyInfo, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.parentName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.childName, PsoDataType.String, 12, 7, 0) + ); + case MetaName.CVfxFogVolumeInfoMgr: + return new PsoStructureInfo(MetaName.CVfxFogVolumeInfoMgr, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxFogVolumeInfos, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.CVfxFogVolumeInfo: + return new PsoStructureInfo(MetaName.CVfxFogVolumeInfo, 0, 0, 112, + new PsoStructureEntryInfo((MetaName)4135301713, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1768347469, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.colR, PsoDataType.UByte, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.colG, PsoDataType.UByte, 65, 0, 0), + new PsoStructureEntryInfo(MetaName.colB, PsoDataType.UByte, 66, 0, 0), + new PsoStructureEntryInfo(MetaName.colA, PsoDataType.UByte, 67, 0, 0), + new PsoStructureEntryInfo(MetaName.hdrMult, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.range, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.density, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.falloff, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.interiorHash, PsoDataType.Long, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.isUnderwater, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.lightingType, PsoDataType.Enum, 100, 0, (MetaName)2628996780) + ); + case MetaName.CVfxInteriorInfoMgr: + return new PsoStructureInfo(MetaName.CVfxInteriorInfoMgr, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxInteriorSetups, PsoDataType.Map, 8, 1, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxInteriorInfos, PsoDataType.Map, 32, 1, (MetaName)196612) + ); + case MetaName.CVfxInteriorSetup: + return new PsoStructureInfo(MetaName.CVfxInteriorSetup, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.interiorInfoName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxRoomSetups, PsoDataType.Map, 16, 1, (MetaName)65538) + ); + case MetaName.CVfxRoomSetup: + return new PsoStructureInfo(MetaName.CVfxRoomSetup, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.interiorInfoName, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CVfxInteriorInfo: + return new PsoStructureInfo(MetaName.CVfxInteriorInfo, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.smokePtFxEnabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.smokePtFxName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.smokePtFxLevelOverride, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.dustPtFxEnabled, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.dustPtFxName, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.dustPtFxEvo, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CVfxPedInfoMgr: + return new PsoStructureInfo(MetaName.CVfxPedInfoMgr, 0, 0, 224, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)1639857157, PsoDataType.Map, 8, 1, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)190681942, PsoDataType.Map, 32, 1, (MetaName)196612), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)866013965, PsoDataType.Map, 56, 1, (MetaName)393223), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)619497315, PsoDataType.Map, 80, 1, (MetaName)589834), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)1719780883, PsoDataType.Map, 104, 1, (MetaName)786445), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)2436902422, PsoDataType.Map, 128, 1, (MetaName)983056), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)670699231, PsoDataType.Map, 152, 1, (MetaName)1179667), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)161646760, PsoDataType.Map, 176, 1, (MetaName)1376278), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxPedInfos, PsoDataType.Map, 200, 1, (MetaName)1572889) + ); + case (MetaName)3745427162: + return new PsoStructureInfo((MetaName)3745427162, 0, 0, 104, + new PsoStructureEntryInfo((MetaName)2328909272, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3928010395, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)1667415425, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3934831401, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2811575072, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3485910056, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)924601972, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2748666322, PsoDataType.SInt, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2717336085, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)383606187, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1201928922, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2683338794, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)244388834, PsoDataType.SInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3603110778, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1531021558, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1193506380, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)1561972343, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)2527519128, PsoDataType.SInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.decalWidth, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.decalLength, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)1369041264, PsoDataType.UByte, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1201263928, PsoDataType.UByte, 89, 0, 0), + new PsoStructureEntryInfo((MetaName)1596752989, PsoDataType.UByte, 90, 0, 0), + new PsoStructureEntryInfo((MetaName)2768457985, PsoDataType.UByte, 91, 0, 0), + new PsoStructureEntryInfo((MetaName)1822646338, PsoDataType.UByte, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)2318441304, PsoDataType.UByte, 93, 0, 0), + new PsoStructureEntryInfo(MetaName.decalLife, PsoDataType.Float, 96, 0, 0) + ); + case (MetaName)1299390333: + return new PsoStructureInfo((MetaName)1299390333, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)634726437, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)1754146930, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)4279228573, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxScale, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2425920550: + return new PsoStructureInfo((MetaName)2425920550, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)3741812782, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2206302043, PsoDataType.String, 12, 7, 0) + ); + case (MetaName)1811001251: + return new PsoStructureInfo((MetaName)1811001251, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.decalId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3806811108, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)3913505542, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3041920342, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2666183704, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1369041264, PsoDataType.UByte, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1201263928, PsoDataType.UByte, 29, 0, 0), + new PsoStructureEntryInfo((MetaName)1596752989, PsoDataType.UByte, 30, 0, 0) + ); + case (MetaName)1559486096: + return new PsoStructureInfo((MetaName)1559486096, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ptFxDepthEvoMin, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxDepthEvoMax, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxSpeedEvoMin, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxSpeedEvoMax, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)4188307664: + return new PsoStructureInfo((MetaName)4188307664, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)3741812782, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2206302043, PsoDataType.String, 12, 7, 0) + ); + case (MetaName)1073939452: + return new PsoStructureInfo((MetaName)1073939452, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.sizeEvo, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.depthMult, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.speedMult, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.widthRatio, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2217981082: + return new PsoStructureInfo((MetaName)2217981082, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.sampleSize, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.boneSize, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2990477260, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxEnabled, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxEnabled, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxEnabled, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxEnabled, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2545172352, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxRange, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxRange, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxRange, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxRange, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1146082049, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CVfxPedInfo: + return new PsoStructureInfo(MetaName.CVfxPedInfo, 0, 0, 512, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)231867887), + new PsoStructureEntryInfo((MetaName)293516458, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1904273735), + new PsoStructureEntryInfo((MetaName)4005470263, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)1938733863, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2108095349, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)898188953, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)815580680, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)728045365, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1340027467, PsoDataType.Bool, 57, 0, 0), + new PsoStructureEntryInfo((MetaName)1185708987, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)3067401171, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)267862759, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)481653295, PsoDataType.Bool, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3695423274, PsoDataType.Bool, 73, 0, 0), + new PsoStructureEntryInfo((MetaName)1954970508, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1273209835, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)1481826432, PsoDataType.Bool, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)1210003497, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)3343556845, PsoDataType.Bool, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)300193613, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)2234775971, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)2648212357, PsoDataType.Bool, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)2189031336, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)1537566823, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)2106749959, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)621919678, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)1944160314, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)537443923, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1293634249, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)1694886060, PsoDataType.Bool, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3575961872, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)423449081, PsoDataType.String, 144, 7, 0), + new PsoStructureEntryInfo((MetaName)4063560113, PsoDataType.Bool, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1810355587), + new PsoStructureEntryInfo((MetaName)1379225165, PsoDataType.Array, 152, 0, (MetaName)34), + new PsoStructureEntryInfo((MetaName)2002559884, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)717291862, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)606684208, PsoDataType.Bool, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)2292742472, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1437576219, PsoDataType.String, 184, 7, 0), + new PsoStructureEntryInfo((MetaName)3754033729, PsoDataType.Enum, 188, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)1020967481, PsoDataType.Enum, 192, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)2592389483, PsoDataType.Bool, 196, 0, 0), + new PsoStructureEntryInfo((MetaName)4054422403, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo((MetaName)740137113, PsoDataType.String, 204, 7, 0), + new PsoStructureEntryInfo((MetaName)1841095686, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)886073686, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo((MetaName)1055815172, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo((MetaName)2913384203, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo((MetaName)3977079346, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo((MetaName)3136327436, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo((MetaName)2168759960, PsoDataType.Bool, 232, 0, 0), + new PsoStructureEntryInfo((MetaName)2723487263, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo((MetaName)1349459576, PsoDataType.String, 240, 7, 0), + new PsoStructureEntryInfo((MetaName)2366514623, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo((MetaName)194784077, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo((MetaName)1052325933, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo((MetaName)2774545125, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo((MetaName)431439807, PsoDataType.Bool, 260, 0, 0), + new PsoStructureEntryInfo((MetaName)2591692617, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo((MetaName)2631634259, PsoDataType.String, 268, 7, 0), + new PsoStructureEntryInfo((MetaName)3959299203, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)2821295083, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo((MetaName)3995586056, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo((MetaName)3353201139, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo((MetaName)412619038, PsoDataType.Bool, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)1889989706, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo((MetaName)3972116805, PsoDataType.Bool, 296, 0, 0), + new PsoStructureEntryInfo((MetaName)4143286255, PsoDataType.String, 300, 7, 0), + new PsoStructureEntryInfo((MetaName)30217815, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)1079949132, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo((MetaName)4224134658, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)901763385, PsoDataType.Bool, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)3950900138, PsoDataType.String, 320, 7, 0), + new PsoStructureEntryInfo((MetaName)10501246, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo((MetaName)4131076032, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo((MetaName)1327278534, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxName, PsoDataType.String, 336, 7, 0), + new PsoStructureEntryInfo((MetaName)374673880, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo((MetaName)1335117116, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)4258146773, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxName, PsoDataType.String, 352, 7, 0), + new PsoStructureEntryInfo((MetaName)4020845257, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)1518647754, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxName, PsoDataType.String, 364, 7, 0), + new PsoStructureEntryInfo((MetaName)4021444798, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)2149475580, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxName, PsoDataType.String, 376, 7, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMin, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMax, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo((MetaName)4096431642, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo((MetaName)415880732, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo((MetaName)3919360765, PsoDataType.String, 396, 7, 0), + new PsoStructureEntryInfo((MetaName)3723675330, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo((MetaName)3295859425, PsoDataType.Bool, 404, 0, 0), + new PsoStructureEntryInfo((MetaName)1659367240, PsoDataType.String, 408, 7, 0), + new PsoStructureEntryInfo((MetaName)2238873027, PsoDataType.String, 412, 7, 0), + new PsoStructureEntryInfo((MetaName)3354804163, PsoDataType.String, 416, 7, 0), + new PsoStructureEntryInfo((MetaName)1800302370, PsoDataType.String, 420, 7, 0), + new PsoStructureEntryInfo((MetaName)2345868328, PsoDataType.String, 424, 7, 0), + new PsoStructureEntryInfo((MetaName)2719523535, PsoDataType.Float, 428, 0, 0), + new PsoStructureEntryInfo((MetaName)460277230, PsoDataType.Float, 432, 0, 0), + new PsoStructureEntryInfo((MetaName)4222549442, PsoDataType.Float, 436, 0, 0), + new PsoStructureEntryInfo((MetaName)2205812843, PsoDataType.Bool, 440, 0, 0), + new PsoStructureEntryInfo((MetaName)2543787987, PsoDataType.Float, 444, 0, 0), + new PsoStructureEntryInfo((MetaName)789559375, PsoDataType.String, 448, 7, 0), + new PsoStructureEntryInfo((MetaName)610648776, PsoDataType.Enum, 452, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)2321865573, PsoDataType.Bool, 456, 0, 0), + new PsoStructureEntryInfo((MetaName)3482316648, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo((MetaName)3414327374, PsoDataType.String, 464, 7, 0), + new PsoStructureEntryInfo((MetaName)3991249477, PsoDataType.Enum, 468, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)3633780286, PsoDataType.Bool, 472, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3663974917), + new PsoStructureEntryInfo((MetaName)1614411627, PsoDataType.Array, 480, 0, (MetaName)113), + new PsoStructureEntryInfo((MetaName)2158250314, PsoDataType.Bool, 496, 0, 0), + new PsoStructureEntryInfo((MetaName)2801240542, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo((MetaName)1702406422, PsoDataType.String, 504, 7, 0) + ); + case (MetaName)231867887: + return new PsoStructureInfo((MetaName)231867887, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.vfxGroup, PsoDataType.Enum, 8, 0, MetaName.eVfxGroup), + new PsoStructureEntryInfo((MetaName)3557178741, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)3535009775, PsoDataType.String, 16, 7, 0) + ); + case (MetaName)1904273735: + return new PsoStructureInfo((MetaName)1904273735, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 8, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo(MetaName.limbId, PsoDataType.Enum, 16, 0, (MetaName)726948528), + new PsoStructureEntryInfo((MetaName)1061041502, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo((MetaName)2989606868, PsoDataType.String, 24, 7, 0) + ); + case (MetaName)1810355587: + return new PsoStructureInfo((MetaName)1810355587, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 16, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo(MetaName.limbId, PsoDataType.SInt, 20, 0, 0) + ); + case (MetaName)3663974917: + return new PsoStructureInfo((MetaName)3663974917, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ptFxName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2366957880, PsoDataType.Enum, 12, 0, MetaName.eAnimBoneTag), + new PsoStructureEntryInfo((MetaName)1407284946, PsoDataType.Enum, 16, 0, MetaName.eAnimBoneTag) + ); + case MetaName.CVfxRegionInfoMgr: + return new PsoStructureInfo(MetaName.CVfxRegionInfoMgr, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxRegionInfos, PsoDataType.Map, 8, 1, (MetaName)1) + ); + case MetaName.CVfxRegionInfo: + return new PsoStructureInfo(MetaName.CVfxRegionInfo, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.windDebrisPtFxEnabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.windDebrisPtFxName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), + new PsoStructureEntryInfo((MetaName)157134441, PsoDataType.Array, 16, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), + new PsoStructureEntryInfo((MetaName)2975635968, PsoDataType.Array, 32, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)215011533), + new PsoStructureEntryInfo((MetaName)3751751493, PsoDataType.Array, 48, 0, (MetaName)6) + ); + case (MetaName)215011533: + return new PsoStructureInfo((MetaName)215011533, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.gpuPtFxEnabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)28713766, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)3099312282, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3614737265, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2437695423, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1775217766, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1202806570, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)4204794351, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)634319578, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)552536380, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CVfxVehicleInfoMgr: + return new PsoStructureInfo(MetaName.CVfxVehicleInfoMgr, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.vfxVehicleInfos, PsoDataType.Map, 8, 1, (MetaName)1) + ); + case MetaName.CVfxVehicleInfo: + return new PsoStructureInfo(MetaName.CVfxVehicleInfo, 0, 0, 880, + new PsoStructureEntryInfo(MetaName.mtlBangPtFxVehicleEvo, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.mtlBangPtFxVehicleScale, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.mtlScrapePtFxVehicleEvo, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.mtlScrapePtFxVehicleScale, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxEnabled, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxName, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxCutOffSpeed, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxRange, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxScale, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxSpeedEvoMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxSpeedEvoMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxTempEvoMin, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxTempEvoMax, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.exhaustPtFxThrottleEvoOnGearChange, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.engineStartupPtFxEnabled, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.engineStartupPtFxName, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.engineStartupPtFxRange, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.misfirePtFxEnabled, PsoDataType.Bool, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.misfirePtFxName, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo(MetaName.misfirePtFxRange, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.backfirePtFxEnabled, PsoDataType.Bool, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.backfirePtFxName, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo(MetaName.backfirePtFxRange, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxEnabled, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxHasPanel, PsoDataType.Bool, 97, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxHasRotorEvo, PsoDataType.Bool, 98, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxNoPanelName, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxPanelOpenName, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxPanelShutName, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxRange, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxSpeedEvoMin, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.engineDamagePtFxSpeedEvoMax, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxEnabled, PsoDataType.Bool, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxName, PsoDataType.String, 128, 7, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxRange, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxAngleThresh, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxSpeedThresh, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.overturnedSmokePtFxEngineHealthThresh, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxEnabled, PsoDataType.Bool, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxOilName, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxPetrolName, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxRange, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxSpeedEvoMin, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.leakPtFxSpeedEvoMax, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelGenericPtFxSet, PsoDataType.SInt, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelGenericDecalSet, PsoDataType.SInt, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelGenericRangeMult, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelSkidmarkRearOnly, PsoDataType.Bool, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelSkidmarkSlipMult, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelSkidmarkPressureMult, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelFrictionPtFxFricMult, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelDisplacementPtFxDispMult, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelBurnoutPtFxFricMult, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelBurnoutPtFxTempMult, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelLowLodPtFxScale, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelPuncturePtFxName, PsoDataType.String, 216, 7, 0), + new PsoStructureEntryInfo(MetaName.wheelPuncturePtFxRange, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelBurstPtFxName, PsoDataType.String, 224, 7, 0), + new PsoStructureEntryInfo(MetaName.wheelBurstPtFxRange, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelFirePtFxName, PsoDataType.String, 232, 7, 0), + new PsoStructureEntryInfo(MetaName.wheelFirePtFxRange, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelFirePtFxSpeedEvoMin, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.wheelFirePtFxSpeedEvoMax, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFirePtFxEnabled, PsoDataType.Bool, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFirePtFxName, PsoDataType.String, 252, 7, 0), + new PsoStructureEntryInfo(MetaName.wreckedFirePtFxDurationMin, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFirePtFxDurationMax, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFirePtFxRadius, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxEnabled, PsoDataType.Bool, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxName, PsoDataType.String, 272, 7, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxDurationMin, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxDurationMax, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2PtFxRadius, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2UseOverheatBone, PsoDataType.Bool, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire2OffsetPos, PsoDataType.Float3, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxEnabled, PsoDataType.Bool, 320, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxName, PsoDataType.String, 324, 7, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxDurationMin, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxDurationMax, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3PtFxRadius, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3UseOverheatBone, PsoDataType.Bool, 340, 0, 0), + new PsoStructureEntryInfo(MetaName.wreckedFire3OffsetPos, PsoDataType.Float3, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxName, PsoDataType.String, 368, 7, 0), + new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxRange, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxSpeedEvoMin, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxSpeedEvoMax, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.petrolTankFirePtFxRadius, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxEnabled, PsoDataType.Bool, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxRange, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxName, PsoDataType.String, 396, 7, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxSpeedEvoMin, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxSpeedEvoMax, PsoDataType.Float, 404, 0, 0), + new PsoStructureEntryInfo(MetaName.boatEntryPtFxScale, PsoDataType.Float, 408, 0, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxEnabled, PsoDataType.Bool, 412, 0, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxRange, PsoDataType.Float, 416, 0, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxName, PsoDataType.String, 420, 7, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxSpeedEvoMin, PsoDataType.Float, 424, 0, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxSpeedEvoMax, PsoDataType.Float, 428, 0, 0), + new PsoStructureEntryInfo(MetaName.boatExitPtFxScale, PsoDataType.Float, 432, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxEnabled, PsoDataType.Bool, 436, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxRange, PsoDataType.Float, 440, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardName, PsoDataType.String, 444, 7, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxReverseName, PsoDataType.String, 448, 7, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardMountedName, PsoDataType.String, 452, 7, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxForwardMountedOffset, PsoDataType.Float3, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxSpeedEvoMin, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxSpeedEvoMax, PsoDataType.Float, 484, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxKeelEvoMin, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxKeelEvoMax, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxScale, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.boatBowPtFxReverseOffset, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxEnabled, PsoDataType.Bool, 504, 0, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxRange, PsoDataType.Float, 508, 0, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxName, PsoDataType.String, 512, 7, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxSpeedEvoMin, PsoDataType.Float, 516, 0, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxSpeedEvoMax, PsoDataType.Float, 520, 0, 0), + new PsoStructureEntryInfo(MetaName.boatWashPtFxScale, PsoDataType.Float, 524, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxEnabled, PsoDataType.Bool, 528, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxRange, PsoDataType.Float, 532, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxName, PsoDataType.String, 536, 7, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxForwardSpeedEvoMin, PsoDataType.Float, 540, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxForwardSpeedEvoMax, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxBackwardSpeedEvoMin, PsoDataType.Float, 548, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxBackwardSpeedEvoMax, PsoDataType.Float, 552, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxDepthEvoMin, PsoDataType.Float, 556, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxDepthEvoMax, PsoDataType.Float, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.boatPropellerPtFxScale, PsoDataType.Float, 564, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxEnabled, PsoDataType.Bool, 568, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxRangeMin, PsoDataType.Float, 572, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxRangeMax, PsoDataType.Float, 576, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxName, PsoDataType.String, 580, 7, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxSpeedEvoMin, PsoDataType.Float, 584, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxSpeedEvoMax, PsoDataType.Float, 588, 0, 0), + new PsoStructureEntryInfo(MetaName.boatLowLodWakePtFxScale, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxEnabled, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxName, PsoDataType.String, 600, 7, 0), + new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxRange, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.planeAfterburnerPtFxScale, PsoDataType.Float, 608, 0, 0), + new PsoStructureEntryInfo(MetaName.planeWingTipPtFxEnabled, PsoDataType.Bool, 612, 0, 0), + new PsoStructureEntryInfo(MetaName.planeWingTipPtFxName, PsoDataType.String, 616, 7, 0), + new PsoStructureEntryInfo(MetaName.planeWingTipPtFxRange, PsoDataType.Float, 620, 0, 0), + new PsoStructureEntryInfo(MetaName.planeWingTipPtFxSpeedEvoMin, PsoDataType.Float, 624, 0, 0), + new PsoStructureEntryInfo(MetaName.planeWingTipPtFxSpeedEvoMax, PsoDataType.Float, 628, 0, 0), + new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxEnabled, PsoDataType.Bool, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxName, PsoDataType.String, 636, 7, 0), + new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxRange, PsoDataType.Float, 640, 0, 0), + new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxSpeedEvoMin, PsoDataType.Float, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.planeDamageFirePtFxSpeedEvoMax, PsoDataType.Float, 648, 0, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxEnabled, PsoDataType.Bool, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameDefault, PsoDataType.String, 656, 7, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameSand, PsoDataType.String, 660, 7, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameDirt, PsoDataType.String, 664, 7, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameWater, PsoDataType.String, 668, 7, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxNameFoliage, PsoDataType.String, 672, 7, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxRange, PsoDataType.Float, 676, 0, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxDist, PsoDataType.Float, 680, 0, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxSpeedEvoMin, PsoDataType.Float, 684, 0, 0), + new PsoStructureEntryInfo(MetaName.planeGroundDisturbPtFxSpeedEvoMax, PsoDataType.Float, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxEnabled, PsoDataType.Bool, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxName, PsoDataType.String, 696, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxRange, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxSpeedEvoMin, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftSectionDamageSmokePtFxSpeedEvoMax, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxEnabled, PsoDataType.Bool, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameDefault, PsoDataType.String, 716, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameSand, PsoDataType.String, 720, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameDirt, PsoDataType.String, 724, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameWater, PsoDataType.String, 728, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxNameFoliage, PsoDataType.String, 732, 7, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxRange, PsoDataType.Float, 736, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxDist, PsoDataType.Float, 740, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxSpeedEvoMin, PsoDataType.Float, 744, 0, 0), + new PsoStructureEntryInfo(MetaName.aircraftDownwashPtFxSpeedEvoMax, PsoDataType.Float, 748, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxEnabled, PsoDataType.Bool, 752, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxRange, PsoDataType.Float, 756, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxName, PsoDataType.String, 760, 7, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSizeEvoMax, PsoDataType.Float, 764, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardThresh, PsoDataType.Float, 768, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedLateralEvoMin, PsoDataType.Float, 772, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedLateralEvoMax, PsoDataType.Float, 776, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardEvoMin, PsoDataType.Float, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.splashInPtFxSpeedDownwardEvoMax, PsoDataType.Float, 784, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxEnabled, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxRange, PsoDataType.Float, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxName, PsoDataType.String, 796, 7, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxSizeEvoMax, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedLateralEvoMin, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedLateralEvoMax, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedUpwardEvoMin, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.splashOutPtFxSpeedUpwardEvoMax, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxEnabled, PsoDataType.Bool, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxRange, PsoDataType.Float, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxName, PsoDataType.String, 828, 7, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxSizeEvoMax, PsoDataType.Float, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedVehicleEvoMin, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedVehicleEvoMax, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedRiverEvoMin, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.splashWadePtFxSpeedRiverEvoMax, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxEnabled, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxRange, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxName, PsoDataType.String, 860, 7, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxSizeEvoMax, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMin, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.splashTrailPtFxSpeedEvoMax, PsoDataType.Float, 872, 0, 0) + ); + case MetaName.CVfxWeaponInfoMgr: + return new PsoStructureInfo(MetaName.CVfxWeaponInfoMgr, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)3938144758, PsoDataType.Map, 8, 1, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo((MetaName)735539988, PsoDataType.Map, 32, 1, (MetaName)196612) + ); + case (MetaName)2452529929: + return new PsoStructureInfo((MetaName)2452529929, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)294307720, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.probability, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.colTint, PsoDataType.UInt, 20, 1, 0) + ); + case (MetaName)1794703310: + return new PsoStructureInfo((MetaName)1794703310, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)1914084434, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.probability, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)3089927233, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2658317066, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CProceduralInfo: + return new PsoStructureInfo(MetaName.CProceduralInfo, 0, 0, 4120, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2143317860), + new PsoStructureEntryInfo(MetaName.procObjInfos, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlantInfo), + new PsoStructureEntryInfo(MetaName.plantInfos, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3343541253), + new PsoStructureEntryInfo(MetaName.procTagTable, PsoDataType.Array, 40, 4, (MetaName)16711684) + ); + case (MetaName)3343541253: + return new PsoStructureInfo((MetaName)3343541253, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1599521754), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 2, (MetaName)524288) + ); + case (MetaName)2143317860: + return new PsoStructureInfo((MetaName)2143317860, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Tag, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PlantTag, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.Spacing, PsoDataType.HFloat, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinXRotation, PsoDataType.HFloat, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxXRotation, PsoDataType.HFloat, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinYRotation, PsoDataType.HFloat, 26, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYRotation, PsoDataType.HFloat, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinZRotation, PsoDataType.HFloat, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZRotation, PsoDataType.HFloat, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinScale, PsoDataType.HFloat, 34, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxScale, PsoDataType.HFloat, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinScaleZ, PsoDataType.HFloat, 38, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxScaleZ, PsoDataType.HFloat, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinZOffset, PsoDataType.HFloat, 42, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZOffset, PsoDataType.HFloat, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.HFloat, 46, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.HFloat, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTintPalette, PsoDataType.UByte, 50, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTintPalette, PsoDataType.UByte, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)956281369), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 52, 2, (MetaName)524308) + ); + case MetaName.CPlantInfo: + return new PsoStructureInfo(MetaName.CPlantInfo, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Tag, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Color, PsoDataType.UInt, 12, 1, 0), + new PsoStructureEntryInfo(MetaName.GroundColor, PsoDataType.UInt, 16, 1, 0), + new PsoStructureEntryInfo(MetaName.ScaleXY, PsoDataType.HFloat, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleZ, PsoDataType.HFloat, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleVariationXY, PsoDataType.HFloat, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleVariationZ, PsoDataType.HFloat, 26, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleRangeXYZ, PsoDataType.HFloat, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleRangeZ, PsoDataType.HFloat, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.MicroMovementsScaleH, PsoDataType.HFloat, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MicroMovementsScaleV, PsoDataType.HFloat, 34, 0, 0), + new PsoStructureEntryInfo(MetaName.MicroMovementsFreqH, PsoDataType.HFloat, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MicroMovementsFreqV, PsoDataType.HFloat, 38, 0, 0), + new PsoStructureEntryInfo(MetaName.WindBendScale, PsoDataType.HFloat, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.WindBendVariation, PsoDataType.HFloat, 42, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.HFloat, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.Density, PsoDataType.HFloat, 46, 0, 0), + new PsoStructureEntryInfo(MetaName.DensityRange, PsoDataType.HFloat, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ModelId, PsoDataType.UByte, 50, 0, 0), + new PsoStructureEntryInfo(MetaName.TextureId, PsoDataType.UByte, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1247137385), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 52, 1, (MetaName)1048596), + new PsoStructureEntryInfo(MetaName.Intensity, PsoDataType.UByte, 54, 0, 0), + new PsoStructureEntryInfo(MetaName.IntensityVar, PsoDataType.UByte, 55, 0, 0) + ); + case MetaName.camMetadataStore: + return new PsoStructureInfo(MetaName.camMetadataStore, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.MetadataList, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.DirectorList, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case MetaName.camDepthOfFieldSettingsMetadata: + return new PsoStructureInfo(MetaName.camDepthOfFieldSettingsMetadata, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3872687437, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)809440628, PsoDataType.Float2, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)490969727, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3622576788, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1424443550, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3810611648, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1068831663, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1181720025, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2941105367, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1760535059, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)244310625, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2726944087, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)366578954, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1584584282, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)4112080817, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)4019248724, PsoDataType.Bool, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)3170603601, PsoDataType.Bool, 85, 0, 0), + new PsoStructureEntryInfo((MetaName)367424479, PsoDataType.Bool, 86, 0, 0), + new PsoStructureEntryInfo((MetaName)3748087913, PsoDataType.Bool, 87, 0, 0), + new PsoStructureEntryInfo((MetaName)981218312, PsoDataType.Bool, 88, 0, 0) + ); + case MetaName.camCinematicAnimatedCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicAnimatedCameraMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0) + ); + case MetaName.camCinematicCameraManCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicCameraManCameraMetadata, 0, 0, 328, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2962759393, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3005507009, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1535052963, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3023548272, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)846082931, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)3539146194, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3668836939, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)69722150, PsoDataType.Bool, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ScanDistance, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 128, 0, MetaName.camCinematicCameraOperatorShakeSettings), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo((MetaName)3518053347, PsoDataType.Bool, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo((MetaName)2596681112, PsoDataType.Bool, 284, 0, 0), + new PsoStructureEntryInfo((MetaName)1468609247, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)727781899, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo((MetaName)3140771983, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo((MetaName)3196312636, PsoDataType.Bool, 300, 0, 0), + new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 324, 0, 0) + ); + case MetaName.camCinematicCameraOperatorShakeSettings: + return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeSettings, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.UncertaintySettings, PsoDataType.Structure, 8, 0, MetaName.camCinematicCameraOperatorShakeUncertaintySettings), + new PsoStructureEntryInfo(MetaName.TurbulenceSettings, PsoDataType.Structure, 88, 0, MetaName.camCinematicCameraOperatorShakeTurbulenceSettings) + ); + case MetaName.camCinematicCameraOperatorShakeUncertaintySettings: + return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeUncertaintySettings, 0, 0, 80, + new PsoStructureEntryInfo((MetaName)784117005, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)4083769430, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)4138212913, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2793659114, PsoDataType.Float2, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2611684493, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3850080675, PsoDataType.Float2, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2902509544, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)3004590170, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ScalingFactor, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2280675285, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)933422390, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3253772488, PsoDataType.Float, 72, 0, 0) + ); + case MetaName.camCinematicCameraOperatorShakeTurbulenceSettings: + return new PsoStructureInfo(MetaName.camCinematicCameraOperatorShakeTurbulenceSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)1741343660, PsoDataType.Float2, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceRange, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2902509544, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3004590170, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camCinematicHeliChaseCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicHeliChaseCameraMetadata, 0, 0, 392, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDuration, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3800346187, PsoDataType.UInt, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2004927681, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)408757490, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1805018741, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1929531797, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)1117152888, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3610993313, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2885533396, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1162205528, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2128811877, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3504182592, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)2040715445, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)1346377414, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)495502725, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)3725520797, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)832331471, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)953228499, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1288561522, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)4220570274, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)613448395, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)106130617, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)2289962831, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)3658577234, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)3483998043, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)2217923367, PsoDataType.Bool, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 169, 0, 0), + new PsoStructureEntryInfo((MetaName)2187445607, PsoDataType.Bool, 170, 0, 0), + new PsoStructureEntryInfo((MetaName)1144995443, PsoDataType.Bool, 171, 0, 0), + new PsoStructureEntryInfo((MetaName)4185802977, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)315713489, PsoDataType.Bool, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 188, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 192, 7, 0), + new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 196, 7, 0), + new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 200, 7, 0), + new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 208, 0, MetaName.camCinematicCameraOperatorShakeSettings), + new PsoStructureEntryInfo((MetaName)983508410, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)3451936358, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo((MetaName)2352608445, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)3574069037, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo((MetaName)761184934, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)1444706843, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo((MetaName)218641622, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 388, 0, 0) + ); + case MetaName.camCinematicVehicleOrbitCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitCameraMetadata, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)315073442, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleDelta, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)559738595, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)2153696126, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)765619120, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)3644129030, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)3991802629, PsoDataType.UInt, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicVehicleOrbitCameraInitalSettings), + new PsoStructureEntryInfo((MetaName)1539141183, PsoDataType.Array, 104, 0, (MetaName)20), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 128, 0, 0) + ); + case MetaName.camCinematicVehicleOrbitCameraInitalSettings: + return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitCameraInitalSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Heading, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingDelta, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camCinematicVehicleLowOrbitCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleLowOrbitCameraMetadata, 0, 0, 256, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)315073442, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleDelta, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2037218535, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)4219845621, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)1088437692, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)565251953, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)2153696126, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)765619120, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicVehicleOrbitCameraInitalSettings), + new PsoStructureEntryInfo((MetaName)1539141183, PsoDataType.Array, 112, 0, (MetaName)MetaTypeName.UINT), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)1958709726, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)2815616753, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)2843406703, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)4109249654, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)565527739, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)3889226535, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)3920334627, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)3189979615, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)1031927866, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)2223609026, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo((MetaName)752307799, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo((MetaName)1612512934, PsoDataType.Structure, 192, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), + new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 224, 0, MetaName.camSpeedRelativeShakeSettingsMetadata) + ); + case MetaName.camSpeedRelativeShakeSettingsMetadata: + return new PsoStructureInfo(MetaName.camSpeedRelativeShakeSettingsMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3092190689, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camCinematicIdleCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicIdleCameraMetadata, 0, 0, 168, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1305640980, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)653716069, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)887335192, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.WideShot, PsoDataType.Structure, 48, 0, MetaName.camCinematicIdleShots), + new PsoStructureEntryInfo(MetaName.MediumShot, PsoDataType.Structure, 72, 0, MetaName.camCinematicIdleShots), + new PsoStructureEntryInfo((MetaName)2026925651, PsoDataType.Structure, 96, 0, MetaName.camCinematicIdleShots), + new PsoStructureEntryInfo((MetaName)2443187932, PsoDataType.Float2, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)762567518, PsoDataType.Float2, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)348135302, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.Float, 160, 0, 0) + ); + case MetaName.camCinematicIdleShots: + return new PsoStructureInfo(MetaName.camCinematicIdleShots, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceLimits, PsoDataType.Float2, 16, 0, 0) + ); + case MetaName.camCinematicFirstPersonIdleCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicFirstPersonIdleCameraMetadata, 0, 0, 200, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.tacticalXml, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2146055434, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)498489070, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)642179285, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3833690476, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)91642876, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3423831703, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1365351828, PsoDataType.UInt, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1799833343, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2451425179, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2398830068, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)4013543182, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)4060544092, PsoDataType.UInt, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)1863497759, PsoDataType.UInt, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2865768466, PsoDataType.UInt, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)2935498108, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)3267214601, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)25343385, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)2453008156, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)333391552, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)3472598366, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)3523922750, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)27172088, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)2656885705, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)3821389091, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)3137663245, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)2149837453, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)1352549573, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)559353307, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)340096669, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)3997020725, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)1330235813, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)3625015755, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)815735892, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)2653018133, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)216085311, PsoDataType.UInt, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)811132412, PsoDataType.UInt, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1561520371, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo((MetaName)2384466151, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo((MetaName)1800176594, PsoDataType.Float, 192, 0, 0) + ); + case MetaName.camCinematicStuntCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicStuntCameraMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3686787728, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2332427685, PsoDataType.Float2, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3195921543, PsoDataType.Float2, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2033229500, PsoDataType.Float2, 60, 0, 0) + ); + case MetaName.camCinematicGroupCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicGroupCameraMetadata, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FovLimits, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3686787728, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)4150576777, PsoDataType.Float2, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)3434528744, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2373655501, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)400251000, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1856660360, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 92, 0, 0) + ); + case MetaName.camCinematicTrainTrackingCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicTrainTrackingCameraMetadata, 0, 0, 400, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2962759393, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3005507009, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)114561573, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1535052963, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3023548272, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)846082931, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)3539146194, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3668836939, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1265046558, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1161122588, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3190591149, PsoDataType.UInt, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2884448793, PsoDataType.UInt, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)69722150, PsoDataType.Bool, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ScanDistance, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)199666231, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo((MetaName)3308026067, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo((MetaName)1279708504, PsoDataType.Structure, 128, 0, MetaName.camCinematicCameraOperatorShakeSettings), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo((MetaName)1035890821, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo((MetaName)3518053347, PsoDataType.Bool, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)568093394, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo((MetaName)781245272, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo((MetaName)2596681112, PsoDataType.Bool, 284, 0, 0), + new PsoStructureEntryInfo((MetaName)1468609247, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)727781899, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo((MetaName)3140771983, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo((MetaName)3196312636, PsoDataType.Bool, 300, 0, 0), + new PsoStructureEntryInfo((MetaName)3061937367, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)1900366054, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo((MetaName)4085704227, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)3250401979, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)618136263, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo((MetaName)2469116692, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo((MetaName)886237220, PsoDataType.Float3, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)649866655, PsoDataType.Float2, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)3049827950, PsoDataType.Float2, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)1066491626, PsoDataType.Float2, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)3832386323, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo((MetaName)412149987, PsoDataType.Float2, 384, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadata, 0, 0, 1344, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.MobilePhoneCameraControlHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo((MetaName)3464513788, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.RagdollBlendEnvelopeRef, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)4071354708, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo((MetaName)972815273, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo((MetaName)844800904, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo((MetaName)648641770, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo((MetaName)722540604, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo((MetaName)3400674238, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo((MetaName)885223840, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachPosition, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)1792533284, PsoDataType.Float3, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.BoneRelativeAttachOffset, PsoDataType.Float3, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)3162861957, PsoDataType.Float3, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)2981089011, PsoDataType.Float3, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)464677746, PsoDataType.Float3, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)2301891370, PsoDataType.Float3, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)1452169682, PsoDataType.Float3, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)4196591490, PsoDataType.Float3, 224, 0, 0), + new PsoStructureEntryInfo((MetaName)1001532487, PsoDataType.Float3, 240, 0, 0), + new PsoStructureEntryInfo((MetaName)1862921276, PsoDataType.Float3, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimits, PsoDataType.Float2, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimitsForPassengers, PsoDataType.Float2, 280, 0, 0), + new PsoStructureEntryInfo((MetaName)3248777081, PsoDataType.Float2, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)74704022, PsoDataType.Float2, 296, 0, 0), + new PsoStructureEntryInfo((MetaName)4088070730, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)2782354748, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo((MetaName)1994565733, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)383680708, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)2931383793, PsoDataType.Bool, 320, 0, 0), + new PsoStructureEntryInfo((MetaName)1919709187, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo((MetaName)945934562, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultRelativePitch, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultReversePitch, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)742850166, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo((MetaName)2686299665, PsoDataType.Float2, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)1473955583, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)704024974, PsoDataType.Bool, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)2135497875, PsoDataType.Bool, 357, 0, 0), + new PsoStructureEntryInfo((MetaName)4187867131, PsoDataType.Bool, 358, 0, 0), + new PsoStructureEntryInfo((MetaName)2423170684, PsoDataType.Structure, 360, 0, MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle), + new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 376, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), + new PsoStructureEntryInfo((MetaName)1672349165, PsoDataType.Structure, 408, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), + new PsoStructureEntryInfo(MetaName.RocketSettings, PsoDataType.Structure, 440, 0, MetaName.camVehicleRocketSettings), + new PsoStructureEntryInfo((MetaName)1913942883, PsoDataType.Bool, 456, 0, 0), + new PsoStructureEntryInfo((MetaName)3459873736, PsoDataType.Bool, 457, 0, 0), + new PsoStructureEntryInfo((MetaName)880876795, PsoDataType.Bool, 458, 0, 0), + new PsoStructureEntryInfo((MetaName)153965986, PsoDataType.Structure, 464, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), + new PsoStructureEntryInfo((MetaName)1625111759, PsoDataType.Structure, 504, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), + new PsoStructureEntryInfo((MetaName)2701071860, PsoDataType.Structure, 544, 0, MetaName.camCinematicMountedCameraMetadataLookAroundSettings), + new PsoStructureEntryInfo((MetaName)1020746469, PsoDataType.Structure, 584, 0, MetaName.camCinematicMountedCameraMetadataFirstPersonRoll), + new PsoStructureEntryInfo((MetaName)3266557322, PsoDataType.Structure, 608, 0, MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset), + new PsoStructureEntryInfo((MetaName)4210630063, PsoDataType.Bool, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringDampingRatio, PsoDataType.Float, 660, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForMaxRelativeAttachSpringConstant, PsoDataType.Float, 664, 0, 0), + new PsoStructureEntryInfo((MetaName)17770171, PsoDataType.Float, 668, 0, 0), + new PsoStructureEntryInfo((MetaName)2454715147, PsoDataType.Float, 672, 0, 0), + new PsoStructureEntryInfo((MetaName)789371927, PsoDataType.Bool, 676, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToFollowPedHead, PsoDataType.Bool, 677, 0, 0), + new PsoStructureEntryInfo((MetaName)2639714447, PsoDataType.Bool, 678, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToFollowPedSeat, PsoDataType.Bool, 679, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldRestictToFrontSeat, PsoDataType.Bool, 680, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToVehicleExitEntryPoint, PsoDataType.Bool, 681, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToVehicleBone, PsoDataType.Bool, 682, 0, 0), + new PsoStructureEntryInfo((MetaName)4227962431, PsoDataType.Bool, 683, 0, 0), + new PsoStructureEntryInfo((MetaName)3424726202, PsoDataType.Bool, 684, 0, 0), + new PsoStructureEntryInfo((MetaName)883646732, PsoDataType.Bool, 685, 0, 0), + new PsoStructureEntryInfo((MetaName)1344883999, PsoDataType.Bool, 686, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2782414211), + new PsoStructureEntryInfo((MetaName)3524553148, PsoDataType.Flags, 688, 0, (MetaName)2097231), + new PsoStructureEntryInfo(MetaName.VehicleAttachPart, PsoDataType.Enum, 692, 0, (MetaName)3404480226), + new PsoStructureEntryInfo(MetaName.LookAtBehaviour, PsoDataType.Enum, 696, 0, (MetaName)2136742399), + new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.LookBehindRelativeAttachPosition, PsoDataType.Float3, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLookBehindCustomPosition, PsoDataType.Bool, 736, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowPedLookAtBoneTag, PsoDataType.SInt, 740, 0, 0), + new PsoStructureEntryInfo(MetaName.OrientationSpring, PsoDataType.Structure, 744, 0, MetaName.camCinematicMountedCameraMetadataOrientationSpring), + new PsoStructureEntryInfo((MetaName)2204528705, PsoDataType.Structure, 808, 0, MetaName.camCinematicMountedCameraMetadataLeadingLookSettings), + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo((MetaName)3932844561, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo((MetaName)1690462370, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeHeadingLimitsForMobilePhoneCamera, PsoDataType.Float2, 872, 0, 0), + new PsoStructureEntryInfo(MetaName.IsBehindVehicleGlass, PsoDataType.Bool, 880, 0, 0), + new PsoStructureEntryInfo((MetaName)2385481086, PsoDataType.Bool, 881, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 882, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMakeFollowPedHeadInvisible, PsoDataType.Bool, 883, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMakePedInAttachSeatInvisible, PsoDataType.Bool, 884, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldCopyVehicleCameraMotionBlur, PsoDataType.Bool, 885, 0, 0), + new PsoStructureEntryInfo(MetaName.LimitAttachParentRelativePitchAndHeading, PsoDataType.Bool, 886, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateForPitchAndHeading, PsoDataType.Bool, 887, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRelativePitch, PsoDataType.Float2, 888, 0, 0), + new PsoStructureEntryInfo((MetaName)1537030464, PsoDataType.Float2, 896, 0, 0), + new PsoStructureEntryInfo((MetaName)3275096368, PsoDataType.Float2, 904, 0, 0), + new PsoStructureEntryInfo((MetaName)923714524, PsoDataType.Float2, 912, 0, 0), + new PsoStructureEntryInfo((MetaName)3680927973, PsoDataType.Float2, 920, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 928, 0, 0), + new PsoStructureEntryInfo((MetaName)2362796003, PsoDataType.Float2, 936, 0, 0), + new PsoStructureEntryInfo((MetaName)2931436971, PsoDataType.Float2, 944, 0, 0), + new PsoStructureEntryInfo((MetaName)4288033461, PsoDataType.Float2, 952, 0, 0), + new PsoStructureEntryInfo((MetaName)1148577305, PsoDataType.Float2, 960, 0, 0), + new PsoStructureEntryInfo((MetaName)818123698, PsoDataType.Float2, 968, 0, 0), + new PsoStructureEntryInfo((MetaName)3197853445, PsoDataType.Float2, 976, 0, 0), + new PsoStructureEntryInfo((MetaName)1847367979, PsoDataType.Float2, 984, 0, 0), + new PsoStructureEntryInfo((MetaName)1083919137, PsoDataType.Float2, 992, 0, 0), + new PsoStructureEntryInfo((MetaName)4130730234, PsoDataType.Float2, 1000, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialRelativePitchLimits, PsoDataType.Float2, 1008, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialRelativeHeadingLimits, PsoDataType.Float2, 1016, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachParentRoll, PsoDataType.Bool, 1024, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateForWorldPitch, PsoDataType.Bool, 1025, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialWorldPitchLimits, PsoDataType.Float2, 1028, 0, 0), + new PsoStructureEntryInfo(MetaName.WorldPitchLimits, PsoDataType.Float2, 1036, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateForOcclusion, PsoDataType.Bool, 1044, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 1048, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateIfOccludedByAttachParent, PsoDataType.Bool, 1052, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccludedByAttachParent, PsoDataType.UInt, 1056, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 1060, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 1064, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateForDistanceToTarget, PsoDataType.Bool, 1068, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToTerminate, PsoDataType.Float, 1072, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldCalculateXYDistance, PsoDataType.Bool, 1076, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTestForClipping, PsoDataType.Bool, 1077, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToClipIntoDynamicCollision, PsoDataType.UInt, 1080, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 1084, 0, 0), + new PsoStructureEntryInfo((MetaName)816145056, PsoDataType.Bool, 1088, 0, 0), + new PsoStructureEntryInfo((MetaName)439797539, PsoDataType.Bool, 1089, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 1092, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 1096, 0, 0), + new PsoStructureEntryInfo((MetaName)976391107, PsoDataType.Bool, 1100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 1104, 0, 0), + new PsoStructureEntryInfo((MetaName)200247978, PsoDataType.Bool, 1108, 0, 0), + new PsoStructureEntryInfo((MetaName)1613380386, PsoDataType.Float, 1112, 0, 0), + new PsoStructureEntryInfo((MetaName)2154681758, PsoDataType.Bool, 1116, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 1120, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 1124, 7, 0), + new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 1128, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldByPassNearClip, PsoDataType.Bool, 1132, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTestForMapPenetrationFromAttachPosition, PsoDataType.Bool, 1133, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseHeading, PsoDataType.Float, 1136, 0, 0), + new PsoStructureEntryInfo((MetaName)1214392329, PsoDataType.Bool, 1140, 0, 0), + new PsoStructureEntryInfo((MetaName)2327168839, PsoDataType.Float, 1144, 0, 0), + new PsoStructureEntryInfo((MetaName)1246262822, PsoDataType.Float, 1148, 0, 0), + new PsoStructureEntryInfo((MetaName)4216676429, PsoDataType.Float, 1152, 0, 0), + new PsoStructureEntryInfo((MetaName)2719028802, PsoDataType.Structure, 1160, 0, MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings), + new PsoStructureEntryInfo((MetaName)36987752, PsoDataType.Float, 1208, 0, 0), + new PsoStructureEntryInfo((MetaName)3434721036, PsoDataType.Float3, 1216, 0, 0), + new PsoStructureEntryInfo((MetaName)3664516177, PsoDataType.Float, 1232, 0, 0), + new PsoStructureEntryInfo((MetaName)2807019381, PsoDataType.Float, 1236, 0, 0), + new PsoStructureEntryInfo((MetaName)1688077651, PsoDataType.Float, 1240, 0, 0), + new PsoStructureEntryInfo((MetaName)1499512130, PsoDataType.Float, 1244, 0, 0), + new PsoStructureEntryInfo((MetaName)805860083, PsoDataType.Float, 1248, 0, 0), + new PsoStructureEntryInfo((MetaName)1793179555, PsoDataType.Float, 1252, 0, 0), + new PsoStructureEntryInfo((MetaName)1784170819, PsoDataType.Float, 1256, 0, 0), + new PsoStructureEntryInfo((MetaName)2549816384, PsoDataType.Float, 1260, 0, 0), + new PsoStructureEntryInfo((MetaName)2482994089, PsoDataType.Float, 1264, 0, 0), + new PsoStructureEntryInfo((MetaName)3440187587, PsoDataType.Float, 1268, 0, 0), + new PsoStructureEntryInfo((MetaName)2744603068, PsoDataType.Float, 1272, 0, 0), + new PsoStructureEntryInfo((MetaName)1387580481, PsoDataType.Float, 1276, 0, 0), + new PsoStructureEntryInfo((MetaName)1233327091, PsoDataType.Float, 1280, 0, 0), + new PsoStructureEntryInfo((MetaName)3672709376, PsoDataType.Float3, 1296, 0, 0), + new PsoStructureEntryInfo((MetaName)2119789086, PsoDataType.Float3, 1312, 0, 0), + new PsoStructureEntryInfo((MetaName)2958804846, PsoDataType.Float, 1328, 0, 0), + new PsoStructureEntryInfo((MetaName)2107938182, PsoDataType.Float, 1332, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataRelativePitchScalingToThrottle, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)1802668561, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)200823333, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataLookAroundSettings: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataLookAroundSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.LeanScale, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)214599438, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2702689596, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2951014073, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2830026870, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3102721723, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)509094775, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3198719034, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataFirstPersonRoll: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataFirstPersonRoll, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)455355504, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)694448363, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2004679597, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2782811596, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataFirstPersonPitchOffset, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)551752221, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOffset, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1775298710, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2173221242, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)75090556, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataOrientationSpring: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataOrientationSpring, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)1464813290, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)12756205, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)967704366, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3344080959, PsoDataType.Float2, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)243857972, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2399868550, PsoDataType.Float2, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2060478858, PsoDataType.Float2, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)131585240, PsoDataType.Float2, 56, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataLeadingLookSettings: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataLeadingLookSettings, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)966483701, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1778767763, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)3524239627, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1788878871, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3960905630, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2872708052, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1733937006, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings: + return new PsoStructureInfo(MetaName.camCinematicMountedCameraMetadataMovementOnAccelerationSettings, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)3974113312, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3305119805, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1186910375, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1778767763, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3493441660, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1259376027, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.camCinematicPositionCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicPositionCameraMetadata, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3983210518, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3715714007, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3434528744, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1699827350, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomDuration, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3609378888, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1843629037, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo((MetaName)4200791860, PsoDataType.String, 100, 7, 0) + ); + case MetaName.camCinematicWaterCrashCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicWaterCrashCameraMetadata, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3106190053, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScale, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DropDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3822313305, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.tacticalXml, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2965889555, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.DropDuration, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)2920068067, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendDuration, PsoDataType.UInt, 80, 0, 0) + ); + case MetaName.camCinematicTwoShotCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicTwoShotCameraMetadata, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeScale, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3072113430, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)654218252, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.CameraRelativeVerticalOffset, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)1926313598, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1167967077, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)656358172, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)940306022, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)4169793326, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistance, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)1953981041, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleCmini, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)2383824547, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)1720877983, PsoDataType.Bool, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)1117249844, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3115155794, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)1144205032, PsoDataType.Bool, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1450705774, PsoDataType.Float, 132, 0, 0) + ); + case MetaName.camCinematicPedCloseUpCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicPedCloseUpCameraMetadata, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOffset, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1099610506, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.LookAtOffset, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)367186942, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)3381486527, PsoDataType.UInt, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)3185512023, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)4280914022, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)430381212, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)2406519031, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)2116722083, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)4065237819, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)1391390084, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)3698583789, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)3754548217, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)2383824547, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)3406809215, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)4170206883, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)3418665750, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)2934396710, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)2715105524, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)3609378888, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 180, 0, 0) + ); + case MetaName.camControlHelperMetadata: + return new PsoStructureInfo(MetaName.camControlHelperMetadata, 0, 0, 288, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ViewModes, PsoDataType.Structure, 16, 0, MetaName.camControlHelperMetadataViewModes), + new PsoStructureEntryInfo(MetaName.LookAround, PsoDataType.Structure, 128, 0, MetaName.camControlHelperMetadataLookAround), + new PsoStructureEntryInfo(MetaName.Zoom, PsoDataType.Structure, 224, 0, MetaName.camControlHelperMetadataZoom), + new PsoStructureEntryInfo(MetaName.LookBehindOutroTimeMS, PsoDataType.UInt, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLookBehindInput, PsoDataType.Bool, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseAccurateModeInput, PsoDataType.Bool, 269, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldToggleAccurateModeInput, PsoDataType.Bool, 270, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplySniperControlPref, PsoDataType.Bool, 271, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyAimSensitivityPref, PsoDataType.Bool, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.AimSensitivityScalingLimits, PsoDataType.Float2, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDurationForMultiplayerViewModeActivation, PsoDataType.UInt, 284, 0, 0) + ); + case MetaName.camControlHelperMetadataViewModes: + return new PsoStructureInfo(MetaName.camControlHelperMetadataViewModes, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.ShouldUseViewModeInput, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldToggleViewModeBetweenThirdAndFirstPerson, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.Context, PsoDataType.Enum, 12, 0, (MetaName)513957198), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2703064232), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 16, 2, (MetaName)327683), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camControlHelperMetadataViewModeSettings), + new PsoStructureEntryInfo(MetaName.Settings, PsoDataType.Array, 24, 4, (MetaName)327685), + new PsoStructureEntryInfo(MetaName.ViewModeBlendEnvelopeRef, PsoDataType.String, 104, 7, 0) + ); + case MetaName.camControlHelperMetadataViewModeSettings: + return new PsoStructureInfo(MetaName.camControlHelperMetadataViewModeSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitScaling, PsoDataType.Float2, 8, 0, 0) + ); + case MetaName.camControlHelperMetadataLookAround: + return new PsoStructureInfo(MetaName.camControlHelperMetadataLookAround, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchSpeed, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MouseMaxHeadingSpeedMin, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MouseMaxHeadingSpeedMax, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MouseMaxPitchSpeedMin, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MouseMaxPitchSpeedMax, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.LSDeadZoneAngle, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.LSAcceleration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.LSDeceleration, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseGameTime, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.InputEnvelopeRef, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo(MetaName.PrecisionAimSettings, PsoDataType.Structure, 64, 0, MetaName.camControlHelperMetaDataPrecisionAimSettings) + ); + case MetaName.camControlHelperMetaDataPrecisionAimSettings: + return new PsoStructureInfo(MetaName.camControlHelperMetaDataPrecisionAimSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinAccelModifier, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAccelModifier, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDeccelModifier, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDeccelModifier, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.InputMagToIncreaseDeadZoneMin, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.InputMagToIncreaseDeadZoneMax, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.camControlHelperMetadataZoom: + return new PsoStructureInfo(MetaName.camControlHelperMetadataZoom, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldUseZoomInput, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDiscreteZoomControl, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseGameTime, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFovForNetworkPlay, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camCinematicVehicleTrackingCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleTrackingCameraMetadata, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.LookAtOffset, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.PositionOffset, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.Fov, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1292601136, PsoDataType.Float2, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3554537001, PsoDataType.Float2, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)4013358927, PsoDataType.Float2, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)328948722, PsoDataType.Float2, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)2198318784, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)1142735275, PsoDataType.UInt, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 124, 0, 0) + ); + case MetaName.camEnvelopeMetadata: + return new PsoStructureInfo(MetaName.camEnvelopeMetadata, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)4004354650, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AttackDuration, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DecayDuration, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1735638891, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.HoldDuration, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ReleaseDuration, PsoDataType.UInt, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2014772834, PsoDataType.Enum, 40, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)1004206996, PsoDataType.Enum, 44, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)1484523694, PsoDataType.Bool, 48, 0, 0) + ); + case MetaName.camSpringMountMetadata: + return new PsoStructureInfo(MetaName.camSpringMountMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AccelerationLimit, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationForce, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringForce, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DampeningForce, PsoDataType.Float3, 64, 0, 0) + ); + case MetaName.camAnimatedCameraMetadata: + return new PsoStructureInfo(MetaName.camAnimatedCameraMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0) + ); + case MetaName.camFreeCameraMetadata: + return new PsoStructureInfo(MetaName.camFreeCameraMetadata, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.StartPosition, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ForwardAcceleration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.StrafeAcceleration, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalAcceleration, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)430698760, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingAcceleration, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchAcceleration, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.RollAcceleration, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)991761956, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.FovAcceleration, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)2276437979, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1380375800, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)3305680632, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)3631492583, PsoDataType.UInt, 100, 0, 0) + ); + case MetaName.camCinematicMountedPartCameraMetadata: + return new PsoStructureInfo(MetaName.camCinematicMountedPartCameraMetadata, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantEnvelopeRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPart, PsoDataType.Enum, 48, 0, (MetaName)3404480226), + new PsoStructureEntryInfo((MetaName)2797646907, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimits, PsoDataType.Float2, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringConstantLimitsForPassengers, PsoDataType.Float2, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForMaxRelativeAttachSpringConstant, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 120, 0, MetaName.camSpeedRelativeShakeSettingsMetadata), + new PsoStructureEntryInfo(MetaName.IsBehindVehicleGlass, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)2385481086, PsoDataType.Bool, 153, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 154, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMakeFollowPedHeadInvisible, PsoDataType.Bool, 155, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldCopyVehicleCameraMotionBlur, PsoDataType.Bool, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendOccluded, PsoDataType.UInt, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRadius, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForOcclusionTest, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTestForClipping, PsoDataType.Bool, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusScalingForClippingTest, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForWaterClippingTest, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForRiverWaterClippingTest, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 188, 0, 0) + ); + case MetaName.camFollowPedCameraMetadata: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadata, 0, 0, 2288, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), + new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), + new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), + new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), + new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), + new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), + new PsoStructureEntryInfo((MetaName)1885083576, PsoDataType.Bool, 1104, 0, 0), + new PsoStructureEntryInfo((MetaName)1213389792, PsoDataType.Bool, 1105, 0, 0), + new PsoStructureEntryInfo((MetaName)473739279, PsoDataType.Float, 1108, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollBlendEnvelopeRef, PsoDataType.String, 1112, 7, 0), + new PsoStructureEntryInfo((MetaName)3575968142, PsoDataType.String, 1116, 7, 0), + new PsoStructureEntryInfo((MetaName)2291862537, PsoDataType.UInt, 1120, 0, 0), + new PsoStructureEntryInfo((MetaName)459469516, PsoDataType.Float, 1124, 0, 0), + new PsoStructureEntryInfo((MetaName)4093180426, PsoDataType.Float, 1128, 0, 0), + new PsoStructureEntryInfo((MetaName)1028171116, PsoDataType.Float, 1132, 0, 0), + new PsoStructureEntryInfo((MetaName)2578221071, PsoDataType.Float2, 1136, 0, 0), + new PsoStructureEntryInfo((MetaName)2418079526, PsoDataType.String, 1144, 7, 0), + new PsoStructureEntryInfo((MetaName)300074581, PsoDataType.Bool, 1148, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), + new PsoStructureEntryInfo((MetaName)95464861, PsoDataType.Array, 1152, 4, (MetaName)327809), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), + new PsoStructureEntryInfo((MetaName)741352357, PsoDataType.Array, 1272, 4, (MetaName)327811), + new PsoStructureEntryInfo((MetaName)1557873238, PsoDataType.Bool, 1392, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), + new PsoStructureEntryInfo((MetaName)1607272001, PsoDataType.Array, 1400, 4, (MetaName)327814), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFollowPedCameraMetadataCustomViewModeSettings), + new PsoStructureEntryInfo((MetaName)467721499, PsoDataType.Array, 1520, 4, (MetaName)327816), + new PsoStructureEntryInfo((MetaName)4261252982, PsoDataType.String, 1640, 7, 0), + new PsoStructureEntryInfo((MetaName)2397521015, PsoDataType.Float, 1644, 0, 0), + new PsoStructureEntryInfo((MetaName)886249434, PsoDataType.Float, 1648, 0, 0), + new PsoStructureEntryInfo((MetaName)3909973356, PsoDataType.Float, 1652, 0, 0), + new PsoStructureEntryInfo((MetaName)4282038076, PsoDataType.Float, 1656, 0, 0), + new PsoStructureEntryInfo((MetaName)1414513338, PsoDataType.Float, 1660, 0, 0), + new PsoStructureEntryInfo((MetaName)233447402, PsoDataType.Float, 1664, 0, 0), + new PsoStructureEntryInfo((MetaName)813655062, PsoDataType.Float, 1668, 0, 0), + new PsoStructureEntryInfo((MetaName)859959795, PsoDataType.Float, 1672, 0, 0), + new PsoStructureEntryInfo((MetaName)2322941924, PsoDataType.Structure, 1680, 0, MetaName.camFollowPedCameraMetadataAssistedMovementAlignment), + new PsoStructureEntryInfo(MetaName.LadderAlignment, PsoDataType.Structure, 1768, 0, MetaName.camFollowPedCameraMetadataLadderAlignment), + new PsoStructureEntryInfo(MetaName.RappellingAlignment, PsoDataType.Structure, 1952, 0, MetaName.camFollowPedCameraMetadataRappellingAlignment), + new PsoStructureEntryInfo((MetaName)215880757, PsoDataType.Bool, 1968, 0, 0), + new PsoStructureEntryInfo((MetaName)4161177976, PsoDataType.Structure, 1976, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo((MetaName)2738607365, PsoDataType.Float2, 2040, 0, 0), + new PsoStructureEntryInfo((MetaName)3410646358, PsoDataType.Float2, 2048, 0, 0), + new PsoStructureEntryInfo((MetaName)528803049, PsoDataType.Bool, 2056, 0, 0), + new PsoStructureEntryInfo((MetaName)3857904181, PsoDataType.Float, 2060, 0, 0), + new PsoStructureEntryInfo((MetaName)2773176002, PsoDataType.Float, 2064, 0, 0), + new PsoStructureEntryInfo((MetaName)3592715839, PsoDataType.Bool, 2068, 0, 0), + new PsoStructureEntryInfo((MetaName)3895855693, PsoDataType.Float2, 2072, 0, 0), + new PsoStructureEntryInfo((MetaName)2344836057, PsoDataType.Structure, 2080, 0, MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision), + new PsoStructureEntryInfo((MetaName)3095276846, PsoDataType.Float, 2112, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleEntryExitPitchLevelSmoothRate, PsoDataType.Float, 2116, 0, 0), + new PsoStructureEntryInfo((MetaName)2068541596, PsoDataType.Float, 2120, 0, 0), + new PsoStructureEntryInfo((MetaName)1699579049, PsoDataType.Structure, 2128, 0, MetaName.camFollowPedCameraMetadataRunningShakeSettings), + new PsoStructureEntryInfo((MetaName)498572221, PsoDataType.Structure, 2160, 0, MetaName.camFollowPedCameraMetadataSwimmingShakeSettings), + new PsoStructureEntryInfo((MetaName)2385645301, PsoDataType.Structure, 2192, 0, MetaName.camFollowPedCameraMetadataDivingShakeSettings), + new PsoStructureEntryInfo((MetaName)136635268, PsoDataType.Structure, 2224, 0, MetaName.camFollowPedCameraMetadataHighFallShakeSettings), + new PsoStructureEntryInfo((MetaName)41370383, PsoDataType.Structure, 2248, 0, MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings) + ); + case MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.HeightScaling, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxExtraHeightForVehicleTrailers, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxExtraHeightForTowedVehicles, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveVehicleDriverSeat, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataBasePivotPosition: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBasePivotPosition, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.ShouldUseBaseAttachPosition, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttain, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttainInTightSpace, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyInAttachParentLocalSpace, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 24, 0, MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings), + new PsoStructureEntryInfo(MetaName.RelativeOffset, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockVerticalOffset, PsoDataType.Bool, 80, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBasePivotPositionRollSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachParentRoll, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleScalingFactor, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataPivotPosition: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataPivotPosition, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.CameraRelativeSideOffset, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.CameraRelativeVerticalOffset, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentWidthScalingForCameraRelativeSideOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForCameraRelativeVerticalOffset, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyAlternateScalingMin, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyAlternateScalingMax, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.maxDistanceAfterAimingToApplyAlternateScalingMax, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.timeAfterAimingToApplyDistanceBlend, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForCameraRelativeVerticalOffset_AfterAiming, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2888330455, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.BlendLevel, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraCameraRelativeVerticalOffset, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentHeightScalingForExtraCameraRelativeVerticalOffset, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataBuoyancySettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataBuoyancySettings, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.ShouldApplyBuoyancy, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayBetweenBuoyancyStateChanges, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayOnSubmerging, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayOnSurfacing, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSpentSwimmingToRespectMotionTask, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentDepthUnderWaterToRemainBuoyant, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentDepthUnderWaterToRemainBuoyantOut, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionFallBackBlendLevelToForceUnderWater, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldSetBuoyantWhenAttachParentNotFullySubmerged, PsoDataType.Bool, 40, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.AttachParentHeightRatioToAttain, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachParentHeightRatioToPushAwayFromCollision, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)4004666528, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendLevelAfterPushAwayFromCollision, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)31648245, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2702477980, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)20195593, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyInAttachParentLocalSpace, PsoDataType.Bool, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDurationToTrackVehicles, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToTestDownForVehiclesToReject, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataLookOverSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataLookOverSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchOffsetAtMinHeight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchOffsetAtMaxHeight, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataStealthZoomSettings: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataStealthZoomSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camFollowCameraMetadataPullAroundSettings: + return new PsoStructureInfo(MetaName.camFollowCameraMetadataPullAroundSettings, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.ShouldBlendOutWhenAttachParentIsInAir, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldBlendOutWhenAttachParentIsOnGround, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldBlendWithAttachParentMatrixForRelativeOrbitBlend, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundMinMoveSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundMaxMoveSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpeedAtMaxMoveSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundErrorScalingBlendLevel, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpringConstant, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingPullAroundSpringDampingRatio, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundMinMoveSpeed, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundMaxMoveSpeed, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundSpeedAtMaxMoveSpeed, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundErrorScalingBlendLevel, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundSpringConstant, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchPullAroundSpringDampingRatio, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.camFollowCameraMetadataFollowOrientationConing: + return new PsoStructureInfo(MetaName.camFollowCameraMetadataFollowOrientationConing, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AspectRatio, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchOffset, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SmoothRate, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowCameraMetadataRollSettings: + return new PsoStructureInfo(MetaName.camFollowCameraMetadataRollSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldApplyRoll, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.RollSpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.RollSpringDampRatio, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.RollAngleScale, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camFollowCameraMetadataHighAltitudeZoomSettings: + return new PsoStructureInfo(MetaName.camFollowCameraMetadataHighAltitudeZoomSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinAltitudeDelta, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAltitudeDelta, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBaseFovScaling, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataCustomViewModeSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataCustomViewModeSettings, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)4026985674, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataAssistedMovementAlignment: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataAssistedMovementAlignment, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)2541847736, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)3143901835, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2602308947, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 24, 0, MetaName.camFollowCameraMetadataPullAroundSettings) + ); + case MetaName.camFollowPedCameraMetadataLadderAlignment: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataLadderAlignment, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)2541847736, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)261180327, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)666447554, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)4131471736, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3980517625, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 56, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo((MetaName)738690141, PsoDataType.Structure, 120, 0, MetaName.camFollowCameraMetadataPullAroundSettings) + ); + case MetaName.camFollowPedCameraMetadataRappellingAlignment: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataRappellingAlignment, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ShouldAlign, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)261180327, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataOrbitPitchLimitsForOverheadCollision, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)1746008730, PsoDataType.Float2, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)256117257, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataRunningShakeSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataRunningShakeSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)491218034, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2700987639, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataSwimmingShakeSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataSwimmingShakeSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)491218034, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1443947683, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2015392943, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataDivingShakeSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataDivingShakeSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataHighFallShakeSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataHighFallShakeSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings: + return new PsoStructureInfo(MetaName.camFollowPedCameraMetadataPushBeyondNearbyVehiclesInRagdollSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.MaxDurationToTrackVehicles, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1159487467, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2913317904, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)752814960, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1115262693, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DetectionRadius, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToTestDownForVehiclesToReject, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camCollisionMetadata: + return new PsoStructureInfo(MetaName.camCollisionMetadata, 0, 0, 240, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithBrokenFragments, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithBrokenFragmentsOfIgnoredEntities, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMoveTowardsLos, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldSweepToAvoidPopIn, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistPopInBehaviour, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullBackByCapsuleRadius, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithSelectCollision, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreOcclusionWithRagdolls, PsoDataType.Bool, 23, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldReportAsCameraTypeTest, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.OcclusionSweep, PsoDataType.Structure, 32, 0, MetaName.camCollisionMetadataOcclusionSweep), + new PsoStructureEntryInfo(MetaName.PathFinding, PsoDataType.Structure, 72, 0, MetaName.camCollisionMetadataPathFinding), + new PsoStructureEntryInfo(MetaName.RotationTowardsLos, PsoDataType.Structure, 88, 0, MetaName.camCollisionMetadataRotationTowardsLos), + new PsoStructureEntryInfo(MetaName.OrbitDistanceDamping, PsoDataType.Structure, 104, 0, MetaName.camCollisionMetadataOrbitDistanceDamping), + new PsoStructureEntryInfo(MetaName.ClippingAvoidance, PsoDataType.Structure, 136, 0, MetaName.camCollisionMetadataClippingAvoidance), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 152, 0, MetaName.camCollisionMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.PushBeyondEntitiesIfClipping, PsoDataType.Structure, 184, 0, MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping), + new PsoStructureEntryInfo(MetaName.PullBackTowardsCollision, PsoDataType.Structure, 216, 0, MetaName.camCollisionMetadataPullBackTowardsCollision) + ); + case MetaName.camCollisionMetadataOcclusionSweep: + return new PsoStructureInfo(MetaName.camCollisionMetadataOcclusionSweep, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.NumCapsuleTests, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionRootSpeedToForcePopIn, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPreCollisionCameraSpeedToForcePopIn, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSweepAngleWhenMovingTowardsLos, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSweepAngleWhenAvoidingPopIn, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOrientationSpeedToMaintainDirection, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCameraMoveSpeedToSweepInDirectionOfTravel, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camCollisionMetadataPathFinding: + return new PsoStructureInfo(MetaName.camCollisionMetadataPathFinding, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxCapsuleTests, PsoDataType.UInt, 8, 0, 0) + ); + case MetaName.camCollisionMetadataRotationTowardsLos: + return new PsoStructureInfo(MetaName.camCollisionMetadataRotationTowardsLos, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camCollisionMetadataOrbitDistanceDamping: + return new PsoStructureInfo(MetaName.camCollisionMetadataOrbitDistanceDamping, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MaxCollisionRootSpeedToPausePullBack, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPreCollisionCameraSpeedToPausePullBack, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceErrorToIgnore, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camCollisionMetadataClippingAvoidance: + return new PsoStructureInfo(MetaName.camCollisionMetadataClippingAvoidance, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxIterations, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.CapsuleLengthForDetection, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camCollisionMetadataBuoyancySettings: + return new PsoStructureInfo(MetaName.camCollisionMetadataBuoyancySettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShouldApplyBuoyancy, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreBuoyancyStateAndAvoidSurface, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHitNormalDotWorldUpForRivers, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.WaterHeightSmoothRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWaterWhenBuoyant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDepthUnderWaterWhenNotBuoyant, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping: + return new PsoStructureInfo(MetaName.camCollisionMetadataPushBeyondEntitiesIfClipping, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ExtraDistanceToPushAway, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingToApplyWhenPushing, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PullBackSpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PushInSpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowOtherCollisionToConstrainCameraIntoEntities, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)925224069, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo((MetaName)631999118, PsoDataType.Bool, 30, 0, 0) + ); + case MetaName.camCollisionMetadataPullBackTowardsCollision: + return new PsoStructureInfo(MetaName.camCollisionMetadataPullBackTowardsCollision, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.camHintHelperMetadata: + return new PsoStructureInfo(MetaName.camHintHelperMetadata, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FovScalar, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1674069994, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)67329582, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2753181554, PsoDataType.Structure, 40, 0, MetaName.camHintHelperMetadataPivotPositionAdditive), + new PsoStructureEntryInfo((MetaName)3051761482, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo((MetaName)399304638, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo((MetaName)315713489, PsoDataType.Bool, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3421755121, PsoDataType.Bool, 73, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1167921072, PsoDataType.Bool, 80, 0, 0) + ); + case MetaName.camHintHelperMetadataPivotPositionAdditive: + return new PsoStructureInfo(MetaName.camHintHelperMetadataPivotPositionAdditive, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)3517580346, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)2171374488, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)3803694830, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)187223663, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camInconsistentBehaviourZoomHelperMetadata: + return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperMetadata, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2835430912, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)192388977, PsoDataType.Structure, 24, 0, MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings), + new PsoStructureEntryInfo((MetaName)3137016932, PsoDataType.Structure, 64, 0, MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings), + new PsoStructureEntryInfo((MetaName)3922359176, PsoDataType.Structure, 104, 0, MetaName.camInconsistentBehaviourZoomHelperAirborneSettings), + new PsoStructureEntryInfo((MetaName)3604184077, PsoDataType.Structure, 144, 0, MetaName.camInconsistentBehaviourZoomHelperLosSettings) + ); + case MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings: + return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperDetectSuddenMovementSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2802018341, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings: + return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperDetectFastCameraTurnSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1513989445, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)423008264, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camInconsistentBehaviourZoomHelperAirborneSettings: + return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperAirborneSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)424844475, PsoDataType.UInt, 32, 0, 0) + ); + case MetaName.camInconsistentBehaviourZoomHelperLosSettings: + return new PsoStructureInfo(MetaName.camInconsistentBehaviourZoomHelperLosSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldDetect, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactionTime, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)989577416, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2226168954, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2667621860, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1918423771, PsoDataType.UInt, 32, 0, 0) + ); + case MetaName.camCatchUpHelperMetadata: + return new PsoStructureInfo(MetaName.camCatchUpHelperMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)482340760, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1046944473, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendDuration, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3764337155, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2836572250, PsoDataType.Enum, 32, 0, MetaName.eCurveType) + ); + case MetaName.camLookAtDampingHelperMetadata: + return new PsoStructureInfo(MetaName.camLookAtDampingHelperMetadata, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3543584583, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2722511334, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3076282416, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3481945794, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1705112434, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)627718911, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3152826625, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3880553368, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1561096582, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1150311187, PsoDataType.Float, 52, 0, 0) + ); + case MetaName.camLookAheadHelperMetadata: + return new PsoStructureInfo(MetaName.camLookAheadHelperMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)765307181, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)988110708, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3931376905, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1623903878, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3766959106, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)88070689, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1846985178, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2004585270, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 60, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadata: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadata, 0, 0, 1376, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), + new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), + new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), + new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), + new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), + new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), + new PsoStructureEntryInfo(MetaName.HandBrakeSwingSettings, PsoDataType.Structure, 1104, 0, MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings), + new PsoStructureEntryInfo(MetaName.DuckUnderOverheadCollisionSettings, PsoDataType.Structure, 1136, 0, MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings), + new PsoStructureEntryInfo(MetaName.HighSpeedZoomSettings, PsoDataType.Structure, 1192, 0, MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings), + new PsoStructureEntryInfo(MetaName.HighSpeedShakeSettings, PsoDataType.Structure, 1224, 0, MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings), + new PsoStructureEntryInfo(MetaName.WaterEntryShakeSettings, PsoDataType.Structure, 1248, 0, MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings), + new PsoStructureEntryInfo(MetaName.VerticalFlightModeSettings, PsoDataType.Structure, 1280, 0, MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings), + new PsoStructureEntryInfo(MetaName.DoorAlignmentSettings, PsoDataType.Structure, 1296, 0, MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings), + new PsoStructureEntryInfo(MetaName.VehicleEntryExitPitchLevelSmoothRate, PsoDataType.Float, 1336, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraOrbitPitchOffsetForHighAngleMode, PsoDataType.Float, 1340, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraOrbitPitchOffsetForThirdPersonFarViewMode, PsoDataType.Float, 1344, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldForceCutToOrbitDistanceLimitsForThirdPersonFarViewMode, PsoDataType.Bool, 1348, 0, 0), + new PsoStructureEntryInfo(MetaName.ThirdPersonVehicleAimCameraRef, PsoDataType.String, 1352, 7, 0), + new PsoStructureEntryInfo((MetaName)4075164277, PsoDataType.Bool, 1356, 0, 0), + new PsoStructureEntryInfo((MetaName)2625336677, PsoDataType.String, 1360, 7, 0), + new PsoStructureEntryInfo((MetaName)3347720841, PsoDataType.Float2, 1364, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHandBrakeSwingSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.HandBrakeInputEnvelopeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinLateralSkidSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLateralSkidSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SwingSpeedAtMaxSkidSpeed, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettings, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.EnvelopeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDuck, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchOffsetWhenFullyDucked, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToPersist, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CapsuleSettings, PsoDataType.Structure, 32, 0, MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings) + ); + case MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataDuckUnderOverheadCollisionSettingsCapsuleSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.NumTests, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LengthScaling, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.OffsetLimits, PsoDataType.Float2, 16, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHighSpeedZoomSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBaseFovScaling, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CutsceneBlendSpringConstant, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CutsceneBlendSpringDampingRatio, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataHighSpeedShakeSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinForwardSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataWaterEntryShakeSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxShakeInstances, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DownwardSpeedLimits, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AmplitudeLimits, PsoDataType.Float2, 24, 0, 0) + ); + case MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings: + return new PsoStructureInfo(MetaName.camFollowVehicleCameraMetadataVerticalFlightModeSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 8, 0, 0) + ); + case MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAlignOnVehicleExit, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo((MetaName)669372144, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.AlignmentConeOffsetTowardsVehicleFrontAngle, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AlignmentConeAngle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AlignmentConeAngleWithTrailer, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCut, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCutForReverseAngle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOrientationDeltaToCutWithTrailer, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camFollowParachuteCameraMetadata: + return new PsoStructureInfo(MetaName.camFollowParachuteCameraMetadata, 0, 0, 1136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentInAirEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingOnGroundEnvelopeRef, PsoDataType.String, 788, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachParentUpwardSpeedScalingInAirEnvelopeRef, PsoDataType.String, 792, 7, 0), + new PsoStructureEntryInfo(MetaName.AimBehaviourEnvelopeRef, PsoDataType.String, 796, 7, 0), + new PsoStructureEntryInfo(MetaName.WaterBobShakeRef, PsoDataType.String, 800, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentMovementForOrientation, PsoDataType.Bool, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.PullAroundSettings, PsoDataType.Structure, 808, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.PullAroundSettingsForLookBehind, PsoDataType.Structure, 872, 0, MetaName.camFollowCameraMetadataPullAroundSettings), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentLocalXYVelocityForPullAround, PsoDataType.Bool, 936, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConsiderAttachParentForwardSpeedForPullAround, PsoDataType.Bool, 937, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToAttachParentFront, PsoDataType.Bool, 938, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundToBasicAttachParentMatrix, PsoDataType.Bool, 939, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPullAroundUsingSimpleSpringDamping, PsoDataType.Bool, 940, 0, 0), + new PsoStructureEntryInfo((MetaName)2671392542, PsoDataType.Bool, 941, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachParentApproachSpeedForPitchLock, PsoDataType.Float, 944, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockHeading, PsoDataType.Bool, 948, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveSpeedForFollowOrientation, PsoDataType.Float, 952, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookAroundMoveSpeedMultiplier, PsoDataType.Float, 956, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedLimitsForVerticalMoveSpeedScaling, PsoDataType.Float2, 960, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScaling, PsoDataType.Float, 968, 0, 0), + new PsoStructureEntryInfo(MetaName.VerticalMoveSpeedScalingAtMaxSpeed, PsoDataType.Float, 972, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingOnGround, PsoDataType.Float, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.UpwardMoveSpeedScalingInAir, PsoDataType.Float, 980, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveOrientationSpeedDuringLookAround, PsoDataType.Float, 984, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowOrientationConing, PsoDataType.Structure, 992, 0, MetaName.camFollowCameraMetadataFollowOrientationConing), + new PsoStructureEntryInfo(MetaName.RollSettings, PsoDataType.Structure, 1024, 0, MetaName.camFollowCameraMetadataRollSettings), + new PsoStructureEntryInfo(MetaName.HighAltitudeZoomSettings, PsoDataType.Structure, 1064, 0, MetaName.camFollowCameraMetadataHighAltitudeZoomSettings), + new PsoStructureEntryInfo(MetaName.CustomSettings, PsoDataType.Structure, 1104, 0, MetaName.camFollowParachuteCameraMetadataCustomSettings) + ); + case MetaName.camFollowParachuteCameraMetadataCustomSettings: + return new PsoStructureInfo(MetaName.camFollowParachuteCameraMetadataCustomSettings, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)3501562487, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)1514912105, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2028447415, PsoDataType.String, 16, 7, 0) + ); + case MetaName.camFirstPersonPedAimCameraMetadata: + return new PsoStructureInfo(MetaName.camFirstPersonPedAimCameraMetadata, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMakeAttachedEntityInvisible, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)1959607978, PsoDataType.Bool, 113, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 114, 0, 0), + new PsoStructureEntryInfo((MetaName)1120407412, PsoDataType.Bool, 115, 0, 0), + new PsoStructureEntryInfo(MetaName.ShakeFirstPersonShootingAbilityLimits, PsoDataType.Float2, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.ShakeAmplitudeScalingForShootingAbilityLimits, PsoDataType.Float2, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)2758176724, PsoDataType.Structure, 136, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), + new PsoStructureEntryInfo((MetaName)330110937, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachPositionSmoothRate, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTorsoIkLimitsOverrideOrbitPitchLimits, PsoDataType.Bool, 188, 0, 0), + new PsoStructureEntryInfo((MetaName)1847867369, PsoDataType.Bool, 189, 0, 0), + new PsoStructureEntryInfo((MetaName)1173900687, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)1322555765, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo((MetaName)1723254225, PsoDataType.Bool, 200, 0, 0) + ); + case MetaName.camFirstPersonAimCameraMetadataHeadingCorrection: + return new PsoStructureInfo(MetaName.camFirstPersonAimCameraMetadataHeadingCorrection, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1496770623, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DeltaTolerance, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadata: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadata, 0, 0, 1664, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldMakeAttachedEntityInvisible, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)1959607978, PsoDataType.Bool, 113, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 114, 0, 0), + new PsoStructureEntryInfo((MetaName)1120407412, PsoDataType.Bool, 115, 0, 0), + new PsoStructureEntryInfo(MetaName.ShakeFirstPersonShootingAbilityLimits, PsoDataType.Float2, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.ShakeAmplitudeScalingForShootingAbilityLimits, PsoDataType.Float2, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)2758176724, PsoDataType.Structure, 136, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), + new PsoStructureEntryInfo((MetaName)330110937, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo((MetaName)3500215588, PsoDataType.Float3, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)1583458555, PsoDataType.Float3, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)3253139357, PsoDataType.Float3, 224, 0, 0), + new PsoStructureEntryInfo((MetaName)4262893203, PsoDataType.Float3, 240, 0, 0), + new PsoStructureEntryInfo((MetaName)2347724525, PsoDataType.Float3, 256, 0, 0), + new PsoStructureEntryInfo((MetaName)3438104893, PsoDataType.Float3, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)424961570, PsoDataType.Float3, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)104465235, PsoDataType.Float3, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)4034848485, PsoDataType.Float3, 320, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)2372600507, PsoDataType.Float2, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)971666241, PsoDataType.Float2, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)162051482, PsoDataType.Float2, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)3789298543, PsoDataType.Float2, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)3507003526, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo((MetaName)1765689234, PsoDataType.String, 384, 7, 0), + new PsoStructureEntryInfo((MetaName)722540604, PsoDataType.String, 388, 7, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 392, 7, 0), + new PsoStructureEntryInfo((MetaName)3102337801, PsoDataType.String, 396, 7, 0), + new PsoStructureEntryInfo((MetaName)1038878908, PsoDataType.String, 400, 7, 0), + new PsoStructureEntryInfo((MetaName)3684814544, PsoDataType.String, 404, 7, 0), + new PsoStructureEntryInfo((MetaName)2377645189, PsoDataType.String, 408, 7, 0), + new PsoStructureEntryInfo((MetaName)3664775821, PsoDataType.String, 412, 7, 0), + new PsoStructureEntryInfo((MetaName)3075522471, PsoDataType.String, 416, 7, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 420, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeAttachPositionSmoothRate, PsoDataType.Float, 424, 0, 0), + new PsoStructureEntryInfo((MetaName)3559802057, PsoDataType.Structure, 432, 0, MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings), + new PsoStructureEntryInfo((MetaName)3284913244, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo((MetaName)742850166, PsoDataType.Float, 548, 0, 0), + new PsoStructureEntryInfo((MetaName)1801708329, PsoDataType.Float, 552, 0, 0), + new PsoStructureEntryInfo((MetaName)522025471, PsoDataType.Float, 556, 0, 0), + new PsoStructureEntryInfo(MetaName.AimFov, PsoDataType.Float, 560, 0, 0), + new PsoStructureEntryInfo((MetaName)2685045238, PsoDataType.Float, 564, 0, 0), + new PsoStructureEntryInfo((MetaName)1545486036, PsoDataType.Float, 568, 0, 0), + new PsoStructureEntryInfo(MetaName.PhoneFov, PsoDataType.Float, 572, 0, 0), + new PsoStructureEntryInfo((MetaName)2263644173, PsoDataType.Float, 576, 0, 0), + new PsoStructureEntryInfo((MetaName)189771911, PsoDataType.Float, 580, 0, 0), + new PsoStructureEntryInfo((MetaName)3266229162, PsoDataType.Float, 584, 0, 0), + new PsoStructureEntryInfo((MetaName)3113298498, PsoDataType.Float, 588, 0, 0), + new PsoStructureEntryInfo((MetaName)317025866, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo((MetaName)788370107, PsoDataType.Float, 596, 0, 0), + new PsoStructureEntryInfo((MetaName)1892114730, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo((MetaName)2312570903, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo((MetaName)1650788232, PsoDataType.Float, 608, 0, 0), + new PsoStructureEntryInfo((MetaName)3142109941, PsoDataType.Float, 612, 0, 0), + new PsoStructureEntryInfo((MetaName)1692829019, PsoDataType.Float, 616, 0, 0), + new PsoStructureEntryInfo((MetaName)1583361695, PsoDataType.Float, 620, 0, 0), + new PsoStructureEntryInfo((MetaName)3530519735, PsoDataType.Float, 624, 0, 0), + new PsoStructureEntryInfo((MetaName)1560089378, PsoDataType.Float, 628, 0, 0), + new PsoStructureEntryInfo((MetaName)1683046794, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo((MetaName)1176445410, PsoDataType.Float, 636, 0, 0), + new PsoStructureEntryInfo((MetaName)3761456258, PsoDataType.Float, 640, 0, 0), + new PsoStructureEntryInfo((MetaName)413985988, PsoDataType.Float, 644, 0, 0), + new PsoStructureEntryInfo((MetaName)731578407, PsoDataType.Float, 648, 0, 0), + new PsoStructureEntryInfo((MetaName)3517278862, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.LadderPitch, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo((MetaName)83336335, PsoDataType.Float, 660, 0, 0), + new PsoStructureEntryInfo((MetaName)3203179444, PsoDataType.Float, 664, 0, 0), + new PsoStructureEntryInfo((MetaName)803486985, PsoDataType.Float, 668, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 672, 0, 0), + new PsoStructureEntryInfo((MetaName)2122499987, PsoDataType.Float, 676, 0, 0), + new PsoStructureEntryInfo((MetaName)1515082975, PsoDataType.Float, 680, 0, 0), + new PsoStructureEntryInfo((MetaName)1515564685, PsoDataType.Float, 684, 0, 0), + new PsoStructureEntryInfo((MetaName)3592059377, PsoDataType.Float, 688, 0, 0), + new PsoStructureEntryInfo((MetaName)448454700, PsoDataType.Bool, 692, 0, 0), + new PsoStructureEntryInfo((MetaName)545313111, PsoDataType.Float, 696, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo((MetaName)1534221961, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo((MetaName)270168093, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo((MetaName)2100042799, PsoDataType.Float, 712, 0, 0), + new PsoStructureEntryInfo((MetaName)3626441228, PsoDataType.UInt, 716, 0, 0), + new PsoStructureEntryInfo((MetaName)700340890, PsoDataType.UInt, 720, 0, 0), + new PsoStructureEntryInfo((MetaName)1968480925, PsoDataType.UInt, 724, 0, 0), + new PsoStructureEntryInfo((MetaName)2850438294, PsoDataType.UInt, 728, 0, 0), + new PsoStructureEntryInfo((MetaName)1608452380, PsoDataType.UInt, 732, 0, 0), + new PsoStructureEntryInfo((MetaName)2387142724, PsoDataType.UInt, 736, 0, 0), + new PsoStructureEntryInfo((MetaName)2743970065, PsoDataType.UInt, 740, 0, 0), + new PsoStructureEntryInfo((MetaName)2452155390, PsoDataType.UInt, 744, 0, 0), + new PsoStructureEntryInfo(MetaName.OrientationSpring, PsoDataType.Structure, 752, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), + new PsoStructureEntryInfo((MetaName)415673303, PsoDataType.Structure, 792, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), + new PsoStructureEntryInfo((MetaName)3397810078, PsoDataType.Structure, 832, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpring), + new PsoStructureEntryInfo((MetaName)3440729757, PsoDataType.Structure, 872, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)2454767338, PsoDataType.Structure, 888, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)1962460716, PsoDataType.Structure, 904, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)1766077384, PsoDataType.Structure, 920, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)2053281479, PsoDataType.Structure, 936, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)3083287001, PsoDataType.Structure, 952, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)4060968766, PsoDataType.Structure, 968, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)2437540040, PsoDataType.Structure, 984, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)3391036765, PsoDataType.Structure, 1000, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)2728534787, PsoDataType.Structure, 1016, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)3139215619, PsoDataType.Structure, 1032, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)4087791749, PsoDataType.Structure, 1048, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)2550891007, PsoDataType.Structure, 1064, 0, MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite), + new PsoStructureEntryInfo((MetaName)475503552, PsoDataType.Float, 1080, 0, 0), + new PsoStructureEntryInfo((MetaName)1215439957, PsoDataType.Float2, 1084, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTorsoIkLimitsOverrideOrbitPitchLimits, PsoDataType.Bool, 1092, 0, 0), + new PsoStructureEntryInfo((MetaName)1723254225, PsoDataType.Bool, 1093, 0, 0), + new PsoStructureEntryInfo((MetaName)366723406, PsoDataType.String, 1096, 7, 0), + new PsoStructureEntryInfo((MetaName)264754789, PsoDataType.String, 1100, 7, 0), + new PsoStructureEntryInfo((MetaName)1539647797, PsoDataType.String, 1104, 7, 0), + new PsoStructureEntryInfo((MetaName)1519473347, PsoDataType.Float, 1108, 0, 0), + new PsoStructureEntryInfo((MetaName)3224324247, PsoDataType.Float, 1112, 0, 0), + new PsoStructureEntryInfo((MetaName)2478271115, PsoDataType.Float, 1116, 0, 0), + new PsoStructureEntryInfo((MetaName)2317113905, PsoDataType.Float, 1120, 0, 0), + new PsoStructureEntryInfo((MetaName)3903912151, PsoDataType.Float, 1124, 0, 0), + new PsoStructureEntryInfo((MetaName)2266019553, PsoDataType.Float, 1128, 0, 0), + new PsoStructureEntryInfo((MetaName)3706052819, PsoDataType.Float, 1132, 0, 0), + new PsoStructureEntryInfo((MetaName)2722258227, PsoDataType.Float, 1136, 0, 0), + new PsoStructureEntryInfo((MetaName)1525907069, PsoDataType.Float, 1140, 0, 0), + new PsoStructureEntryInfo((MetaName)2570774561, PsoDataType.Float, 1144, 0, 0), + new PsoStructureEntryInfo((MetaName)1547572758, PsoDataType.Bool, 1148, 0, 0), + new PsoStructureEntryInfo((MetaName)3957958745, PsoDataType.UInt, 1152, 0, 0), + new PsoStructureEntryInfo((MetaName)1630855608, PsoDataType.Float, 1156, 0, 0), + new PsoStructureEntryInfo((MetaName)3965978499, PsoDataType.Structure, 1160, 0, MetaName.camFirstPersonShooterCameraMetadataStickyAim), + new PsoStructureEntryInfo((MetaName)585212636, PsoDataType.Structure, 1272, 0, MetaName.camFirstPersonShooterCameraMetadataStickyAim), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 1384, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 1385, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 1388, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 1392, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 1396, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 1400, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 1404, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 1408, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 1412, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 1416, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 1420, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 1424, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 1428, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 1432, 0, 0), + new PsoStructureEntryInfo((MetaName)2447870594, PsoDataType.Float, 1436, 0, 0), + new PsoStructureEntryInfo((MetaName)2225908075, PsoDataType.Float, 1440, 0, 0), + new PsoStructureEntryInfo((MetaName)1894138, PsoDataType.Float, 1444, 0, 0), + new PsoStructureEntryInfo((MetaName)724885771, PsoDataType.Float, 1448, 0, 0), + new PsoStructureEntryInfo((MetaName)2413827894, PsoDataType.Float2, 1452, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverSettings, PsoDataType.Structure, 1464, 0, MetaName.camFirstPersonShooterCameraMetadataCoverSettings), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings), + new PsoStructureEntryInfo((MetaName)2011532787, PsoDataType.Array, 1584, 1, (MetaName)131236), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 1656, 7, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataRelativeAttachOrientationSettings, 0, 0, 112, + new PsoStructureEntryInfo((MetaName)3727099699, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3120224920, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2408234737, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)869960116, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3340971535, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2197092363, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2198368821, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3606762226, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1647925848, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)490937808, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)379620733, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1441798592, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3840322276, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3383026591, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1824793815, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1259376027, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2964527414, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)2439730995, PsoDataType.Float3, 96, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataOrientationSpring: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataOrientationSpring, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.HeadingLimits, PsoDataType.Float2, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchLimits, PsoDataType.Float2, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1524988618, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1290012653, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataOrientationSpringLite, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataStickyAim: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataStickyAim, 0, 0, 112, + new PsoStructureEntryInfo((MetaName)934287534, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1890095417, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2911838887, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1168068740, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)943460322, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2440008981, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3546382126, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3702929248, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1390609527, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1952283316, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1859396322, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)3508865952, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)4071651879, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3012719683, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1163787532, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3148686816, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2294593316, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3264503435, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)432760898, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3118501359, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2024506330, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1824271937, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)721888806, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)903289241, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)2991714924, PsoDataType.Float, 104, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataCoverSettings: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataCoverSettings, 0, 0, 120, + new PsoStructureEntryInfo((MetaName)2970917480, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)256711860, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)2716737212, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1153272400, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)11232964, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1680843526, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1294539981, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3548711893, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3299300152, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1497386222, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)783496886, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2616989255, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingCorrection, PsoDataType.Structure, 56, 0, MetaName.camFirstPersonAimCameraMetadataHeadingCorrection), + new PsoStructureEntryInfo((MetaName)907428778, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)4143200730, PsoDataType.SInt, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)105496678, PsoDataType.SInt, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)2098811685, PsoDataType.SInt, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)1946159554, PsoDataType.SInt, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)3595423851, PsoDataType.SInt, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)153370955, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1271201291, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)558015512, PsoDataType.UInt, 112, 0, 0) + ); + case MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings: + return new PsoStructureInfo(MetaName.camFirstPersonShooterCameraMetadataSprintBreakOutSettings, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)741085985, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)87271889, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)4190510062, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1438187592, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1823031239, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2144963791, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.camFirstPersonHeadTrackingAimCameraMetadata: + return new PsoStructureInfo(MetaName.camFirstPersonHeadTrackingAimCameraMetadata, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUpdatesBeforeApplyingMotionBlur, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseMotionBlurStrength, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMinFovDelta, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxFovDelta, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ZoomMotionBlurMaxStrengthForFov, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachRelativeOffset, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachOffsetRelativeToCamera, PsoDataType.Bool, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRelativeHeading, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRelativeHeading, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 116, 0, 0) + ); + case MetaName.camThirdPersonPedAimCameraMetadata: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadata, 0, 0, 1040, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), + new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), + new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), + new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0) + ); + case MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldApplyDamping, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedHeadingSpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedHeadingSpringDampingRatio, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedPitchSpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedPitchSpringDampingRatio, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedDistanceSpringConstant, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.StunnedDistanceSpringDampingRatio, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldApplyScaling, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnDistanceLimits, PsoDataType.Float2, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingLimits, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingSpringConstant, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingSpringDampingRatio, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraMetadata: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraMetadata, 0, 0, 1584, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), + new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), + new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), + new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), + new PsoStructureEntryInfo((MetaName)2612404486, PsoDataType.Bool, 1040, 0, 0), + new PsoStructureEntryInfo((MetaName)3464513788, PsoDataType.String, 1044, 7, 0), + new PsoStructureEntryInfo((MetaName)3165832172, PsoDataType.Float, 1048, 0, 0), + new PsoStructureEntryInfo((MetaName)313901382, PsoDataType.Float, 1052, 0, 0), + new PsoStructureEntryInfo((MetaName)3456520914, PsoDataType.Float, 1056, 0, 0), + new PsoStructureEntryInfo((MetaName)3227758752, PsoDataType.Float, 1060, 0, 0), + new PsoStructureEntryInfo((MetaName)2595201884, PsoDataType.Structure, 1064, 0, MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings), + new PsoStructureEntryInfo((MetaName)1699579049, PsoDataType.Structure, 1088, 0, MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings), + new PsoStructureEntryInfo((MetaName)2514985597, PsoDataType.Structure, 1112, 0, MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings), + new PsoStructureEntryInfo((MetaName)3459655185, PsoDataType.Structure, 1136, 0, MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings), + new PsoStructureEntryInfo((MetaName)1039438125, PsoDataType.Structure, 1192, 0, MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings), + new PsoStructureEntryInfo((MetaName)2331386580, PsoDataType.Structure, 1248, 0, MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings), + new PsoStructureEntryInfo((MetaName)3975806377, PsoDataType.Structure, 1432, 0, MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings), + new PsoStructureEntryInfo((MetaName)2579888707, PsoDataType.Structure, 1464, 0, MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings) + ); + case MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraShakeActivityScalingSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.AmplitudeScale, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraRunningShakeSettings, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinAmplitude, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmplitude, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3083741385, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2434404012, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo((MetaName)1424595128, PsoDataType.Bool, 22, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraPivotScalingSettings, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3290868314, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1239610477, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)4266810853, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2490035552, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1582111169, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ErrorThreshold, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.SideOffset, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3185812029, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2740464011, PsoDataType.Float, 52, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraShootingFocusSettings, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)1778381348, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)352609433, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2503271690, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZoomFactor, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraCinematicMomentSettings, 0, 0, 184, + new PsoStructureEntryInfo((MetaName)3112353702, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3298892127, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)3924454742, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2215779446, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)917560913, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1705773296, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3495762240, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2011477591, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3944656129, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3273599536, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.ZoomFactor, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1293989475, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3934763180, PsoDataType.Structure, 56, 0, MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings), + new PsoStructureEntryInfo((MetaName)4209943355, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)3222932576, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)1411402256, PsoDataType.Structure, 120, 0, MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 180, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraLockOnAlignmentSettings, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2192037365, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)1207772736, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1953981041, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleCmini, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3067708566, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3928624067, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)4117544351, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3546588287, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2433975532, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2894326732, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraPlayerFramingSettings, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.AttackDelay, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AttackDuration, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ReleaseDelay, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1918481730, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredPitch, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3067708566, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3928624067, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)4117544351, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3648026356, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraRecoilShakeScalingSettings, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)632884413, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3501089975, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)1841607681, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)405521980, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAssistedAimCameraInCoverSettings, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3044106186, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2342994624, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2363962395, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3996729234, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2974603259, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1163820100, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1153320978, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)887750583, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.parameterIntensity, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3038154213, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)795086429, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2305231569, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2043206239, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1283135688, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3878807616, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3640542370, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)3758922505, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1764223557, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)3214654546, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)1111260888, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)3050977735, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1185331567, PsoDataType.Float, 108, 0, 0) + ); + case MetaName.camThirdPersonPedAimInCoverCameraMetadata: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadata, 0, 0, 1248, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), + new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), + new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), + new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), + new PsoStructureEntryInfo((MetaName)124410885, PsoDataType.Float, 1040, 0, 0), + new PsoStructureEntryInfo((MetaName)1852506764, PsoDataType.Float, 1044, 0, 0), + new PsoStructureEntryInfo((MetaName)1914946004, PsoDataType.Float, 1048, 0, 0), + new PsoStructureEntryInfo((MetaName)2125876256, PsoDataType.Float, 1052, 0, 0), + new PsoStructureEntryInfo((MetaName)3456376985, PsoDataType.Float, 1056, 0, 0), + new PsoStructureEntryInfo(MetaName.streamedMusc, PsoDataType.Float, 1060, 0, 0), + new PsoStructureEntryInfo((MetaName)2791057952, PsoDataType.Float, 1064, 0, 0), + new PsoStructureEntryInfo((MetaName)1336398630, PsoDataType.Bool, 1068, 0, 0), + new PsoStructureEntryInfo((MetaName)1847527244, PsoDataType.Float, 1072, 0, 0), + new PsoStructureEntryInfo((MetaName)364456330, PsoDataType.Float, 1076, 0, 0), + new PsoStructureEntryInfo((MetaName)3398320415, PsoDataType.Float, 1080, 0, 0), + new PsoStructureEntryInfo((MetaName)2699503170, PsoDataType.Float, 1084, 0, 0), + new PsoStructureEntryInfo((MetaName)2215910236, PsoDataType.Float, 1088, 0, 0), + new PsoStructureEntryInfo((MetaName)2140597790, PsoDataType.Float, 1092, 0, 0), + new PsoStructureEntryInfo((MetaName)2141354850, PsoDataType.Float, 1096, 0, 0), + new PsoStructureEntryInfo((MetaName)9125054, PsoDataType.Float, 1100, 0, 0), + new PsoStructureEntryInfo((MetaName)341585039, PsoDataType.Float, 1104, 0, 0), + new PsoStructureEntryInfo((MetaName)3090152422, PsoDataType.Float, 1108, 0, 0), + new PsoStructureEntryInfo((MetaName)3518102089, PsoDataType.Float, 1112, 0, 0), + new PsoStructureEntryInfo((MetaName)2714979879, PsoDataType.Float, 1116, 0, 0), + new PsoStructureEntryInfo((MetaName)4047322117, PsoDataType.Float, 1120, 0, 0), + new PsoStructureEntryInfo((MetaName)10419895, PsoDataType.Float, 1124, 0, 0), + new PsoStructureEntryInfo((MetaName)817394632, PsoDataType.Float2, 1128, 0, 0), + new PsoStructureEntryInfo((MetaName)3793303691, PsoDataType.Bool, 1136, 0, 0), + new PsoStructureEntryInfo((MetaName)891610436, PsoDataType.Float, 1140, 0, 0), + new PsoStructureEntryInfo((MetaName)1332592052, PsoDataType.Float, 1144, 0, 0), + new PsoStructureEntryInfo((MetaName)3712243434, PsoDataType.Float, 1148, 0, 0), + new PsoStructureEntryInfo((MetaName)2126717159, PsoDataType.Float, 1152, 0, 0), + new PsoStructureEntryInfo((MetaName)467663222, PsoDataType.Float, 1156, 0, 0), + new PsoStructureEntryInfo((MetaName)3920880465, PsoDataType.Float, 1160, 0, 0), + new PsoStructureEntryInfo((MetaName)1407257659, PsoDataType.UInt, 1164, 0, 0), + new PsoStructureEntryInfo((MetaName)1350298358, PsoDataType.Structure, 1168, 0, MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings), + new PsoStructureEntryInfo(MetaName.AimingSettings, PsoDataType.Structure, 1208, 0, MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings) + ); + case MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadataLowCoverSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.BlendInSpringConstant, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)2811394796, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutSpringConstant, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)388057725, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)4026985674, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2972801644, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings: + return new PsoStructureInfo(MetaName.camThirdPersonPedAimInCoverCameraMetadataAimingSettings, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)3794685898, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3031220740, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)810186943, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2302950975, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camThirdPersonPedMeleeAimCameraMetadata: + return new PsoStructureInfo(MetaName.camThirdPersonPedMeleeAimCameraMetadata, 0, 0, 1088, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetStunnedEnvelopeRef, PsoDataType.String, 880, 7, 0), + new PsoStructureEntryInfo(MetaName.LockOnTargetDampingSettings, PsoDataType.Structure, 888, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnTargetDampingSettings), + new PsoStructureEntryInfo(MetaName.LockOnOrbitDistanceSettings, PsoDataType.Structure, 928, 0, MetaName.camThirdPersonPedAimCameraMetadataLockOnOrbitDistanceSettings), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffset, PsoDataType.Float3, 976, 0, 0), + new PsoStructureEntryInfo(MetaName.ParentRelativeAttachOffsetAtOrbitHeadingLimits, PsoDataType.Float3, 992, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachBoneTag, PsoDataType.SInt, 1008, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldScriptedAimTaskOverrideOrbitPitchLimits, PsoDataType.Bool, 1012, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAimSweepOverrideOrbitPitchLimits, PsoDataType.Bool, 1013, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsForMobilePhoneShallowDofMode, PsoDataType.String, 1016, 7, 0), + new PsoStructureEntryInfo((MetaName)309842601, PsoDataType.Float, 1020, 0, 0), + new PsoStructureEntryInfo((MetaName)3770307856, PsoDataType.Bool, 1024, 0, 0), + new PsoStructureEntryInfo((MetaName)3195731427, PsoDataType.Float, 1040, 0, 0), + new PsoStructureEntryInfo((MetaName)2888452072, PsoDataType.Float2, 1044, 0, 0), + new PsoStructureEntryInfo((MetaName)2501102835, PsoDataType.Float, 1052, 0, 0), + new PsoStructureEntryInfo((MetaName)2903662656, PsoDataType.Float, 1056, 0, 0), + new PsoStructureEntryInfo((MetaName)2037218535, PsoDataType.Float, 1060, 0, 0), + new PsoStructureEntryInfo((MetaName)4219845621, PsoDataType.Float, 1064, 0, 0), + new PsoStructureEntryInfo((MetaName)3549368383, PsoDataType.Float, 1068, 0, 0), + new PsoStructureEntryInfo((MetaName)1000603972, PsoDataType.Float, 1072, 0, 0), + new PsoStructureEntryInfo((MetaName)1991971403, PsoDataType.Float, 1076, 0, 0) + ); + case MetaName.camThirdPersonVehicleAimCameraMetadata: + return new PsoStructureInfo(MetaName.camThirdPersonVehicleAimCameraMetadata, 0, 0, 896, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlHelperRef, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.HintHelperRef, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.CatchUpHelperRef, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseAttachVelocityToIgnoreEnvelopeRef, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseFov, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseNearClip, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3305154880, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldOrbitRelativeToAttachParentOrientation, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPersistOrbitOrientationRelativeToAttachParent, PsoDataType.Bool, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringConstant, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentMatrixForRelativeOrbitSpringDampingRatio, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2406229624, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)727876548, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSubmergedLevelToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftGroundSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAircraftContactSpeedToApplyFullAttachParentMatrixForRelativeOrbit, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldTimeToBlockFullAttachParentMatrixForRelativeOrbit, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAttachParentSpeedToClonePitchFromCinematicMountedCameras, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomFramingInTightSpace, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAttachSpeedToUpdateTightSpaceLevel, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringConstant, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.TightSpaceSpringDampingRatio, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DofSettingsInTightSpace, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldAttachToParentCentreOfGravity, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseDynamicCentreOfGravity, PsoDataType.Bool, 121, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVelocityOfAttachParentAttachEntity, PsoDataType.Bool, 122, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomBoundingBoxSettings, PsoDataType.Structure, 128, 0, MetaName.camThirdPersonCameraMetadataCustomBoundingBoxSettings), + new PsoStructureEntryInfo(MetaName.ShouldApplyAttachPedPelvisOffset, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringConstant, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachPedPelvisOffsetSpringDampingRatio, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotPosition, PsoDataType.Structure, 176, 0, MetaName.camThirdPersonCameraMetadataBasePivotPosition), + new PsoStructureEntryInfo(MetaName.PivotPosition, PsoDataType.Structure, 272, 0, MetaName.camThirdPersonCameraMetadataPivotPosition), + new PsoStructureEntryInfo(MetaName.PivotOverBoundingBoxSettings, PsoDataType.Structure, 320, 0, MetaName.camThirdPersonCameraMetadataPivotOverBoungingBoxSettings), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoom, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoom, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMinFootRoomInTightSpace, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ScreenRatioForMaxFootRoomInTightSpace, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.BasePivotHeightScalingForFootRoom, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreVerticalPivotOffsetForFootRoom, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeOrbitDistanceScalingForExtensions, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)560700931, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomOrbitDistanceLimitsToForce, PsoDataType.Float2, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringConstant, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitSpringDampingRatio, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceScalingForCustomFirstPersonFallBack, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.BuoyancySettings, PsoDataType.Structure, 400, 0, MetaName.camThirdPersonCameraMetadataBuoyancySettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithAttachParent, PsoDataType.Bool, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreCollisionWithFollowVehicle, PsoDataType.Bool, 449, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionOrigin, PsoDataType.Bool, 450, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreFollowVehicleForCollisionRoot, PsoDataType.Bool, 451, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringConstant, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionTestRadiusSpringDampingRatio, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomCollisionOriginRelativePosition, PsoDataType.Float3, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)4194152221, PsoDataType.Float3, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseCustomCollisionOrigin, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1998689777, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo((MetaName)2235540893, PsoDataType.Bool, 514, 0, 0), + new PsoStructureEntryInfo((MetaName)3479639237, PsoDataType.Float3, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)1496115250, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionFallBackPosition, PsoDataType.Structure, 552, 0, MetaName.camThirdPersonCameraMetadataCollisionFallBackPosition), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionFallBackToPivotBlendValue, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldConstrainCollisionRootPositionAgainstClippingTypes, PsoDataType.Bool, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringConstant, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionRootPositionSpringDampingRatio, PsoDataType.Float, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleOnTopOfVehicleCollisionSettings, PsoDataType.Structure, 608, 0, MetaName.camThirdPersonCameraMetadataVehicleOnTopOfVehicleCollisionSettings), + new PsoStructureEntryInfo(MetaName.IdealHeadingOffsetForLimiting, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeOrbitHeadingLimits, PsoDataType.Float2, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitPitchLimits, PsoDataType.Float2, 644, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffset, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseOrbitPitchOffsetInTightSpace, PsoDataType.Float, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.LookOverSettings, PsoDataType.Structure, 664, 0, MetaName.camThirdPersonCameraMetadataLookOverSettings), + new PsoStructureEntryInfo(MetaName.ShouldIgnoreAttachParentPitchForLookBehind, PsoDataType.Bool, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.OrbitDistanceLimitsForBasePosition, PsoDataType.Float2, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.PreToPostCollisionLookAtOrientationBlendValue, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringConstant, PsoDataType.Float, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollSpringDampingRatio, PsoDataType.Float, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchSoftLimits, PsoDataType.Float2, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRollDampingPitchHardLimits, PsoDataType.Float2, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthZoomSettings, PsoDataType.Structure, 728, 0, MetaName.camThirdPersonCameraMetadataStealthZoomSettings), + new PsoStructureEntryInfo((MetaName)1947299079, PsoDataType.Structure, 752, 0, MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring), + new PsoStructureEntryInfo(MetaName.MotionBlurSettings, PsoDataType.String, 776, 7, 0), + new PsoStructureEntryInfo((MetaName)2122226771, PsoDataType.Bool, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnEnvelopeRef, PsoDataType.String, 784, 7, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticule, PsoDataType.Bool, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldDisplayReticuleDuringInterpolation, PsoDataType.Bool, 789, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldAllowInterpolationSourceCameraToPersistReticule, PsoDataType.Bool, 790, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldApplyWeaponFov, PsoDataType.Bool, 791, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAiming, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLockOnToTargetEntityPosition, PsoDataType.Bool, 793, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldValidateLockOnTargetPosition, PsoDataType.Bool, 794, 0, 0), + new PsoStructureEntryInfo(MetaName.TripleHeadNearClip, PsoDataType.Float, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.RecoilShakeAmplitudeScaling, PsoDataType.Float, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLockOn, PsoDataType.Float, 804, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForFineAimScaling, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForFineAimScaling, PsoDataType.Float, 812, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleDeltaForLockOnSwitchBlendScaling, PsoDataType.Float, 816, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForInitialLockOn, PsoDataType.UInt, 820, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForInitialLockOn, PsoDataType.UInt, 824, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendDurationForLockOnSwitch, PsoDataType.UInt, 828, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBlendDurationForLockOnSwitch, PsoDataType.UInt, 832, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringConstant, PsoDataType.Float, 836, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimBlendSpringDampingRatio, PsoDataType.Float, 840, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringConstant, PsoDataType.Float, 844, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponZoomFactorSpringDampingRatio, PsoDataType.Float, 848, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFocusOnLockOnTarget, PsoDataType.Bool, 852, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseFovToEmulateWithFocalLengthMultiplier, PsoDataType.Float, 856, 0, 0), + new PsoStructureEntryInfo(MetaName.FocusParentToTargetBlendLevel, PsoDataType.Float, 860, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondaryFocusParentToTargetBlendLevel, PsoDataType.Float, 864, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFocusToSecondaryFocusDistance, PsoDataType.Float, 868, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAimingForDriver, PsoDataType.Bool, 880, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldUseLockOnAimingForPassenger, PsoDataType.Bool, 881, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraSideOffsetForHangingOnLeftSide, PsoDataType.Float, 884, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraSideOffsetForHangingOnRightSide, PsoDataType.Float, 888, 0, 0) + ); + case MetaName.camMarketingFreeCameraMetadata: + return new PsoStructureInfo(MetaName.camMarketingFreeCameraMetadata, 0, 0, 200, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0) + ); + case MetaName.camMarketingFreeCameraMetadataInputResponse: + return new PsoStructureInfo(MetaName.camMarketingFreeCameraMetadataInputResponse, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)3855676319, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Acceleration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Deceleration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.camMarketingAToBCameraMetadata: + return new PsoStructureInfo(MetaName.camMarketingAToBCameraMetadata, 0, 0, 216, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)1044888659, PsoDataType.String, 200, 7, 0), + new PsoStructureEntryInfo((MetaName)1147067733, PsoDataType.UInt, 204, 0, 0), + new PsoStructureEntryInfo((MetaName)1825469896, PsoDataType.UInt, 208, 0, 0) + ); + case MetaName.camTimedSplineCameraMetadata: + return new PsoStructureInfo(MetaName.camTimedSplineCameraMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) + ); + case MetaName.camMarketingOrbitCameraMetadata: + return new PsoStructureInfo(MetaName.camMarketingOrbitCameraMetadata, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 204, 7, 0) + ); + case MetaName.camMarketingMountedCameraMetadata: + return new PsoStructureInfo(MetaName.camMarketingMountedCameraMetadata, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)2308368369, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringMountRef, PsoDataType.String, 204, 7, 0) + ); + case MetaName.camMarketingStickyCameraMetadata: + return new PsoStructureInfo(MetaName.camMarketingStickyCameraMetadata, 0, 0, 200, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3808044930, PsoDataType.Structure, 32, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2925373184, PsoDataType.Structure, 64, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 96, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3295350072, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)1591024915, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)829837985, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camMarketingFreeCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3141690306, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)4157311158, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)1989308054, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 192, 0, 0) + ); + case MetaName.camScriptedCameraMetadata: + return new PsoStructureInfo(MetaName.camScriptedCameraMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camScriptedFlyCameraMetadata: + return new PsoStructureInfo(MetaName.camScriptedFlyCameraMetadata, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1160500952, PsoDataType.Structure, 40, 0, MetaName.camScriptedFlyCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2802203540, PsoDataType.Structure, 64, 0, MetaName.camScriptedFlyCameraMetadataInputResponse), + new PsoStructureEntryInfo(MetaName.DefaultPitch, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)2736468652, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.CapsuleRadius, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveWater, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)2779060394, PsoDataType.UInt, 112, 0, 0) + ); + case MetaName.camScriptedFlyCameraMetadataInputResponse: + return new PsoStructureInfo(MetaName.camScriptedFlyCameraMetadataInputResponse, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAcceleration, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDeceleration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camCustomTimedSplineCameraMetadata: + return new PsoStructureInfo(MetaName.camCustomTimedSplineCameraMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) + ); + case MetaName.camRoundedSplineCameraMetadata: + return new PsoStructureInfo(MetaName.camRoundedSplineCameraMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camSmoothedSplineCameraMetadata: + return new PsoStructureInfo(MetaName.camSmoothedSplineCameraMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3867080895, PsoDataType.SInt, 40, 0, 0) + ); + case MetaName.camSwitchCameraMetadata: + return new PsoStructureInfo(MetaName.camSwitchCameraMetadata, 0, 0, 144, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1245276384, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)2105074563, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.Fov, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MotionBlurStrength, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1056782751, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)341706306, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2303904065, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)978298090, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultPitch, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)1771807090, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)1215756626, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1181521957, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)2559186523, PsoDataType.UInt, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)1045169360, PsoDataType.UInt, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)1298516568, PsoDataType.UInt, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3976211620, PsoDataType.UInt, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)3193297650, PsoDataType.UInt, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)3466836211, PsoDataType.UInt, 132, 0, 0) + ); + case MetaName.camReplayRecordedCameraMetadata: + return new PsoStructureInfo(MetaName.camReplayRecordedCameraMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camReplayPresetCameraMetadata: + return new PsoStructureInfo(MetaName.camReplayPresetCameraMetadata, 0, 0, 256, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3243156997, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.RelativeLookAtPosition, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3869518259, PsoDataType.Structure, 80, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 104, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 128, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)777402839, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)1557834870, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)1089474876, PsoDataType.Bool, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)2480397790, PsoDataType.Bool, 173, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionSettings, PsoDataType.Structure, 176, 0, MetaName.camReplayBaseCameraMetadataCollisionSettings), + new PsoStructureEntryInfo((MetaName)549109147, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo((MetaName)3394194196, PsoDataType.UInt, 228, 0, 0), + new PsoStructureEntryInfo((MetaName)2704093958, PsoDataType.UInt, 232, 0, 0), + new PsoStructureEntryInfo((MetaName)1677933530, PsoDataType.UInt, 236, 0, 0), + new PsoStructureEntryInfo((MetaName)343964264, PsoDataType.UInt, 240, 0, 0), + new PsoStructureEntryInfo((MetaName)681964647, PsoDataType.UInt, 244, 0, 0), + new PsoStructureEntryInfo((MetaName)2782721869, PsoDataType.UInt, 248, 0, 0) + ); + case MetaName.camReplayBaseCameraMetadataInputResponse: + return new PsoStructureInfo(MetaName.camReplayBaseCameraMetadataInputResponse, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.InputMagPowerFactor, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAcceleration, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDeceleration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camReplayBaseCameraMetadataCollisionSettings: + return new PsoStructureInfo(MetaName.camReplayBaseCameraMetadataCollisionSettings, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)2162401385, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.WaterHeightSmoothRate, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSafeRadiusReductionWithinPedMoverCapsule, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)653804618, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3232040475, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)819688366, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)122123361, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)557881422, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldPushBeyondAttachParentIfClipping, PsoDataType.Bool, 40, 0, 0) + ); + case MetaName.camReplayFreeCameraMetadata: + return new PsoStructureInfo(MetaName.camReplayFreeCameraMetadata, 0, 0, 544, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.CollisionRef, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.DofSettings, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCollisionTestRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.NearClip, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1160500952, PsoDataType.Structure, 48, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2802203540, PsoDataType.Structure, 72, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2292446130, PsoDataType.Structure, 96, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)31061142, PsoDataType.Structure, 120, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)3177251856, PsoDataType.Structure, 144, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)1176189471, PsoDataType.Structure, 168, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)4043692651, PsoDataType.Structure, 192, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)2391928883, PsoDataType.Structure, 216, 0, MetaName.camReplayBaseCameraMetadataInputResponse), + new PsoStructureEntryInfo((MetaName)1466164024, PsoDataType.Structure, 240, 0, MetaName.camInterpolatorMetadata), + new PsoStructureEntryInfo((MetaName)3699879509, PsoDataType.Structure, 280, 0, MetaName.camInterpolatorMetadata), + new PsoStructureEntryInfo((MetaName)2461431150, PsoDataType.Structure, 320, 0, MetaName.camInterpolatorMetadata), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFov, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFov, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultFov, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.CapsuleRadius, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo((MetaName)537337364, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo((MetaName)870756038, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo((MetaName)1068739939, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo((MetaName)3629360459, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo((MetaName)479683481, PsoDataType.Float, 396, 0, 0), + new PsoStructureEntryInfo((MetaName)2077539523, PsoDataType.Float3, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionSettings, PsoDataType.Structure, 416, 0, MetaName.camReplayBaseCameraMetadataCollisionSettings), + new PsoStructureEntryInfo((MetaName)4113213041, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo((MetaName)2101093733, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo((MetaName)2090863388, PsoDataType.Float, 472, 0, 0), + new PsoStructureEntryInfo((MetaName)109690208, PsoDataType.Float, 476, 0, 0), + new PsoStructureEntryInfo((MetaName)425553139, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)2285453310, PsoDataType.UInt, 484, 0, 0), + new PsoStructureEntryInfo((MetaName)3186336829, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo((MetaName)858986389, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo((MetaName)168114371, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo((MetaName)2257617130, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo((MetaName)4119877675, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo((MetaName)2969211614, PsoDataType.UInt, 508, 0, 0), + new PsoStructureEntryInfo((MetaName)3394194196, PsoDataType.UInt, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)2704093958, PsoDataType.UInt, 516, 0, 0), + new PsoStructureEntryInfo((MetaName)1677933530, PsoDataType.UInt, 520, 0, 0), + new PsoStructureEntryInfo((MetaName)343964264, PsoDataType.UInt, 524, 0, 0), + new PsoStructureEntryInfo((MetaName)681964647, PsoDataType.UInt, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)2782721869, PsoDataType.UInt, 532, 0, 0), + new PsoStructureEntryInfo((MetaName)3026527735, PsoDataType.Float, 536, 0, 0), + new PsoStructureEntryInfo((MetaName)1272604977, PsoDataType.Float, 540, 0, 0) + ); + case MetaName.camShakeMetadata: + return new PsoStructureInfo(MetaName.camShakeMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)1260823161, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)1428204256, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3480173900, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camShakeMetadataFrameComponent), + new PsoStructureEntryInfo(MetaName.FrameComponents, PsoDataType.Array, 24, 0, (MetaName)4), + new PsoStructureEntryInfo(MetaName.Vibration, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camShakeMetadataFrameComponent: + return new PsoStructureInfo(MetaName.camShakeMetadataFrameComponent, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, (MetaName)4206293824), + new PsoStructureEntryInfo((MetaName)3866719227, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.EnvelopeRef, PsoDataType.String, 16, 7, 0) + ); + case MetaName.camOscillatorMetadata: + return new PsoStructureInfo(MetaName.camOscillatorMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Waveform, PsoDataType.Enum, 16, 0, (MetaName)902027429), + new PsoStructureEntryInfo(MetaName.Amplitude, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.Frequency, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.phase, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2974245218, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.Decay, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.camAnimatedShakeMetadata: + return new PsoStructureInfo(MetaName.camAnimatedShakeMetadata, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)1260823161, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)1428204256, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3480173900, PsoDataType.Bool, 21, 0, 0) + ); + case MetaName.camCinematicCameraManShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicCameraManShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.camCinematicCraningCameraManShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicCraningCameraManShotMetadata, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)934463872, PsoDataType.Bool, 65, 0, 0), + new PsoStructureEntryInfo((MetaName)2227467637, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)943740099, PsoDataType.Bool, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1606540295, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3516181833, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3249173046, PsoDataType.Float2, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2987455099, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.ScanRadius, PsoDataType.Float, 96, 0, 0) + ); + case MetaName.camCinematicInVehicleCrashShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleCrashShotMetadata, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRoll, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3669617802, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3100384106, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelocity, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)3730987855, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)4150416286, PsoDataType.UInt, 88, 0, 0) + ); + case MetaName.camCinematicVehiclePartShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehiclePartShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)233780411, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicHeliTrackingShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicHeliTrackingShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.camCinematicVehicleOrbitShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleOrbitShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicVehicleLowOrbitShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleLowOrbitShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicTrainRoofMountedShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicTrainRoofMountedShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicTrainStationShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicTrainStationShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicTrainPassengerShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicTrainPassengerShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicTrainTrackShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicTrainTrackShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicPoliceCarMountedShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicPoliceCarMountedShotMetadata, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.LimitAttachParentRelativePitchAndHeading, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldTerminateForPitchAndHeading, PsoDataType.Bool, 65, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRelativePitch, PsoDataType.Float2, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachParentRelativeHeading, PsoDataType.Float2, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialRelativePitchLimits, PsoDataType.Float2, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialRelativeHeadingLimits, PsoDataType.Float2, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.InVehicleLookAtDampingRef, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootLookAtDampingRef, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 108, 0, 0) + ); + case MetaName.camCinematicPoliceHeliMountedShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicPoliceHeliMountedShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.camCinematicPoliceInCoverShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicPoliceInCoverShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.camCinematicPoliceRoadBlockShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicPoliceRoadBlockShotMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)876494977, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.SpreadLimit, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 72, 0, 0) + ); + case MetaName.camCinematicPoliceExitVehicleShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicPoliceExitVehicleShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)4197822931, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.camCinematicOnFootIdleShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootIdleShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicOnFootFirstPersonIdleShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootFirstPersonIdleShotMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Cameras, PsoDataType.Array, 64, 0, (MetaName)14) + ); + case MetaName.camCinematicStuntJumpShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicStuntJumpShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicParachuteHeliShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicParachuteHeliShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicParachuteCameraManShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicParachuteCameraManShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicOnFootAssistedAimingKillShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootAssistedAimingKillShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1965493319, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)513375599, PsoDataType.Float, 68, 0, 0) + ); + case MetaName.camCinematicOnFootMeleeShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootMeleeShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicVehicleBonnetShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleBonnetShotMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1109718587, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)4170146926, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2661334408, PsoDataType.String, 72, 7, 0) + ); + case MetaName.camCinematicBustedShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicBustedShotMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3180920449, PsoDataType.Float, 64, 0, 0) + ); + case MetaName.camCinematicVehicleGroupShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleGroupShotMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)189014933, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3490628210, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)456924361, PsoDataType.UInt, 72, 0, 0) + ); + case MetaName.camCinematicMissileKillShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicMissileKillShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicWaterCrashShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicWaterCrashShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicFallFromHeliShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicFallFromHeliShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicVehicleConvertibleRoofShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicVehicleConvertibleRoofShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camCinematicScriptRaceCheckPointShotMetadata: + return new PsoStructureInfo(MetaName.camCinematicScriptRaceCheckPointShotMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)3727857604, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2997337835, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3529626013), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 32, 0, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)841129953, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1771050581, PsoDataType.Bool, 37, 0, 0), + new PsoStructureEntryInfo((MetaName)2973786865, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1480107235, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2460595867, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo((MetaName)3700663941, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2275630497, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60485337, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camLongSwoopSwitchHelperMetadata: + return new PsoStructureInfo(MetaName.camLongSwoopSwitchHelperMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), + new PsoStructureEntryInfo((MetaName)796068415, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)417423151, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3958574934, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2939152164, PsoDataType.Enum, 52, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2707662935, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)26423852, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)322264486, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2868975511, PsoDataType.Enum, 68, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)3659327390, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)833330146, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.camShortZoomToHeadSwitchHelperMetadata: + return new PsoStructureInfo(MetaName.camShortZoomToHeadSwitchHelperMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), + new PsoStructureEntryInfo((MetaName)864831122, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3573176421, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1837935839, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2395979106, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)4037747409, PsoDataType.Float, 68, 0, 0) + ); + case MetaName.camShortRotationSwitchHelperMetadata: + return new PsoStructureInfo(MetaName.camShortRotationSwitchHelperMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), + new PsoStructureEntryInfo((MetaName)2291716575, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camShortTranslationSwitchHelperMetadata: + return new PsoStructureInfo(MetaName.camShortTranslationSwitchHelperMetadata, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), + new PsoStructureEntryInfo((MetaName)3634726737, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.camShortZoomInOutSwitchHelperMetadata: + return new PsoStructureInfo(MetaName.camShortZoomInOutSwitchHelperMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2578467489, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1608990953, PsoDataType.Enum, 24, 0, MetaName.eCurveType), + new PsoStructureEntryInfo((MetaName)2608832721, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2368120393, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3903914248, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo((MetaName)1595139928, PsoDataType.Bool, 34, 0, 0), + new PsoStructureEntryInfo((MetaName)1489449044, PsoDataType.Bool, 35, 0, 0), + new PsoStructureEntryInfo((MetaName)1190587282, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)547488153, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2504913741, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)26423852, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)4037747409, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.camNearClipScannerMetadata: + return new PsoStructureInfo(MetaName.camNearClipScannerMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)494178060, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1713774083, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3006651453, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1502537267, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3831489261, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1103532228, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)639510975, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1947972687, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1176855075, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)529344496, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)1434632498, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3130208423, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1525295652, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)304640727, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2477079271, PsoDataType.Float, 72, 0, 0) + ); + case MetaName.camVehicleCustomSettingsMetadata: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadata, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DoorAlignmentSettings, PsoDataType.Structure, 16, 0, MetaName.camVehicleCustomSettingsMetadataDoorAlignmentSettings), + new PsoStructureEntryInfo((MetaName)2728784918, PsoDataType.Structure, 56, 0, MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings), + new PsoStructureEntryInfo((MetaName)556143364, PsoDataType.Structure, 72, 0, MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings), + new PsoStructureEntryInfo((MetaName)981761687, PsoDataType.Structure, 104, 0, MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings), + new PsoStructureEntryInfo((MetaName)955775077, PsoDataType.Structure, 136, 0, MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings), + new PsoStructureEntryInfo((MetaName)3842334374, PsoDataType.Structure, 152, 0, MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras), + new PsoStructureEntryInfo((MetaName)3299186532, PsoDataType.Bool, 184, 0, 0) + ); + case MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataExitSeatPhaseForCameraExitSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)2549072274, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataMultiplayerPassengerCameraHashSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)109781807, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)2400069518, PsoDataType.Array, 16, 0, (MetaName)2) + ); + case MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataInvalidCinematcShotsRefsForVehicleSettings, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)3579087558, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataAdditionalBoundScalingVehicleSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.HeightScaling, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras: + return new PsoStructureInfo(MetaName.camVehicleCustomSettingsMetadataSeatSpecficCameras, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ShouldConsiderData, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camSeatSpecificCameras), + new PsoStructureEntryInfo((MetaName)1517635298, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.camSeatSpecificCameras: + return new PsoStructureInfo(MetaName.camSeatSpecificCameras, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.SeatIndex, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)1261448360, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.PovCameraOffset, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2254474492, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)273799675, PsoDataType.Bool, 36, 0, 0) + ); + case MetaName.camGameplayDirectorMetadata: + return new PsoStructureInfo(MetaName.camGameplayDirectorMetadata, 0, 0, 608, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2089690180, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo((MetaName)519684035, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)4121580243, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)3253949128, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo((MetaName)3345137885, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)2365172496, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.ThirdPersonVehicleAimCameraRef, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)3734793071, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo((MetaName)2936418982, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo((MetaName)595399339, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo((MetaName)4266955763, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo((MetaName)1070442381, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo((MetaName)838085564, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo((MetaName)1252415609, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo((MetaName)2466448846, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo((MetaName)3845919335, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo((MetaName)3326977311, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo((MetaName)374047020, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo((MetaName)859347369, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo((MetaName)1384877759, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo((MetaName)399013837, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo((MetaName)3929905827, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo((MetaName)2078537289, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo((MetaName)2211994659, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo((MetaName)1839344859, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo((MetaName)1168367025, PsoDataType.String, 124, 7, 0), + new PsoStructureEntryInfo((MetaName)3316487821, PsoDataType.String, 128, 7, 0), + new PsoStructureEntryInfo((MetaName)2772847581, PsoDataType.String, 132, 7, 0), + new PsoStructureEntryInfo((MetaName)766173022, PsoDataType.String, 136, 7, 0), + new PsoStructureEntryInfo((MetaName)2535543863, PsoDataType.String, 140, 7, 0), + new PsoStructureEntryInfo((MetaName)160927927, PsoDataType.String, 144, 7, 0), + new PsoStructureEntryInfo((MetaName)478304411, PsoDataType.String, 148, 7, 0), + new PsoStructureEntryInfo((MetaName)2995820414, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo((MetaName)2615323901, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo((MetaName)773221014, PsoDataType.UInt, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)1041806552, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)2032331076, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)1446696509, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo((MetaName)3986662918, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)508043832, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)2976021060, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo((MetaName)3396642792, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo((MetaName)3225930628, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)1352017718, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo((MetaName)73333937, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo((MetaName)1414986019, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo((MetaName)3574987574, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)992242800, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo((MetaName)2148272557, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo((MetaName)1884609047, PsoDataType.UInt, 220, 0, 0), + new PsoStructureEntryInfo((MetaName)839256524, PsoDataType.Float2, 224, 0, 0), + new PsoStructureEntryInfo((MetaName)3914143003, PsoDataType.Float2, 232, 0, 0), + new PsoStructureEntryInfo((MetaName)1935117365, PsoDataType.Float2, 240, 0, 0), + new PsoStructureEntryInfo((MetaName)3465208228, PsoDataType.Float2, 248, 0, 0), + new PsoStructureEntryInfo((MetaName)2745575061, PsoDataType.UInt, 256, 0, 0), + new PsoStructureEntryInfo((MetaName)19236851, PsoDataType.UInt, 260, 0, 0), + new PsoStructureEntryInfo((MetaName)3381171437, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo((MetaName)4274113098, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo((MetaName)3364491568, PsoDataType.UInt, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)565980479, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo((MetaName)467608921, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo((MetaName)3180328046, PsoDataType.UInt, 284, 0, 0), + new PsoStructureEntryInfo((MetaName)924888517, PsoDataType.UInt, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)1870040536, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camGameplayDirectorMetadataVehicleCustomSettings), + new PsoStructureEntryInfo(MetaName.VehicleCustomSettingsList, PsoDataType.Array, 296, 0, (MetaName)66), + new PsoStructureEntryInfo((MetaName)3559905910, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)259392755, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)1523938219, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo((MetaName)3704241863, PsoDataType.UInt, 324, 0, 0), + new PsoStructureEntryInfo((MetaName)2185907197, PsoDataType.UInt, 328, 0, 0), + new PsoStructureEntryInfo((MetaName)2766631017, PsoDataType.UInt, 332, 0, 0), + new PsoStructureEntryInfo((MetaName)4088657953, PsoDataType.UInt, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)2940797056, PsoDataType.UInt, 340, 0, 0), + new PsoStructureEntryInfo((MetaName)926072750, PsoDataType.UInt, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)4071374960, PsoDataType.UInt, 348, 0, 0), + new PsoStructureEntryInfo((MetaName)4097214758, PsoDataType.UInt, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)4182146981, PsoDataType.UInt, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)3961367630, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)1597015313, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo((MetaName)2284520874, PsoDataType.Bool, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)4217422073, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo((MetaName)636518286, PsoDataType.String, 376, 7, 0), + new PsoStructureEntryInfo((MetaName)984379181, PsoDataType.UInt, 380, 0, 0), + new PsoStructureEntryInfo((MetaName)2430934664, PsoDataType.UInt, 384, 0, 0), + new PsoStructureEntryInfo((MetaName)1190562413, PsoDataType.Float2, 388, 0, 0), + new PsoStructureEntryInfo((MetaName)3193796044, PsoDataType.Float2, 396, 0, 0), + new PsoStructureEntryInfo((MetaName)3497158180, PsoDataType.Float2, 404, 0, 0), + new PsoStructureEntryInfo((MetaName)202581691, PsoDataType.Float2, 412, 0, 0), + new PsoStructureEntryInfo((MetaName)1600149759, PsoDataType.Float2, 420, 0, 0), + new PsoStructureEntryInfo((MetaName)310864401, PsoDataType.Float2, 428, 0, 0), + new PsoStructureEntryInfo((MetaName)910310359, PsoDataType.Float, 436, 0, 0), + new PsoStructureEntryInfo((MetaName)1518272577, PsoDataType.Float, 440, 0, 0), + new PsoStructureEntryInfo((MetaName)2881277133, PsoDataType.Float, 444, 0, 0), + new PsoStructureEntryInfo((MetaName)1283045856, PsoDataType.Float, 448, 0, 0), + new PsoStructureEntryInfo((MetaName)1013584657, PsoDataType.UInt, 452, 0, 0), + new PsoStructureEntryInfo((MetaName)1494877942, PsoDataType.UInt, 456, 0, 0), + new PsoStructureEntryInfo((MetaName)3664775821, PsoDataType.String, 460, 7, 0), + new PsoStructureEntryInfo((MetaName)1867117468, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo((MetaName)425967458, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo((MetaName)2079587041, PsoDataType.Float, 472, 0, 0), + new PsoStructureEntryInfo((MetaName)3495981266, PsoDataType.Float, 476, 0, 0), + new PsoStructureEntryInfo((MetaName)3273630905, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)3860060233, PsoDataType.Float, 484, 0, 0), + new PsoStructureEntryInfo((MetaName)2204296545, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo((MetaName)111546466, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo((MetaName)2322128139, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo((MetaName)642537232, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo((MetaName)2040447490, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo((MetaName)928667502, PsoDataType.Float, 508, 0, 0), + new PsoStructureEntryInfo((MetaName)3216527316, PsoDataType.UInt, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)3465879577, PsoDataType.UInt, 516, 0, 0), + new PsoStructureEntryInfo((MetaName)3390712027, PsoDataType.UInt, 520, 0, 0), + new PsoStructureEntryInfo((MetaName)2683111365, PsoDataType.UInt, 524, 0, 0), + new PsoStructureEntryInfo((MetaName)3170020756, PsoDataType.UInt, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)4287333189, PsoDataType.UInt, 532, 0, 0), + new PsoStructureEntryInfo((MetaName)115056986, PsoDataType.UInt, 536, 0, 0), + new PsoStructureEntryInfo((MetaName)1843179030, PsoDataType.UInt, 540, 0, 0), + new PsoStructureEntryInfo((MetaName)3134298162, PsoDataType.String, 544, 7, 0), + new PsoStructureEntryInfo((MetaName)1564626128, PsoDataType.String, 548, 7, 0), + new PsoStructureEntryInfo((MetaName)834090440, PsoDataType.Structure, 552, 0, MetaName.camGameplayDirectorMetadataExplosionShakeSettings) + ); + case MetaName.camGameplayDirectorMetadataExplosionShakeSettings: + return new PsoStructureInfo(MetaName.camGameplayDirectorMetadataExplosionShakeSettings, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DistanceLimits, PsoDataType.Float2, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxInstances, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.RumbleDuration, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3070197011, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2337695573, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)815713089, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1985122943, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3938350897, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)951241725, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.camGameplayDirectorMetadataVehicleCustomSettings: + return new PsoStructureInfo(MetaName.camGameplayDirectorMetadataVehicleCustomSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SettingsRef, PsoDataType.String, 12, 7, 0) + ); + case MetaName.camCinematicDirectorMetadata: + return new PsoStructureInfo(MetaName.camCinematicDirectorMetadata, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)164388064, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1567199172, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)4027640984, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)730699960, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)4198475225, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)3640482549, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2985235183, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)200602575, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2683111365, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1677201089, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo((MetaName)2101508607, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo((MetaName)1867117468, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)425967458, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)2079587041, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.CinematicContexts, PsoDataType.Array, 80, 0, (MetaName)MetaTypeName.STRING), + new PsoStructureEntryInfo((MetaName)28440621, PsoDataType.UInt, 96, 0, 0) + ); + case MetaName.camCinematicInVehicleMultiplayerPassengerContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleMultiplayerPassengerContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicShots: + return new PsoStructureInfo(MetaName.camCinematicShots, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Shot, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ProbabilityWeighting, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.camCinematicSpectatorNewsChannelContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicSpectatorNewsChannelContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicScriptedMissionCreatorFailContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicScriptedMissionCreatorFailContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicScriptContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicScriptContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicScriptedRaceCheckPointContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicScriptedRaceCheckPointContextMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1650416254, PsoDataType.UInt, 72, 0, 0) + ); + case MetaName.camCinematicBustedContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicBustedContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicFallFromHeliContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicFallFromHeliContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicInVehicleOverriddenFirstPersonContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleOverriddenFirstPersonContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicInVehicleWantedContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleWantedContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camPreferredShotSelectionType: + return new PsoStructureInfo(MetaName.camPreferredShotSelectionType, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Shot, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.InputType, PsoDataType.Enum, 12, 0, (MetaName)3889593720) + ); + case MetaName.camCinematicInVehicleContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicInTrainAtStationContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInTrainAtStationContextMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2216049071, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)3119408512, PsoDataType.UInt, 76, 0, 0) + ); + case MetaName.camCinematicInTrainContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInTrainContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicOnFootSpectatingContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootSpectatingContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicParachuteContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicParachuteContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicStuntJumpContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicStuntJumpContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicOnFootAssistedAimingContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootAssistedAimingContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicOnFootMeleeContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootMeleeContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicInVehicleFirstPersonContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicInVehicleFirstPersonContextMetadata, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0) + ); + case MetaName.camCinematicOnFootIdleContextMetadata: + return new PsoStructureInfo(MetaName.camCinematicOnFootIdleContextMetadata, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camCinematicShots), + new PsoStructureEntryInfo(MetaName.Shots, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camPreferredShotSelectionType), + new PsoStructureEntryInfo((MetaName)2569180342, PsoDataType.Array, 32, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)2437129562, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4114376857, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo((MetaName)2434943359, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo((MetaName)2838462683, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo((MetaName)2639584784, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3699223405, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo((MetaName)3274921789, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3966397175, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2910409886, PsoDataType.UInt, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1879525600, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1202637816, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.camSyncedSceneDirectorMetadata: + return new PsoStructureInfo(MetaName.camSyncedSceneDirectorMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2406434970, PsoDataType.String, 24, 7, 0) + ); + case MetaName.camScriptDirectorMetadata: + return new PsoStructureInfo(MetaName.camScriptDirectorMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3308601968, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo((MetaName)1044888659, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)609660376, PsoDataType.UInt, 32, 0, 0) + ); + case MetaName.camSwitchDirectorMetadata: + return new PsoStructureInfo(MetaName.camSwitchDirectorMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)4284026199, PsoDataType.String, 24, 7, 0) + ); + case MetaName.camCutsceneDirectorMetadata: + return new PsoStructureInfo(MetaName.camCutsceneDirectorMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1814055656, PsoDataType.String, 24, 7, 0) + ); + case MetaName.camReplayDirectorMetadata: + return new PsoStructureInfo(MetaName.camReplayDirectorMetadata, 0, 0, 160, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2721634605, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo((MetaName)2132680058, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)491767013, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)2648380967, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo((MetaName)4072288030, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)664486210, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo((MetaName)3903471436, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)3789126205, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2319741638, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1596110048, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1238798750, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1362065867, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo((MetaName)2640324566, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)3068943162, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)81027141, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)4246618820, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)1674718375, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)227690771, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo((MetaName)1982856886, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo((MetaName)881665360, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo((MetaName)2599823537, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo((MetaName)3206570060, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo((MetaName)1690145332, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)4171384554, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)3385138470, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)950635108, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)925408249, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)3918000719, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)1379084243, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)2245689292, PsoDataType.Float, 152, 0, 0) + ); + case MetaName.camDebugDirectorMetadata: + return new PsoStructureInfo(MetaName.camDebugDirectorMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2750009688, PsoDataType.String, 24, 7, 0) + ); + case MetaName.camMarketingDirectorMetadata: + return new PsoStructureInfo(MetaName.camMarketingDirectorMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.camMarketingDirectorMetadataMode), + new PsoStructureEntryInfo(MetaName.Modes, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case MetaName.camMarketingDirectorMetadataMode: + return new PsoStructureInfo(MetaName.camMarketingDirectorMetadataMode, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.CameraRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TextLabel, PsoDataType.String, 12, 0, (MetaName)1048576) + ); + case MetaName.CExplosionInfoManager: + return new PsoStructureInfo(MetaName.CExplosionInfoManager, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2541591167), + new PsoStructureEntryInfo(MetaName.aExplosionTagData, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)2541591167: + return new PsoStructureInfo((MetaName)2541591167, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo(MetaName.damageAtCentre, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.damageAtEdge, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.networkPlayerModifier, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.networkPedModifier, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.endRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.initSpeed, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.decayFactor, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.forceFactor, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fRagdollForceModifier, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fSelfForceModifier, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.directedWidth, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.directedLifeTime, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.camShakeName, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.camShake, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.camShakeRollOffScaling, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.shockingEventVisualRangeOverride, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.shockingEventAudioRangeOverride, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.minorExplosion, PsoDataType.Bool, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.vfxTagHashName, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo(MetaName.fragDamage, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.bAppliesContinuousDamage, PsoDataType.Bool, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.bPostProcessCollisionsWithNoForce, PsoDataType.Bool, 105, 0, 0), + new PsoStructureEntryInfo(MetaName.bDamageVehicles, PsoDataType.Bool, 106, 0, 0), + new PsoStructureEntryInfo(MetaName.bDamageObjects, PsoDataType.Bool, 107, 0, 0), + new PsoStructureEntryInfo(MetaName.bOnlyAffectsLivePeds, PsoDataType.Bool, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.bIgnoreExplodingEntity, PsoDataType.Bool, 109, 0, 0), + new PsoStructureEntryInfo(MetaName.bNoOcclusion, PsoDataType.Bool, 110, 0, 0), + new PsoStructureEntryInfo(MetaName.explodeAttachEntityWhenFinished, PsoDataType.Bool, 111, 0, 0), + new PsoStructureEntryInfo(MetaName.bCanSetPedOnFire, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.bCanSetPlayerOnFire, PsoDataType.Bool, 113, 0, 0), + new PsoStructureEntryInfo(MetaName.bSuppressCrime, PsoDataType.Bool, 114, 0, 0), + new PsoStructureEntryInfo(MetaName.bUseDistanceDamageCalc, PsoDataType.Bool, 115, 0, 0), + new PsoStructureEntryInfo(MetaName.bPreventWaterExplosionVFX, PsoDataType.Bool, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.bIgnoreRatioCheckForFire, PsoDataType.Bool, 117, 0, 0), + new PsoStructureEntryInfo(MetaName.bAllowUnderwaterExplosion, PsoDataType.Bool, 118, 0, 0), + new PsoStructureEntryInfo(MetaName.bForceVehicleExplosion, PsoDataType.Bool, 119, 0, 0), + new PsoStructureEntryInfo(MetaName.midRadius, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.damageAtMid, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.bApplyVehicleEMP, PsoDataType.Bool, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.bApplyVehicleSlick, PsoDataType.Bool, 129, 0, 0), + new PsoStructureEntryInfo(MetaName.bApplyVehicleSlowdown, PsoDataType.Bool, 130, 0, 0), + new PsoStructureEntryInfo(MetaName.bApplyVehicleTyrePop, PsoDataType.Bool, 131, 0, 0), + new PsoStructureEntryInfo(MetaName.bForcePetrolTankDamage, PsoDataType.Bool, 132, 0, 0) + ); + case MetaName.CPedModelInfo__PersonalityDataList: + return new PsoStructureInfo(MetaName.CPedModelInfo__PersonalityDataList, 0, 0, 88, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1111461724), + new PsoStructureEntryInfo(MetaName.MovementModeUnholsterData, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)29118966), + new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4185391031), + new PsoStructureEntryInfo(MetaName.PedPersonalities, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)905918498), + new PsoStructureEntryInfo(MetaName.BraveryTypes, PsoDataType.Array, 56, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2072330808), + new PsoStructureEntryInfo(MetaName.CriminalityTypes, PsoDataType.Array, 72, 0, (MetaName)8) + ); + case (MetaName)1111461724: + return new PsoStructureInfo((MetaName)1111461724, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2934735155), + new PsoStructureEntryInfo(MetaName.UnholsterClips, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case (MetaName)2934735155: + return new PsoStructureInfo((MetaName)2934735155, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Weapons, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Clip, PsoDataType.String, 24, 7, 0) + ); + case (MetaName)29118966: + return new PsoStructureInfo((MetaName)29118966, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1727236615), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Array, 0, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.Array, 16, 4, (MetaName)131074), + new PsoStructureEntryInfo(MetaName.LastBattleEventHighEnergyStartTime, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.LastBattleEventHighEnergyEndTime, PsoDataType.Float, 52, 0, 0) + ); + case (MetaName)1727236615: + return new PsoStructureInfo((MetaName)1727236615, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Weapons, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3455138791), + new PsoStructureEntryInfo(MetaName.ClipSets, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)3455138791: + return new PsoStructureInfo((MetaName)3455138791, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.MovementClipSetId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponClipSetId, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponClipFilterId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.UpperBodyShadowExpressionEnabled, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.UpperBodyFeatheredLeanEnabled, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.UseWeaponAnimsForGrip, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.UseLeftHandIk, PsoDataType.Bool, 23, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleTransitionBlendOutTime, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.IdleTransitions, PsoDataType.Array, 32, 0, (MetaName)8), + new PsoStructureEntryInfo(MetaName.UnholsterClipSetId, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.UnholsterClipData, PsoDataType.String, 52, 7, 0) + ); + case (MetaName)4185391031: + return new PsoStructureInfo((MetaName)4185391031, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.PersonalityName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultWeaponLoadout, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.Bravery, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.AgitatedPersonality, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.Criminality, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.AgitationTriggers, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo(MetaName.HealthConfigHash, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponAnimations, PsoDataType.Array, 40, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo(MetaName.AmbientAudio, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo(MetaName.WitnessPersonality, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo(MetaName.Agility, PsoDataType.Structure, 64, 0, (MetaName)265080325), + new PsoStructureEntryInfo(MetaName.IsMale, PsoDataType.Bool, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.IsHuman, PsoDataType.Bool, 81, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldRewardMoneyOnDeath, PsoDataType.Bool, 82, 0, 0), + new PsoStructureEntryInfo(MetaName.IsGang, PsoDataType.Bool, 83, 0, 0), + new PsoStructureEntryInfo(MetaName.IsSecurity, PsoDataType.Bool, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.IsWeird, PsoDataType.Bool, 85, 0, 0), + new PsoStructureEntryInfo(MetaName.IsDangerousAnimal, PsoDataType.Bool, 86, 0, 0), + new PsoStructureEntryInfo(MetaName.CausesRumbleWhenCollidesWithPlayer, PsoDataType.Bool, 87, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowSlowCruisingWithMusic, PsoDataType.Bool, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowRoadCrossHurryOnLightChange, PsoDataType.Bool, 89, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2920442291), + new PsoStructureEntryInfo(MetaName.VehicleTypes, PsoDataType.Flags, 92, 0, (MetaName)524310), + new PsoStructureEntryInfo(MetaName.AttackStrengthMin, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.AttackStrengthMax, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.StaminaEfficiency, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.ArmourEfficiency, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.HealthRegenEfficiency, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.ExplosiveDamageMod, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.HandGunDamageMod, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.RifleDamageMod, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.SmgDamageMod, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.PopulationFleeMod, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.HotwireRate, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MotivationMin, PsoDataType.UInt, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MotivationMax, PsoDataType.UInt, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.DrivingAbilityMin, PsoDataType.UByte, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.DrivingAbilityMax, PsoDataType.UByte, 149, 0, 0), + new PsoStructureEntryInfo(MetaName.DrivingAggressivenessMin, PsoDataType.UByte, 150, 0, 0), + new PsoStructureEntryInfo(MetaName.DrivingAggressivenessMax, PsoDataType.UByte, 151, 0, 0), + new PsoStructureEntryInfo(MetaName.Affluence, PsoDataType.Enum, 152, 0, MetaName.Affluence), + new PsoStructureEntryInfo(MetaName.TechSavvy, PsoDataType.Enum, 156, 0, MetaName.TechSavvy), + new PsoStructureEntryInfo(MetaName.MovementModes, PsoDataType.String, 160, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSIdle, PsoDataType.String, 164, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSRNG, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSLT, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo(MetaName.WeaponAnimsFPSScope, PsoDataType.String, 176, 7, 0) + ); + case (MetaName)265080325: + return new PsoStructureInfo((MetaName)265080325, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2675594832), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 0, (MetaName)2097152), + new PsoStructureEntryInfo(MetaName.MovementCostModifier, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)905918498: + return new PsoStructureInfo((MetaName)905918498, 0, 0, 256, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3079935216), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153), + new PsoStructureEntryInfo(MetaName.TakedownProbability, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ThreatResponseUnarmed, PsoDataType.Structure, 24, 0, (MetaName)3637970520), + new PsoStructureEntryInfo(MetaName.ThreatResponseMelee, PsoDataType.Structure, 96, 0, (MetaName)3637970520), + new PsoStructureEntryInfo(MetaName.ThreatResponseArmed, PsoDataType.Structure, 168, 0, (MetaName)3637970520), + new PsoStructureEntryInfo(MetaName.FleeDuringCombat, PsoDataType.Structure, 240, 0, (MetaName)651017172) + ); + case (MetaName)3637970520: + return new PsoStructureInfo((MetaName)3637970520, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Action, PsoDataType.Structure, 8, 0, (MetaName)3450423538), + new PsoStructureEntryInfo(MetaName.Fight, PsoDataType.Structure, 32, 0, (MetaName)301719986) + ); + case (MetaName)3450423538: + return new PsoStructureInfo((MetaName)3450423538, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)3954379444) + ); + case (MetaName)3954379444: + return new PsoStructureInfo((MetaName)3954379444, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Fight, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Flee, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)301719986: + return new PsoStructureInfo((MetaName)301719986, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)272028034), + new PsoStructureEntryInfo(MetaName.ProbabilityDrawWeaponWhenLosing, PsoDataType.Float, 32, 0, 0) + ); + case (MetaName)272028034: + return new PsoStructureInfo((MetaName)272028034, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.KeepWeapon, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MatchTargetWeapon, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.EquipBestWeapon, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)651017172: + return new PsoStructureInfo((MetaName)651017172, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesWhenBuddyKilledWithScaryWeapon, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)2072330808: + return new PsoStructureInfo((MetaName)2072330808, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1639628591), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) + ); + case MetaName.sStatsMetadataTuning: + return new PsoStructureInfo(MetaName.sStatsMetadataTuning, 0, 0, 72, + new PsoStructureEntryInfo((MetaName)1063717096, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardVehicleJumpTime, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardParachuteJumpTime, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SPLargeAccidenThresold, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MPLargeAccidenThresold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.FreefallThresold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardVehicleJumpDistanceA, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardVehicleJumpDistanceB, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardParachuteJumpDistanceA, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AwardParachuteJumpDistanceB, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.nonFlyableAreas, PsoDataType.Structure, 48, 0, MetaName.NonFlyableAreaArray) + ); + case MetaName.CFiringPatternInfoManager: + return new PsoStructureInfo(MetaName.CFiringPatternInfoManager, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Infos, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.CFiringPatternInfo: + return new PsoStructureInfo(MetaName.CFiringPatternInfo, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.NumberOfBurstsMin, PsoDataType.SShort, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.NumberOfBurstsMax, PsoDataType.SShort, 14, 0, 0), + new PsoStructureEntryInfo(MetaName.NumberOfShotsPerBurstMin, PsoDataType.SShort, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.NumberOfShotsPerBurstMax, PsoDataType.SShort, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenShotsMin, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenShotsMax, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenShotsAbsoluteMin, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMin, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMax, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsAbsoluteMin, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeFiringMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeFiringMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2922044807, PsoDataType.Bool, 52, 0, 0) + ); + case MetaName.CTuningFile: + return new PsoStructureInfo(MetaName.CTuningFile, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Tunables, PsoDataType.Array, 0, 0, 0) + ); + case MetaName.CCombatTaskManager__Tunables: + return new PsoStructureInfo(MetaName.CCombatTaskManager__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenUpdates, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxPedsInCombatTask, PsoDataType.SInt, 20, 0, 0) + ); + case MetaName.CTaskAnimatedHitByExplosion__Tunables: + return new PsoStructureInfo(MetaName.CTaskAnimatedHitByExplosion__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.InitialRagdollDelay, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowPitchAndRoll, PsoDataType.Bool, 20, 0, 0) + ); + case MetaName.CTaskStandGuard__Tunables: + return new PsoStructureInfo(MetaName.CTaskStandGuard__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinStandWaitTimeMS, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStandWaitTimeMS, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDefendPointWaitTimeMS, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDefendPointWaitTimeMS, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinNavmeshPatrolRadiusFactor, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNavmeshPatrolRadiusFactor, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.RouteRadiusFactor, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskCombatAdditionalTask__Tunables: + return new PsoStructureInfo(MetaName.CTaskCombatAdditionalTask__Tunables, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.iBulletEventResponseLengthMs, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fChanceOfDynamicRun, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDynamicStrafeDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeInState, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMoveBlendRatioLerpTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToClearCorner, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDistanceFromCorner, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxLeavingCornerDistance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fBlockedLosAimTime, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fStartAimingDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fStopAimingDistance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinOtherPedDistanceDiff, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeBetweenRunDirectlyChecks, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeStrafing, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeRunning, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.fForceStrafeDistance, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)2878670581, PsoDataType.Float, 80, 0, 0) + ); + case MetaName.CTaskCombatFlank__Tunables: + return new PsoStructureInfo(MetaName.CTaskCombatFlank__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fInfluenceSphereInnerWeight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fInfluenceSphereOuterWeight, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fInfluenceSphereRequestRadius, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fInfluenceSphereCheckRouteRadius, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fSmallInfluenceSphereRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fDistanceBetweenInfluenceSpheres, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fAbsoluteMinDistanceToTarget, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoverPointScoreMultiplier, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CTaskHelicopterStrafe__Tunables: + return new PsoStructureInfo(MetaName.CTaskHelicopterStrafe__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FlightHeightAboveTarget, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDirectionMinDot, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetOffset, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetMinSpeedToIgnore, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetMaxSpeedToStrafe, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToAvoidTargetAfterDamaged, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidOffsetXY, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidOffsetZ, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToBeConsideredInFront, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.BehindRotateAngleLookAhead, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.SearchRotateAngleLookAhead, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.CircleRotateAngleLookAhead, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.BehindTargetAngle, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetOffsetFilter, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenStrafeDirectionChanges, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.CTaskMeleeActionResult__Tunables: + return new PsoStructureInfo(MetaName.CTaskMeleeActionResult__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ActionModeTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceRunDelayTime, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskMoveCombatMounted__Tunables: + return new PsoStructureInfo(MetaName.CTaskMoveCombatMounted__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.CircleTestRadii, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.CircleTestsMoveDistToTestNewPos, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceAnyCircleJoined, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceSameCircleJoined, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TransitionReactionTime, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.VelStartCircling, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.VelStopCircling, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeWaitingForCircleMs, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.CTaskDyingDead__Tunables: + return new PsoStructureInfo(MetaName.CTaskDyingDead__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.VehicleForwardInitialScale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleForwardScale, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToApplyPushFromVehicleForce, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceToApply, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFallingSpeedForAnimatedDyingFall, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SphereTestRadiusForDeadWaterSettle, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollAbortPoseDistanceThreshold, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollAbortPoseMaxVelocity, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToThrowWeaponMS, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToThrowWeaponPlayerMS, PsoDataType.UInt, 52, 0, 0) + ); + case MetaName.CTaskDamageElectric__Tunables: + return new PsoStructureInfo(MetaName.CTaskDamageElectric__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FallsOutofVehicleVelocity, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskInvestigate__Tunables: + return new PsoStructureInfo(MetaName.CTaskInvestigate__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.iTimeToStandAtSearchPoint, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToUseVehicle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceSavingToUseVehicle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeToStandAtPerimeter, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fNewPositionThreshold, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskCombat__Tunables: + return new PsoStructureInfo(MetaName.CTaskCombat__Tunables, 0, 0, 704, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BuddyShot, PsoDataType.Structure, 16, 0, (MetaName)4144542252), + new PsoStructureEntryInfo(MetaName.LackOfHostility, PsoDataType.Structure, 48, 0, (MetaName)455065356), + new PsoStructureEntryInfo(MetaName.EnemyAccuracyScaling, PsoDataType.Structure, 144, 0, (MetaName)1818844971), + new PsoStructureEntryInfo(MetaName.ChargeTuning, PsoDataType.Structure, 168, 0, (MetaName)3736726978), + new PsoStructureEntryInfo(MetaName.ThrowSmokeGrenadeTuning, PsoDataType.Structure, 240, 0, (MetaName)1530415684), + new PsoStructureEntryInfo(MetaName.MaxDistToCoverZ, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToCoverXY, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.fAmbientAnimsMinDistToTargetSq, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.fAmbientAnimsMaxDistToTargetSq, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.fGoToDefAreaTimeOut, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.fFireContinuouslyDistMin, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo(MetaName.fFireContinuouslyDistMax, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo(MetaName.fLostTargetTime, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeAfterAimPoseForStateChange, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxAttemptMoveToCoverDelay, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinAttemptMoveToCoverDelay, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxAttemptMoveToCoverDelayGlobal, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinAttemptMoveToCoverDelayGlobal, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceForAltCover, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeStandingAtCover, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeBetweenFrustratedPeds, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenFrustratedPeds, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.fRetreatTime, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.fTargetTooCloseDistance, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenJackingAttempts, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenCoverSearchesMin, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenCoverSearchesMax, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenAltCoverSearches, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.fShoutTargetPositionInterval, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.fShoutBlockingLosInterval, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenDragsMin, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenSecondaryTargetUsesMin, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenSecondaryTargetUsesMax, PsoDataType.Float, 396, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeToUseSecondaryTargetMin, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeToUseSecondaryTargetMax, PsoDataType.Float, 404, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenCombatDirectorUpdates, PsoDataType.Float, 408, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenPassiveAnimsMin, PsoDataType.Float, 412, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenPassiveAnimsMax, PsoDataType.Float, 416, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenQuickGlancesMin, PsoDataType.Float, 420, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenQuickGlancesMax, PsoDataType.Float, 424, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenGestureAnimsMin, PsoDataType.Float, 428, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenGestureAnimsMax, PsoDataType.Float, 432, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenFailedGestureMin, PsoDataType.Float, 436, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenFailedGestureMax, PsoDataType.Float, 440, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenGesturesMinGlobal, PsoDataType.Float, 444, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenGesturesMaxGlobal, PsoDataType.Float, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeSinceLastAimedAtForGesture, PsoDataType.Float, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeBeforeReactToExplosion, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeBeforeReactToExplosion, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetInfluenceSphereRadius, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetMinDistanceToRoute, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetMinDistanceToAwayFacingNavLink, PsoDataType.Float, 472, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxWaitForCoverExitTime, PsoDataType.Float, 476, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDstanceToMoveAwayFromAlly, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenAllyProximityChecks, PsoDataType.Float, 484, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceFromPrimaryTarget, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxAngleBetweenTargets, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromPedToHelpPed, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDotToTargetToHelpPed, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingDifferenceForQuickGlanceInSameDirection, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenQuickGlancesInSameDirection, PsoDataType.Float, 508, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToStartJackingVehicle, PsoDataType.Float, 512, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToContinueJackingVehicle, PsoDataType.Float, 516, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetJackRadius, PsoDataType.Float, 520, 0, 0), + new PsoStructureEntryInfo(MetaName.SafetyProportionInDefensiveAreaMin, PsoDataType.Float, 524, 0, 0), + new PsoStructureEntryInfo(MetaName.SafetyProportionInDefensiveAreaMax, PsoDataType.Float, 528, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveToDefensiveAreaAngleVariation, PsoDataType.Float, 532, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToEnterVehicleIfTargetEntersVehicle, PsoDataType.Float, 536, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToMyVehicleToChase, PsoDataType.Float, 540, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToVehicleForCommandeer, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.NumEarlyVehicleEntryDriversAllowed, PsoDataType.UByte, 548, 0, 0), + new PsoStructureEntryInfo(MetaName.SafeTimeBeforeLeavingCover, PsoDataType.UInt, 552, 0, 0), + new PsoStructureEntryInfo(MetaName.WaitTimeForJackingSlowedVehicle, PsoDataType.UInt, 556, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxInjuredTargetTimerVariation, PsoDataType.Float, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNumPedsChasingOnFoot, PsoDataType.UByte, 564, 0, 0), + new PsoStructureEntryInfo(MetaName.FireTimeAfterStaticMovementAbort, PsoDataType.Float, 568, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMovingToCoverTimeToStop, PsoDataType.Float, 572, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToCoverToStop, PsoDataType.Float, 576, 0, 0), + new PsoStructureEntryInfo(MetaName.FireTimeAfterStoppingMoveToCover, PsoDataType.Float, 580, 0, 0), + new PsoStructureEntryInfo(MetaName.ApproachingTargetVehicleHoldFireDistance, PsoDataType.Float, 584, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDefensiveAreaRadiusForWillAdvance, PsoDataType.Float, 588, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToHoldFireForArrest, PsoDataType.Float, 592, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToDelayChaseOnFoot, PsoDataType.Float, 596, 0, 0), + new PsoStructureEntryInfo(MetaName.FireTimeAfterChaseOnFoot, PsoDataType.Float, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToChangeChaseOnFootSpeed, PsoDataType.UInt, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableForcedFireForTargetProximity, PsoDataType.Bool, 608, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForceFiringStateTime, PsoDataType.Float, 612, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForceFiringStateTime, PsoDataType.Float, 616, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeInitialForcedFire, PsoDataType.Float, 620, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenForcedFireStates, PsoDataType.Float, 624, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInStateForForcedFire, PsoDataType.Float, 628, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForceFiringDistance, PsoDataType.Float, 632, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForceFiringDistance, PsoDataType.Float, 636, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForAimIntro, PsoDataType.Float, 640, 0, 0), + new PsoStructureEntryInfo((MetaName)3129989164, PsoDataType.Float, 644, 0, 0), + new PsoStructureEntryInfo((MetaName)4269476531, PsoDataType.Float, 648, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbientAnimLengthBuffer, PsoDataType.Float, 652, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenPlayerArrestAttempts, PsoDataType.UInt, 656, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenArmedMeleeAttemptsInMs, PsoDataType.UInt, 660, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowMovingArmedMeleeAttack, PsoDataType.Bool, 664, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToHoldFireAfterJack, PsoDataType.Float, 668, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenMeleeJackAttempts, PsoDataType.UInt, 672, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenMeleeJackAttemptsOnNetworkClone, PsoDataType.UInt, 676, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToHoldFireAtTaskInitialization, PsoDataType.Float, 680, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToRejectRespawnedTarget, PsoDataType.UInt, 684, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForLawToFleeFromCombat, PsoDataType.Float, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForLawToReturnToCombatFromFlee, PsoDataType.Float, 692, 0, 0), + new PsoStructureEntryInfo((MetaName)2186966715, PsoDataType.Float, 696, 0, 0) + ); + case (MetaName)4144542252: + return new PsoStructureInfo((MetaName)4144542252, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeReact, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBeforeReact, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeSinceShot, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)455065356: + return new PsoStructureInfo((MetaName)455065356, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.WantedLevel1, PsoDataType.Structure, 8, 0, (MetaName)2841666617), + new PsoStructureEntryInfo(MetaName.WantedLevel2, PsoDataType.Structure, 24, 0, (MetaName)2841666617), + new PsoStructureEntryInfo(MetaName.WantedLevel3, PsoDataType.Structure, 40, 0, (MetaName)2841666617), + new PsoStructureEntryInfo(MetaName.WantedLevel4, PsoDataType.Structure, 56, 0, (MetaName)2841666617), + new PsoStructureEntryInfo(MetaName.WantedLevel5, PsoDataType.Structure, 72, 0, (MetaName)2841666617), + new PsoStructureEntryInfo(MetaName.MaxSpeedForVehicle, PsoDataType.Float, 88, 0, 0) + ); + case (MetaName)2841666617: + return new PsoStructureInfo((MetaName)2841666617, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceLastHostileAction, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)1818844971: + return new PsoStructureInfo((MetaName)1818844971, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.iMinNumEnemiesForScaling, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fAccuracyReductionPerEnemy, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fAccuracyReductionFloor, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)3736726978: + return new PsoStructureInfo((MetaName)3736726978, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.bChargeTargetEnabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.uMaxNumActiveChargers, PsoDataType.UByte, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.uConsiderRecentChargeAsActiveTimeoutMS, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.uMinTimeBetweenChargesAtSameTargetMS, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.uMinTimeForSamePedToChargeAgainMS, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.uCheckForChargeTargetPeriodMS, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeInCombatSeconds, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToTarget, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDistanceToTarget, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistToNonTargetEnemy, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistBetweenTargetAndOtherEnemies, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fDistToHidingTarget_Outer, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fDistToHidingTarget_Inner, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fChargeGoalCompletionRadius, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fCancelTargetOutOfCoverMovedDist, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.fCancelTargetInCoverMovedDist, PsoDataType.Float, 64, 0, 0) + ); + case (MetaName)1530415684: + return new PsoStructureInfo((MetaName)1530415684, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.bThrowSmokeGrenadeEnabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.uMaxNumActiveThrowers, PsoDataType.UByte, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.uConsiderRecentThrowAsActiveTimeoutMS, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.uMinTimeBetweenThrowsAtSameTargetMS, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.uMinTimeForSamePedToThrowAgainMS, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.uCheckForSmokeThrowPeriodMS, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToTarget, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDistanceToTarget, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fDotMinThrowerToTarget, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinLoiteringTimeSeconds, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskReactAimWeapon__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactAimWeapon__Tunables, 0, 0, 680, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Professional, PsoDataType.Structure, 16, 0, (MetaName)3326118529), + new PsoStructureEntryInfo(MetaName.NotProfessional, PsoDataType.Structure, 344, 0, (MetaName)3326118529), + new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 672, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRateVariance, PsoDataType.Float, 676, 0, 0) + ); + case (MetaName)3326118529: + return new PsoStructureInfo((MetaName)3326118529, 0, 0, 328, + new PsoStructureEntryInfo(MetaName.Flinch, PsoDataType.Structure, 8, 0, (MetaName)2563725968), + new PsoStructureEntryInfo(MetaName.Surprised, PsoDataType.Structure, 88, 0, (MetaName)2563725968), + new PsoStructureEntryInfo(MetaName.Sniper, PsoDataType.Structure, 168, 0, (MetaName)2563725968), + new PsoStructureEntryInfo(MetaName.None, PsoDataType.Structure, 248, 0, (MetaName)2563725968) + ); + case (MetaName)2563725968: + return new PsoStructureInfo((MetaName)2563725968, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Pistol, PsoDataType.Structure, 8, 0, (MetaName)3972028972), + new PsoStructureEntryInfo(MetaName.Rifle, PsoDataType.Structure, 32, 0, (MetaName)3972028972), + new PsoStructureEntryInfo(MetaName.MicroSMG, PsoDataType.Structure, 56, 0, (MetaName)3972028972) + ); + case (MetaName)3972028972: + return new PsoStructureInfo((MetaName)3972028972, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ClipSetId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.HasSixDirections, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.HasCreateWeaponTag, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.HasInterruptTag, PsoDataType.Bool, 18, 0, 0) + ); + case MetaName.CTaskSearch__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearch__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToStare, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetReached, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskSearchForUnknownThreat__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchForUnknownThreat__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.iMinTimeBeforeSearchingForNewHidingPlace, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxTimeBeforeSearchingForNewHidingPlace, PsoDataType.SInt, 20, 0, 0) + ); + case MetaName.CTaskSharkCircle__Tunables: + return new PsoStructureInfo(MetaName.CTaskSharkCircle__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AdvanceDistanceSquared, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveRateOverride, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskSharkAttack__Tunables: + return new PsoStructureInfo(MetaName.CTaskSharkAttack__Tunables, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SurfaceProjectionDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceZOffset, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDepthBelowSurface, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CirclingAngularSpeed, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToCircle, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCircleRadius, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCircleRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.CirclingMBR, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveProjectionDistance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveDepth, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveMBR, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinNumberFakeApproaches, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNumberFakeApproaches, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.FakeLungeOffset, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.LungeForwardOffset, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.LungeZOffset, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.LungeChangeDistance, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.LungeTargetRadius, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowTimeout, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowYOffset, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowZOffset, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.LandProbeLength, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingVehicleVelocityThreshold, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.SharkFleeDist, PsoDataType.Float, 108, 0, 0) + ); + case MetaName.CTaskCover__Tunables: + return new PsoStructureInfo(MetaName.CTaskCover__Tunables, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3698046827, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1862046997, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1686691958, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3171144783, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1788624470, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1235126752, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1335048013, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2787523036, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PriorityCoverWeighting, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleToCameraWeighting, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleToDynamicCoverWeighting, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceWeighting, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleToCoverWeighting, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleOfCoverWeighting, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeWeighting, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendOutDurationRun, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendOutDurationRunStart, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendOutDuration, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlayerToCoverDist, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)1534623417, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularDiffBetweenDynamicAndStaticCover, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.RangeToUseDynamicCoverPointMin, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.RangeToUseDynamicCoverPointMax, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToCoverAnyDir, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToPriorityCoverToForce, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToCoverSpecificDir, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.BehindPedToCoverCosTolerance, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.SearchToCoverCosTolerance, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.CapsuleZOffset, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenTestSpheresIntersectingRoute, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToCoverWhenPlayerIsClose, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCoverToPlayerCoverDist, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMoveToCoverDistForCoverMeAudio, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSecondsAsTopLevelTask, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceStreamingFailure, PsoDataType.Bool, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.StreamedUnarmedCoverMovementClipSetId, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo((MetaName)1804897490, PsoDataType.String, 160, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamedOneHandedCoverMovementClipSetId, PsoDataType.String, 164, 7, 0), + new PsoStructureEntryInfo(MetaName.AIOneHandedAimingClipSetId, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo(MetaName.AITwoHandedAimingClipSetId, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo(MetaName.CoreWeaponClipSetId, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo((MetaName)3902347552, PsoDataType.String, 180, 7, 0), + new PsoStructureEntryInfo((MetaName)2620277506, PsoDataType.String, 184, 7, 0) + ); + case MetaName.CTaskEnterCover__Tunables: + return new PsoStructureInfo(MetaName.CTaskEnterCover__Tunables, 0, 0, 368, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryRatePlayer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryRateAI, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryShortDistanceAI, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryShortDistancePlayer, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryStandDistance, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryStandStrafeDistance, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMinDistance, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMaxDistance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMinDistanceAI, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMaxDistanceAI, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMaxDirectDistance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMinTimeNavigatingAI, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryMinAngleToScale, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryHeadingReachedTol, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverEntryPositionReachedTol, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.FromCoverExitDistance, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendInDuration, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.DistFromCoverToAllowReloadCache, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.WaitForFootPlant, PsoDataType.Bool, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableFootTagSyncing, PsoDataType.Bool, 89, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceToTarget, PsoDataType.Bool, 90, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableInitialHeadingBlend, PsoDataType.Bool, 91, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableTranslationScaling, PsoDataType.Bool, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableRotationScaling, PsoDataType.Bool, 93, 0, 0), + new PsoStructureEntryInfo(MetaName.PreventTranslationOvershoot, PsoDataType.Bool, 94, 0, 0), + new PsoStructureEntryInfo(MetaName.PreventRotationOvershoot, PsoDataType.Bool, 95, 0, 0), + new PsoStructureEntryInfo(MetaName.DoInitialHeadingBlend, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.DoFinalHeadingFixUp, PsoDataType.Bool, 97, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToPlayEntryAnim, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToScale, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotSpeed, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTransScale, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTransScale, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRotScale, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotScale, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.DeltaTolerance, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRotDelta, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleToSetDirectly, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.AiEntryHalfAngleTolerance, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableNewAICoverEntry, PsoDataType.Bool, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableUseSwatClipSet, PsoDataType.Bool, 149, 0, 0), + new PsoStructureEntryInfo(MetaName.UseShortDistAngleRotation, PsoDataType.Bool, 150, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableAiCoverEntryStreamCheck, PsoDataType.Bool, 151, 0, 0), + new PsoStructureEntryInfo(MetaName.DistToUseShortestRotation, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.InCoverTolerance, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.DotThresholdForCenterEnter, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.AiEntryMinRate, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.AiEntryMaxRate, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSprintEntryRate, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultPlayerStandEntryStartMovementPhase, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultPlayerStandEntryEndMovementPhase, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleToBeginRotationScale, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDefaultAngularVelocity, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverInterruptMinTime, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverInterruptDistanceTolerance, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverInterruptHeadingTolerance, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAimInterruptDistanceTolerance, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAimInterruptHeadingTolerance, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 216, 0, (MetaName)1285383250), + new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 256, 0, (MetaName)1285383250), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)711010751), + new PsoStructureEntryInfo(MetaName.AIEnterCoverClips, PsoDataType.Array, 296, 0, (MetaName)62), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3590219800), + new PsoStructureEntryInfo(MetaName.AIStandEnterCoverClips, PsoDataType.Array, 312, 0, (MetaName)64), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)711010751), + new PsoStructureEntryInfo(MetaName.AIEnterTransitionClips, PsoDataType.Array, 328, 0, (MetaName)66), + new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingBase1H, PsoDataType.String, 344, 7, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingBase2H, PsoDataType.String, 348, 7, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingSwat1H, PsoDataType.String, 352, 7, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAIAimingSwat2H, PsoDataType.String, 356, 7, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAITransition1H, PsoDataType.String, 360, 7, 0), + new PsoStructureEntryInfo(MetaName.EnterCoverAITransition2H, PsoDataType.String, 364, 7, 0) + ); + case (MetaName)1285383250: + return new PsoStructureInfo((MetaName)1285383250, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo((MetaName)611524654, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo((MetaName)1120845094, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)3038580099: + return new PsoStructureInfo((MetaName)3038580099, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097154) + ); + case (MetaName)711010751: + return new PsoStructureInfo((MetaName)711010751, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.EnterClipId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) + ); + case (MetaName)3590219800: + return new PsoStructureInfo((MetaName)3590219800, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.StandClip0Id, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StandClip1Id, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.StandClip2Id, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 20, 0, (MetaName)2097155) + ); + case MetaName.CTaskExitCover__Tunables: + return new PsoStructureInfo(MetaName.CTaskExitCover__Tunables, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4010326834), + new PsoStructureEntryInfo(MetaName.CornerExitClips, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.ExitCoverBaseClipSetId, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)2123164199, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.ExitCoverExtraClipSetId, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)1757551615, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.MinInputToInterruptIdle, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.CornerExitHeadingModifier, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitCornerZOffset, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitCornerYOffset, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitCornerDirOffset, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 72, 0, (MetaName)246682624), + new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 96, 0, (MetaName)246682624) + ); + case (MetaName)246682624: + return new PsoStructureInfo((MetaName)246682624, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo((MetaName)1123873278, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)4010326834: + return new PsoStructureInfo((MetaName)4010326834, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ExitClipId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 12, 0, (MetaName)2097153) + ); + case MetaName.CTaskInCover__Tunables: + return new PsoStructureInfo(MetaName.CTaskInCover__Tunables, 0, 0, 536, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MovementClipRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnClipRate, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxInputForIdleExit, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.InputYAxisCornerExitValue, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlDebugXPos, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlDebugYPos, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlDebugRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlDebugBeginAngle, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.ControlDebugEndAngle, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickInputToMoveInCover, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickInputXAxisToTurnInCover, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)927329696, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.InputYAxisQuitValue, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.StartExtendedProbeTime, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToSpendInTask, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDistanceToCover, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDistanceToCoverToRequestStep, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.OptimumDistToRightCoverEdgeCrouched, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.OptimumDistToLeftCoverEdgeCrouched, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.OptimumDistToRightCoverEdge, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.OptimumDistToLeftCoverEdge, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMovingProbeOffset, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMovingProbeOffset, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTurnProbeOffset, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTurnProbeOffset, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultProbeOffset, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStoppingEdgeCheckProbeOffset, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStoppingEdgeCheckProbeOffset, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStoppingProbeOffset, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStoppingProbeOffset, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingChangeRate, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeAllowingCornerMove, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.CrouchedLeftFireOffset, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.CrouchedRightFireOffset, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverLeftFireModifier, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverRightFireModifier, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverLeftFireModifierLow, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverRightFireModifierLow, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)2625425324, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.CFriendlyIssues, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverLeftIncreaseModifier, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverRightIncreaseModifier, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.AimTurnCosAngleTolerance, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.InCoverMovementSpeedEnterCover, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.InCoverMovementSpeed, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingMovementSpeed, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.UseAutoPeekAimFromCoverControls, PsoDataType.Bool, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.ComeBackInWhenAimDirectChangeInHighCover, PsoDataType.Bool, 201, 0, 0), + new PsoStructureEntryInfo(MetaName.AlternateControlStickInputThreshold, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeCapsuleRadius, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeStartXOffset, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeEndXOffset, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeStartYOffset, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeEndYOffset, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.InsideEdgeStartYOffset, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.InsideEdgeEndYOffset, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.InsideEdgeStartXOffset, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.InsideEdgeEndXOffset, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.WallTestYOffset, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialLowEdgeWallTestYOffset, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.HighCloseEdgeWallTestYOffset, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.WallTestStartXOffset, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.WallTestEndXOffset, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.WallHighTestZOffset, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingEdgeTestStartYOffset, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingEdgeTestEndYOffset, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverEdgeTestStartYOffset, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverEdgeTestEndYOffset, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingEdgeTestStartYOffset, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingEdgeTestEndYOffset, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialLowEdgeTestStartYOffset, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialLowEdgeTestEndYOffset, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeHighZOffset, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeLowZOffset, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeMinimumOffsetDiff, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeMaximumOffsetDiff, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownPeekChance, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownBlindFireChance, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeAllowingAutoPeek, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableAimDirectlyIntros, PsoDataType.Bool, 328, 0, 0), + new PsoStructureEntryInfo(MetaName.PedDirToPedCoverCosAngleTol, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.CamToPedDirCosAngleTol, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo(MetaName.CamToCoverDirCosAngleTol, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToTargetForPeek, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenPeeksWithoutLOS, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1466791495), + new PsoStructureEntryInfo(MetaName.ThrowProjectileClips, PsoDataType.Array, 352, 0, (MetaName)86), + new PsoStructureEntryInfo(MetaName.RecreateWeaponTime, PsoDataType.SInt, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.BlindFireHighCoverMinPitchLimit, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.BlindFireHighCoverMaxPitchLimit, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableLeftHandIkInCover, PsoDataType.Bool, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableReloadingWhilstMovingInCover, PsoDataType.Bool, 381, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroRateForAi, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.AimOutroRateForAi, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.MinReactToFireRate, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxReactToFireRate, PsoDataType.Float, 396, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxReactToFireDelay, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeUntilReturnToIdleFromAimAfterAimedAt, PsoDataType.Float, 404, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeUntilReturnToIdleFromAimAfterAimedAt, PsoDataType.Float, 408, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeUntilReturnToIdleFromAimDefault, PsoDataType.Float, 412, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeUntilReturnToIdleFromAimDefault, PsoDataType.Float, 416, 0, 0), + new PsoStructureEntryInfo(MetaName.GlobalLateralTorsoOffsetInLeftCover, PsoDataType.Float, 420, 0, 0), + new PsoStructureEntryInfo((MetaName)3668359056, PsoDataType.Float, 424, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponLongBlockingOffsetInLeftCover, PsoDataType.Float, 428, 0, 0), + new PsoStructureEntryInfo((MetaName)2805643991, PsoDataType.Float, 432, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponBlockingOffsetInLeftCover, PsoDataType.Float, 436, 0, 0), + new PsoStructureEntryInfo((MetaName)3824828934, PsoDataType.Float, 440, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponBlockingOffsetInRightCover, PsoDataType.Float, 444, 0, 0), + new PsoStructureEntryInfo((MetaName)3593181124, PsoDataType.Float, 448, 0, 0), + new PsoStructureEntryInfo((MetaName)1214766569, PsoDataType.Float, 452, 0, 0), + new PsoStructureEntryInfo((MetaName)2018978213, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponBlockingLengthOffset, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo((MetaName)2717483602, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverStepClipSetId, PsoDataType.String, 468, 7, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownTakeCoverAmount, PsoDataType.Float, 472, 0, 0), + new PsoStructureEntryInfo(MetaName.AmountPinnedDownByDamage, PsoDataType.Float, 476, 0, 0), + new PsoStructureEntryInfo(MetaName.AmountPinnedDownByBullet, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo(MetaName.AmountPinnedDownByWitnessKill, PsoDataType.Float, 484, 0, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownByBulletRange, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownDecreaseAmountPerSecond, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroTaskBlendOutDuration, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToBePinnedDown, PsoDataType.UInt, 500, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBurstsMaxRandomPercent, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo(MetaName.AimOutroDelayTime, PsoDataType.UInt, 508, 0, 0), + new PsoStructureEntryInfo((MetaName)3531438516, PsoDataType.UInt, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)796325569, PsoDataType.UInt, 516, 0, 0), + new PsoStructureEntryInfo((MetaName)2152868269, PsoDataType.Bool, 520, 0, 0), + new PsoStructureEntryInfo((MetaName)1536785516, PsoDataType.Bool, 521, 0, 0), + new PsoStructureEntryInfo(MetaName.ThrowProjectileClipSetId, PsoDataType.String, 524, 7, 0), + new PsoStructureEntryInfo((MetaName)3576155857, PsoDataType.String, 528, 7, 0) + ); + case (MetaName)1466791495: + return new PsoStructureInfo((MetaName)1466791495, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.IntroClipId, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PullPinClipId, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.BaseClipId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.ThrowLongClipId, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.ThrowShortClipId, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo((MetaName)1925480184, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)3487669030, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 36, 0, (MetaName)2097159) + ); + case MetaName.CTaskMotionInCover__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionInCover__Tunables, 0, 0, 1112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverClipRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableCoverToCoverTranslationScaling, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableCoverToCoverRotationScaling, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.UseButtonToMoveAroundCorner, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableCoverToCover, PsoDataType.Bool, 23, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableWalkStops, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableCoverPeekingVariations, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableCoverPinnedVariations, PsoDataType.Bool, 26, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableCoverIdleVariations, PsoDataType.Bool, 27, 0, 0), + new PsoStructureEntryInfo(MetaName.UseSprintButtonForCoverToCover, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.VerifyCoverInterval, PsoDataType.UByte, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeForCornerMove, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultSettleBlendDuration, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.HeightChangeSettleBlendDuration, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeStayPinned, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStayPinned, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PinnedDownThreshold, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ForcePinnedDown, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToTargetForIdleVariations, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenIdleVariations, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBetweenIdleVariations, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWaitTimeToPlayPlayerIdleVariations, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenPlayerIdleVariations, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBetweenPlayerIdleVariations, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverDuration, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinScalePhase, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMaxScalePhase, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinRotScalePhase, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMaxRotScalePhase, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotationalSpeed, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickInputToEnableMoveAroundCorner, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickInputToEnableCoverToCover, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickInputToMoveAroundCorner, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStoppingDuration, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStoppingDist, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToScale, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCDepthDistanceCompletionOffset, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeLowCoverMoveTime, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToStandUp, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinDistToScale, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinAngToScale, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinAng, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverDistTol, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMaxDistToStep, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverAngTol, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMaxAngToStep, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMaxAccel, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.ForwardDistToStartSideScale, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverMinDepthToScale, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverToCoverSmallAnimDist, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendToIdleTime, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.InsideCornerStopDistance, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverHeadingCloseEnough, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverHeadingCloseEnoughTurn, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverPositionCloseEnough, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultStillToTurnBlendDuration, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultEdgeTurnBlendDuration, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.PeekToEdgeTurnBlendDuration, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMoveSpeedInCover, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.MinEdgeDistanceForStoppingAnim, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.UseNewStepAndWalkStarts, PsoDataType.Bool, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.UseNewTurns, PsoDataType.Bool, 237, 0, 0), + new PsoStructureEntryInfo(MetaName.UseNewTurnWalkStarts, PsoDataType.Bool, 238, 0, 0), + new PsoStructureEntryInfo(MetaName.CoreMotionClipSetId, PsoDataType.String, 240, 7, 0), + new PsoStructureEntryInfo((MetaName)1642317087, PsoDataType.String, 244, 7, 0), + new PsoStructureEntryInfo(MetaName.CoreAIMotionClipSetId, PsoDataType.String, 248, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.PeekingVariationAnimStateInfos, PsoDataType.Array, 256, 0, (MetaName)69), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PeekingLow1HVariationClipsets, PsoDataType.Array, 272, 0, (MetaName)71), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PeekingLow2HVariationClipsets, PsoDataType.Array, 288, 0, (MetaName)73), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PeekingHigh1HVariationClipsets, PsoDataType.Array, 304, 0, (MetaName)75), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PeekingHigh2HVariationClipsets, PsoDataType.Array, 320, 0, (MetaName)77), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PinnedLow1HVariationClipsets, PsoDataType.Array, 336, 0, (MetaName)79), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PinnedLow2HVariationClipsets, PsoDataType.Array, 352, 0, (MetaName)81), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PinnedHigh1HVariationClipsets, PsoDataType.Array, 368, 0, (MetaName)83), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PinnedHigh2HVariationClipsets, PsoDataType.Array, 384, 0, (MetaName)85), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.OutroReact1HVariationClipsets, PsoDataType.Array, 400, 0, (MetaName)87), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.OutroReact2HVariationClipsets, PsoDataType.Array, 416, 0, (MetaName)89), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.IdleLow1HVariationClipsets, PsoDataType.Array, 432, 0, (MetaName)91), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.IdleLow2HVariationClipsets, PsoDataType.Array, 448, 0, (MetaName)93), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.IdleHigh1HVariationClipsets, PsoDataType.Array, 464, 0, (MetaName)95), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.IdleHigh2HVariationClipsets, PsoDataType.Array, 480, 0, (MetaName)97), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleLow0HVariationClipsets, PsoDataType.Array, 496, 0, (MetaName)99), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleLow1HVariationClipsets, PsoDataType.Array, 512, 0, (MetaName)101), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleLow2HVariationClipsets, PsoDataType.Array, 528, 0, (MetaName)103), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleHigh0HVariationClipsets, PsoDataType.Array, 544, 0, (MetaName)105), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleHigh1HVariationClipsets, PsoDataType.Array, 560, 0, (MetaName)107), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleHigh2HVariationClipsets, PsoDataType.Array, 576, 0, (MetaName)109), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.PinnedIntroAnimStateInfos, PsoDataType.Array, 592, 0, (MetaName)111), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.PinnedIdleAnimStateInfos, PsoDataType.Array, 608, 0, (MetaName)113), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.PinnedOutroAnimStateInfos, PsoDataType.Array, 624, 0, (MetaName)115), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.IdleVariationAnimStateInfos, PsoDataType.Array, 640, 0, (MetaName)117), + new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 656, 0, (MetaName)2625948332), + new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 880, 0, (MetaName)2625948332), + new PsoStructureEntryInfo((MetaName)1230607954, PsoDataType.Bool, 1104, 0, 0), + new PsoStructureEntryInfo((MetaName)1949874056, PsoDataType.Bool, 1105, 0, 0), + new PsoStructureEntryInfo((MetaName)3098272438, PsoDataType.Bool, 1106, 0, 0), + new PsoStructureEntryInfo((MetaName)2038512667, PsoDataType.Bool, 1107, 0, 0) + ); + case (MetaName)2625948332: + return new PsoStructureInfo((MetaName)2625948332, 0, 0, 224, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.IdleAnimStateInfos, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.AtEdgeAnimStateInfos, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.PeekingAnimStateInfos, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.StoppingAnimStateInfos, PsoDataType.Array, 56, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.MovingAnimStateInfos, PsoDataType.Array, 72, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.EdgeTurnAnimStateInfos, PsoDataType.Array, 88, 0, (MetaName)10), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.CoverToCoverAnimStateInfos, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.SteppingAnimStateInfos, PsoDataType.Array, 120, 0, (MetaName)14), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.WalkStartAnimStateInfos, PsoDataType.Array, 136, 0, (MetaName)MetaTypeName.STRING), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.SettleAnimStateInfos, PsoDataType.Array, 152, 0, (MetaName)18), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.TurnEnterAnimStateInfos, PsoDataType.Array, 168, 0, (MetaName)20), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.TurnEndAnimStateInfos, PsoDataType.Array, 184, 0, (MetaName)22), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo(MetaName.TurnWalkStartAnimStateInfos, PsoDataType.Array, 200, 0, (MetaName)24), + new PsoStructureEntryInfo((MetaName)3535710087, PsoDataType.String, 216, 7, 0) + ); + case MetaName.CTaskAimGunFromCoverIntro__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimGunFromCoverIntro__Tunables, 0, 0, 312, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.UpperBodyAimBlendInDuration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroMovementDuration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableIntroScaling, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableIntroOverShootCheck, PsoDataType.Bool, 26, 0, 0), + new PsoStructureEntryInfo(MetaName.UseConstantIntroScaling, PsoDataType.Bool, 27, 0, 0), + new PsoStructureEntryInfo(MetaName.RenderArcsAtCoverPosition, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.RenderAimArcDebug, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.UseMoverPositionWhilePeeking, PsoDataType.Bool, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableWeaponBlocking, PsoDataType.Bool, 31, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTranslationScaling, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ArcRadius, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroScalingDefaultStartPhase, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroScalingDefaultEndPhase, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroRotScalingDefaultStartPhase, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroRotScalingDefaultEndPhase, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.AiAimIntroCloseEnoughTolerance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStepBackDist, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStepOutDist, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStepOutDist, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroMaxScale, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.IntroRate, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)2875886470, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroRate, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2575356761, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingApproachRateSlow, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingApproachRate, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingApproachRateFast, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.SteppingHeadingApproachRate, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRotationalSpeedScale, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.StepOutCapsuleRadiusScale, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.AimDirectlyMaxAngle, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.StepOutLeftX, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.StepOutRightX, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.StepOutY, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.LowXClearOffsetCapsuleTest, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.LowXOffsetCapsuleTest, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.LowYOffsetCapsuleTest, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.LowZOffsetCapsuleTest, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.LowOffsetCapsuleLength, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.LowOffsetCapsuleRadius, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.LowLeftStep, PsoDataType.Float2, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.LowRightStep, PsoDataType.Float2, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.LowBlockedBlend, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepOutLeftXBlocked, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepOutLeftYBlocked, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepBackLeftXBlocked, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepBackLeftYBlocked, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepOutRightXBlocked, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepOutRightYBlocked, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepBackRightXBlocked, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.LowStepBackRightYBlocked, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.LowSideZOffset, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.DistConsideredAtAimPosition, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPhaseToApplyExtraHeadingAi, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPhaseToApplyExtraHeadingPlayer, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityAi, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayer, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayerForcedStandAim, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.HighLeftAimStepInfoSet, PsoDataType.Structure, 248, 0, (MetaName)791301518), + new PsoStructureEntryInfo(MetaName.HighRightAimStepInfoSet, PsoDataType.Structure, 272, 0, (MetaName)791301518), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4162893736), + new PsoStructureEntryInfo(MetaName.AimIntroClips, PsoDataType.Array, 296, 0, (MetaName)64) + ); + case (MetaName)791301518: + return new PsoStructureInfo((MetaName)791301518, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2996437115), + new PsoStructureEntryInfo(MetaName.StepInfos, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)2996437115: + return new PsoStructureInfo((MetaName)2996437115, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.StepOutX, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.StepOutY, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.StepTransitionMinAngle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StepTransitionMaxAngle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.PreviousTransitionExtraScalar, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.NextTransitionExtraScalar, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.PreviousTransitionClipId, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.NextTransitionClipId, PsoDataType.String, 36, 7, 0) + ); + case (MetaName)4162893736: + return new PsoStructureInfo((MetaName)4162893736, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097154) + ); + case MetaName.CTaskAimGunFromCoverOutro__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimGunFromCoverOutro__Tunables, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DisableOutroScaling, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableOutroOverShootCheck, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.UseConstantOutroScaling, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroRotationScalingDefaultStartPhase, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroRotationScalingDefaultEndPhase, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroScalingDefaultStartPhase, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroScalingDefaultEndPhase, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroMaxScale, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AdditionalModifier, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.EndHeadingTolerance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDistanceToCover, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.InCoverMovementSpeed, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.OutroMovementDuration, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.UpperBodyAimBlendOutDuration, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityAi, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayer, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)2412106599, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularHeadingVelocityPlayerForcedStandAim, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3920645611, PsoDataType.Structure, 80, 0, (MetaName)1280972310), + new PsoStructureEntryInfo((MetaName)80713034, PsoDataType.Structure, 104, 0, (MetaName)1280972310) + ); + case (MetaName)1280972310: + return new PsoStructureInfo((MetaName)1280972310, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3038580099), + new PsoStructureEntryInfo((MetaName)2828309925, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.CTaskAimGunBlindFire__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimGunBlindFire__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RemoveReticuleDuringBlindFire, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DontRemoveReticuleDuringBlindFireNew, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.LowBlindFireAimingDirectlyLimitAngle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HighBlindFireAimingDirectlyLimitAngle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)994532516), + new PsoStructureEntryInfo(MetaName.BlindFireAnimStateNewInfos, PsoDataType.Array, 32, 0, (MetaName)5) + ); + case (MetaName)994532516: + return new PsoStructureInfo((MetaName)994532516, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.IntroClip0Id, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.IntroClip1Id, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.SweepClip0Id, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.SweepClip1Id, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo(MetaName.SweepClip2Id, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.OutroClip0Id, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)2291961208, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)3610728325, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo((MetaName)1018316975, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.CockGunWeaponClipId, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1559228487), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 48, 0, (MetaName)2097162), + new PsoStructureEntryInfo(MetaName.MinHeadingAngle, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingAngle, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3127121455, PsoDataType.Structure, 64, 0, (MetaName)4209697792), + new PsoStructureEntryInfo((MetaName)465339689, PsoDataType.Structure, 88, 0, (MetaName)4209697792) + ); + case (MetaName)4209697792: + return new PsoStructureInfo((MetaName)4209697792, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinPitchAngle, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchAngle, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitchAngle2H, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchAngle2H, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CAiCoverClipVariationHelper__Tunables: + return new PsoStructureInfo(MetaName.CAiCoverClipVariationHelper__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinUsesForPeekingVariationChange, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUsesForPeekingVariationChange, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUsesForPinnedVariationChange, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUsesForPinnedVariationChange, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUsesForOutroReactVariationChange, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUsesForOutroReactVariationChange, PsoDataType.UInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinUsesForIdleVariationChange, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUsesForIdleVariationChange, PsoDataType.UInt, 44, 0, 0) + ); + case MetaName.CPlayerCoverClipVariationHelper__Tunables: + return new PsoStructureInfo(MetaName.CPlayerCoverClipVariationHelper__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinUsesForIdleVariationChange, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUsesForIdleVariationChange, PsoDataType.UInt, 20, 0, 0) + ); + case MetaName.CDynamicCoverHelper__Tunables: + return new PsoStructureInfo(MetaName.CDynamicCoverHelper__Tunables, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EnableConflictingNormalCollisionRemoval, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.UseStickHistoryForCoverSearch, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.StickDownDuration, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.StickDownMinRange, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.UseCameraOrientationWeighting, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.UseCameraOrientationWhenStill, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.UseCameraOrientationForBackwardsDirection, PsoDataType.Bool, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.BehindThreshold, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToWallStanding, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToWallCrouching, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToWallCoverToCover, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMCrouchedForwardClearanceOffset, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMStandingForwardClearanceOffset, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMSideClearanceDepth, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMClearanceCapsuleRadius, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMSideTestDepth, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMCrouchedHeightOffset, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.OCMStandingHeightOffset, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCSideOffset, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCProbeDepth, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCForwardOffset, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCSpacingOffset, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCCapsuleRadius, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCHeightOffset, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.LowCoverProbeHeight, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.HighCoverProbeHeight, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleRadius, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleStartForwardOffset, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleEndForwardOffset, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleStartZOffset, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCClearanceCapsuleEndZOffset, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.CTCMinDistance, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleEdgeProbeXOffset, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleEdgeProbeZOffset, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZDiffBetweenCoverPoints, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZDiffBetweenPedPos, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingDiffBetweenCTCPoints, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.PedToCoverCapsuleRadius, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.PedToCoverEndPullBackDistance, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.PedToCoverEndZOffset, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStickInputAngleInfluence, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleYStartOffset, PsoDataType.Float, 168, 0, 0) + ); + case MetaName.CClipScalingHelper__Tunables: + return new PsoStructureInfo(MetaName.CClipScalingHelper__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DisableRotationScaling, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableRotationOvershoot, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTranslationScaling, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTranslationOvershoot, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelocityToScale, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTransVelocity, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRemainingAnimDurationToScale, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAnimRotationDeltaToScale, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAnimTranslationDeltaToScale, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCurrentRotationDeltaToScale, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMinRotationScalingValue, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMaxRotationScalingValue, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMinTranslationScalingValue, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMaxTranslationScalingValue, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.CTaskAdvance__Tunables: + return new PsoStructureInfo(MetaName.CTaskAdvance__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToWaitAtPosition, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenPointUpdates, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenSeekChecksAtTacticalPoint, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskAimFromGround__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimFromGround__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxAimFromGroundTime, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskBoatChase__Tunables: + return new PsoStructureInfo(MetaName.CTaskBoatChase__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceForPursue, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskBoatCombat__Tunables: + return new PsoStructureInfo(MetaName.CTaskBoatCombat__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)384450892), + new PsoStructureEntryInfo(MetaName.MinSpeedForChase, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLookAheadForCollision, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DepthForLandProbe, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToWait, PsoDataType.Float, 44, 0, 0) + ); + case (MetaName)384450892: + return new PsoStructureInfo((MetaName)384450892, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionProbe, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.LandProbe, PsoDataType.Bool, 10, 0, 0) + ); + case MetaName.CTaskBoatStrafe__Tunables: + return new PsoStructureInfo(MetaName.CTaskBoatStrafe__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AdditionalDistanceForApproach, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AdditionalDistanceForStrafe, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedForStrafe, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.RotationLookAhead, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAdjustmentLookAhead, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskDraggingToSafety__Tunables: + return new PsoStructureInfo(MetaName.CTaskDraggingToSafety__Tunables, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ObstructionProbe, PsoDataType.Structure, 16, 0, (MetaName)1469164696), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 40, 0, (MetaName)512689970), + new PsoStructureEntryInfo(MetaName.MaxTimeForStream, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverMinDistance, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverMaxDistance, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.LookAtUpdateTime, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.LookAtTime, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverWeightDistance, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverWeightUsage, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverWeightValue, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.SeparationPickup, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.SeparationDrag, PsoDataType.Float3, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.SeparationPutdown, PsoDataType.Float3, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.AbortAimedAtMinDistance, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverResponseTimeout, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotForPickupDirection, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForHolster, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForPedToBeVeryCloseToCover, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNumPedsAllowedToBeVeryCloseToCover, PsoDataType.SInt, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenCoverPointSearches, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToSetApproachPosition, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderTooClose, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToAlwaysLookAtTarget, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeightDifferenceToApproachTarget, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxXYDistanceToApproachTarget, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToBeObstructed, PsoDataType.Float, 192, 0, 0) + ); + case (MetaName)1469164696: + return new PsoStructureInfo((MetaName)1469164696, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Height, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Radius, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraHeightForGround, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)512689970: + return new PsoStructureInfo((MetaName)512689970, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ObstructionProbe, PsoDataType.Bool, 9, 0, 0) + ); + case MetaName.CTaskHeliChase__Tunables: + return new PsoStructureInfo(MetaName.CTaskHeliChase__Tunables, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DriftX, PsoDataType.Structure, 16, 0, (MetaName)1407012688), + new PsoStructureEntryInfo(MetaName.DriftY, PsoDataType.Structure, 40, 0, (MetaName)1407012688), + new PsoStructureEntryInfo(MetaName.DriftZ, PsoDataType.Structure, 64, 0, (MetaName)1407012688), + new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDistanceMin, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDistanceMax, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForOrientation, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.NearDistanceForOrientation, PsoDataType.Float, 108, 0, 0) + ); + case (MetaName)1407012688: + return new PsoStructureInfo((MetaName)1407012688, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinValueForCorrection, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxValueForCorrection, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskHeliCombat__Tunables: + return new PsoStructureInfo(MetaName.CTaskHeliCombat__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Chase, PsoDataType.Structure, 16, 0, (MetaName)960897278) + ); + case (MetaName)960897278: + return new PsoStructureInfo((MetaName)960897278, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetOffsetX, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetOffsetX, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetOffsetY, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetOffsetY, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetOffsetZ, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetOffsetZ, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetOffsetZ_TargetInAir, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetOffsetZ_TargetInAir, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskPlaneChase__Tunables: + return new PsoStructureInfo(MetaName.CTaskPlaneChase__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskReactToBuddyShot__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactToBuddyShot__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskVariedAimPose__Tunables: + return new PsoStructureInfo(MetaName.CTaskVariedAimPose__Tunables, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeCanChooseNewPose, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeNewPose, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBeforeNewPose, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForMinTimeBeforeNewPose, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForMaxTimeBeforeNewPose, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidNearbyPedHorizontal, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidNearbyPedVertical, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidNearbyPedDotThreshold, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenReactions, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAnimOffsetMagnitude, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToCareAboutBlockingLineOfSight, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToUseUrgentTransitions, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToUseUrgentTransitionsWhenThreatened, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenReactionChecksForGunAimedAt, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToReactForGunAimedAt, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxClipsToCheckPerFrame, PsoDataType.SInt, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugDraw, PsoDataType.Bool, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultStandingPose, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultCrouchingPose, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)896772506), + new PsoStructureEntryInfo(MetaName.AimPoses, PsoDataType.Array, 104, 0, (MetaName)22) + ); + case (MetaName)896772506: + return new PsoStructureInfo((MetaName)896772506, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.IsCrouching, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.IsStationary, PsoDataType.Bool, 13, 0, 0), + new PsoStructureEntryInfo(MetaName.LoopClipSetId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.LoopClipId, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2263463390), + new PsoStructureEntryInfo(MetaName.Transitions, PsoDataType.Array, 24, 0, (MetaName)5) + ); + case (MetaName)2263463390: + return new PsoStructureInfo((MetaName)2263463390, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ToPose, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ClipSetId, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.ClipId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)966624441), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 2, (MetaName)524292) + ); + case MetaName.CTaskVehicleChase__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleChase__Tunables, 0, 0, 264, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CloseDistance, PsoDataType.Structure, 16, 0, (MetaName)653343499), + new PsoStructureEntryInfo(MetaName.Block, PsoDataType.Structure, 32, 0, (MetaName)45194904), + new PsoStructureEntryInfo(MetaName.Pursue, PsoDataType.Structure, 56, 0, (MetaName)2956630463), + new PsoStructureEntryInfo(MetaName.Ram, PsoDataType.Structure, 80, 0, (MetaName)533527745), + new PsoStructureEntryInfo(MetaName.SpinOut, PsoDataType.Structure, 104, 0, (MetaName)2379651736), + new PsoStructureEntryInfo(MetaName.PullAlongside, PsoDataType.Structure, 128, 0, (MetaName)3309127383), + new PsoStructureEntryInfo(MetaName.AggressiveMove, PsoDataType.Structure, 152, 0, (MetaName)2082149421), + new PsoStructureEntryInfo(MetaName.Cheat, PsoDataType.Structure, 216, 0, (MetaName)3284002922), + new PsoStructureEntryInfo(MetaName.MaxDotForHandBrake, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenCarChaseShockingEvents, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForCarChaseShockingEvents, PsoDataType.Float, 256, 0, 0) + ); + case (MetaName)653343499: + return new PsoStructureInfo((MetaName)653343499, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MinDistanceToStart, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToContinue, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)45194904: + return new PsoStructureInfo((MetaName)45194904, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MaxDotToStartFromAnalyze, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDotToContinueFromAnalyze, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2956630463: + return new PsoStructureInfo((MetaName)2956630463, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinDotToStartFromAnalyze, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToContinueFromAnalyze, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)533527745: + return new PsoStructureInfo((MetaName)533527745, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)2379651736: + return new PsoStructureInfo((MetaName)2379651736, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)3309127383: + return new PsoStructureInfo((MetaName)3309127383, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToStartFromPursue, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetSpeedToContinueFromPursue, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)2082149421: + return new PsoStructureInfo((MetaName)2082149421, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.MaxDistanceToStartFromPursue, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToStartFromPursue, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedLeewayToStartFromPursue, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetSteerAngleToStartFromPursue, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToContinueFromPursue, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToContinueFromPursue, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeInStateToContinueFromPursue, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetSteerAngleToContinueFromPursue, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelay, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelay, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.WeightToRamFromPursue, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.WeightToBlockFromPursue, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.WeightToSpinOutFromPursue, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.WeightToPullAlongsideFromPursue, PsoDataType.Float, 60, 0, 0) + ); + case (MetaName)3284002922: + return new PsoStructureInfo((MetaName)3284002922, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinSpeedDifferenceForPowerAdjustment, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedDifferenceForPowerAdjustment, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PowerForMinAdjustment, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PowerForMaxAdjustment, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.destroySuppressor, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskVehiclePersuit__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehiclePersuit__Tunables, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ApproachTarget, PsoDataType.Structure, 16, 0, (MetaName)2385857407), + new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleA, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleB, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.ObstructionProbeAngleC, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceOnBikeAndTargetUnarmed, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceOnBikeAndTargetArmed, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceInVehicleAndTargetUnarmed, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceInVehicleAndTargetArmed, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceShotAt, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceCouldLeaveCar, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToStopMultiplier, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToStopMassIdeal, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToStopMassWeight, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDriverTimeToLeaveVehicle, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDriverTimeToLeaveVehicle, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPassengerTimeToLeaveVehicle, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPassengerTimeToLeaveVehicle, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForEarlyCombatExit, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToJumpOutOfVehicle, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBoatOutOfWaterForExit, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidanceMarginForOtherLawEnforcementVehicles, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToWaitForOtherPedToExit, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayExitTime, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayExitTime, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.PreventShufflingExtraRange, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeWaitForExitBeforeWarp, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTargetStandingOnTrainSpeed, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToFollowInCar, PsoDataType.SInt, 176, 0, 0) + ); + case (MetaName)2385857407: + return new PsoStructureInfo((MetaName)2385857407, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.TargetArriveDist, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderClose, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenClose, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenObstructedByLawEnforcementPed, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedWhenObstructedByLawEnforcementVehicle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1208093369, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)4019091857, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2510151940, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1955661253, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2422052515, PsoDataType.SInt, 48, 0, 0) + ); + case MetaName.CTaskVehicleCombat__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleCombat__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenShootOutTiresGlobal, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBetweenShootOutTiresGlobal, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInCombatToShootOutTires, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeInCombatToShootOutTires, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToApplyReactionWhenShootingOutTire, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToPrepareWeapon, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToPrepareWeapon, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1726607124, PsoDataType.UInt, 44, 0, 0) + ); + case MetaName.CTaskSearchBase__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchBase__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToGiveUp, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPositionVariance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDirectionVariance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskSearchInAutomobile__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchInAutomobile__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskSearchInBoat__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchInBoat__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskSearchInHeli__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchInHeli__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeightAboveTerrain, PsoDataType.SInt, 24, 0, 0) + ); + case MetaName.CTaskSearchOnFoot__Tunables: + return new PsoStructureInfo(MetaName.CTaskSearchOnFoot__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FleeOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeSafeDistance, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskShootOutTire__Tunables: + return new PsoStructureInfo(MetaName.CTaskShootOutTire__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeoutToAcquireLineOfSight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeoutToAcquireLineOfSight, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenLineOfSightChecks, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToWaitForShot, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToWaitForShot, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWaitForShotFailures, PsoDataType.SInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToApplyReaction, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskTargetUnreachable__Tunables: + return new PsoStructureInfo(MetaName.CTaskTargetUnreachable__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fTimeBetweenRouteSearches, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskTargetUnreachableInInterior__Tunables: + return new PsoStructureInfo(MetaName.CTaskTargetUnreachableInInterior__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fDirectionTestProbeLength, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskTargetUnreachableInExterior__Tunables: + return new PsoStructureInfo(MetaName.CTaskTargetUnreachableInExterior__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RangePercentage, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromNavMesh, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveBlendRatio, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToWait, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToWait, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CPedTargetting__Tunables: + return new PsoStructureInfo(MetaName.CPedTargetting__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fExistingTargetScoreWeight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fTargetingInactiveDisableTime, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fBlockedLosWeighting, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fTimeToIgnoreBlockedLosWeighting, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerHighThreatWeighting, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1742395925, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.iTargetNotSeenIgnoreTimeMs, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerThreatDistance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerDirectThreatDistance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerBeingTargetedExtraDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.iPlayerDirectThreatTimeMs, PsoDataType.SInt, 56, 0, 0) + ); + case MetaName.CTaskPursueCriminal__Tunables: + return new PsoStructureInfo(MetaName.CTaskPursueCriminal__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToFindVehicle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToFindVehicle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeightDifference, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DotProductFacing, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DotProductBehind, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToFollowVehicleBeforeFlee, PsoDataType.SInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToSignalVehiclePursuitToCriminal, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToSignalVehiclePursuitToCriminalMin, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToSignalVehiclePursuitToCriminalMax, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DrawDebug, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowPursuePlayer, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo(MetaName.CriminalVehicleMinStartSpeed, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.CTaskReactToPursuit__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactToPursuit__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToFleeInVehicle, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToFleeInVehicle, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeSpeedInVehicle, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskStealVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskStealVehicle__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToFindVehicle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToPursueVehicle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToRunToVehicle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CanStealPlayersVehicle, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CanStealCarsAtLights, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.CanStealParkedCars, PsoDataType.Bool, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.CanStealStationaryCars, PsoDataType.Bool, 31, 0, 0) + ); + case MetaName.CLookAtHistory__Tunables: + return new PsoStructureInfo(MetaName.CLookAtHistory__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.HistoryCosineThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MemoryDuration, PsoDataType.UInt, 20, 0, 0) + ); + case MetaName.CAmbientLookAt__Tunables: + return new PsoStructureInfo(MetaName.CAmbientLookAt__Tunables, 0, 0, 416, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultLookAtThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultDistanceFromWorldCenter, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtendedDistanceFromWorldCenter, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToScanLookAts, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.BaseTimeToLook, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AITimeBetweenLookAtsFailureMin, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AITimeBetweenLookAtsFailureMax, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerTimeBetweenLookAtsMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerTimeBetweenLookAtsMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerTimeMyVehicleLookAtsMin, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerTimeMyVehicleLookAtsMax, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenScenarioScans, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioScanOffsetDistance, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioScanRadius, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlayerScore, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.BasicPedScore, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.BasicVehicleScore, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.BasicObjectScore, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.BehindPedModifier, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerPedModifier, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.WalkingRoundPedModifier, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.RunningPedModifier, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.ClimbingOrJumpingPedModifier, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.FightingModifier, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.JackingModifier, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.HangingAroundVehicleModifier, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioToScenarioPedModifier, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.GangScenarioPedToPlayerModifier, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.ApproachingPlayerModifier, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosePlayerModifier, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.InRangePlayerModifier, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.InRangeDrivingPlayerModifier, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.HoldingWeaponPlayerModifier, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.CoveredInBloodPlayerModifier, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollingModifier, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.PickingUpBikeModifier, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.RecklessCarModifier, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.RecentlyLookedAtPlayerModifier, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.RecentlyLookedAtEntityModifier, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.HighImportanceModifier, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MediumImportanceModifier, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.LowImportanceModifier, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.ModelNamesToConsiderPlayersForScoringPurposes, PsoDataType.Array, 184, 0, (MetaName)43), + new PsoStructureEntryInfo(MetaName.RecklessCarSpeedMin, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.RecklessCarSpeedMax, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.CarSirenModifier, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerCopModifier, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSexyPedModifier, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSwankyCarModifier, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerCopCarModifier, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerHasslingModifier, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedMinDistance, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedMaxDistance, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedMinDotAngle, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedMaxDotAngle, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedMaxHeightDifference, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.InRangePlayerDistanceThreshold, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.InRangePlayerInRaceDistanceThreshold, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosePlayerDistanceThreshold, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.ApproachingPlayerDistanceThreshold, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.ApproachingPlayerCosineThreshold, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollPlayerDistanceThreshold, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.LookingInRangePlayerMaxDotAngle, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVelocityForVehicleLookAtSqr, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSwankyCarMin, PsoDataType.UByte, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSwankyCarMax, PsoDataType.UByte, 285, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedRenderDebug, PsoDataType.Bool, 286, 0, 0), + new PsoStructureEntryInfo(MetaName.HotPedDisableSexinessFlagChecks, PsoDataType.Bool, 287, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBeforeSwitchLookAt, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookBackAngle, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTurnSpeedMotionOverPOI, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedForNarrowestAnglePickPOI, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAnglePickPOI, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAnglePickPOI, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchingAnglePickPOI, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerLookAtDebugDraw, PsoDataType.Bool, 316, 0, 0), + new PsoStructureEntryInfo(MetaName.CameraLookAtTurnRate, PsoDataType.Enum, 320, 0, MetaName.LookIkTurnRate), + new PsoStructureEntryInfo(MetaName.POILookAtTurnRate, PsoDataType.Enum, 324, 0, MetaName.LookIkTurnRate), + new PsoStructureEntryInfo(MetaName.MotionLookAtTurnRate, PsoDataType.Enum, 328, 0, MetaName.LookIkTurnRate), + new PsoStructureEntryInfo(MetaName.VehicleJumpLookAtTurnRate, PsoDataType.Enum, 332, 0, MetaName.LookIkTurnRate), + new PsoStructureEntryInfo(MetaName.CameraLookAtBlendRate, PsoDataType.Enum, 336, 0, MetaName.LookIkBlendRate), + new PsoStructureEntryInfo(MetaName.POILookAtBlendRate, PsoDataType.Enum, 340, 0, MetaName.LookIkBlendRate), + new PsoStructureEntryInfo(MetaName.MotionLookAtBlendRate, PsoDataType.Enum, 344, 0, MetaName.LookIkBlendRate), + new PsoStructureEntryInfo(MetaName.VehicleJumpLookAtBlendRate, PsoDataType.Enum, 348, 0, MetaName.LookIkBlendRate), + new PsoStructureEntryInfo(MetaName.CameraLookAtRotationLimit, PsoDataType.Enum, 352, 0, MetaName.LookIkRotationLimit), + new PsoStructureEntryInfo(MetaName.POILookAtRotationLimit, PsoDataType.Enum, 356, 0, MetaName.LookIkRotationLimit), + new PsoStructureEntryInfo(MetaName.MotionLookAtRotationLimit, PsoDataType.Enum, 360, 0, MetaName.LookIkRotationLimit), + new PsoStructureEntryInfo(MetaName.AITimeWaitingToCrossRoadMin, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.AITimeWaitingToCrossRoadMax, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.fAIGreetingDistanceMin, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.fAIGreetingDistanceMax, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.uAITimeBetweenGreeting, PsoDataType.UInt, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.fAIGreetingPedModifier, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.uTimeBetweenLookBacks, PsoDataType.UInt, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.uTimeToLookBack, PsoDataType.UInt, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.uAimToIdleLookAtTime, PsoDataType.UInt, 396, 0, 0), + new PsoStructureEntryInfo(MetaName.fAimToIdleBreakOutAngle, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.fAimToIdleAngleLimitLeft, PsoDataType.Float, 404, 0, 0), + new PsoStructureEntryInfo(MetaName.fAimToIdleAngleLimitRight, PsoDataType.Float, 408, 0, 0), + new PsoStructureEntryInfo((MetaName)3044687592, PsoDataType.UInt, 412, 0, 0) + ); + case MetaName.CTaskAmbientClips__Tunables: + return new PsoStructureInfo(MetaName.CTaskAmbientClips__Tunables, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.LowLodBaseClipSetId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultChanceOfStandingWhileMoving, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTimeBetweenIdles, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterGunshotToPlayIdles, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterGunshotForPlayerToPlayIdles, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.playerNearToHangoutDistanceInMetersSquared, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.minSecondsNearPlayerUntilHangoutQuit, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.maxSecondsNearPlayerUntilHangoutQuit, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.maxHangoutChatDistSq, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.VFXCullRangeScaleNotVisible, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondsSinceInWaterThatCountsAsWet, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVehicleVelocityForAmbientIdles, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSteeringAngleForAmbientIdles, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeSinceGetUpForAmbientIdles, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)110858295, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)990057437, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.fArgumentProbability, PsoDataType.Float, 80, 0, 0) + ); + case MetaName.CTaskChat__Tunables: + return new PsoStructureInfo(MetaName.CTaskChat__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.HeadingToleranceDegrees, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWaitTime, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskCuffed__Tunables: + return new PsoStructureInfo(MetaName.CTaskCuffed__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.HandcuffedClipSetId, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.ActionsHandcuffedNetworkId, PsoDataType.String, 20, 7, 0) + ); + case MetaName.CTaskInCustody__Tunables: + return new PsoStructureInfo(MetaName.CTaskInCustody__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AbandonDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowRadius, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.FollowOffset, PsoDataType.Float3, 32, 0, 0) + ); + case MetaName.CTaskFlyingWander__Tunables: + return new PsoStructureInfo(MetaName.CTaskFlyingWander__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RangeOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingWanderChange, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskPlayerOnFoot__Tunables: + return new PsoStructureInfo(MetaName.CTaskPlayerOnFoot__Tunables, 0, 0, 368, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ParachutePack, PsoDataType.Structure, 16, 0, (MetaName)810561649), + new PsoStructureEntryInfo(MetaName.ScubaGear, PsoDataType.Structure, 88, 0, (MetaName)4252665724), + new PsoStructureEntryInfo((MetaName)973020790, PsoDataType.Structure, 152, 0, (MetaName)2770060121), + new PsoStructureEntryInfo(MetaName.EvaluateThreatFromCoverPoints, PsoDataType.Bool, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.UseThreatWeighting, PsoDataType.Bool, 209, 0, 0), + new PsoStructureEntryInfo((MetaName)1978058747, PsoDataType.Bool, 210, 0, 0), + new PsoStructureEntryInfo((MetaName)3319528567, PsoDataType.Bool, 211, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestDistance, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestDot, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxEncumberedClimbHeight, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTrainClimbHeight, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.TakeCustodyDistance, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.UncuffDistance, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToTalk, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToTalk, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenPlayerEvents, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceBetweenAiPedsCoverAndPlayersCover, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceAiPedFromTheirCoverToAbortPlayerEnterCover, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.SmallCapsuleCoverPenalty, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.SmallCapsuleCoverRadius, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.PriorityCoverWeight, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.EdgeCoverWeight, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.DistToCoverWeightThreat, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.DistToCoverWeight, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.DistToCoverWeightNoStickBonus, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.VeryCloseToCoverDist, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.VeryCloseToCoverWeight, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDirToCoverWeight, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDirToCoverAimingWeight, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.ThreatDirWeight, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.ThreatEngageDirWeight, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMin, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMax, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMaxAimGun, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverDirToCameraWeightMaxScaleDist, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredDirToCoverMinDot, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo(MetaName.CameraDirToCoverMinDot, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo(MetaName.StaticLosTest1Offset, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo(MetaName.StaticLosTest2Offset, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo(MetaName.CollisionLosHeightOffset, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo(MetaName.VeryCloseIgnoreDesAndCamToleranceDist, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo(MetaName.VeryCloseIgnoreDesAndCamToleranceDistAimGun, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo(MetaName.DeadZoneStickNorm, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.SearchThreatMaxDot, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)3328482583, PsoDataType.String, 360, 7, 0), + new PsoStructureEntryInfo((MetaName)1221942053, PsoDataType.Bool, 364, 0, 0), + new PsoStructureEntryInfo((MetaName)1138836382, PsoDataType.Bool, 365, 0, 0) + ); + case (MetaName)810561649: + return new PsoStructureInfo((MetaName)810561649, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)1276417684), + new PsoStructureEntryInfo(MetaName.AttachOffsetX, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOffsetY, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOffsetZ, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationX, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationY, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationZ, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendInDeltaForPed, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendInDeltaForProp, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 68, 0, 0) + ); + case (MetaName)1276417684: + return new PsoStructureInfo((MetaName)1276417684, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)4252665724: + return new PsoStructureInfo((MetaName)4252665724, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)2201360486), + new PsoStructureEntryInfo(MetaName.AttachOffsetX, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOffsetY, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOffsetZ, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationX, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationY, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachOrientationZ, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 60, 0, 0) + ); + case (MetaName)2201360486: + return new PsoStructureInfo((MetaName)2201360486, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2770060121: + return new PsoStructureInfo((MetaName)2770060121, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.VelocityInheritance, PsoDataType.Structure, 8, 0, (MetaName)549752042), + new PsoStructureEntryInfo(MetaName.PhaseToBlendOut, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3586541171, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)4160387967, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo((MetaName)2801649672, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)2028074979, PsoDataType.String, 52, 7, 0) + ); + case (MetaName)549752042: + return new PsoStructureInfo((MetaName)549752042, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskSwimmingWander__Tunables: + return new PsoStructureInfo(MetaName.CTaskSwimmingWander__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SurfaceSkimmerDepth, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.NormalPreferredDepth, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidanceProbeLength, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidanceProbePullback, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidanceProbeInterval, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AvoidanceSteerAngleDegrees, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.InstantProbeDurationMin, PsoDataType.UInt, 40, 0, 0) + ); + case MetaName.CTaskUnalerted__Tunables: + return new PsoStructureInfo(MetaName.CTaskUnalerted__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureMin, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureMax, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterFailureWhenStationary, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterNotAbleToSearch, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterSuccessMin, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayAfterSuccessMax, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayInitialMin, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ScenarioDelayInitialMax, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeDriverAnimCheck, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenSearchesForNextScenarioInChain, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeMinBeforeLastPoint, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeMinBeforeLastPointType, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PavementFloodFillSearchRadius, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.WaitTimeAfterFailedVehExit, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToReturnToLastUsedVehicle, PsoDataType.Float, 72, 0, 0) + ); + case MetaName.CTaskWander__Tunables: + return new PsoStructureInfo(MetaName.CTaskWander__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.uNumPedsToTransitionToRainPerPeriod, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fSecondsInRainTransitionPeriod, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskWanderInArea__Tunables: + return new PsoStructureInfo(MetaName.CTaskWanderInArea__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinWaitTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWaitTime, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CDispatchSpawnHelper__Tunables: + return new PsoStructureInfo(MetaName.CDispatchSpawnHelper__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Restrictions, PsoDataType.Structure, 16, 0, (MetaName)2369454477), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 32, 0, (MetaName)3541869149), + new PsoStructureEntryInfo(MetaName.IdealSpawnDistance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotForInFront, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceTraveledMultiplier, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToBeConsideredEscapingInVehicle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForDispatchPosition, PsoDataType.Float, 64, 0, 0) + ); + case (MetaName)2369454477: + return new PsoStructureInfo((MetaName)2369454477, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxDistanceFromCameraForViewportChecks, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusForViewportCheck, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)3541869149: + return new PsoStructureInfo((MetaName)3541869149, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DispatchNode, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.FindSpawnPointInDirection, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.IncidentLocation, PsoDataType.Bool, 11, 0, 0) + ); + case MetaName.CDispatchAdvancedSpawnHelper__Tunables: + return new PsoStructureInfo(MetaName.CDispatchAdvancedSpawnHelper__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)3744572044), + new PsoStructureEntryInfo(MetaName.TimeBetweenInvalidateInvalidDispatchVehicles, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenMarkDispatchVehiclesForDespawn, PsoDataType.Float, 36, 0, 0) + ); + case (MetaName)3744572044: + return new PsoStructureInfo((MetaName)3744572044, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0) + ); + case MetaName.CDispatchHelperSearchOnFoot__Tunables: + return new PsoStructureInfo(MetaName.CDispatchHelperSearchOnFoot__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), + new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromNavMesh, PsoDataType.Float, 32, 0, 0) + ); + case (MetaName)2350715434: + return new PsoStructureInfo((MetaName)2350715434, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.MinTimeSinceLastSpotted, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeSinceLastSpotted, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRadiusForMinTimeSinceLastSpotted, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRadiusForMaxTimeSinceLastSpotted, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.UseLastSeenPosition, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.UseByDefault, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo(MetaName.UseEnclosedSearchRegions, PsoDataType.Bool, 34, 0, 0) + ); + case MetaName.CDispatchHelperSearchInAutomobile__Tunables: + return new PsoStructureInfo(MetaName.CDispatchHelperSearchInAutomobile__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), + new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromRoadNode, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CDispatchHelperSearchInBoat__Tunables: + return new PsoStructureInfo(MetaName.CDispatchHelperSearchInBoat__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), + new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.CruiseSpeed, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CDispatchHelperSearchInHeli__Tunables: + return new PsoStructureInfo(MetaName.CDispatchHelperSearchInHeli__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2350715434), + new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.CDispatchHelperVolumes__Tunables: + return new PsoStructureInfo(MetaName.CDispatchHelperVolumes__Tunables, 0, 0, 152, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)3452608618), + new PsoStructureEntryInfo(MetaName.LocationForNearestCarNodeOverrides, PsoDataType.Structure, 32, 0, (MetaName)3249772165), + new PsoStructureEntryInfo(MetaName.EnclosedSearchRegions, PsoDataType.Structure, 72, 0, (MetaName)898276026), + new PsoStructureEntryInfo(MetaName.BlockingAreas, PsoDataType.Structure, 112, 0, (MetaName)2312163633) + ); + case (MetaName)3452608618: + return new PsoStructureInfo((MetaName)3452608618, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LocationForNearestCarNodeOverrides, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.EnclosedSearchRegions, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.BlockingAreas, PsoDataType.Bool, 11, 0, 0) + ); + case (MetaName)3249772165: + return new PsoStructureInfo((MetaName)3249772165, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1419890352), + new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3809247475), + new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)898276026: + return new PsoStructureInfo((MetaName)898276026, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2129766809), + new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)253441159), + new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)2312163633: + return new PsoStructureInfo((MetaName)2312163633, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3558216355), + new PsoStructureEntryInfo(MetaName.AngledAreas, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1335944774), + new PsoStructureEntryInfo(MetaName.Spheres, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)1419890352: + return new PsoStructureInfo((MetaName)1419890352, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.AngledArea, PsoDataType.Structure, 8, 0, (MetaName)3558216355), + new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Structure, 72, 0, (MetaName)2431379611) + ); + case (MetaName)3558216355: + return new PsoStructureInfo((MetaName)3558216355, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 8, 0, (MetaName)2431379611), + new PsoStructureEntryInfo(MetaName.End, PsoDataType.Structure, 32, 0, (MetaName)2431379611), + new PsoStructureEntryInfo(MetaName.Width, PsoDataType.Float, 56, 0, 0) + ); + case (MetaName)2431379611: + return new PsoStructureInfo((MetaName)2431379611, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)2129766809: + return new PsoStructureInfo((MetaName)2129766809, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.AngledArea, PsoDataType.Structure, 8, 0, (MetaName)3558216355), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)4002001992), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 72, 0, (MetaName)2097153) + ); + case MetaName.CWantedHelicopterDispatch__Tunables: + return new PsoStructureInfo(MetaName.CWantedHelicopterDispatch__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttempts, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpawnTimeForPoliceHeliAfterDestroyed, PsoDataType.UInt, 20, 0, 0) + ); + case MetaName.CPoliceBoatDispatch__Tunables: + return new PsoStructureInfo(MetaName.CPoliceBoatDispatch__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttempts, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CEventPedJackingMyVehicle__Tunables: + return new PsoStructureInfo(MetaName.CEventPedJackingMyVehicle__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CEventEncroachingPed__Tunables: + return new PsoStructureInfo(MetaName.CEventEncroachingPed__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CEventRequestHelp__Tunables: + return new PsoStructureInfo(MetaName.CEventRequestHelp__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxRangeWithoutRadioForFistFights, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CEventCrimeCryForHelp__Tunables: + return new PsoStructureInfo(MetaName.CEventCrimeCryForHelp__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1405855513, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)4108300187, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1818772152, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)2579479361, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)977600457, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CEventSuspiciousActivity__Tunables: + return new PsoStructureInfo(MetaName.CEventSuspiciousActivity__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToBeConsideredSameEvent, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CEventAgitated__Tunables: + return new PsoStructureInfo(MetaName.CEventAgitated__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToLive, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbientEventLifetime, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TriggerAmbientReactionChances, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForAmbientReaction, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForAmbientReaction, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeForAmbientReaction, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForAmbientReaction, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbientEventType, PsoDataType.Enum, 44, 0, MetaName.AmbientEventType) + ); + case MetaName.CEventRespondedToThreat__Tunables: + return new PsoStructureInfo(MetaName.CEventRespondedToThreat__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskCallPolice__Tunables: + return new PsoStructureInfo(MetaName.CTaskCallPolice__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeMovingAwayToGiveToWitness, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceTalkingEndedToMakeCall, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceTargetTalkingEndedToMakeCall, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeTargetHasBeenTalkingToMakeCall, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSinceTalkingEndedToSayContextForCall, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeSpentInEarLoopToSayContextForCall, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToSpendInEarLoopToPutDownPhone, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSpendInEarLoopToPutDownPhone, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CTaskConversationHelper__Tunables: + return new PsoStructureInfo(MetaName.CTaskConversationHelper__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fMinSecondsDelayBetweenPhoneLines, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxSecondsDelayBetweenPhoneLines, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinSecondsDelayBetweenChatLines, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxSecondsDelayBetweenChatLines, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceSquaredToPlayerForAudio, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fChanceOfConversationRant, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fChanceOfArgumentChallenge, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fChanceOfArgumentChallengeBeingAccepted, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.uTimeInMSUntilNewWeirdPedComment, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.uMaxTimeInMSToPlayRingTone, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.uTimeToWaitAfterNewSayFailureInSeconds, PsoDataType.UByte, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.uTicksUntilHangoutConversationCheck, PsoDataType.UByte, 57, 0, 0) + ); + case MetaName.CLegIkSolver__Tunables: + return new PsoStructureInfo(MetaName.CLegIkSolver__Tunables, 0, 0, 392, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PelvisInterp, PsoDataType.Structure, 16, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.PelvisInterpMoving, PsoDataType.Structure, 40, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.PelvisInterpOnDynamic, PsoDataType.Structure, 64, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.FootInterp, PsoDataType.Structure, 88, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.FootInterpIntersecting, PsoDataType.Structure, 112, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.FootInterpMoving, PsoDataType.Structure, 136, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.FootInterpIntersectingMoving, PsoDataType.Structure, 160, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.FootInterpOnDynamic, PsoDataType.Structure, 184, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsPelvisInterp, PsoDataType.Structure, 208, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsPelvisInterpMoving, PsoDataType.Structure, 232, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsPelvisInterpCoverAim, PsoDataType.Structure, 256, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsFootInterp, PsoDataType.Structure, 280, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsFootInterpIntersecting, PsoDataType.Structure, 304, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.StairsFootInterpCoverAim, PsoDataType.Structure, 328, 0, (MetaName)1560218317), + new PsoStructureEntryInfo(MetaName.UpStairsPelvisMaxDeltaZMoving, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.UpStairsPelvisMaxNegativeDeltaZMoving, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo(MetaName.DownStairsPelvisMaxDeltaZMoving, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo(MetaName.DownStairsPelvisMaxNegativeDeltaZMoving, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.StairsPelvisMaxNegativeDeltaZCoverAim, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.VelMagStairsSpringMin, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.VelMagStairsSpringMax, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.StairsSpringMultiplierMin, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.StairsSpringMultiplierMax, PsoDataType.Float, 384, 0, 0) + ); + case (MetaName)1560218317: + return new PsoStructureInfo((MetaName)1560218317, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Rate, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationBased, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleAccelWithDelta, PsoDataType.Bool, 13, 0, 0), + new PsoStructureEntryInfo(MetaName.ZeroRateOnDirectionChange, PsoDataType.Bool, 14, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelRate, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CMiniMap__Tunables: + return new PsoStructureInfo(MetaName.CMiniMap__Tunables, 0, 0, 352, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Sonar, PsoDataType.Structure, 16, 0, (MetaName)53366421), + new PsoStructureEntryInfo(MetaName.HealthBar, PsoDataType.Structure, 132, 0, (MetaName)1902464991), + new PsoStructureEntryInfo(MetaName.Bitmap, PsoDataType.Structure, 140, 0, (MetaName)2026887270), + new PsoStructureEntryInfo((MetaName)1791333322, PsoDataType.Structure, 172, 0, (MetaName)1690619373), + new PsoStructureEntryInfo(MetaName.Camera, PsoDataType.Structure, 200, 0, (MetaName)283649933), + new PsoStructureEntryInfo(MetaName.Tiles, PsoDataType.Structure, 300, 0, (MetaName)3031405081), + new PsoStructureEntryInfo(MetaName.Overlay, PsoDataType.Structure, 320, 0, (MetaName)2449081679), + new PsoStructureEntryInfo(MetaName.Display, PsoDataType.Structure, 340, 0, (MetaName)1640186987) + ); + case (MetaName)53366421: + return new PsoStructureInfo((MetaName)53366421, 0, 0, 116, + new PsoStructureEntryInfo(MetaName.fSoundRange_BarelyAudible, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_MostlyAudible, PsoDataType.Float, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_ClearlyAudible, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Whisper, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Talking, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Shouting, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Megaphone, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_FootstepBase, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_HeavyFootstep, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_FootstepFoliage, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_LandFromFall, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_WeaponSpinUp, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Gunshot, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_SilencedGunshot, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)60903513, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_Explosion, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_ObjectCollision, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_GlassBreak, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_CarHorn, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_CarLowSpeed, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_CarHighSpeed, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_WaterSplashSmall, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.fSoundRange_WaterSplashLarge, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinListenerRangeToDrawSonarBlips, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.fRainSnowSoundReductionAmount, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.fRadioSoundReductionAmount, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.fRadioSoundReductionDistance, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.fConversationSoundReductionAmount, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.fConversationSoundReductionDistance, PsoDataType.Float, 112, 0, 0) + ); + case (MetaName)1902464991: + return new PsoStructureInfo((MetaName)1902464991, 0, 0, 8, + new PsoStructureEntryInfo(MetaName.fStaminaDepletionBlinkPercentage, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iHealthDepletionBlinkPercentage, PsoDataType.SInt, 4, 0, 0) + ); + case (MetaName)2026887270: + return new PsoStructureInfo((MetaName)2026887270, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)2262853888, PsoDataType.UShort, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)735818480, PsoDataType.UShort, 2, 0, 0), + new PsoStructureEntryInfo((MetaName)4138858726, PsoDataType.Float2, 4, 0, 0), + new PsoStructureEntryInfo((MetaName)3205558428, PsoDataType.Float2, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)1388742013, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3712817443, PsoDataType.Enum, 24, 0, (MetaName)1049598006), + new PsoStructureEntryInfo((MetaName)1737696498, PsoDataType.Enum, 28, 0, (MetaName)1049598006) + ); + case (MetaName)1690619373: + return new PsoStructureInfo((MetaName)1690619373, 0, 0, 28, + new PsoStructureEntryInfo(MetaName.fWorldX, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fWorldY, PsoDataType.Float, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.fWorldW, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fWorldH, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fBaseAlpha, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2170322240, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fFowWaterHeight, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)283649933: + return new PsoStructureInfo((MetaName)283649933, 0, 0, 100, + new PsoStructureEntryInfo((MetaName)3708284943, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)1172300147, PsoDataType.Float, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.fExteriorFootZoom, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fExteriorFootZoomRunning, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fExteriorFootZoomWanted, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fExteriorFootZoomWantedRunning, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1296848312, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)187030077, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fInteriorFootZoom, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2652932444, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2075786872, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fParachutingZoom, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleStaticZoom, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleStaticWantedZoom, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleMovingZoom, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleMovingWantedZoom, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleSpeedZoomScalar, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleTilt, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fVehicleOffset, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1912611271, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)4158832075, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)2229181525, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)1723892124, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.fRangeZoomedScalarStandard, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.fRangeZoomedScalarPlane, PsoDataType.Float, 96, 0, 0) + ); + case (MetaName)3031405081: + return new PsoStructureInfo((MetaName)3031405081, 0, 0, 20, + new PsoStructureEntryInfo((MetaName)2152230135, PsoDataType.Float2, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)4201231105, PsoDataType.Float2, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)142519492, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)866622976, PsoDataType.Bool, 17, 0, 0) + ); + case (MetaName)2449081679: + return new PsoStructureInfo((MetaName)2449081679, 0, 0, 20, + new PsoStructureEntryInfo(MetaName.vPos, PsoDataType.Float2, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.vScale, PsoDataType.Float2, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fDisplayZ, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)1640186987: + return new PsoStructureInfo((MetaName)1640186987, 0, 0, 12, + new PsoStructureEntryInfo((MetaName)717614933, PsoDataType.UShort, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)81490677, PsoDataType.UShort, 2, 0, 0), + new PsoStructureEntryInfo((MetaName)2014573657, PsoDataType.Float, 4, 0, 0), + new PsoStructureEntryInfo((MetaName)3269987179, PsoDataType.Float, 8, 0, 0) + ); + case MetaName.CTaskMotionAiming__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionAiming__Tunables, 0, 0, 144, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PlayerMoveAccel, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerMoveDecel, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.PedMoveAccel, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.PedMoveDecel, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FromOnFootAccelerationMod, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.WalkAngAccel, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.RunAngAccel, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1722146938, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1350763236, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)3375971933, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3611401160, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.Turn180ActivationAngle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.Turn180ConsistentAngleTolerance, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.Turn, PsoDataType.Structure, 72, 0, (MetaName)150934045), + new PsoStructureEntryInfo(MetaName.PitchChangeRate, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchChangeRateAcceleration, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.OverwriteMaxPitch, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroMaxAngleChangeRate, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroMinPhaseChangeRate, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroMaxPhaseChangeRate, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.AimIntroMaxTimedOutPhaseChangeRate, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerIdleIntroAnimRate, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateMin, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateMax, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingWalkAnimRateAcceleration, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.DoPostCameraClipUpdateForPlayer, PsoDataType.Bool, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableIkForAI, PsoDataType.Bool, 133, 0, 0), + new PsoStructureEntryInfo((MetaName)122800807, PsoDataType.Bool, 134, 0, 0), + new PsoStructureEntryInfo((MetaName)259313148, PsoDataType.Bool, 135, 0, 0), + new PsoStructureEntryInfo((MetaName)2900191858, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)827074596, PsoDataType.Bool, 140, 0, 0) + ); + case (MetaName)150934045: + return new PsoStructureInfo((MetaName)150934045, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxVariationForCurrentPitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVariationForDesiredPitch, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.CTaskBirdLocomotion__Tunables: + return new PsoStructureInfo(MetaName.CTaskBirdLocomotion__Tunables, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinWaitTimeBetweenTakeOffsMS, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWaitTimeBetweenTakeOffsMS, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTakeOffRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTakeOffRate, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTakeOffHeadingChangeRate, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTakeOffHeadingChangeRate, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2759154614, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToFlapMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToFlapMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1388183900, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceNoTimeslicingHeadingDiff, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceFromPlayerToDeleteStuckBird, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeUntilDeletionWhenStuckOffscreen, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeWhenStuckToIgnoreBird, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.HighLodWalkHeadingLerpRate, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.LowLodWalkHeadingLerpRate, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)325409255, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)2032071225, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)171073592, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)2122727094, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)578605354, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)961953658, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)291845288, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1918070033, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)677105748, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)2691956573, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)27278755, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)2575647854, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)3370383430, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 132, 7, 0) + ); + case MetaName.CTaskMotionSwimming__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionSwimming__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinStruggleTime, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStruggleTime, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4258712195), + new PsoStructureEntryInfo(MetaName.ScubaGearVariations, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.fCargoFuel), + new PsoStructureEntryInfo(MetaName.ScubaMaskProps, PsoDataType.Array, 40, 0, (MetaName)5) + ); + case (MetaName)4258712195: + return new PsoStructureInfo((MetaName)4258712195, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3020467458), + new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case (MetaName)3020467458: + return new PsoStructureInfo((MetaName)3020467458, 0, 0, 72, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2469984956), + new PsoStructureEntryInfo(MetaName.Wearing, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ScubaGearWithLightsOn, PsoDataType.Structure, 24, 0, (MetaName)2354064210), + new PsoStructureEntryInfo(MetaName.ScubaGearWithLightsOff, PsoDataType.Structure, 48, 0, (MetaName)2354064210) + ); + case (MetaName)2354064210: + return new PsoStructureInfo((MetaName)2354064210, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo(MetaName.DrawableId, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DrawableAltId, PsoDataType.UInt, 16, 0, 0) + ); + case (MetaName)2469984956: + return new PsoStructureInfo((MetaName)2469984956, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.DrawableIds, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.fCargoFuel: + return new PsoStructureInfo(MetaName.fCargoFuel, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Index, PsoDataType.SInt, 12, 0, 0) + ); + case MetaName.CTaskMotionBasicLocomotionLowLod__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionBasicLocomotionLowLod__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAcceleration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceUpdatesWhenTurningStartThresholdRadians, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceUpdatesWhenTurningStopThresholdRadians, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskFishLocomotion__Tunables: + return new PsoStructureInfo(MetaName.CTaskFishLocomotion__Tunables, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StartTurnThresholdDegrees, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StopTurnThresholdDegrees, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTurnApproachRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealTurnApproachRate, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)190400066, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnAcceleration, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)2035076014, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchAcceleration, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2691956573, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1242076965, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2945548240, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)3350282721, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.FishOutOfWaterDelay, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1246801857, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.AssistanceAngle, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraHeadingRate, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceProbeHead, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceProbeTail, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfacePitchLerpRate, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceHeightFallingLerpRate, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceHeightRisingLerpRate, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.SurfaceHeightFollowingTriggerRange, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)2334883967, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)487169156, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo((MetaName)1984559896, PsoDataType.Float, 116, 0, 0) + ); + case MetaName.CTaskHumanLocomotion__Tunables: + return new PsoStructureInfo(MetaName.CTaskHumanLocomotion__Tunables, 0, 0, 864, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Player_MBRAcceleration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Player_MBRDeceleration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AI_MBRAcceleration, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AI_MBRDeceleration, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FromStrafeAccelerationMod, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.FastWalkRateMin, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.FastWalkRateMax, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowRunRateMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowRunRateMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.FastRunRateMin, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.FastRunRateMax, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.Turn180ActivationAngle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.Turn180ConsistentAngleTolerance, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleHeadingLerpRate, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.Player_IdleTurnRate, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.AI_IdleTurnRate, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.FromStrafe_WeightRate, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.FromStrafe_MovingBlendOutTime, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleTransitionBlendTimeFromActionMode, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleTransitionBlendTimeFromStealth, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2557519583), + new PsoStructureEntryInfo(MetaName.MovingVarsSet, PsoDataType.Array, 96, 4, (MetaName)196629) + ); + case (MetaName)2557519583: + return new PsoStructureInfo((MetaName)2557519583, 0, 0, 256, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Standard, PsoDataType.Structure, 16, 0, (MetaName)1246324819), + new PsoStructureEntryInfo(MetaName.StandardAI, PsoDataType.Structure, 96, 0, (MetaName)1246324819), + new PsoStructureEntryInfo(MetaName.TighterTurn, PsoDataType.Structure, 176, 0, (MetaName)1246324819) + ); + case (MetaName)1246324819: + return new PsoStructureInfo((MetaName)1246324819, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingAngleMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingAngleMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMin, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMaxWalk, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateMaxRun, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateAccelerationMin, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingRateAccelerationMax, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardAngleWalk, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardAngleRun, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardRateMod, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingDirectionSmoothingForwardRateAccelerationMod, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeAngleMin, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeAngleMax, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateWalk, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateRun, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAccelerationMin, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingExtraHeadingChangeRateAccelerationMax, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.UseExtraHeading, PsoDataType.Bool, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.UseMovingDirectionDiff, PsoDataType.Bool, 77, 0, 0) + ); + case MetaName.CTaskMotionTennis__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionTennis__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMinAI, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMaxAI, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMinPlayer, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.StrafeDirectionLerpRateMaxPlayer, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskQuadLocomotion__Tunables: + return new PsoStructureInfo(MetaName.CTaskQuadLocomotion__Tunables, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StartAnimatedTurnsD, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StopAnimatedTurnsD, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnTransitionDelay, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnToIdleTransitionDelay, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.SteepSlopeStartAnimatedTurnsD, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SteepSlopeStopAnimatedTurnsD, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.SteepSlopeThresholdD, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.InMotionAlignmentVelocityTolerance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.InMotionTighterTurnsVelocityTolerance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.InPlaceAlignmentVelocityTolerance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnSpeedMBRThreshold, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowMinTurnApproachRate, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.FastMinTurnApproachRate, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowTurnApproachRate, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.FastTurnApproachRate, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowTurnAcceleration, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.FastTurnAcceleration, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnResetThresholdD, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.ProcessPhysicsApproachRate, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTimeslicingHeadingThresholdD, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.LowLodExtraHeadingAdjustmentRate, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionBlendoutThreshold, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionHeadingDeltaBlendoutThreshold, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionDefaultBlendDuration, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionDefaultBlendOutDuration, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionEarlyOutBlendOutDuration, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.StartLocomotionWalkRunBoundary, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.StartToIdleDirectlyPhaseThreshold, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MovementAcceleration, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMBRToStop, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.PursuitModeGallopRateFactor, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.PursuitModeExtraHeadingRate, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.StoppingDistanceWalkMBR, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.StoppingDistanceRunMBR, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.StoppingDistanceGallopMBR, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.StoppingGotoPointRemainingDist, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.StopPhaseThreshold, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStopPhaseToResumeMovement, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStopPhaseToResumeMovement, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo((MetaName)951644869, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo((MetaName)3492404675, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo((MetaName)3330274310, PsoDataType.Float, 180, 0, 0) + ); + case MetaName.CEventPotentialBeWalkedInto__Tunables: + return new PsoStructureInfo(MetaName.CEventPotentialBeWalkedInto__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3702961077, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3689187240, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1651660816, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CEventPotentialGetRunOver__Tunables: + return new PsoStructureInfo(MetaName.CEventPotentialGetRunOver__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToDive, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedToAlwaysDive, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToDive, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToDive, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)4246045187, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelay, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelay, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CEventPotentialBlast__Tunables: + return new PsoStructureInfo(MetaName.CEventPotentialBlast__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskComplexEvasiveStep__Tunables: + return new PsoStructureInfo(MetaName.CTaskComplexEvasiveStep__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelta, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskFall__Tunables: + return new PsoStructureInfo(MetaName.CTaskFall__Tunables, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ImmediateHighFallSpeedPlayer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ImmediateHighFallSpeedAi, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HighFallProbeLength, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1694135928, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ContinuousGapHighFallTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3844027585, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)3197570465, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)391736247, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2495576534, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirHeadingRate, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirMovementRate, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirMovementApproachRate, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.LandHeadingModifier, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.StandingLandHeadingModifier, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.FallLandThreshold, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.ReenterFallLandThreshold, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMinIntensity, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMaxIntensity, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMinHeight, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMaxHeight, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMinDuration, PsoDataType.UInt, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.PadShakeMaxDuration, PsoDataType.UInt, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)2719065213, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)358840176, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.VaultFallTestAngle, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.JumpFallTestAngle, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.FallTestAngleBlendOutTime, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveControlMaxFallDistance, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveControlExtraDistanceForDiveFromVehicle, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveControlExtraDistanceBlendOutSpeed, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveWaterOffsetToHitFullyInControlWeight, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.LandRollHeightFromJump, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.LandRollHeightFromVault, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.LandRollHeight, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo((MetaName)4229439207, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)2581310221, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)3807299066, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo((MetaName)2776570354, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)4036569890, PsoDataType.Float, 168, 0, 0) + ); + case MetaName.CTaskFlyToPoint__Tunables: + return new PsoStructureInfo(MetaName.CTaskFlyToPoint__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.HeightMapDelta, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.HeightMapLookAheadDist, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialTerrainAvoidanceAngleD, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ProgressiveTerrainAvoidanceAngleD, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenIncreasingAvoidanceAngle, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskGetUp__Tunables: + return new PsoStructureInfo(MetaName.CTaskGetUp__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fPreferInjuredGetupPlayerHealthThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fInjuredGetupImpulseMag2, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeInGetUpToAllowCover, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowNonPlayerHighFallAbort, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowOffScreenHighFallAbort, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.FallTimeBeforeHighFallAbort, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFallSpeedForHighFallAbort, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)866980885, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerMoverFixupMaxExtraHeadingChange, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AiMoverFixupMaxExtraHeadingChange, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.StartClipWaitTimePlayer, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.StartClipWaitTime, PsoDataType.SInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckWaitTime, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckWaitTimeMp, PsoDataType.SInt, 64, 0, 0) + ); + case MetaName.CTaskGoToScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskGoToScenario__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ClosePointDistanceSquared, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosePointCounterMax, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingDiffStartBlendDegrees, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.PositionDiffStartBlend, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ExactStopTargetRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.PreferNearWaterSurfaceArrivalRadius, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBrokenPointChecks, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskMoveToTacticalPoint__Tunables: + return new PsoStructureInfo(MetaName.CTaskMoveToTacticalPoint__Tunables, 0, 0, 224, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 16, 0, (MetaName)2164459263), + new PsoStructureEntryInfo(MetaName.TargetRadiusForMoveToPosition, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeUntilRelease, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToConsiderCloseToPositionToMoveTo, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenInfluenceSphereChecks, PsoDataType.Float, 220, 0, 0) + ); + case (MetaName)2164459263: + return new PsoStructureInfo((MetaName)2164459263, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.CoverPoint, PsoDataType.Structure, 8, 0, (MetaName)3018405043), + new PsoStructureEntryInfo(MetaName.NavMeshPoint, PsoDataType.Structure, 88, 0, (MetaName)1211016943), + new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Structure, 160, 0, (MetaName)3791189200) + ); + case (MetaName)3018405043: + return new PsoStructureInfo((MetaName)3018405043, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Bonus, PsoDataType.Structure, 16, 0, (MetaName)1890577968), + new PsoStructureEntryInfo(MetaName.Penalty, PsoDataType.Structure, 32, 0, (MetaName)3436208238) + ); + case (MetaName)1890577968: + return new PsoStructureInfo((MetaName)1890577968, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Current, PsoDataType.Float, 8, 0, 0) + ); + case (MetaName)3436208238: + return new PsoStructureInfo((MetaName)3436208238, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 8, 0, (MetaName)532562236), + new PsoStructureEntryInfo(MetaName.Arc, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.LineOfSight, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Float, 40, 0, 0) + ); + case (MetaName)532562236: + return new PsoStructureInfo((MetaName)532562236, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)1211016943: + return new PsoStructureInfo((MetaName)1211016943, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Bonus, PsoDataType.Structure, 16, 0, (MetaName)1762528765), + new PsoStructureEntryInfo(MetaName.Penalty, PsoDataType.Structure, 32, 0, (MetaName)2194913513) + ); + case (MetaName)1762528765: + return new PsoStructureInfo((MetaName)1762528765, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Current, PsoDataType.Float, 8, 0, 0) + ); + case (MetaName)2194913513: + return new PsoStructureInfo((MetaName)2194913513, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 8, 0, (MetaName)333617339), + new PsoStructureEntryInfo(MetaName.LineOfSight, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Float, 36, 0, 0) + ); + case (MetaName)333617339: + return new PsoStructureInfo((MetaName)333617339, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)3791189200: + return new PsoStructureInfo((MetaName)3791189200, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MaxDistanceFromPed, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMaxDistanceFromPed, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMinDistanceFromPed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromOptimal, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMaxDistanceFromOptimal, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMinDistanceFromOptimal, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskMoveCrossRoadAtTrafficLights__Tunables: + return new PsoStructureInfo(MetaName.CTaskMoveCrossRoadAtTrafficLights__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.bTrafficLightPositioning, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)645072887), + new PsoStructureEntryInfo(MetaName.WaitingOffsets, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.iMaxPedsAtTrafficLights, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceBetweenPeds, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fDecideToRunChance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerObstructionCheckRadius, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerObstructionRadius, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.bDebugRender, PsoDataType.Bool, 60, 0, 0) + ); + case (MetaName)645072887: + return new PsoStructureInfo((MetaName)645072887, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Pos, PsoDataType.Float3, 16, 0, 0) + ); + case MetaName.CTaskMoveWithinAttackWindow__Tunables: + return new PsoStructureInfo(MetaName.CTaskMoveWithinAttackWindow__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fMaxAngleOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinAlliesForMaxAngleOffset, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxAllyDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxRandomAdditionalOffset, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxRouteDistanceModifier, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeToWait, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeToWait, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskMoveFollowNavMesh__Tunables: + return new PsoStructureInfo(MetaName.CTaskMoveFollowNavMesh__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.uRepeatedAttemptsBeforeTeleportToLeader, PsoDataType.UByte, 16, 0, 0) + ); + case MetaName.CTaskParachute__Tunables: + return new PsoStructureInfo(MetaName.CTaskParachute__Tunables, 0, 0, 1312, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ChangeRatesForSkydiving, PsoDataType.Structure, 16, 0, (MetaName)2342773550), + new PsoStructureEntryInfo(MetaName.ChangeRatesForParachuting, PsoDataType.Structure, 40, 0, (MetaName)1918103038), + new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForSkydiving, PsoDataType.Structure, 64, 0, (MetaName)3788337195), + new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForParachutingNormal, PsoDataType.Structure, 96, 0, (MetaName)4209854321), + new PsoStructureEntryInfo(MetaName.FlightAngleLimitsForParachutingBraking, PsoDataType.Structure, 144, 0, (MetaName)4209854321), + new PsoStructureEntryInfo(MetaName.PedAngleLimitsForSkydiving, PsoDataType.Structure, 192, 0, (MetaName)3009185102), + new PsoStructureEntryInfo(MetaName.MoveParameters, PsoDataType.Structure, 208, 0, (MetaName)560894723), + new PsoStructureEntryInfo(MetaName.ForcesForSkydiving, PsoDataType.Structure, 264, 0, (MetaName)2934924657), + new PsoStructureEntryInfo(MetaName.ParachutingAi, PsoDataType.Structure, 280, 0, (MetaName)2046463254), + new PsoStructureEntryInfo(MetaName.Landing, PsoDataType.Structure, 464, 0, (MetaName)2206940602), + new PsoStructureEntryInfo(MetaName.CrashLanding, PsoDataType.Structure, 552, 0, (MetaName)954219518), + new PsoStructureEntryInfo(MetaName.Allow, PsoDataType.Structure, 592, 0, (MetaName)202257215), + new PsoStructureEntryInfo(MetaName.CameraSettings, PsoDataType.Structure, 616, 0, (MetaName)892940524), + new PsoStructureEntryInfo(MetaName.ParachutePhysics, PsoDataType.Structure, 640, 0, (MetaName)3266862316), + new PsoStructureEntryInfo(MetaName.ExtraForces, PsoDataType.Structure, 656, 0, (MetaName)889782022), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 1008, 0, (MetaName)629460530), + new PsoStructureEntryInfo(MetaName.LowLod, PsoDataType.Structure, 1024, 0, (MetaName)196547756), + new PsoStructureEntryInfo(MetaName.ParachuteBones, PsoDataType.Structure, 1040, 0, (MetaName)1078023650), + new PsoStructureEntryInfo(MetaName.Aiming, PsoDataType.Structure, 1144, 0, (MetaName)2787675897), + new PsoStructureEntryInfo(MetaName.PadShake, PsoDataType.Structure, 1160, 0, (MetaName)947557087), + new PsoStructureEntryInfo(MetaName.BrakingDifferenceForLinearVZMin, PsoDataType.Float, 1216, 0, 0), + new PsoStructureEntryInfo(MetaName.BrakingDifferenceForLinearVZMax, PsoDataType.Float, 1220, 0, 0), + new PsoStructureEntryInfo(MetaName.LinearVZForBrakingDifferenceMin, PsoDataType.Float, 1224, 0, 0), + new PsoStructureEntryInfo(MetaName.LinearVZForBrakingDifferenceMax, PsoDataType.Float, 1228, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchRatioForLinearVZMin, PsoDataType.Float, 1232, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchRatioForLinearVZMax, PsoDataType.Float, 1236, 0, 0), + new PsoStructureEntryInfo(MetaName.LinearVZForPitchRatioMin, PsoDataType.Float, 1240, 0, 0), + new PsoStructureEntryInfo(MetaName.LinearVZForPitchRatioMax, PsoDataType.Float, 1244, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBrakeForCloseUpCamera, PsoDataType.Float, 1248, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteMass, PsoDataType.Float, 1252, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteMassReduced, PsoDataType.Float, 1256, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToLookAheadForFutureTargetPosition, PsoDataType.Float, 1260, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDifferenceToAverageBrakes, PsoDataType.Float, 1264, 0, 0), + new PsoStructureEntryInfo(MetaName.ModelForParachuteInSP, PsoDataType.String, 1268, 7, 0), + new PsoStructureEntryInfo(MetaName.ModelForParachuteInMP, PsoDataType.String, 1272, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)974228846), + new PsoStructureEntryInfo(MetaName.ParachutePackVariations, PsoDataType.Array, 1280, 0, (MetaName)36), + new PsoStructureEntryInfo(MetaName.FirstPersonDriveByIKOffset, PsoDataType.Float3, 1296, 0, 0) + ); + case (MetaName)2342773550: + return new PsoStructureInfo((MetaName)2342773550, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Pitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Roll, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Yaw, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Heading, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)1918103038: + return new PsoStructureInfo((MetaName)1918103038, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Pitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Roll, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Yaw, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Brake, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)3788337195: + return new PsoStructureInfo((MetaName)3788337195, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.InflectionPitch, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYaw, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)4209854321: + return new PsoStructureInfo((MetaName)4209854321, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRollFromStick, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRollFromBrake, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRoll, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYawFromStick, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYawFromRoll, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.RollForMinYaw, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.RollForMaxYaw, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYaw, PsoDataType.Float, 44, 0, 0) + ); + case (MetaName)3009185102: + return new PsoStructureInfo((MetaName)3009185102, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MinPitch, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitch, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)560894723: + return new PsoStructureInfo((MetaName)560894723, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Parachuting, PsoDataType.Structure, 8, 0, (MetaName)801836577) + ); + case (MetaName)801836577: + return new PsoStructureInfo((MetaName)801836577, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.InterpRates, PsoDataType.Structure, 8, 0, (MetaName)2238420428), + new PsoStructureEntryInfo(MetaName.MinParachutePitch, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxParachutePitch, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxParachuteRoll, PsoDataType.Float, 40, 0, 0) + ); + case (MetaName)2238420428: + return new PsoStructureInfo((MetaName)2238420428, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.StickX, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.StickY, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.TotalStickInput, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CurrentHeading, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2934924657: + return new PsoStructureInfo((MetaName)2934924657, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxThrust, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLift, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)2046463254: + return new PsoStructureInfo((MetaName)2046463254, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.Target, PsoDataType.Structure, 8, 0, (MetaName)4228543633), + new PsoStructureEntryInfo(MetaName.Brake, PsoDataType.Structure, 24, 0, (MetaName)1021020250), + new PsoStructureEntryInfo(MetaName.RollForNormal, PsoDataType.Structure, 56, 0, (MetaName)1305267132), + new PsoStructureEntryInfo(MetaName.RollForBraking, PsoDataType.Structure, 80, 0, (MetaName)1305267132), + new PsoStructureEntryInfo(MetaName.PitchForNormal, PsoDataType.Structure, 104, 0, (MetaName)2131363216), + new PsoStructureEntryInfo(MetaName.PitchForBraking, PsoDataType.Structure, 128, 0, (MetaName)2131363216), + new PsoStructureEntryInfo(MetaName.Drop, PsoDataType.Structure, 152, 0, (MetaName)209420440) + ); + case (MetaName)4228543633: + return new PsoStructureInfo((MetaName)4228543633, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MinDistanceToAdjust, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Adjustment, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)1021020250: + return new PsoStructureInfo((MetaName)1021020250, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToStart, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForFull, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleForMin, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleForMax, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)1305267132: + return new PsoStructureInfo((MetaName)1305267132, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.AngleDifferenceForMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleDifferenceForMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.StickValueForMin, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StickValueForMax, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2131363216: + return new PsoStructureInfo((MetaName)2131363216, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.DesiredTimeToResolveAngleDifference, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DeltaForMaxStickChange, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStickChangePerSecond, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)209420440: + return new PsoStructureInfo((MetaName)209420440, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeight, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeight, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDot, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)2206940602: + return new PsoStructureInfo((MetaName)2206940602, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.NormalThresholds, PsoDataType.Structure, 8, 0, (MetaName)3954319942), + new PsoStructureEntryInfo(MetaName.MaxVelocityForSlow, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelocityForFast, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteProbeRadius, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinStickMagnitudeForEarlyOutMovement, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.FramesToLookAheadForProbe, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendDurationForEarlyOut, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.AngleForRunway, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.LookAheadForRunway, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.DropForRunway, PsoDataType.Float, 80, 0, 0) + ); + case (MetaName)3954319942: + return new PsoStructureInfo((MetaName)3954319942, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Normal, PsoDataType.Structure, 8, 0, (MetaName)1558938460), + new PsoStructureEntryInfo(MetaName.Braking, PsoDataType.Structure, 24, 0, (MetaName)1558938460) + ); + case (MetaName)1558938460: + return new PsoStructureInfo((MetaName)1558938460, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Forward, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Collision, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)954219518: + return new PsoStructureInfo((MetaName)954219518, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.NoParachuteTimeForMinCollisionNormalThreshold, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.NoParachuteMaxCollisionNormalThreshold, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.NoParachuteMinCollisionNormalThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.NoParachuteMaxPitch, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteProbeRadius, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteUpThreshold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.FramesToLookAheadForProbe, PsoDataType.Float, 32, 0, 0) + ); + case (MetaName)202257215: + return new PsoStructureInfo((MetaName)202257215, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinClearDistanceBelow, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFallingSpeedInRagdoll, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInRagdoll, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)892940524: + return new PsoStructureInfo((MetaName)892940524, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.SkyDivingCamera, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ParachuteCamera, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.ParachuteCloseUpCamera, PsoDataType.String, 16, 7, 0) + ); + case (MetaName)3266862316: + return new PsoStructureInfo((MetaName)3266862316, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ParachuteInitialVelocityY, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachuteInitialVelocityZ, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)889782022: + return new PsoStructureInfo((MetaName)889782022, 0, 0, 352, + new PsoStructureEntryInfo(MetaName.Parachuting, PsoDataType.Structure, 8, 0, (MetaName)1386112053) + ); + case (MetaName)1386112053: + return new PsoStructureInfo((MetaName)1386112053, 0, 0, 344, + new PsoStructureEntryInfo(MetaName.Normal, PsoDataType.Structure, 8, 0, (MetaName)899207522), + new PsoStructureEntryInfo(MetaName.Braking, PsoDataType.Structure, 224, 0, (MetaName)3310740500) + ); + case (MetaName)899207522: + return new PsoStructureInfo((MetaName)899207522, 0, 0, 216, + new PsoStructureEntryInfo(MetaName.TurnFromStick, PsoDataType.Structure, 8, 0, (MetaName)3387028743), + new PsoStructureEntryInfo(MetaName.TurnFromRoll, PsoDataType.Structure, 120, 0, (MetaName)3597070589) + ); + case (MetaName)3387028743: + return new PsoStructureInfo((MetaName)3387028743, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.FromValue, PsoDataType.Structure, 8, 0, (MetaName)3597070589), + new PsoStructureEntryInfo(MetaName.UseVerticalAxis, PsoDataType.Bool, 104, 0, 0) + ); + case (MetaName)3597070589: + return new PsoStructureInfo((MetaName)3597070589, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinValue, PsoDataType.Structure, 16, 0, (MetaName)162458425), + new PsoStructureEntryInfo(MetaName.ZeroValue, PsoDataType.Structure, 40, 0, (MetaName)162458425), + new PsoStructureEntryInfo(MetaName.MaxValue, PsoDataType.Structure, 64, 0, (MetaName)162458425), + new PsoStructureEntryInfo(MetaName.IsLocal, PsoDataType.Bool, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.ClearZ, PsoDataType.Bool, 89, 0, 0) + ); + case (MetaName)162458425: + return new PsoStructureInfo((MetaName)162458425, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)3310740500: + return new PsoStructureInfo((MetaName)3310740500, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.TurnFromStick, PsoDataType.Structure, 8, 0, (MetaName)3387028743) + ); + case (MetaName)629460530: + return new PsoStructureInfo((MetaName)629460530, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.RunwayProbes, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.ValidityProbes, PsoDataType.Bool, 10, 0, 0) + ); + case (MetaName)196547756: + return new PsoStructureInfo((MetaName)196547756, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.AlwaysUse, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.NeverUse, PsoDataType.Bool, 13, 0, 0) + ); + case (MetaName)1078023650: + return new PsoStructureInfo((MetaName)1078023650, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.LeftGrip, PsoDataType.Structure, 8, 0, (MetaName)2874150626), + new PsoStructureEntryInfo(MetaName.RightGrip, PsoDataType.Structure, 32, 0, (MetaName)2874150626), + new PsoStructureEntryInfo(MetaName.LeftWire, PsoDataType.Structure, 56, 0, (MetaName)2874150626), + new PsoStructureEntryInfo(MetaName.RightWire, PsoDataType.Structure, 80, 0, (MetaName)2874150626) + ); + case (MetaName)2874150626: + return new PsoStructureInfo((MetaName)2874150626, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.X, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Y, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Z, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.UseOrientationFromParachuteBone, PsoDataType.Bool, 20, 0, 0) + ); + case (MetaName)2787675897: + return new PsoStructureInfo((MetaName)2787675897, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Disabled, PsoDataType.Bool, 8, 0, 0) + ); + case (MetaName)947557087: + return new PsoStructureInfo((MetaName)947557087, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Falling, PsoDataType.Structure, 8, 0, (MetaName)3452040071), + new PsoStructureEntryInfo(MetaName.Deploy, PsoDataType.Structure, 40, 0, (MetaName)2930279050) + ); + case (MetaName)3452040071: + return new PsoStructureInfo((MetaName)3452040071, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchForMinIntensity, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchForMaxIntensity, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinIntensity, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxIntensity, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)2930279050: + return new PsoStructureInfo((MetaName)2930279050, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Intensity, PsoDataType.Float, 12, 0, 0) + ); + case (MetaName)974228846: + return new PsoStructureInfo((MetaName)974228846, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1192596872), + new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case (MetaName)1192596872: + return new PsoStructureInfo((MetaName)1192596872, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3788247444), + new PsoStructureEntryInfo(MetaName.Wearing, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ParachutePack, PsoDataType.Structure, 24, 0, (MetaName)3901274641) + ); + case (MetaName)3901274641: + return new PsoStructureInfo((MetaName)3901274641, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo(MetaName.DrawableId, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DrawableAltId, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TexId, PsoDataType.UInt, 20, 0, 0) + ); + case (MetaName)3788247444: + return new PsoStructureInfo((MetaName)3788247444, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 8, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.DrawableIds, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.CTaskParachuteObject__Tunables: + return new PsoStructureInfo(MetaName.CTaskParachuteObject__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PhaseDuringDeployToConsiderOut, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskTakeOffPedVariation__Tunables: + return new PsoStructureInfo(MetaName.CTaskTakeOffPedVariation__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskHeliPassengerRappel__Tunables: + return new PsoStructureInfo(MetaName.CTaskHeliPassengerRappel__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fDefaultRopeLength, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fExtraRopeLength, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fExitDescendRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fDefaultDescendRate, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fStartDescendingDistToTargetSq, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fRopeUnwindRate, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinHeightToRappel, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxHeliSpeedForRappel, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CTaskRappel__Tunables: + return new PsoStructureInfo(MetaName.CTaskRappel__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fJumpDescendRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fLongJumpDescendRate, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fJumpToSmashWindowPhaseChange, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinJumpPhaseAllowDescend, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxJumpPhaseAllowDescend, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinJumpPhaseAllowSmashWindow, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxJumpPhaseAllowSmashWindow, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinSmashWindowPhase, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fGlassBreakRadius, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fGlassDamage, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinDistanceToBreakWindow, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinStickValueAllowDescend, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.bAllowSmashDuringJump, PsoDataType.Bool, 64, 0, 0) + ); + case MetaName.CTaskVault__Tunables: + return new PsoStructureInfo(MetaName.CTaskVault__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AngledClimbTheshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAngleForScaleVelocityExtension, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleForScaleVelocityExtension, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AngledClimbScaleVelocityExtensionMax, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableVaultForwardDot, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.SlideWalkAnimRate, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskJump__Tunables: + return new PsoStructureInfo(MetaName.CTaskJump__Tunables, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinSuperJumpInitialVelocity, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSuperJumpInitialVelocity, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)3568425813, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)1477129396, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.HighJumpMinAngleForVelScale, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.HighJumpMaxAngleForVelScale, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.HighJumpMinVelScale, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.HighJumpMaxVelScale, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableJumpOnSteepStairs, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStairsJumpAngle, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.bEnableJumpCollisions, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.bEnableJumpCollisionsMp, PsoDataType.Bool, 57, 0, 0), + new PsoStructureEntryInfo(MetaName.bBlockJumpCollisionAgainstRagdollBlocked, PsoDataType.Bool, 58, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveProbeZOffset, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveBraceStartDelay, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveBraceProbeLength, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveBraceBlendInDuration, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveBraceBlendOutDuration, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveBraceMaxUpDotSlope, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveRagdollIntersectionDot, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveRagdollStartDelay, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveRagdollProbeLength, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveRagdollProbeRadius, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.PredictiveRagdollRequiredVelocityMag, PsoDataType.Float, 100, 0, 0) + ); + case MetaName.CPedTargetEvaluator__Tunables: + return new PsoStructureInfo(MetaName.CPedTargetEvaluator__Tunables, 0, 0, 232, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitMelee, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitMeleeLockOnNoStick, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetDistanceWeightMelee, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2485794835, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetDistanceWeightMeleeRunning, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2082223604, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetHeadingWeightMelee, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3532059041, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetHeadingWeightMeleeRunning, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)1974328161, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitVehicleWeapon, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeLockOnStickWeighting, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeLockOnCameraWeighting, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeLockOnCameraWeightingNoStick, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeLockOnPedWeightingNoStick, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioHarmless, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioNeutral, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioNeutralInjured, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioIngangOrFriend, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPotentialThreat, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMissionThreat, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMissionThreatCuffed, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.DownedThreatModifier, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerEveryone, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerStrangers, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerAttackers, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPlayer2Player, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioPlayer2PlayerCuffed, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioScriptedHighPriority, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMeleeDead, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMeleeCombatThreat, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMeleeDownedCombatThreat, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMeleeInjured, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.PrioMeleePotentialThreat, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.InCoverScoreModifier, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosestPointToLineDist, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosestPointToLineBonusModifier, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeHeadingOverride, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeHeadingOverrideRunning, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeHeadingFalloffPowerRunning, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMeleeRange, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceWeightingMin, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceWeightingMax, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetHeadingWeighting, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceMaxWeightingAimTime, PsoDataType.UInt, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceFallOffMin, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceFallOffMax, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.RejectLockonHeadingTheshold, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingScoreForCoverLockOnRejection, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo((MetaName)680689338, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeForTakedownTargetAcquiry, PsoDataType.UInt, 216, 0, 0), + new PsoStructureEntryInfo((MetaName)3508597107, PsoDataType.UInt, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.UseMeleeHeadingOverride, PsoDataType.Bool, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.LimitMeleeRangeToDefault, PsoDataType.Bool, 225, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugTargetting, PsoDataType.Bool, 226, 0, 0), + new PsoStructureEntryInfo(MetaName.UseNonNormalisedScoringForPlayer, PsoDataType.Bool, 227, 0, 0), + new PsoStructureEntryInfo(MetaName.RejectLockIfBestTargetIsInCover, PsoDataType.Bool, 228, 0, 0) + ); + case MetaName.CGrabHelper__Tunables: + return new PsoStructureInfo(MetaName.CGrabHelper__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Sets, PsoDataType.Structure, 16, 0, (MetaName)2070432509) + ); + case (MetaName)2070432509: + return new PsoStructureInfo((MetaName)2070432509, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.sets, PsoDataType.Map, 8, 1, (MetaName)1) + ); + case MetaName.CNmTuningSet: + return new PsoStructureInfo(MetaName.CNmTuningSet, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Id, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Messages, PsoDataType.Array, 24, 0, (MetaName)3) + ); + case MetaName.CNmMessage: + return new PsoStructureInfo(MetaName.CNmMessage, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Params, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.ForceNewMessage, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TaskMessage, PsoDataType.Bool, 33, 0, 0) + ); + case MetaName.CNmParameterBool: + return new PsoStructureInfo(MetaName.CNmParameterBool, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Bool, 16, 0, 0) + ); + case MetaName.CNmParameterFloat: + return new PsoStructureInfo(MetaName.CNmParameterFloat, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CNmParameterRandomFloat: + return new PsoStructureInfo(MetaName.CNmParameterRandomFloat, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CNmParameterInt: + return new PsoStructureInfo(MetaName.CNmParameterInt, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.SInt, 16, 0, 0) + ); + case MetaName.CTaskNMControl__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMControl__Tunables, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DriveToGetup, PsoDataType.Structure, 16, 0, (MetaName)3336326859), + new PsoStructureEntryInfo(MetaName.OnEnableDriveToGetup, PsoDataType.Structure, 48, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnDisableDriveToGetup, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet) + ); + case (MetaName)3336326859: + return new PsoStructureInfo((MetaName)3336326859, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.AllowDriveToGetup, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.OnlyAllowForShot, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowWhenBalanced, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHealth, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxUprightRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MatchTimer, PsoDataType.UInt, 24, 0, 0) + ); + case MetaName.CNmParameterString: + return new PsoStructureInfo(MetaName.CNmParameterString, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.String, 16, 8, 0) + ); + case MetaName.CTaskNMBehaviour__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMBehaviour__Tunables, 0, 0, 936, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EnableRagdollPooling, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxGameplayNmAgents, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRageRagdolls, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ReserveLocalPlayerNmAgent, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableRagdollPoolingMp, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxGameplayNmAgentsMp, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRageRagdollsMp, PsoDataType.SInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ReserveLocalPlayerNmAgentMp, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.BlockOffscreenShotReactions, PsoDataType.Bool, 41, 0, 0), + new PsoStructureEntryInfo(MetaName.UsePreEmptiveEdgeActivation, PsoDataType.Bool, 42, 0, 0), + new PsoStructureEntryInfo(MetaName.UsePreEmptiveEdgeActivationMp, PsoDataType.Bool, 43, 0, 0), + new PsoStructureEntryInfo(MetaName.UseBalanceForEdgeActivation, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxVel, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxHeadingDiff, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMinDotVel, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMaxDistance, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PreEmptiveEdgeActivationMinDesiredMBR2, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.StandardBlendOutThresholds, PsoDataType.Structure, 72, 0, (MetaName)3979439077), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4115910995), + new PsoStructureEntryInfo(MetaName.CamAttachPositionWeights, PsoDataType.Array, 176, 0, (MetaName)MetaTypeName.USHORT), + new PsoStructureEntryInfo(MetaName.SpActivationModifiers, PsoDataType.Structure, 192, 0, (MetaName)2720813484), + new PsoStructureEntryInfo(MetaName.MpActivationModifiers, PsoDataType.Structure, 272, 0, (MetaName)2720813484), + new PsoStructureEntryInfo(MetaName.PlayerBumpedByCloneCarActivationModifier, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo(MetaName.ClonePlayerBumpedByCarActivationModifier, PsoDataType.Float, 356, 0, 0), + //new PsoStructureEntryInfo(MetaName.ClonePlayerBumpedByCloneCarActivationModifier, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)2048881690, PsoDataType.Float, 360, 0, 0), //seems to be newer than above.. + new PsoStructureEntryInfo(MetaName.MaxVehicleCapsulePushTimeForRagdollActivation, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVehicleCapsulePushTimeForPlayerRagdollActivation, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForContinuousPushActivation, PsoDataType.Float, 372, 0, 0), + new PsoStructureEntryInfo(MetaName.MinContactDepthForContinuousPushActivation, PsoDataType.Float, 376, 0, 0), + new PsoStructureEntryInfo(MetaName.DurationRampDownCapsulePushedByVehicle, PsoDataType.Float, 380, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForAiActivation, PsoDataType.Float, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForStationaryAiActivation, PsoDataType.Float, 388, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForPlayerActivation, PsoDataType.Float, 392, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForStationaryPlayerActivation, PsoDataType.Float, 396, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleMinSpeedForWarningActivation, PsoDataType.Float, 400, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleFallingSpeedWeight, PsoDataType.Float, 404, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierDefault, PsoDataType.Float, 408, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBicycle, PsoDataType.Float, 412, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBike, PsoDataType.Float, 416, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierBoat, PsoDataType.Float, 420, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierPlane, PsoDataType.Float, 424, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierQuadBike, PsoDataType.Float, 428, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierHeli, PsoDataType.Float, 432, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleActivationForceMultiplierTrain, PsoDataType.Float, 436, 0, 0), + new PsoStructureEntryInfo(MetaName.ExcludePedBumpAngleFromPushCalculation, PsoDataType.Bool, 440, 0, 0), + new PsoStructureEntryInfo(MetaName.PedActivationForceMultiplier, PsoDataType.Float, 444, 0, 0), + new PsoStructureEntryInfo(MetaName.ObjectMinSpeedForActivation, PsoDataType.Float, 448, 0, 0), + new PsoStructureEntryInfo(MetaName.ObjectActivationForceMultiplier, PsoDataType.Float, 452, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlayerCapsulePushTimeForRagdollActivation, PsoDataType.SInt, 456, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerCapsuleMinSpeedForContinuousPushActivation, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckOnVehicleMaxTime, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckOnVehicleBlendOutThresholds, PsoDataType.Structure, 472, 0, (MetaName)3979439077), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 576, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.TeeterControl, PsoDataType.Structure, 616, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.animPoseDefault, PsoDataType.Structure, 656, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.animPoseAttachDefault, PsoDataType.Structure, 696, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.animPoseAttachToVehicle, PsoDataType.Structure, 736, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.animPoseHandsCuffed, PsoDataType.Structure, 776, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.forceFall, PsoDataType.Structure, 816, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.RagdollUnderWheelTuning, PsoDataType.Structure, 856, 0, (MetaName)267001783), + new PsoStructureEntryInfo(MetaName.KickOnGroundTuning, PsoDataType.Structure, 880, 0, (MetaName)2578171686), + new PsoStructureEntryInfo(MetaName.CapsuleVehicleHitTuning, PsoDataType.Structure, 896, 0, (MetaName)1040069698) + ); + case (MetaName)3979439077: + return new PsoStructureInfo((MetaName)3979439077, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Ai, PsoDataType.Structure, 8, 0, (MetaName)3749122641), + new PsoStructureEntryInfo(MetaName.Player, PsoDataType.Structure, 40, 0, (MetaName)3749122641), + new PsoStructureEntryInfo(MetaName.PlayerMp, PsoDataType.Structure, 72, 0, (MetaName)3749122641) + ); + case (MetaName)3749122641: + return new PsoStructureInfo((MetaName)3749122641, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.MaxLinearVelocity, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularVelocity, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SettledTimeMS, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.RandomiseSettledTime, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SettledTimeMinMS, PsoDataType.SInt, 24, 0, 0) + ); + case (MetaName)2720813484: + return new PsoStructureInfo((MetaName)2720813484, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.BumpedByCar, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByCarFriendly, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerBumpedByCar, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVehicleWarning, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPedMinVel, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPedMinDotVel, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPed, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPlayerRagdoll, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPedRagdoll, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPedFriendly, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByPedIsQuadruped, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BumpedByObject, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.Walking, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.Running, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlayerActivationLimit, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAiActivationLimit, PsoDataType.Float, 72, 0, 0) + ); + case (MetaName)267001783: + return new PsoStructureInfo((MetaName)267001783, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.fImpulseMultLimbs, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fImpulseMultSpine, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinSpeedForPush, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fFastCarPushImpulseMult, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2578171686: + return new PsoStructureInfo((MetaName)2578171686, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.fPronePedKickImpulse, PsoDataType.Float, 8, 0, 0) + ); + case (MetaName)1040069698: + return new PsoStructureInfo((MetaName)1040069698, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.EnableActivationsFromCapsuleImpacts, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleVelToImpactNormalMinDot, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableSideSwipeActivations, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2302810051, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSideNormalForSideSwipe, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelThroughNormalForSideSwipe, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAccumulatedImpactForSideSwipe, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVehVelMagForSideSwipe, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVehVelMagForBicycleSideSwipe, PsoDataType.Float, 36, 0, 0) + ); + case (MetaName)4115910995: + return new PsoStructureInfo((MetaName)4115910995, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Bound, PsoDataType.Enum, 8, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.Weight, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.CTaskNMBalance__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMBalance__Tunables, 0, 0, 912, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.InitialBumpComponent, PsoDataType.Enum, 16, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.InitialBumpForce, PsoDataType.Structure, 24, 0, (MetaName)760338219), + new PsoStructureEntryInfo(MetaName.InitialBumpOffset, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleStayUprightWithVel, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.StayUprightAtMaxVel, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVel, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.StayUprightAtMinVel, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVel, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.lookAtVelProbIfNoBumpTarget, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTargetDistToUpdateFlinch, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTargetDistToUpdateFlinchOnGround, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.fFlinchTargetZOffset, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.fFlinchTargetZOffsetOnGround, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinForwardVectorToFlinch, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinForwardVectorToFlinchOnGround, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeadLookZOffset, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeadLookZOffsetOnGround, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSteps, PsoDataType.SInt, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.timeToCatchfallMS, PsoDataType.SInt, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.StartWeak, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StartAggressive, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StartDefault, PsoDataType.Structure, 256, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BumpedByPed, PsoDataType.Structure, 296, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 336, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnSteepSlope, PsoDataType.Structure, 376, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnMovingGround, PsoDataType.Structure, 416, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.LostBalanceAndGrabbing, PsoDataType.Structure, 456, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Teeter, PsoDataType.Structure, 496, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.FallOffAMovingCar, PsoDataType.Structure, 536, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.RollingFall, PsoDataType.Structure, 576, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.CatchFall, PsoDataType.Structure, 616, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 656, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.NotBeingPushedDelayMS, PsoDataType.SInt, 696, 0, 0), + new PsoStructureEntryInfo(MetaName.NotBeingPushedOnGroundDelayMS, PsoDataType.SInt, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.BeingPushedOnGroundTooLongMS, PsoDataType.SInt, 704, 0, 0), + new PsoStructureEntryInfo(MetaName.OnBeingPushed, PsoDataType.Structure, 712, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBeingPushedOnGround, PsoDataType.Structure, 752, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnNotBeingPushed, PsoDataType.Structure, 792, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBeingPushedOnGroundTooLong, PsoDataType.Structure, 832, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.PushedThresholdOnGround, PsoDataType.Structure, 872, 0, (MetaName)3749122641) + ); + case (MetaName)760338219: + return new PsoStructureInfo((MetaName)760338219, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Enable, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Mag, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithVelocity, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityMin, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityMax, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceAtMinVelocity, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceAtMaxVelocity, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ClampImpulse, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinImpulse, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxImpulse, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 56, 0, 0) + ); + case MetaName.CNmParameterVector: + return new PsoStructureInfo(MetaName.CNmParameterVector, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float3, 16, 0, 0) + ); + case MetaName.CTaskNMBrace__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMBrace__Tunables, 0, 0, 1568, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.VehicleOverrides, PsoDataType.Structure, 16, 0, (MetaName)2216090795), + new PsoStructureEntryInfo(MetaName.InverseMassScales, PsoDataType.Structure, 40, 0, (MetaName)1267291753), + new PsoStructureEntryInfo(MetaName.AngularVelocityLimits, PsoDataType.Structure, 64, 0, (MetaName)238499603), + new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 144, 0, (MetaName)2808943365), + new PsoStructureEntryInfo(MetaName.ChestForce, PsoDataType.Structure, 176, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.FeetLiftForce, PsoDataType.Structure, 232, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.RootLiftForce, PsoDataType.Structure, 288, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.FlipForce, PsoDataType.Structure, 344, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.CapsuleHitForce, PsoDataType.Structure, 400, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.SideSwipeForce, PsoDataType.Structure, 456, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.ForceUnderVehicle, PsoDataType.Bool, 512, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceOverVehicle, PsoDataType.Bool, 513, 0, 0), + new PsoStructureEntryInfo(MetaName.ChestForcePitch, PsoDataType.Float, 516, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowWarningActivations, PsoDataType.Bool, 520, 0, 0), + new PsoStructureEntryInfo(MetaName.LowVelocityReactionThreshold, PsoDataType.Float, 524, 0, 0), + new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 528, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionElasticityMult, PsoDataType.Float, 532, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionFrictionMult, PsoDataType.Float, 536, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionNormalPitchOverVehicle, PsoDataType.Float, 540, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionNormalPitchUnderVehicle, PsoDataType.Float, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.AiClearedVehicleDelay, PsoDataType.SInt, 548, 0, 0), + new PsoStructureEntryInfo(MetaName.AiClearedVehicleSmartFallDelay, PsoDataType.SInt, 552, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerClearedVehicleDelay, PsoDataType.SInt, 556, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerClearedVehicleSmartFallDelay, PsoDataType.SInt, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 608, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Weak, PsoDataType.Structure, 648, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 688, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailedStairs, PsoDataType.Structure, 728, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HighVelocity, PsoDataType.Structure, 768, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StuckUnderVehicleMaxUpright, PsoDataType.Float, 808, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 816, 0, (MetaName)1649426998), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 1256, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Dead, PsoDataType.Structure, 1296, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OverVehicle, PsoDataType.Structure, 1336, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.UnderVehicle, PsoDataType.Structure, 1376, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.ClearedVehicle, PsoDataType.Structure, 1416, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HighVelocityBlendOut, PsoDataType.Structure, 1456, 0, (MetaName)3979439077) + ); + case (MetaName)2216090795: + return new PsoStructureInfo((MetaName)2216090795, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1768633733), + new PsoStructureEntryInfo(MetaName.sets, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)1267291753: + return new PsoStructureInfo((MetaName)1267291753, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ApplyVehicleScale, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleScale, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ApplyPedScale, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.PedScale, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)238499603: + return new PsoStructureInfo((MetaName)238499603, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Apply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Constant, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Velocity, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.Velocity2, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.SInt, 68, 0, 0) + ); + case (MetaName)2808943365: + return new PsoStructureInfo((MetaName)2808943365, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.VelocityMin, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceAtMinVelocity, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceAtMaxVelocity, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 24, 0, 0) + ); + case (MetaName)3816043274: + return new PsoStructureInfo((MetaName)3816043274, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Apply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithVelocity, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelThreshold, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVelThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelMag, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVelMag, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithUpright, PsoDataType.Bool, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleWithMass, PsoDataType.Bool, 29, 0, 0), + new PsoStructureEntryInfo(MetaName.ReduceWithPedVelocity, PsoDataType.Bool, 30, 0, 0), + new PsoStructureEntryInfo(MetaName.ReduceWithPedAngularVelocity, PsoDataType.Bool, 31, 0, 0), + new PsoStructureEntryInfo(MetaName.OnlyInContact, PsoDataType.Bool, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.OnlyNotInContact, PsoDataType.Bool, 33, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceMag, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMag, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxMag, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.SInt, 48, 0, 0) + ); + case (MetaName)1649426998: + return new PsoStructureInfo((MetaName)1649426998, 0, 0, 440, + new PsoStructureEntryInfo(MetaName.InitialDelay, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.UnderVehicleInitialDelay, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityThreshold, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ContinuousContactTime, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.UnderVehicleVelocityThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.UnderVehicleContinuousContactTime, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.UnderCarMaxVelocity, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 40, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.EndStuckOnVehicle, PsoDataType.Structure, 80, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.UpdateOnVehicle, PsoDataType.Structure, 120, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StuckUnderVehicle, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.EndStuckUnderVehicle, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StuckOnVehiclePlayer, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.EndStuckOnVehiclePlayer, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.UpdateOnVehiclePlayer, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StuckUnderVehiclePlayer, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.EndStuckUnderVehiclePlayer, PsoDataType.Structure, 400, 0, MetaName.CNmTuningSet) + ); + case (MetaName)1768633733: + return new PsoStructureInfo((MetaName)1768633733, 0, 0, 736, + new PsoStructureEntryInfo(MetaName.Id, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.OverrideInverseMassScales, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.InverseMassScales, PsoDataType.Structure, 16, 0, (MetaName)1267291753), + new PsoStructureEntryInfo(MetaName.OverrideReactionType, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceUnderVehicle, PsoDataType.Bool, 41, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceOverVehicle, PsoDataType.Bool, 42, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCentreZOffset, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.OverrideRootLiftForce, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.RootLiftForce, PsoDataType.Structure, 56, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.OverrideFlipForce, PsoDataType.Bool, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.FlipForce, PsoDataType.Structure, 120, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.OverrideInitialForce, PsoDataType.Bool, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 184, 0, (MetaName)2808943365), + new PsoStructureEntryInfo(MetaName.OverrideElasticity, PsoDataType.Bool, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionElasticityMult, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.OverrideFriction, PsoDataType.Bool, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleCollisionFrictionMult, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.LateralForce, PsoDataType.Structure, 232, 0, (MetaName)3816043274), + new PsoStructureEntryInfo(MetaName.OverrideStuckOnVehicleSets, PsoDataType.Bool, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.AddToBaseStuckOnVehicleSets, PsoDataType.Bool, 289, 0, 0), + new PsoStructureEntryInfo(MetaName.StuckOnVehicle, PsoDataType.Structure, 296, 0, (MetaName)1649426998) + ); + case MetaName.CNmParameterResetMessage: + return new PsoStructureInfo(MetaName.CNmParameterResetMessage, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0) + ); + case MetaName.CTaskNMDraggingToSafety__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMDraggingToSafety__Tunables, 0, 0, 160, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Stiffness, PsoDataType.Structure, 16, 0, (MetaName)2241487041), + new PsoStructureEntryInfo(MetaName.DraggerArmIk, PsoDataType.Structure, 48, 0, (MetaName)1214269741), + new PsoStructureEntryInfo(MetaName.Constraints, PsoDataType.Structure, 96, 0, (MetaName)2410537644), + new PsoStructureEntryInfo(MetaName.Forces, PsoDataType.Structure, 112, 0, (MetaName)2059054874) + ); + case (MetaName)2241487041: + return new PsoStructureInfo((MetaName)2241487041, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Relaxation, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadAndNeck, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.AnkleAndWrist, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)1214269741: + return new PsoStructureInfo((MetaName)1214269741, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftBoneOffset, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.RightBoneOffset, PsoDataType.Float3, 32, 0, 0) + ); + case (MetaName)2410537644: + return new PsoStructureInfo((MetaName)2410537644, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 8, 0, 0) + ); + case (MetaName)2059054874: + return new PsoStructureInfo((MetaName)2059054874, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftHandOffset, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.RightHandOffset, PsoDataType.Float3, 32, 0, 0) + ); + case MetaName.CTaskNMDrunk__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMDrunk__Tunables, 0, 0, 256, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fMinHeadingDeltaToFixTurn, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeadingRandomizationRange, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.iHeadingRandomizationTimeMin, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.iHeadingRandomizationTimeMax, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fForceLeanInDirectionAmountMin, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fForceLeanInDirectionAmountMax, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fForceRampMinSpeed, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fForceRampMaxSpeed, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeadLookHeadingRandomizationRange, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeadLookPitchRandomizationRange, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.iHeadLookRandomizationTimeMin, PsoDataType.SInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.iHeadlookRandomizationTimeMax, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinHeadingDeltaToIdleTurn, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.iRunningTimeForVelocityBasedStayupright, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fStayUprightForceNonVelocityBased, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.fStayUprightForceMoving, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.fStayUprightForceIdle, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.fFallingSpeedForHighFall, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.bUseStayUpright, PsoDataType.Bool, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.bDrawIdleHeadLookTarget, PsoDataType.Bool, 89, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Moving, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Idle, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMElectrocute__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMElectrocute__Tunables, 0, 0, 400, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.InitialForceComponent, PsoDataType.Enum, 16, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.InitialForce, PsoDataType.Structure, 24, 0, (MetaName)760338219), + new PsoStructureEntryInfo(MetaName.InitialForceOffset, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 120, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Walking, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Running, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnCatchFallSuccess, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnElectrocuteFinished, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMExplosion__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMExplosion__Tunables, 0, 0, 344, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinStunnedTime, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStunnedTime, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowPlayerStunned, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.UseRelaxBehaviour, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.RollUpHeightThreshold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdRollUp, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdWindmill, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.CatchFallHeightThresholdClipPose, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToStartCatchFall, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToStartCatchFallPlayer, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DoCatchFallRelax, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.CatchFallRelaxHeight, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.HeightToStartWrithe, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeForInitialState, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForInitialState, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWritheTime, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWritheTime, PsoDataType.SInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceRollUp, PsoDataType.Bool, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceWindmill, PsoDataType.Bool, 81, 0, 0), + new PsoStructureEntryInfo(MetaName.StartWindmill, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StartCatchFall, PsoDataType.Structure, 128, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StartRollDownStairs, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Explosion, PsoDataType.Structure, 248, 0, (MetaName)3490848491) + ); + case (MetaName)3490848491: + return new PsoStructureInfo((MetaName)3490848491, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.NMBodyScale, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.HumanBodyScale, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.HumanPelvisScale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.HumanSpine0Scale, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HumanSpine1Scale, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AnimalBodyScale, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AnimalPelvisScale, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.StrongBlastMagnitude, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.FastMovingPedSpeed, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceAbovePedPositionToClampPitch, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchClampMin, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchClampMax, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MagnitudeClamp, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.SideScale, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchSideAngle, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchTorqueMin, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.PitchTorqueMax, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.BlanketForceScale, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraTorqueTwistMax, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableInjuredBehaviorImpulseLimit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableInjuredBehaviorDistLimit, PsoDataType.Float, 88, 0, 0) + ); + case MetaName.CTaskNMFlinch__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMFlinch__Tunables, 0, 0, 624, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Passive, PsoDataType.Structure, 56, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.WaterCannon, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Armoured, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 176, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BoundAnkles, PsoDataType.Structure, 216, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.FatallyInjured, PsoDataType.Structure, 256, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.PlayerDeath, PsoDataType.Structure, 296, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HoldingTwoHandedWeapon, PsoDataType.Structure, 336, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HoldingSingleHandedWeapon, PsoDataType.Structure, 376, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 416, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 456, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailedStairs, PsoDataType.Structure, 496, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.WeaponSets, PsoDataType.Structure, 536, 0, (MetaName)2070432509), + new PsoStructureEntryInfo(MetaName.ActionSets, PsoDataType.Structure, 568, 0, (MetaName)2070432509), + new PsoStructureEntryInfo(MetaName.RandomiseLeadingHand, PsoDataType.Bool, 600, 0, 0), + new PsoStructureEntryInfo(MetaName.MinLeanInDirectionTime, PsoDataType.SInt, 604, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLeanInDirectionTime, PsoDataType.SInt, 608, 0, 0), + new PsoStructureEntryInfo(MetaName.fImpulseReductionScaleMax, PsoDataType.Float, 612, 0, 0), + new PsoStructureEntryInfo(MetaName.fSpecialAbilityRageKickImpulseModifier, PsoDataType.Float, 616, 0, 0), + new PsoStructureEntryInfo(MetaName.fCounterImpulseScale, PsoDataType.Float, 620, 0, 0) + ); + case MetaName.CNmParameterRandomInt: + return new PsoStructureInfo(MetaName.CNmParameterRandomInt, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Min, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.SInt, 20, 0, 0) + ); + case MetaName.CTaskNMHighFall__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMHighFall__Tunables, 0, 0, 1112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.PitchInDirectionForce, PsoDataType.Structure, 16, 0, (MetaName)760338219), + new PsoStructureEntryInfo(MetaName.PitchInDirectionComponent, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.StuntJumpPitchInDirectionForce, PsoDataType.Structure, 88, 0, (MetaName)760338219), + new PsoStructureEntryInfo(MetaName.StuntJumpPitchInDirectionComponent, PsoDataType.SInt, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.HighFallTimeToBlockInjuredOnGround, PsoDataType.SInt, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 160, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.InAir, PsoDataType.Structure, 200, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Vault, PsoDataType.Structure, 240, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.FromCarHit, PsoDataType.Structure, 280, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SlopeSlide, PsoDataType.Structure, 320, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.TeeterEdge, PsoDataType.Structure, 360, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SprintExhausted, PsoDataType.Structure, 400, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.JumpCollision, PsoDataType.Structure, 440, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StuntJump, PsoDataType.Structure, 480, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailedSprintExhausted, PsoDataType.Structure, 520, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.DisableStartMessageForSprintExhausted, PsoDataType.Bool, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BlendOut, PsoDataType.Structure, 608, 0, (MetaName)3979439077), + new PsoStructureEntryInfo(MetaName.PlayerQuickBlendOut, PsoDataType.Structure, 712, 0, (MetaName)3749122641), + new PsoStructureEntryInfo(MetaName.MpPlayerQuickBlendOut, PsoDataType.Structure, 744, 0, (MetaName)3749122641), + new PsoStructureEntryInfo(MetaName.MaxHealthLossForQuickGetup, PsoDataType.Float, 776, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHealthForQuickGetup, PsoDataType.Float, 780, 0, 0), + new PsoStructureEntryInfo(MetaName.MpMaxHealthLossForQuickGetup, PsoDataType.Float, 784, 0, 0), + new PsoStructureEntryInfo(MetaName.MpMinHealthForQuickGetup, PsoDataType.Float, 788, 0, 0), + new PsoStructureEntryInfo(MetaName.UseRemainingMinTimeForGroundWrithe, PsoDataType.Bool, 792, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeRemainingForGroundWrithe, PsoDataType.SInt, 796, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeElapsedForGroundWrithe, PsoDataType.SInt, 800, 0, 0), + new PsoStructureEntryInfo(MetaName.HighHighFallStart, PsoDataType.Structure, 808, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SuperHighFallStart, PsoDataType.Structure, 848, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HighHighFallEnd, PsoDataType.Structure, 888, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.AirResistanceOption, PsoDataType.UByte, 928, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceZThresholdForHighHighFall, PsoDataType.Float, 932, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityZThresholdForHighHighFall, PsoDataType.Float, 936, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityZThresholdForSuperHighFall, PsoDataType.Float, 940, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollComponentAirResistanceForce, PsoDataType.Array, 944, 4, (MetaName)1376291), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollComponentAirResistanceMinStiffness, PsoDataType.Array, 1028, 4, (MetaName)1310757) + ); + case MetaName.CTaskNMInjuredOnGround__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMInjuredOnGround__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fDoInjuredOnGroundChance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fFallingSpeedThreshold, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.iRandomDurationMin, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.iRandomDurationMax, PsoDataType.SInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxNumInjuredOnGroundAgents, PsoDataType.SInt, 32, 0, 0) + ); + case MetaName.CTaskNMJumpRollFromRoadVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMJumpRollFromRoadVehicle__Tunables, 0, 0, 304, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.GravityScale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StartForceDownHeight, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 24, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.EntryPointSets, PsoDataType.Structure, 64, 0, (MetaName)2070432509), + new PsoStructureEntryInfo(MetaName.BlendOut, PsoDataType.Structure, 96, 0, (MetaName)3979439077), + new PsoStructureEntryInfo(MetaName.QuickBlendOut, PsoDataType.Structure, 200, 0, (MetaName)3979439077) + ); + case MetaName.CTaskNMOnFire__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMOnFire__Tunables, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Weak, PsoDataType.Structure, 56, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 96, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 136, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMPrototype__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMPrototype__Tunables, 0, 0, 288, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RunForever, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SimulationTimeInMs, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CheckForMovingGround, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 32, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 72, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailed, PsoDataType.Structure, 112, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTaskNMPrototype__Tunables__TimedTuning), + new PsoStructureEntryInfo(MetaName.TimedMessages, PsoDataType.Array, 152, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo(MetaName.DynamicSet1, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.DynamicSet2, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.DynamicSet3, PsoDataType.Structure, 248, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMPrototype__Tunables__TimedTuning: + return new PsoStructureInfo(MetaName.CTaskNMPrototype__Tunables__TimedTuning, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.TimeInSeconds, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Periodic, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Messages, PsoDataType.Structure, 16, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMRiverRapids__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMRiverRapids__Tunables, 0, 0, 272, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fMinRiverFlowForRapids, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinRiverGroundClearanceForRapids, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.bHorizontalRighting, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fHorizontalRightingStrength, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fHorizontalRightingTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.bVerticalRighting, PsoDataType.Bool, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fVerticalRightingStrength, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fVerticalRightingTime, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fRagdollComponentBuoyancy, PsoDataType.Array, 48, 4, (MetaName)1376265), + new PsoStructureEntryInfo(MetaName.BodyWrithe, PsoDataType.Structure, 136, 0, (MetaName)2361842970), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 192, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 232, 0, MetaName.CNmTuningSet) + ); + case (MetaName)2361842970: + return new PsoStructureInfo((MetaName)2361842970, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.bControlledByPlayerSprintInput, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinArmAmplitude, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxArmAmplitude, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinArmStiffness, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxArmStiffness, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinArmPeriod, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxArmPeriod, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinStroke, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxStroke, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinBuoyancy, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxBuoyancy, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.CTaskNMShot__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMShot__Tunables, 0, 0, 2304, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinimumShotReactionTimePlayerMS, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinimumShotReactionTimeAIMS, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.bUseClipPoseHelper, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.bEnableDebugDraw, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.fImpactConeAngleFront, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fImpactConeAngleBack, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.eImpactConeRagdollComponent, PsoDataType.Enum, 36, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.iShotMinTimeBeforeGunThreaten, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.iShotMaxTimeBeforeGunThreaten, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.iShotMinTimeBetweenFireGun, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.iShotMaxTimeBetweenFireGun, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.iShotMaxBlindFireTimeL, PsoDataType.SInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.iShotMaxBlindFireTimeH, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelayStanding, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDelayBalanceFailed, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fShotBlindFireProbability, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.fShotWeaponAngleToFireGun, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.fShotHeadAngleToFireGun, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.fFireWeaponStrengthForceMultiplier, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinFinisherShotgunTotalImpulseNormal, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinFinisherShotgunTotalImpulseBraced, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.fFinisherShotgunBonusArmedSpeedModifier, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleSnapWithSpineOrientation, PsoDataType.Bool, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSnap, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotAgainstWall, PsoDataType.Structure, 112, 0, (MetaName)2342621138), + new PsoStructureEntryInfo(MetaName.BCRExclusionZone, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.Impulses, PsoDataType.Structure, 152, 0, (MetaName)209088469), + new PsoStructureEntryInfo(MetaName.HitRandomisation, PsoDataType.Structure, 352, 0, (MetaName)996969243), + new PsoStructureEntryInfo(MetaName.HitRandomisationAutomatic, PsoDataType.Structure, 392, 0, (MetaName)996969243), + new PsoStructureEntryInfo(MetaName.StayUpright, PsoDataType.Structure, 432, 0, (MetaName)1001943080), + new PsoStructureEntryInfo(MetaName.ArmShot, PsoDataType.Structure, 464, 0, (MetaName)2149258416), + new PsoStructureEntryInfo(MetaName.FallingSpeedForHighFall, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo(MetaName.ReduceDownedTimeByPerformanceTime, PsoDataType.Bool, 508, 0, 0), + new PsoStructureEntryInfo(MetaName.MinimumDownedTime, PsoDataType.SInt, 512, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceOfFallToKneesOnCollapse, PsoDataType.Float, 516, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceOfFallToKneesAfterLastStand, PsoDataType.Float, 520, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceForGutShotKnockdown, PsoDataType.Float, 524, 0, 0), + new PsoStructureEntryInfo(MetaName.LastStandMaxTotalTime, PsoDataType.Float, 528, 0, 0), + new PsoStructureEntryInfo(MetaName.LastStandMaxArmouredTotalTime, PsoDataType.Float, 532, 0, 0), + new PsoStructureEntryInfo(MetaName.RapidHitCount, PsoDataType.SInt, 536, 0, 0), + new PsoStructureEntryInfo(MetaName.ArmouredRapidHitCount, PsoDataType.SInt, 540, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowArmouredLegShot, PsoDataType.Bool, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowArmouredKnockdown, PsoDataType.Bool, 545, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShot, PsoDataType.Bool, 546, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShotMinDelay, PsoDataType.SInt, 548, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnHeadShotMaxDelay, PsoDataType.SInt, 552, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShot, PsoDataType.Bool, 556, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShotMinDelay, PsoDataType.SInt, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableReachForWoundOnNeckShotMaxDelay, PsoDataType.SInt, 564, 0, 0), + new PsoStructureEntryInfo(MetaName.ParamSets, PsoDataType.Structure, 568, 0, (MetaName)436100430), + new PsoStructureEntryInfo(MetaName.WeaponSets, PsoDataType.Structure, 2136, 0, (MetaName)2070432509), + new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 2168, 0, (MetaName)3979439077), + new PsoStructureEntryInfo(MetaName.SubmergedBlendOutThreshold, PsoDataType.Structure, 2272, 0, (MetaName)3749122641) + ); + case (MetaName)2342621138: + return new PsoStructureInfo((MetaName)2342621138, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.HealthRatioLimit, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.WallProbeRadius, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.WallProbeDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ProbeHeightAbovePelvis, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ImpulseMult, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWallAngle, PsoDataType.Float, 28, 0, 0) + ); + case (MetaName)209088469: + return new PsoStructureInfo((MetaName)209088469, 0, 0, 200, + new PsoStructureEntryInfo(MetaName.MaxArmourImpulseMult, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinArmourImpulseMult, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHealthImpulseMult, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHealthImpulseMult, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDamageTakenImpulseMult, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenImpulseMult, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDamageTakenThreshold, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenThreshold, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultKillShotImpulseMult, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultRapidFireKillShotImpulseMult, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMPKillShotImpulseMult, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMPRapidFireKillShotImpulseMult, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunMaxSpeedForLiftImpulse, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunMaxLiftImpulse, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunLiftNearThreshold, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveSpine3ImpulseToSpine2, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveNeckImpulseToSpine2, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.ShotgunChanceToMoveHeadImpulseToSpine2, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.RapidFireBoostShotImpulseMult, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.RapidFireBoostShotMinRandom, PsoDataType.SInt, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.RapidFireBoostShotMaxRandom, PsoDataType.SInt, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.EqualizeAmount, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.COMImpulseScale, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.COMImpulseComponent, PsoDataType.Flags, 100, 0, (MetaName)2097175), + new PsoStructureEntryInfo(MetaName.COMImpulseMaxRootVelocityMagnitude, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.COMImpulseOnlyWhileBalancing, PsoDataType.Bool, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadShotImpulseMultiplier, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadShotMPImpulseMultiplier, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.ScaleHeadShotImpulseWithSpineOrientation, PsoDataType.Bool, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeadShotImpulseMultiplier, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.AutomaticInitialSnapMult, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.BurstFireInitialSnapMult, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.FinalShotImpulseClampMax, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.RunningAgainstBulletImpulseMult, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.RunningAgainstBulletImpulseMultMax, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.RunningWithBulletImpulseMult, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.LegShotFallRootImpulseMinUpright, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.LegShotFallRootImpulseMult, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.SniperImpulses, PsoDataType.Structure, 160, 0, (MetaName)3192684380) + ); + case (MetaName)3192684380: + return new PsoStructureInfo((MetaName)3192684380, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.MaxHealthImpulseMult, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHealthImpulseMult, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDamageTakenImpulseMult, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenImpulseMult, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDamageTakenThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenThreshold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultKillShotImpulseMult, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultMPKillShotImpulseMult, PsoDataType.Float, 36, 0, 0) + ); + case (MetaName)996969243: + return new PsoStructureInfo((MetaName)996969243, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Enable, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.TopSpread, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.BottomSpread, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Blend, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TopComponent, PsoDataType.Enum, 24, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.BottomComponent, PsoDataType.Enum, 28, 0, (MetaName)3509057257), + new PsoStructureEntryInfo(MetaName.BiasSide, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BiasSideTime, PsoDataType.UInt, 36, 0, 0) + ); + case (MetaName)1001943080: + return new PsoStructureInfo((MetaName)1001943080, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.HoldingWeaponBonus, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.UnarmedBonus, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ArmouredBonus, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingMultiplierBonus, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HealthMultiplierBonus, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)2149258416: + return new PsoStructureInfo((MetaName)2149258416, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.MinLookAtArmWoundTime, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookAtArmWoundTime, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.UpperArmImpulseCap, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.LowerArmImpulseCap, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ClavicleImpulseScale, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.UpperArmNoTorsoHitImpulseCap, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.LowerArmNoTorseHitImpulseCap, PsoDataType.Float, 32, 0, 0) + ); + case (MetaName)436100430: + return new PsoStructureInfo((MetaName)436100430, 0, 0, 1568, + new PsoStructureEntryInfo(MetaName.Base, PsoDataType.Structure, 8, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Melee, PsoDataType.Structure, 48, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Electrocute, PsoDataType.Structure, 88, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SprintingLegShot, PsoDataType.Structure, 128, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SprintingDeath, PsoDataType.Structure, 168, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Sprinting, PsoDataType.Structure, 208, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.AutomaticHeadShot, PsoDataType.Structure, 248, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HeadShot, PsoDataType.Structure, 288, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.AutomaticNeckShot, PsoDataType.Structure, 328, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.NeckShot, PsoDataType.Structure, 368, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SniperLegShot, PsoDataType.Structure, 408, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.LegShot, PsoDataType.Structure, 448, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.ArmShot, PsoDataType.Structure, 488, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BackShot, PsoDataType.Structure, 528, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Underwater, PsoDataType.Structure, 568, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.UnderwaterRelax, PsoDataType.Structure, 608, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Armoured, PsoDataType.Structure, 648, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BoundAnkles, PsoDataType.Structure, 688, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.FatallyInjured, PsoDataType.Structure, 728, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.PlayerDeathSP, PsoDataType.Structure, 768, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.PlayerDeathMP, PsoDataType.Structure, 808, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnStairs, PsoDataType.Structure, 848, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.ShotAgainstWall, PsoDataType.Structure, 888, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.LastStand, PsoDataType.Structure, 928, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.LastStandArmoured, PsoDataType.Structure, 968, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HeadLook, PsoDataType.Structure, 1008, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.FallToKnees, PsoDataType.Structure, 1048, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.StaggerFall, PsoDataType.Structure, 1088, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.CatchFall, PsoDataType.Structure, 1128, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SetFallingReactionHealthy, PsoDataType.Structure, 1168, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SetFallingReactionInjured, PsoDataType.Structure, 1208, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SetFallingReactionFallOverWall, PsoDataType.Structure, 1248, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.SetFallingReactionFallOverVehicle, PsoDataType.Structure, 1288, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.RubberBulletKnockdown, PsoDataType.Structure, 1328, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Teeter, PsoDataType.Structure, 1368, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HoldingTwoHandedWeapon, PsoDataType.Structure, 1408, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.HoldingSingleHandedWeapon, PsoDataType.Structure, 1448, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.CrouchedOrLowCover, PsoDataType.Structure, 1488, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Female, PsoDataType.Structure, 1528, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskNMSimple__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMSimple__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2610655349), + new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Map, 16, 1, (MetaName)65538) + ); + case (MetaName)2610655349: + return new PsoStructureInfo((MetaName)2610655349, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.iMinTime, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxTime, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fRagdollScore, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 24, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 64, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.OnBalanceFailure, PsoDataType.Structure, 104, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 144, 0, (MetaName)3749122641) + ); + case MetaName.CTaskNMThroughWindscreen__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMThroughWindscreen__Tunables, 0, 0, 232, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.GravityScale, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StartForceDownHeight, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeForwardMinComponent, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeForwardMaxComponent, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeUpMinComponent, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeUpMaxComponent, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikePitchMinComponent, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikePitchMaxComponent, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeMinSpeed, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeMaxSpeed, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeMinUpright, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeMaxUpright, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeEjectMaxImpactDepth, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.KnockOffBikeEjectImpactFriction, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ClearVehicleTimeMS, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultInverseMassScales, PsoDataType.Structure, 80, 0, (MetaName)1267291753), + new PsoStructureEntryInfo(MetaName.BicycleInverseMassScales, PsoDataType.Structure, 104, 0, (MetaName)1267291753), + new PsoStructureEntryInfo(MetaName.BikeInverseMassScales, PsoDataType.Structure, 128, 0, (MetaName)1267291753), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Structure, 152, 0, MetaName.CNmTuningSet), + new PsoStructureEntryInfo(MetaName.Update, PsoDataType.Structure, 192, 0, MetaName.CNmTuningSet) + ); + case MetaName.CTaskRageRagdoll__Tunables: + return new PsoStructureInfo(MetaName.CTaskRageRagdoll__Tunables, 0, 0, 168, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SpineStrengthTuning, PsoDataType.Structure, 16, 0, (MetaName)2579680791), + new PsoStructureEntryInfo(MetaName.NeckStrengthTuning, PsoDataType.Structure, 48, 0, (MetaName)2579680791), + new PsoStructureEntryInfo(MetaName.LimbStrengthTuning, PsoDataType.Structure, 80, 0, (MetaName)2579680791), + new PsoStructureEntryInfo(MetaName.RageRagdollImpulseTuning, PsoDataType.Structure, 112, 0, (MetaName)2715073781), + new PsoStructureEntryInfo(MetaName.fMuscleAngleStrengthRampDownRate, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.fMuscleSpeedStrengthRampDownRate, PsoDataType.Float, 164, 0, 0) + ); + case (MetaName)2579680791: + return new PsoStructureInfo((MetaName)2579680791, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.fInitialDelay, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fStartStrength, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fMidStrength, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fEndStrength, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fDurationStage1, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fDurationStage2, PsoDataType.Float, 28, 0, 0) + ); + case (MetaName)2715073781: + return new PsoStructureInfo((MetaName)2715073781, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.fImpulseReductionPerShot, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fImpulseRecoveryPerSecond, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxImpulseModifier, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinImpulseModifier, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fCounterImpulseRatio, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fTempInitialStiffnessWhenShot, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fAnimalMassMult, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fAnimalImpulseMultMin, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fAnimalImpulseMultMax, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fInitialHitImpulseMult, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CPlayerInfo__Tunables: + return new PsoStructureInfo(MetaName.CPlayerInfo__Tunables, 0, 0, 992, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EnemyCharging, PsoDataType.Structure, 16, 0, (MetaName)2968011987), + new PsoStructureEntryInfo(MetaName.CombatLoitering, PsoDataType.Structure, 48, 0, (MetaName)2859355160), + new PsoStructureEntryInfo(MetaName.MinVehicleCollisionDamageScale, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVehicleCollisionDamageScale, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngleConsidered, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToConsiderVehicleValid, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToConsiderVehicleValid, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.SprintReplenishFinishedPercentage, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)3763989739, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.SprintReplenishRateMultiplier, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.SprintReplenishRateMultiplierBike, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWorldLimitsPlayerX, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWorldLimitsPlayerY, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWorldLimitsPlayerX, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWorldLimitsPlayerY, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToTrespassWhileSwimmingBeforeDeath, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MovementAwayWeighting, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceWeighting, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingWeighting, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.CameraWeighting, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceWeightingNoStick, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingWeightingNoStick, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.OnFireWeightingMult, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeMaxRestoreDuration, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeMinRestoreDuration, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleDepletionMinMult, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleDepletionMidMult, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleDepletionMaxMult, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleMinDepletionLimit, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleMidDepletionLimit, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleMaxDepletionLimit, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenSwitchToClearTasks, PsoDataType.UInt, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenShoutTargetPosition, PsoDataType.UInt, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.TrespassGuardModelName, PsoDataType.String, 188, 7, 0), + new PsoStructureEntryInfo(MetaName.GuardWorldExtents, PsoDataType.Bool, 192, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlayerInfo__sSprintControlData), + new PsoStructureEntryInfo(MetaName.SprintControlData, PsoDataType.Array, 200, 1, (MetaName)262180), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPlayerInfo__sPlayerStatInfo), + new PsoStructureEntryInfo(MetaName.PlayerStatInfos, PsoDataType.Array, 336, 1, (MetaName)524326), + new PsoStructureEntryInfo((MetaName)4178328957, PsoDataType.Float, 984, 0, 0), + new PsoStructureEntryInfo((MetaName)1447073898, PsoDataType.Float, 988, 0, 0) + ); + case (MetaName)2968011987: + return new PsoStructureInfo((MetaName)2968011987, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.fChargeGoalBehindCoverCentralOffset, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fChargeGoalLateralOffset, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fChargeGoalRearOffset, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fChargeGoalMaxAdjustRadius, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fPlayerMoveDistToResetChargeGoals, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)2859355160: + return new PsoStructureInfo((MetaName)2859355160, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.fPlayerMoveDistToResetLoiterPosition, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.uDistanceCheckPeriodMS, PsoDataType.UInt, 12, 0, 0) + ); + case MetaName.CPlayerInfo__sSprintControlData: + return new PsoStructureInfo(MetaName.CPlayerInfo__sSprintControlData, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.TapAdd, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.HoldSub, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ReleaseSub, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Threshhold, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLimit, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ResultMult, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CPlayerInfo__sPlayerStatInfo: + return new PsoStructureInfo(MetaName.CPlayerInfo__sPlayerStatInfo, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinStaminaDuration, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxStaminaDuration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHoldBreathDuration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHoldBreathDuration, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWheelieAbility, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWheelieAbility, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPlaneControlAbility, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlaneControlAbility, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPlaneDamping, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPlaneDamping, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeliDamping, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeliDamping, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFallHeight, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFallHeight, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDiveHeight, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDiveHeight, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.DiveRampPow, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.CAnimSpeedUps__Tunables: + return new PsoStructureInfo(MetaName.CAnimSpeedUps__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerClimbStandRateModifier, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerClimbRunningRateModifier, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerClimbClamberRateModifier, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerEnterExitJackVehicleRateModifier, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerLadderRateModifier, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerReloadRateModifier, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerCoverIntroRateModifier, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplayerIdleTurnRateModifier, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceMPAnimRatesInSP, PsoDataType.Bool, 48, 0, 0) + ); + case MetaName.CPlayerPedTargeting__Tunables: + return new PsoStructureInfo(MetaName.CPlayerPedTargeting__Tunables, 0, 0, 3776, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fTargetableDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fTargetThreatOverride, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestHardLockDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.UnarmedInCoverTargetingDistance, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1109599945, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MeleeLostLOSBreakTime, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToAllowCachedStickInputForMelee, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DoAynchronousProbesWhenFindingFreeAimAssistTarget, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowDriverLockOnToAmbientPeds, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowDriverLockOnToAmbientPedsInSP, PsoDataType.Bool, 46, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplayAimAssistIntersections, PsoDataType.Bool, 47, 0, 0), + new PsoStructureEntryInfo((MetaName)2235947157, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplayAimAssistCurves, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplayLockOnDistRanges, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplayLockOnAngularRanges, PsoDataType.Bool, 51, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplaySoftLockDebug, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplayFreeAimTargetDebug, PsoDataType.Bool, 53, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugLockOnTargets, PsoDataType.Bool, 54, 0, 0), + new PsoStructureEntryInfo(MetaName.UseRagdollTargetIfNoAssistTarget, PsoDataType.Bool, 55, 0, 0), + new PsoStructureEntryInfo(MetaName.UseReticuleSlowDownStrafeClamp, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.EasyTargettingDifficultyInfo, PsoDataType.Structure, 64, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo(MetaName.NormalTargettingDifficultyInfo, PsoDataType.Structure, 528, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)2843442022, PsoDataType.Structure, 992, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)933644170, PsoDataType.Structure, 1456, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)1051298047, PsoDataType.Structure, 1920, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)1712651720, PsoDataType.Structure, 2384, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)3769742750, PsoDataType.Structure, 2848, 0, MetaName.CTargettingDifficultyInfo), + new PsoStructureEntryInfo((MetaName)1604857901, PsoDataType.Structure, 3312, 0, MetaName.CTargettingDifficultyInfo) + ); + case MetaName.CTargettingDifficultyInfo: + return new PsoStructureInfo(MetaName.CTargettingDifficultyInfo, 0, 0, 464, + new PsoStructureEntryInfo(MetaName.LockType, PsoDataType.Enum, 8, 0, MetaName.LockType), + new PsoStructureEntryInfo((MetaName)3742855719, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.UseLockOnTargetSwitching, PsoDataType.Bool, 13, 0, 0), + new PsoStructureEntryInfo(MetaName.UseReticuleSlowDownForRunAndGun, PsoDataType.Bool, 14, 0, 0), + new PsoStructureEntryInfo(MetaName.UseReticuleSlowDown, PsoDataType.Bool, 15, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableBulletBending, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowSoftLockFineAim, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.UseFineAimSpring, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.UseNewSlowDownCode, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.UseCapsuleTests, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.UseDriveByAssistedAim, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo((MetaName)3708089905, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnRangeModifier, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ReticuleSlowDownRadius, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ReticuleSlowDownCapsuleRadius, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ReticuleSlowDownCapsuleLength, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimit, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitClose, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitCloseDistMin, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAngularLimitCloseDistMax, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.WideTargetAngularLimit, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.CycleTargetAngularLimit, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.CycleTargetAngularLimitMelee, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAimPitchMin, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultTargetAimPitchMax, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleLockOnRangeModifier, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleMaxLockOnRange, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimit, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitClose, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitCloseDistMin, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleTargetAngularLimitCloseDistMax, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.NoReticuleTargetAimPitchLimit, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelocityForDriveByAssistedAim, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnDistanceRejectionModifier, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimVerticalMovement, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimDownwardsVerticalMovement, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimSidewaysScale, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSoftLockBreakTime, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSoftLockBreakTimeCloseRange, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSoftLockBreakAtMaxXStickTime, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockBreakDistanceMin, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockBreakDistanceMax, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFineAimTime, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MinFineAimTimeHoldingStick, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MinNoReticuleAimTime, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.AimAssistCapsuleRadius, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo((MetaName)2152729841, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.AimAssistCapsuleMaxLength, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo((MetaName)1099784311, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.AimAssistBlendInTime, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.AimAssistBlendOutTime, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockFineAimBreakXYValue, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockFineAimBreakZValue, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockFineAimXYAbsoluteValue, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockFineAimXYAbsoluteValueClose, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockBreakValue, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockTime, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.SoftLockTimeToAcquireTarget, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo((MetaName)2167138628, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimHorSpeedMin, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimHorSpeedMax, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimVerSpeed, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplier, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimHorWeightSpeedMultiplier, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimHorSpeedPower, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierClose, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierCloseDistMin, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.FineAimSpeedMultiplierCloseDistMax, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo((MetaName)1715236167, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo((MetaName)1204531501, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo((MetaName)2894104098, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo((MetaName)1976544803, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo((MetaName)922516025, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo((MetaName)3926385305, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo((MetaName)493048149, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo((MetaName)2549641570, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnSwitchTimeExtensionBreakLock, PsoDataType.UInt, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.LockOnSwitchTimeExtensionKillTarget, PsoDataType.UInt, 284, 0, 0), + new PsoStructureEntryInfo((MetaName)3957255740, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo((MetaName)3799655237, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCurveSet), + new PsoStructureEntryInfo(MetaName.CurveSets, PsoDataType.Array, 296, 1, (MetaName)262224), + new PsoStructureEntryInfo(MetaName.AimAssistDistanceCurve, PsoDataType.Structure, 432, 0, MetaName.CCurveSet) + ); + case MetaName.CCurveSet: + return new PsoStructureInfo(MetaName.CCurveSet, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCurve), + new PsoStructureEntryInfo(MetaName.curves, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case MetaName.CCurve: + return new PsoStructureInfo(MetaName.CCurve, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.fInputMax, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.fResultMax, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.fPow, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CRandomEventManager__Tunables: + return new PsoStructureInfo(MetaName.CRandomEventManager__Tunables, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RenderDebug, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceCrime, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.EventInterval, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.EventInitInterval, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1980648971), + new PsoStructureEntryInfo(MetaName.RandomEventType, PsoDataType.Array, 32, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2790883352), + new PsoStructureEntryInfo(MetaName.RandomEventData, PsoDataType.Array, 48, 0, (MetaName)8), + new PsoStructureEntryInfo(MetaName.SpawningChasesEnabled, PsoDataType.Bool, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNumberCopVehiclesInChase, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ProbSpawnHeli, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAmbientVehiclesToSpawnChase, PsoDataType.SInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPlayerMoveDistanceToSpawnChase, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.HeliVehicleModelId, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.HeliPedModelId, PsoDataType.String, 88, 7, 0) + ); + case (MetaName)1980648971: + return new PsoStructureInfo((MetaName)1980648971, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.RandomEventTypeName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RandomEventTimeIntervalMin, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.RandomEventTimeIntervalMax, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DeltaScaleWhenPlayerStationary, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)2790883352: + return new PsoStructureInfo((MetaName)2790883352, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.RandomEventName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RandomEventType, PsoDataType.Enum, 12, 0, (MetaName)3799765345) + ); + case MetaName.CEventExplosionHeard__Tunables: + return new PsoStructureInfo(MetaName.CEventExplosionHeard__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxCombineDistThresholdSquared, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CRelationshipManager__Tunables: + return new PsoStructureInfo(MetaName.CRelationshipManager__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DisplayRemovedGroups, PsoDataType.Bool, 16, 0, 0) + ); + case MetaName.CTaskAgitated__Tunables: + return new PsoStructureInfo(MetaName.CTaskAgitated__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)588501678), + new PsoStructureEntryInfo(MetaName.TimeBetweenLookAts, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MovingAwayVelocityMSThreshold, PsoDataType.Float, 36, 0, 0) + ); + case (MetaName)588501678: + return new PsoStructureInfo((MetaName)588501678, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Info, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.Hashes, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.History, PsoDataType.Bool, 11, 0, 0) + ); + case MetaName.CTaskConfront__Tunables: + return new PsoStructureInfo(MetaName.CTaskConfront__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceIfUnarmed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistanceIfArmed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToMove, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRadius, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToIntimidateArmedTarget, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToIntimidateUnarmedTarget, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskSmartFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskSmartFlee__Tunables, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2976849785, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2923989237, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo((MetaName)964747565, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2588997912, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3847831913, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)182226933, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3494668944, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)55450154, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)1156561437, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2850307001, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)4172340609, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)916666022, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1653710895, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleMaxDistance, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleRouteMinDistance, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenHandsUpChecks, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenExitVehicleDueToRouteChecks, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToCower, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeForHandsUp, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForHandsUp, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimeForExitVehicle, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimeForExitVehicle, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceToDeleteOnExitVehicle, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteOnExitVehicle, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRouteLengthForCower, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistFromTargetWhenCoweringToCheckForExit, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeTargetTooCloseDistance, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)945475130, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)909291779, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRouteSizeForCower, PsoDataType.SInt, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceCower, PsoDataType.Bool, 132, 0, 0) + ); + case MetaName.CTaskScenarioFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskScenarioFlee__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fFleeProjectRange, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fInitialSearchRadius, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fSearchScaler, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fSearchRangeMax, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fFleeRange, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1817496588, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fTargetScenarioRadius, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fProbeLength, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3328108206, PsoDataType.UInt, 48, 0, 0) + ); + case MetaName.CTaskExhaustedFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskExhaustedFlee__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StartingEnergy, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.EnergyLostPerSecond, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.OuterDistanceThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.InnerDistanceThreshold, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskWalkAway__Tunables: + return new PsoStructureInfo(MetaName.CTaskWalkAway__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SafeDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenRouteAdjustments, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskGrowlAndFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskGrowlAndFlee__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FleeMBR, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskIntimidate__Tunables: + return new PsoStructureInfo(MetaName.CTaskIntimidate__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)920671881, PsoDataType.Bool, 16, 0, 0) + ); + case MetaName.CTaskReactAndFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactAndFlee__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinFleeMoveBlendRatio, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFleeMoveBlendRatio, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.OverrideDirections, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.OverrideReactDirection, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.OverrideFleeDirection, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxReactionTime, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingChangeRate, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToRepeatLastAnimation, PsoDataType.Float, 52, 0, 0) + ); + case MetaName.CTaskReactInDirection__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactInDirection__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CTaskReactToExplosion__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactToExplosion__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxShellShockedDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFlinchDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLookAtDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskReactToImminentExplosion__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactToImminentExplosion__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxEscapeDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxFlinchDistance, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskShockingEvent__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEvent__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinRemainingRotationForScaling, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAngularVelocityScaleFactor, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAngularVelocityScaleFactor, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskShockingEventGoto__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventGoto__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DistSquaredThresholdAtCrowdRoundPos, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DistSquaredThresholdMovingToCrowdRoundPos, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DistVicinityOfCrowd, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraDistForGoto, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistFromOtherPeds, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveBlendRatioForFarGoto, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadiusForCloseNavMeshTask, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraToleranceForStopWatchDistance, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CTaskShockingEventHurryAway__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventHurryAway__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.LookAheadDistanceForBackAway, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToCallPolice, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToCallPolice, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToCallPolice, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancePlayingInitalTurnAnimSmallReact, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancePlayingCustomBackAwayAnimSmallReact, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancePlayingInitalTurnAnimBigReact, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancePlayingCustomBackAwayAnimBigReact, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFleeDistance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFleeVehicleDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldFleeFilmingDistance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.EvasionThreshold, PsoDataType.UInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosePlayerSpeedupDistanceSquaredThreshold, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ClosePlayerSpeedupTimeThreshold, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceFromPlayerToDeleteHurriedPed, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeUntilDeletionWhenHurrying, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.CTaskShockingEventWatch__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventWatch__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTargetAngularMovementForWatch, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ThresholdWatchAfterFace, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ThresholdWatchStop, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceBetweenFilmingPeds, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)1440458015, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceAwayForFilming, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskShockingEventReact__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventReact__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TurningTolerance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TurningRate, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TurningEnergyUpperThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TurningEnergyLowerThreshold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenReactionIdlesMin, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenReactionIdlesMax, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendoutPhase, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskShockingEventBackAway__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventBackAway__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingAdjustmentRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeadingAlignmentCosThreshold, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeadingAlignmentCosThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveNetworkBlendoutDuration, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultBackwardsProjectionRange, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AxesFacingTolerance, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForBackAway, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForBackAway, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWptAngle, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutPhase, PsoDataType.Float, 52, 0, 0) + ); + case MetaName.CTaskShockingEventReactToAircraft__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventReactToAircraft__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ThresholdWatch, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ThresholdRun, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskShockingPoliceInvestigate__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingPoliceInvestigate__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ExtraDistForGoto, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveBlendRatioForFarGoto, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteOffscreen, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DeleteOffscreenTimeMS_MIN, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DeleteOffscreenTimeMS_MAX, PsoDataType.UInt, 32, 0, 0) + ); + case MetaName.CTaskShockingEventStopAndStare__Tunables: + return new PsoStructureInfo(MetaName.CTaskShockingEventStopAndStare__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BringVehicleToHaltDistance, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskShove__Tunables: + return new PsoStructureInfo(MetaName.CTaskShove__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 16, 0, (MetaName)838054604), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDot, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusForContact, PsoDataType.Float, 40, 0, 0) + ); + case (MetaName)838054604: + return new PsoStructureInfo((MetaName)838054604, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Contact, PsoDataType.Bool, 9, 0, 0) + ); + case MetaName.CTaskShoved__Tunables: + return new PsoStructureInfo(MetaName.CTaskShoved__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CScenarioClipHelper__Tunables: + return new PsoStructureInfo(MetaName.CScenarioClipHelper__Tunables, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CVehicleScenarioManager__AttractorTuning__Tunables: + return new PsoStructureInfo(MetaName.CVehicleScenarioManager__AttractorTuning__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ForwardDirectionThresholdCosSquared, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToPathDefault, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToVehicle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToVehicle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.NumToUpdatePerFrame, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterAttractionMs, PsoDataType.UInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterChainTestFailedMs, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterFailedConditionsMs, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAfterNoBoundsMs, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPassengersForAttraction, PsoDataType.UShort, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPassengersForAttraction, PsoDataType.UShort, 54, 0, 0) + ); + case MetaName.CTaskCoupleScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskCoupleScenario__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ResumeDistSq, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StopDistSq, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskCowerScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskCowerScenario__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EventDecayTimeMS, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ReturnToNormalDistanceSq, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BackHeadingInterpRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.EventlessSwitchStateTimeRequirement, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.EventlessSwitchInactivityTimeRequirement, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.EventlessSwitchDistanceRequirement, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistFromPlayerToDeleteCoweringForever, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.CoweringForeverDeleteOffscreenTimeMS_MIN, PsoDataType.UInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.CoweringForeverDeleteOffscreenTimeMS_MAX, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.FlinchDecayTime, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenFlinches, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.CTaskUseScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskUseScenario__Tunables, 0, 0, 152, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AdvanceUseTimeRandomMaxProportion, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.BreakAttachmentMoveSpeedThreshold, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BreakAttachmentOrientationThreshold, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitAttachmentMoveSpeedThreshold, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.RouteLengthThresholdForFinalApproach, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ZThresholdForApproachOffset, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DetachExitDefaultPhaseThreshold, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.FastExitDefaultPhaseThreshold, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.RouteLengthThresholdForApproachOffset, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraFleeDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.FindPropInEnvironmentDist, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRateToPlayCowerReaction, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRateToPlayCowerReaction, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDifferenceBetweenCowerReactionRates, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactAndFleeBlendOutPhase, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.RegularExitDefaultPhaseThreshold, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeOfDayRandomnessHours, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLeaveMinBetweenAnybody, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLeaveRandomAmount, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLeaveRandomFraction, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.PavementFloodFillSearchRadius, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.DelayBetweenPavementFloodFillSearches, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeMBRMin, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeMBRMax, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPathLengthForValidExit, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceNavmeshMayAdjustPath, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenChecksToLeaveCowering, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.SkipGotoXYDist, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.SkipGotoZDist, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.SkipGotoHeadingDeltaDegrees, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MinExtraMoney, PsoDataType.SInt, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxExtraMoney, PsoDataType.SInt, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.UpdatesBeforeShiftingBounds, PsoDataType.SByte, 144, 0, 0) + ); + case MetaName.CTaskUseVehicleScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskUseVehicleScenario__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BringVehicleToHaltDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.IdleTimeRandomFactor, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDist, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownSpeed, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.SwitchToStraightLineDist, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetArriveDist, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.PlaneTargetArriveDist, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.HeliTargetArriveDist, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BoatTargetArriveDist, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PlaneTargetArriveDistTaxiOnGround, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PlaneDrivingSubtaskArrivalDist, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.BoatMaxAvoidanceAngle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSearchDistance, PsoDataType.UShort, 64, 0, 0) + ); + case MetaName.CTaskWanderingScenario__Tunables: + return new PsoStructureInfo(MetaName.CTaskWanderingScenario__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeWaitingForBlockingArea, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SwitchToNextPointDistWalking, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SwitchToNextPointDistJogging, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.PreferNearWaterSurfaceArrivalRadius, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenBlockingAreaChecksMS, PsoDataType.UInt, 32, 0, 0) + ); + case MetaName.CTaskPoliceOrderResponse__Tunables: + return new PsoStructureInfo(MetaName.CTaskPoliceOrderResponse__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToWait, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForVehicleMovingSlowly, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForVehicleMovingQuickly, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeOvertakeToMatchSpeedWhenPulledOver, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBeforeOvertakeToMatchSpeedWhenCruising, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.CheatPowerIncreaseForMatchSpeed, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.HashOrdering, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)683308669, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)527303977, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.CTaskArrestPed__Tunables: + return new PsoStructureInfo(MetaName.CTaskArrestPed__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AimDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestInVehicleDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MoveToDistanceInVehicle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetDistanceFromVehicleEntry, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)1425198943, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)4218266421, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)305536610, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.RegainComet, PsoDataType.UInt, 48, 0, 0) + ); + case MetaName.CTaskSwatOrderResponse__Tunables: + return new PsoStructureInfo(MetaName.CTaskSwatOrderResponse__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.HashOrdering, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)683308669, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskHeliOrderResponse__Tunables: + return new PsoStructureInfo(MetaName.CTaskHeliOrderResponse__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3905663903, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)143141277, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)490178156, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)2892876798, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)3618878970, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)3555374966, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskWitness__Tunables: + return new PsoStructureInfo(MetaName.CTaskWitness__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeMoveNearCrimeMs, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeMoveToLawMs, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeSearchMs, PsoDataType.UInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeMoveToLawFailedPathfindingMs, PsoDataType.UInt, 28, 0, 0) + ); + case MetaName.CEventShocking__Tunables: + return new PsoStructureInfo(MetaName.CEventShocking__Tunables, 0, 0, 224, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.LifeTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.VisualReactionRange, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.CopInVehicleVisualReactionRange, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AudioReactionRange, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.AIOnlyReactionRangeScaleFactor, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DuckAndCoverCanTriggerForPlayerTime, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.GotoWatchRange, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.StopWatchDistance, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayMBRChangeDelay, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayMBRChangeRange, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayInitialMBR, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayMoveBlendRatioWhenFar, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayMoveBlendRatioWhenNear, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWatchTime, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWatchTime, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinWatchTimeHurryAway, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxWatchTimeHurryAway, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceOfWatchRatherThanHurryAway, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPhoneFilmTime, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPhoneFilmTime, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPhoneFilmTimeHurryAway, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPhoneFilmTimeHurryAway, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceOfFilmingEventOnPhoneIfWatching, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.PedGenBlockedAreaMinRadius, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.WanderInfluenceSphereRadius, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.TriggerAmbientReactionChances, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForAmbientReaction, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForAmbientReaction, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbientEventLifetime, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeForAmbientReaction, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForAmbientReaction, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.PedFearImpact, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.ShockingSpeechChance, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.DuplicateDistanceCheck, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForAudioReaction, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToUseGunfireReactAndFleeAnimations, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.PedGenBlockingAreaLifeTimeMS, PsoDataType.UInt, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.DuplicateTimeCheck, PsoDataType.UInt, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.ShockingSpeechHash, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo(MetaName.ShockingFilmSpeechHash, PsoDataType.String, 180, 7, 0), + new PsoStructureEntryInfo(MetaName.Priority, PsoDataType.SInt, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.AmbientEventType, PsoDataType.Enum, 188, 0, MetaName.AmbientEventType), + new PsoStructureEntryInfo(MetaName.AddPedGenBlockedArea, PsoDataType.Bool, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.CausesVehicleAvoidance, PsoDataType.Bool, 193, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowIgnoreAsLowPriority, PsoDataType.Bool, 194, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugDisplayAlwaysUseEventPosition, PsoDataType.Bool, 195, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugDisplayListPlayerInfo, PsoDataType.Bool, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.HurryAwayWatchFirst, PsoDataType.Bool, 197, 0, 0), + new PsoStructureEntryInfo(MetaName.MobileChatScenarioMayAbort, PsoDataType.Bool, 198, 0, 0), + new PsoStructureEntryInfo(MetaName.WatchSayFightCheers, PsoDataType.Bool, 199, 0, 0), + new PsoStructureEntryInfo(MetaName.WatchSayShocked, PsoDataType.Bool, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleSlowDown, PsoDataType.Bool, 201, 0, 0), + new PsoStructureEntryInfo(MetaName.IgnoreIfSensingPedIsOtherEntity, PsoDataType.Bool, 202, 0, 0), + new PsoStructureEntryInfo(MetaName.IgnorePavementChecks, PsoDataType.Bool, 203, 0, 0), + new PsoStructureEntryInfo(MetaName.AllowScanningEvenIfPreviouslyReacted, PsoDataType.Bool, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactionMode, PsoDataType.Enum, 208, 0, (MetaName)1809724872), + new PsoStructureEntryInfo(MetaName.StopResponseWhenExpired, PsoDataType.Bool, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeIfApproachedByOtherEntity, PsoDataType.Bool, 213, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeIfApproachedBySourceEntity, PsoDataType.Bool, 214, 0, 0), + new PsoStructureEntryInfo(MetaName.CanCallPolice, PsoDataType.Bool, 215, 0, 0), + new PsoStructureEntryInfo(MetaName.IgnoreFovForHeadIk, PsoDataType.Bool, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.ReactToOtherEntity, PsoDataType.Bool, 217, 0, 0) + ); + case MetaName.CSituationalClipSetStreamer__Tunables: + return new PsoStructureInfo(MetaName.CSituationalClipSetStreamer__Tunables, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Avoids, PsoDataType.Structure, 16, 0, (MetaName)2341712397), + new PsoStructureEntryInfo(MetaName.FleeReactions, PsoDataType.Structure, 48, 0, MetaName.iVectorDefault) + ); + case (MetaName)2341712397: + return new PsoStructureInfo((MetaName)2341712397, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.ClipSet, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ClipSetForCasual, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1095110195), + new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Array, 16, 0, (MetaName)2) + ); + case MetaName.iVectorDefault: + return new PsoStructureInfo(MetaName.iVectorDefault, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.ClipSetForIntro, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3696584734, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo((MetaName)4027846555, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.ClipSetForRuns, PsoDataType.String, 20, 7, 0), + new PsoStructureEntryInfo((MetaName)3482724306, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo((MetaName)551602790, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInCombatToNotStreamIn, PsoDataType.Float, 32, 0, 0) + ); + case (MetaName)1095110195: + return new PsoStructureInfo((MetaName)1095110195, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ClipSet, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.IsCasual, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Chances, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CEventFootStepHeard__Tunables: + return new PsoStructureInfo(MetaName.CEventFootStepHeard__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTacticalAnalysisNavMeshPoints__Tunables: + return new PsoStructureInfo(MetaName.CTacticalAnalysisNavMeshPoints__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BufferDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNewPosition, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenLineOfSightTests, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNearby, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSearchRadiusForNavMesh, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusForFindNearby, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithClearLineOfSight, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithoutClearLineOfSightInExteriors, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceBetweenPositionsWithoutClearLineOfSightInInteriors, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxXYDistanceForNewPosition, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNearbyToFindPerFrame, PsoDataType.SInt, 64, 0, 0) + ); + case MetaName.CTacticalAnalysisCoverPointSearch__Tunables: + return new PsoStructureInfo(MetaName.CTacticalAnalysisCoverPointSearch__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 16, 0, (MetaName)850484111), + new PsoStructureEntryInfo(MetaName.ScoreCalculationsPerFrame, PsoDataType.SInt, 48, 0, 0) + ); + case (MetaName)850484111: + return new PsoStructureInfo((MetaName)850484111, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Occupied, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Scripted, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.PointOnMap, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToBeConsideredOptimal, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToBeConsideredOptimal, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.Optimal, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTacticalAnalysisCoverPoints__Tunables: + return new PsoStructureInfo(MetaName.CTacticalAnalysisCoverPoints__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceMovedToStartSearch, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeBetweenSearches, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForSearch, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForSearch, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenLineOfSightTests, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenAttemptsToFindNearby, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenStatusUpdates, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.RadiusForFindNearby, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNearbyToFindPerFrame, PsoDataType.SInt, 48, 0, 0) + ); + case MetaName.CTacticalAnalysis__Tunables: + return new PsoStructureInfo(MetaName.CTacticalAnalysis__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BadRoute, PsoDataType.Structure, 16, 0, (MetaName)1310298123), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 40, 0, (MetaName)1230349399), + new PsoStructureEntryInfo(MetaName.MaxSpeedToActivate, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToDeactivate, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeWithNoReferences, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 76, 0, 0) + ); + case (MetaName)1310298123: + return new PsoStructureInfo((MetaName)1310298123, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ValueForUnableToFind, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForTooCloseToTarget, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForTaint, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DecayRate, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)1230349399: + return new PsoStructureInfo((MetaName)1230349399, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverPoints, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.NavMeshPoints, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Bool, 11, 0, 0), + new PsoStructureEntryInfo(MetaName.LineOfSightStatus, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ArcStatus, PsoDataType.Bool, 13, 0, 0), + new PsoStructureEntryInfo(MetaName.Reserved, PsoDataType.Bool, 14, 0, 0), + new PsoStructureEntryInfo(MetaName.Nearby, PsoDataType.Bool, 15, 0, 0), + new PsoStructureEntryInfo(MetaName.BadRouteValue, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.Reservations, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.LineOfSightTests, PsoDataType.Bool, 18, 0, 0) + ); + case MetaName.CTaskVehicleApproach__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleApproach__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceAroundClosestRoadNode, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskVehicleBlock__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleBlock__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DistanceToCapSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToStartCappingSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AdditionalSpeedCap, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceFromTargetToForceStraightLineMode, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartBackAndForth, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsOurSideToStartBackAndForth, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueBackAndForth, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartBrakeInFront, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotMovingTowardsTargetToStartBrakeInFront, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueBrakeInFront, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotMovingTowardsTargetToContinueBrakeInFront, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToStartCruiseInFront, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotMovingAwayFromTargetToStartCruiseInFront, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotTargetMovingTowardsUsToContinueCruiseInFront, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.CTaskVehicleBlockCruiseInFront__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleBlockCruiseInFront__Tunables, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Probes, PsoDataType.Structure, 16, 0, (MetaName)3985328803), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 56, 0, (MetaName)999261493), + new PsoStructureEntryInfo(MetaName.StraightLineDistance, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotForSlowdown, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForSlowdown, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForSlowdown, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMinSlowdown, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMaxSlowdown, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToAdjustSpeed, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToAdjustSpeed, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCruiseSpeedMultiplier, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCruiseSpeedMultiplier, PsoDataType.Float, 120, 0, 0) + ); + case (MetaName)3985328803: + return new PsoStructureInfo((MetaName)3985328803, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Collision, PsoDataType.Structure, 8, 0, (MetaName)1883924946) + ); + case (MetaName)1883924946: + return new PsoStructureInfo((MetaName)1883924946, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)2241187664, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)3879165256, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo((MetaName)4154217054, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinLength, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxLength, PsoDataType.Float, 24, 0, 0) + ); + case (MetaName)999261493: + return new PsoStructureInfo((MetaName)999261493, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Probe, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.ProbeResults, PsoDataType.Bool, 10, 0, 0), + new PsoStructureEntryInfo((MetaName)2932215080, PsoDataType.Bool, 11, 0, 0), + new PsoStructureEntryInfo((MetaName)1537468920, PsoDataType.Bool, 12, 0, 0) + ); + case MetaName.CTaskVehicleBlockBrakeInFront__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleBlockBrakeInFront__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeAheadForGetInPosition, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOffsetForGetInPosition, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAheadForBrake, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeAheadForBrakeOnWideRoads, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForBrake, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.FutureDistanceForMinSteerAngle, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.FutureDistanceForMaxSteerAngle, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToUseHandBrake, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToClampCruiseSpeed, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToClampCruiseSpeed, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCruiseSpeedWhenClamped, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.CTaskVehicleBlockBackAndForth__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleBlockBackAndForth__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ThrottleMultiplier, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskVehicleFlee__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleFlee__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ChancesForSwerve, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForSwerve, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToSwerve, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToSwerve, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesForHesitate, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForHesitate, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToHesitate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToHesitate, PsoDataType.Float, 44, 0, 0) + ); + case MetaName.CTaskVehicleCruiseBoat__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleCruiseBoat__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fTimeToPickNewPoint, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fDistToPickNewPoint, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fDistSearch, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskVehicleDeadDriver__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleDeadDriver__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SwerveTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.SteerAngleControl, PsoDataType.Enum, 20, 0, (MetaName)888350649), + new PsoStructureEntryInfo(MetaName.MinSteerAngle, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSteerAngle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ThrottleControl, PsoDataType.Enum, 32, 0, (MetaName)2055586340), + new PsoStructureEntryInfo(MetaName.MinThrottle, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxThrottle, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.BrakeControl, PsoDataType.Enum, 44, 0, (MetaName)3374036042), + new PsoStructureEntryInfo(MetaName.MinBrake, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBrake, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.HandBrakeControl, PsoDataType.Enum, 56, 0, (MetaName)4001255574) + ); + case MetaName.CTaskVehicleFleeBoat__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleFleeBoat__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.FleeDistance, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskVehicleCrash__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleCrash__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForWreck, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskVehicleGoToPointWithAvoidanceAutomobile__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleGoToPointWithAvoidanceAutomobile__Tunables, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TailgateDistanceMax, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TailgateIdealDistanceMin, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TailgateIdealDistanceMax, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.TailgateSpeedMultiplierMin, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TailgateSpeedMultiplierMax, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.TailgateVelocityMin, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ChanceOfPedSeeingCarFromBehind, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForAvoid, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForAvoid, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForAvoid, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForAvoid, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceForAvoidDirected, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForAvoidDirected, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceForAvoidDirected, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForAvoidDirected, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAbsDotForAvoidDirected, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForBrace, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForDive, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToConsiderDangerousDriving, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MultiplierForDangerousDriving, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToSideOnPavement, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToSideOnPavement, PsoDataType.Float, 100, 0, 0) + ); + case MetaName.CTaskVehicleGoToBoat__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleGoToBoat__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SlowdownDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.RouteArrivalDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.RouteLookAheadDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskVehicleGoToHelicopter__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleGoToHelicopter__Tunables, 0, 0, 152, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.slowDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.maxCruiseSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.maxPitchRoll, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.maxThrottle, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.leanKp, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.leanKi, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.leanKd, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKp, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKi, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKd, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKp, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKi, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKd, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.whiskerForwardTestDistance, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.whiskerForwardSpeedScale, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.whiskerLateralTestDistance, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.whiskerVerticalTestDistance, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.whiskerTestAngle, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.avoidHeadingChangeSpeed, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.avoidHeadingJump, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.avoidPitchChangeSpeed, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.avoidPitchJump, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.avoidLockDuration, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)2436197334, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)1438517312, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)444775360, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)3623227512, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3009403254, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.numHeightmapFutureSamples, PsoDataType.SInt, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.futureHeightmapSampleTime, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceXYToUseHeightMapAvoidance, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.TimesliceMinDistToTarget, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.TimesliceTimeAfterAvoidanceMs, PsoDataType.UInt, 144, 0, 0) + ); + case MetaName.CTaskVehicleGoToPlane__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleGoToPlane__Tunables, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.numFutureSamples, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.futureSampleTime, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.maxDesiredAngleYawDegrees, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.maxDesiredAnglePitchDegrees, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.maxDesiredAngleRollDegrees, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.angleToTargetDegreesToNotUseMinRadius, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.minMinDistanceForRollComputation, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.maxMinDistanceForRollComputation, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.maxYaw, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.maxPitch, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.maxRoll, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.maxThrottle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKp, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKi, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.yawKd, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.pitchKp, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.pitchKi, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.pitchKd, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.rollKp, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.rollKi, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.rollKd, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKp, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKi, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.throttleKd, PsoDataType.Float, 108, 0, 0) + ); + case MetaName.CTaskVehicleLandPlane__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleLandPlane__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeOnGroundToDrive, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.HeightToStartLanding, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.LandSlopeNoseUpMin, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.LandSlopeNoseUpMax, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskVehicleMissionBase__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleMissionBase__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToKeepEngineAndLightsOnWhileParked, PsoDataType.UInt, 16, 0, 0) + ); + case MetaName.CTaskVehicleParkNew__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleParkNew__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ParkingSpaceBlockedWaitTimePerAttempt, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ParkingSpaceBlockedMaxAttempts, PsoDataType.UByte, 20, 0, 0) + ); + case MetaName.CTaskVehiclePlaneChase__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehiclePlaneChase__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeed, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskVehiclePullAlongside__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehiclePullAlongside__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.OverlapSpeedMultiplier, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedDifference, PsoDataType.Float, 28, 0, 0) + ); + case MetaName.CTaskVehiclePursue__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehiclePursue__Tunables, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DriftX, PsoDataType.Structure, 16, 0, (MetaName)42267357), + new PsoStructureEntryInfo(MetaName.DriftY, PsoDataType.Structure, 40, 0, (MetaName)42267357), + new PsoStructureEntryInfo(MetaName.TimeToLookBehind, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToLookBehind, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedDifferenceForMinDistanceToStartMatchingSpeed, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedDifferenceForMaxDistanceToStartMatchingSpeed, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToStartMatchingSpeed, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToStartMatchingSpeed, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForBackOff, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.DotToClampSpeedToMinimum, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.DotToClampSpeedToMaximum, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.SpeedForMinimumDot, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenLineOfSightChecks, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForStraightLineModeAlways, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceForStraightLineModeIfLos, PsoDataType.Float, 112, 0, 0) + ); + case (MetaName)42267357: + return new PsoStructureInfo((MetaName)42267357, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.MinValueForCorrection, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxValueForCorrection, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRate, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskVehicleRam__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleRam__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BackOffTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBackOffDistance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxBackOffDistance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMinBackOffDistance, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseSpeedMultiplierForMaxBackOffDistance, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskVehicleShotTire__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleShotTire__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeInSwerve, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedInSwerve, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToApplyTorque, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDotToApplyTorque, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.TorqueMultiplier, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.CTaskVehicleSpinOut__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleSpinOut__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeToLookAhead, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToLookAhead, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BumperOverlapForMaxSpeed, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.BumperOverlapForMinSpeed, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.CatchUpSpeed, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BumperOverlapToBeInPosition, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSidePaddingForTurn, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TurnTime, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.InvMassScale, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.CPrioritizedClipSetRequestManager__Tunables: + return new PsoStructureInfo(MetaName.CPrioritizedClipSetRequestManager__Tunables, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.RenderDebugDraw, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.vScroll, PsoDataType.Float2, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fIndent, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxNumRequestsPerContext, PsoDataType.SInt, 32, 0, 0) + ); + case MetaName.CVehicleClipRequestHelper__Tunables: + return new PsoStructureInfo(MetaName.CVehicleClipRequestHelper__Tunables, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToScanForNearbyVehicle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToScanForNearbyVehicle, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistUpdateFrequency, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistUpdateFrequency, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistPercentageToScaleScanArc, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistScanArc, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistScanArc, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableVehicleDependencies, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableStreamedVehicleAnimRequestHelper, PsoDataType.Bool, 45, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableStreamedEntryAnims, PsoDataType.Bool, 46, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableStreamedInVehicleAnims, PsoDataType.Bool, 47, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableStreamedEntryVariationAnims, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.StreamConnectedSeatAnims, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo(MetaName.StreamInVehicleAndEntryAnimsTogether, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo(MetaName.StreamEntryAndInVehicleAnimsTogether, PsoDataType.Bool, 51, 0, 0) + ); + case MetaName.CTaskInVehicleBasic__Tunables: + return new PsoStructureInfo(MetaName.CTaskInVehicleBasic__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.fSecondsInAirBeforePassengerComment, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.CTaskPlayerDrive__Tunables: + return new PsoStructureInfo(MetaName.CTaskPlayerDrive__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.StealthNoisePeriodMS, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthSpeedThresholdLow, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthSpeedThresholdHigh, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.StealthVehicleTypeFactorBicycles, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPlayerJumpOutSpeedBike, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPlayerJumpOutSpeedCar, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenAddingDangerousVehicleEvents, PsoDataType.Float, 40, 0, 0) + ); + case MetaName.CTaskCarReactToVehicleCollision__Tunables: + return new PsoStructureInfo(MetaName.CTaskCarReactToVehicleCollision__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.SlowDown, PsoDataType.Structure, 16, 0, (MetaName)3933935552), + new PsoStructureEntryInfo(MetaName.MaxDamageToIgnore, PsoDataType.Float, 56, 0, 0) + ); + case (MetaName)3933935552: + return new PsoStructureInfo((MetaName)3933935552, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.MinTimeToReact, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToReact, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxCruiseSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToHonk, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToHonkHeldDown, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ChancesToFlipOff, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTime, PsoDataType.Float, 36, 0, 0) + ); + case MetaName.CTaskEnterVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskEnterVehicle__Tunables, 0, 0, 408, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.UseCombatEntryForAiJack, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableJackRateOverride, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableDoorHandleArmIk, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableBikeHandleArmIk, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableSeatBoneArmIk, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTagSyncIntoAlign, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableMoverFixups, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableBikePickPullUpOffsetScale, PsoDataType.Bool, 23, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableNewBikeEntry, PsoDataType.Bool, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ForcedDoorHandleArmIk, PsoDataType.Bool, 25, 0, 0), + new PsoStructureEntryInfo(MetaName.IgnoreRotationBlend, PsoDataType.Bool, 26, 0, 0), + new PsoStructureEntryInfo(MetaName.EnableBikePickUpAlign, PsoDataType.Bool, 27, 0, 0), + new PsoStructureEntryInfo((MetaName)192421777, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)509809270, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.BikePickUpAlignBlendDuration, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.GetInRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinMagForBikeToBeOnSide, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DistanceToEvaluateDoors, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendDuration, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.NetworkBlendDurationOpenDoorCombat, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpenSteps, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpen, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorOpenCombat, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.DoorRatioToConsiderDoorClosed, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.DistToEntryToAllowForcedActionMode, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.VaultDepth, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.VaultHorizClearance, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.VaultVertClearance, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseStart, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseEnd, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseStart, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseEnd, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseStart, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseEnd, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseStart, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseEnd, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPickUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftPullUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPickUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseStartBicycle, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.RightPullUpTargetLerpPhaseEndBicycle, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo((MetaName)3408785399, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoor, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoorCombat, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToAbortOpenDoorPlayer, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoor, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoorCombat, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToRagdollOpenDoorPlayer, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackRate, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeEnterForce, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleEnterForce, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.FastEnterExitRate, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRearDoorOpenRatio, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInitialOutside, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorOutside, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOscillationDisplacementOutside, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInitialInside, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOpenRatioForOpenDoorInside, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOscillationDisplacementInside, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeEnterLeanAngleOvershootAmt, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeEnterLeanAngleOvershootRate, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToCheckEntryCollisionWhenIgnoring, PsoDataType.Float, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.CombatEntryBlendDuration, PsoDataType.Float, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToReactToJackForGoToDoor, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeWarpSP, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeWarpMP, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStreamClipSetInBeforeSkippingCloseDoor, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStreamShuffleClipSetInBeforeWarp, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.ClimbAlignTolerance, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenDoorChecks, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.UseSlowInOut, PsoDataType.Bool, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.OpenDoorBlendDurationFromNormalAlign, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.OpenDoorBlendDurationFromOnVehicleAlign, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.OpenDoorToJackBlendDuration, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.GroupMemberWaitMinTime, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.GroupMemberSlowDownDistance, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.GroupMemberWalkCloseDistance, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.GroupMemberWaitDistance, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.SecondsBeforeWarpToLeader, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo((MetaName)119275101, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo((MetaName)2217815195, PsoDataType.UInt, 312, 0, 0), + new PsoStructureEntryInfo(MetaName.DurationHeldDownEnterButtonToJackFriendly, PsoDataType.UInt, 316, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackAlivePedFromOutsideClipId, PsoDataType.String, 320, 7, 0), + new PsoStructureEntryInfo((MetaName)3431653792, PsoDataType.String, 324, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromOutsideClipId, PsoDataType.String, 328, 7, 0), + new PsoStructureEntryInfo((MetaName)1983954745, PsoDataType.String, 332, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackAlivePedFromWaterClipId, PsoDataType.String, 336, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromWaterClipId, PsoDataType.String, 340, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackPedFromOnVehicleClipId, PsoDataType.String, 344, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedFromOnVehicleClipId, PsoDataType.String, 348, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackPedOnVehicleIntoWaterClipId, PsoDataType.String, 352, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJackDeadPedOnVehicleIntoWaterClipId, PsoDataType.String, 356, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultClimbUpClipId, PsoDataType.String, 360, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultClimbUpNoDoorClipId, PsoDataType.String, 364, 7, 0), + new PsoStructureEntryInfo((MetaName)1857752806, PsoDataType.String, 368, 7, 0), + new PsoStructureEntryInfo((MetaName)536807372, PsoDataType.String, 372, 7, 0), + new PsoStructureEntryInfo((MetaName)298521545, PsoDataType.String, 376, 7, 0), + new PsoStructureEntryInfo((MetaName)3045129247, PsoDataType.String, 380, 7, 0), + new PsoStructureEntryInfo((MetaName)2509236171, PsoDataType.String, 384, 7, 0), + new PsoStructureEntryInfo((MetaName)939217889, PsoDataType.String, 388, 7, 0), + new PsoStructureEntryInfo((MetaName)3905015036, PsoDataType.String, 392, 7, 0), + new PsoStructureEntryInfo((MetaName)3309036906, PsoDataType.String, 396, 7, 0), + new PsoStructureEntryInfo((MetaName)3854657159, PsoDataType.Bool, 400, 0, 0), + new PsoStructureEntryInfo((MetaName)1405627810, PsoDataType.Bool, 401, 0, 0), + new PsoStructureEntryInfo((MetaName)2067860370, PsoDataType.Float, 404, 0, 0) + ); + case MetaName.CTaskEnterVehicleAlign__Tunables: + return new PsoStructureInfo(MetaName.CTaskEnterVehicleAlign__Tunables, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.UseAttachDuringAlign, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.RenderDebugToTTY, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.ApplyRotationScaling, PsoDataType.Bool, 18, 0, 0), + new PsoStructureEntryInfo(MetaName.ApplyTranslationScaling, PsoDataType.Bool, 19, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableRotationOvershootCheck, PsoDataType.Bool, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableTranslationOvershootCheck, PsoDataType.Bool, 21, 0, 0), + new PsoStructureEntryInfo(MetaName.ReverseLeftFootAlignAnims, PsoDataType.Bool, 22, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceStandEnterOnly, PsoDataType.Bool, 23, 0, 0), + new PsoStructureEntryInfo(MetaName.TranslationChangeRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.RotationChangeRate, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultAlignRate, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.FastAlignRate, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.CombatAlignRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ActionCombatAlignRate, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.StandAlignMaxDist, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.AlignSuccessMaxDist, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultAlignStartFixupPhase, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultAlignEndFixupPhase, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadiusForOrientatedAlignWalk, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.TargetRadiusForOrientatedAlignRun, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRotationalSpeedScale, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotationalSpeedScale, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRotationalSpeed, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTranslationalScale, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTranslationalScale, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTranslationalStandSpeed, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTranslationalMoveSpeed, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.HeadingReachedTolerance, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.StdVehicleMinPhaseToStartRotFixup, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeVehicleMinPhaseToStartRotFixup, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.VaultExtraZGroundTest, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSqdDistToSetPos, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistAwayFromEntryPointToConsiderFinished, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPedFwdToEntryDotToClampInitialOrientation, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistToAlwaysClampInitialOrientation, PsoDataType.Float, 128, 0, 0) + ); + case MetaName.CTaskOpenVehicleDoorFromOutside__Tunables: + return new PsoStructureInfo(MetaName.CTaskOpenVehicleDoorFromOutside__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EnableOpenDoorHandIk, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorStartPhase, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorEndPhase, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorStartIkPhase, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorEndIkPhase, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendWeightToUseHighClipEvents, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHandleHeightDiffVan, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHandleHeightDiffVan, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHandleHeightDiff, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultOpenDoorClipId, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo(MetaName.HighOpenDoorClipId, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo(MetaName.CombatOpenDoorClipId, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultTryLockedDoorClipId, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultForcedEntryClipId, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo((MetaName)26377711, PsoDataType.String, 76, 7, 0) + ); + case MetaName.CTaskCloseVehicleDoorFromInside__Tunables: + return new PsoStructureInfo(MetaName.CTaskCloseVehicleDoorFromInside__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.EnableCloseDoorHandIk, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultCloseDoorStartPhase, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultCloseDoorEndPhase, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultCloseDoorStartIkPhase, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultCloseDoorEndIkPhase, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinBlendWeightToUseFarClipEvents, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.CloseDoorForceMultiplier, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.VehicleSpeedToAbortCloseDoor, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.PedTestXOffset, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.PedTestYOffset, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.PedTestZStartOffset, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.PedTestZOffset, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.PedTestRadius, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinOpenDoorRatioToUseArmIk, PsoDataType.Float, 68, 0, 0) + ); + case MetaName.CTaskEnterVehicleSeat__Tunables: + return new PsoStructureInfo(MetaName.CTaskEnterVehicleSeat__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinVelocityToRagdollPed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVelocityToEnterBike, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetInClipId, PsoDataType.String, 24, 7, 0), + new PsoStructureEntryInfo(MetaName.GetOnQuickClipId, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo(MetaName.GetInFromWaterClipId, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.GetInStandOnClipId, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.GetInCombatClipId, PsoDataType.String, 40, 7, 0) + ); + case MetaName.CTaskExitVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskExitVehicle__Tunables, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TimeSinceLastSpottedToLeaveEngineOn, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.BeJackedBlendInDuration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleBlendInDuration, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.ThroughWindScreenBlendInDuration, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleBlendOutDuration, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleUnderWaterBlendOutDuration, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitVehicleAttempToFireBlendOutDuration, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeExitVehicleBlendOutDuration, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.LeaderExitVehicleDistance, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitProbeDistance, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.ExitDistance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.RearExitSideOffset, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelocityToRagdollPed, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToReserveComponentBeforeWarp, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraOffsetForGroundCheck, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.JumpOutofSubNeutralBuoyancyTime, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultClimbDownClipId, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultClimbDownNoDoorClipId, PsoDataType.String, 84, 7, 0) + ); + case MetaName.CTaskExitVehicleSeat__Tunables: + return new PsoStructureInfo(MetaName.CTaskExitVehicleSeat__Tunables, 0, 0, 232, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)3909498748, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.AdditionalWindscreenRagdollForceFwd, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.AdditionalWindscreenRagdollForceUp, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.SkyDiveProbeDistance, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirProbeDistance, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.ArrestProbeDistance, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.InWaterExitDepth, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.InWaterExitProbeLength, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeVelocityToUseAnimatedJumpOff, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleVelocityToUseAnimatedJumpOff, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutBlendDuration, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutNoWindBlendDuration, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeForArrestBreakout, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.ThroughWindscreenDamagePlayer, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.ThroughWindscreenDamageAi, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultCrashExitOnSideClipId, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedFromOutsideClipId, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo((MetaName)2529144140, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedFromOutsideClipId, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo((MetaName)3459414413, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedFromWaterClipId, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedFromWaterClipId, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedOnVehicleClipId, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedOnVehicleClipId, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedAlivePedOnVehicleIntoWaterClipId, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultBeJackedDeadPedOnVehicleIntoWaterClipId, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultFleeExitClipId, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutClipId, PsoDataType.String, 124, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutToWaterClipId, PsoDataType.String, 128, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutOnToVehicleClipId, PsoDataType.String, 132, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultGetOutNoWingId, PsoDataType.String, 136, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultJumpOutClipId, PsoDataType.String, 140, 7, 0), + new PsoStructureEntryInfo(MetaName.DeadFallOutClipId, PsoDataType.String, 144, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)609992288), + new PsoStructureEntryInfo(MetaName.ExitToAimClipSets, PsoDataType.Array, 152, 0, (MetaName)34), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3736014569), + new PsoStructureEntryInfo(MetaName.ExitToAimVehicleInfos, PsoDataType.Array, 168, 0, (MetaName)36), + new PsoStructureEntryInfo(MetaName.BikeExitForce, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.RagdollIntoWaterVelocity, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundFixupHeight, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundFixupHeightLarge, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundFixupHeightLargeOffset, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundFixupHeightBoatInWaterInitial, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundFixupHeightBoatInWater, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.ExtraWaterZGroundFixup, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeExitExtraRotationSpeed, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.FleeExitExtraTranslationSpeed, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo((MetaName)1345368814, PsoDataType.String, 224, 7, 0), + new PsoStructureEntryInfo((MetaName)1495472466, PsoDataType.String, 228, 7, 0) + ); + case (MetaName)609992288: + return new PsoStructureInfo((MetaName)609992288, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Clips, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case (MetaName)3736014569: + return new PsoStructureInfo((MetaName)3736014569, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1118518303), + new PsoStructureEntryInfo(MetaName.Seats, PsoDataType.Array, 16, 0, (MetaName)1) + ); + case (MetaName)1118518303: + return new PsoStructureInfo((MetaName)1118518303, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ExitToAimClipsName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.OneHandedClipSetName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.TwoHandedClipSetName, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo(MetaName.SeatPosition, PsoDataType.Enum, 20, 0, (MetaName)894416699) + ); + case MetaName.CTaskReactToBeingAskedToLeaveVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskReactToBeingAskedToLeaveVehicle__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToWatchVehicle, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToWatchVehicle, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskRideTrain__Tunables: + return new PsoStructureInfo(MetaName.CTaskRideTrain__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayForGetOff, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayForGetOff, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxWaitSeconds, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskTrainBase__Tunables: + return new PsoStructureInfo(MetaName.CTaskTrainBase__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TargetRadius, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.CompletionRadius, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowDownDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskTryToGrabVehicleDoor__Tunables: + return new PsoStructureInfo(MetaName.CTaskTryToGrabVehicleDoor__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinGrabTime, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxGrabTime, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHandToHandleDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CTaskVehicleFSM__Tunables: + return new PsoStructureInfo(MetaName.CTaskVehicleFSM__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.AllowEntryToMPWarpInSeats, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ForceStreamingFailure, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.PushAngleDotTolerance, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.TowardsDoorPushAngleDotTolerance, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DeadZoneAnyInputDirection, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DisallowGroundProbeVelocity, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPedSpeedToActivateRagdoll, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPhysSpeedToActivateRagdoll, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHoverHeightDistToWarpIntoHeli, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToConsiderPedGoingToDoorPriority, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeToConsiderPedGoingToDoorPriority, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistToConsiderPedGoingToDoorPriority, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)1835160785, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)1964009554, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2552082535, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)3034610967, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeToConsiderEnterInputValid, PsoDataType.UInt, 76, 0, 0) + ); + case MetaName.CTaskMotionInVehicle__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionInVehicle__Tunables, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.DisableCloseDoor, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3306188437, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedForVehicleToBeConsideredStillSqr, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOut, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOutPlayerSP, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.VelocityDeltaThrownOutPlayerMP, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRateForInVehicleAnims, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRateForInVehicleAnims, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.HeavyBrakeYAcceleration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MinRatioForClosingDoor, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirZAccelTrigger, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirProbeDistance, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.InAirProbeForwardOffset, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitchDefault, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchDefault, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitchInAir, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchInAir, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultPitchSmoothingRate, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.BikePitchSmoothingRate, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.BikePitchSmoothingPassengerRate, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieAccelerateControlThreshold, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieMaxSpeedThreshold, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieUpDownControlThreshold, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieDesiredLeanAngleTol, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.StillAccTol, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.StillPitchAngleTol, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationSmoothing, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationSmoothingBike, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationScaleBike, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInCurrentStateForStill, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.AccelerationToStartLeaning, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.ZAccelerationToStartLeaning, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAccelerationForLean, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxXYAccelerationForLeanBike, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZAccelerationForLeanBike, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.StillDelayTime, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.ShuntAccelerateMag, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.ShuntAccelerateMagBike, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInShuntStateBeforeRestart, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAbsThrottleForCloseDoor, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVehSpeedToConsiderClosingDoor, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDoorSpeedToConsiderClosingDoor, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVehVelocityToGoThroughWindscreen, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVehVelocityToGoThroughWindscreenMP, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxZComponentForCollisionNormal, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeStreamInVehicleClipSetBeforeStartingEngine, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo((MetaName)599372255, PsoDataType.UInt, 200, 0, 0) + ); + case MetaName.CTaskMotionInAutomobile__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionInAutomobile__Tunables, 0, 0, 536, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.TestLowLodIdle, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3645563068, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2286839301, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInHornState, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxVelocityForSitIdles, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSteeringAngleForSitIdles, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MinCentredSteeringAngleTimeForSitIdles, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingRateMin, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingRateMax, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleSmoothingAcc, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleMinAccAngle, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanSidewaysAngleMaxAccAngle, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftRightStickInputSmoothingRate, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.LeftRightStickInputMin, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanForwardsAngleSmoothingRate, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.UpDownStickInputSmoothingRate, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.UpDownStickInputMin, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.ZAccForLowImpact, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.ZAccForMedImpact, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.ZAccForHighImpact, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.UseLegIkOnBikes, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.LargeVerticalAccelerationDelta, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.NumFramesToPersistLargeVerticalAcceleration, PsoDataType.SInt, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.LowLodIdleClipSetId, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.SeatDisplacementSmoothingRateDriver, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.SeatDisplacementSmoothingRatePassenger, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)3038905403, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.StartEngineForce, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlope, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlope, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlopeBalance, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlopeBalance, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeInWheelieToEnforceMinPitch, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchWheelieBalance, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchWheelieBalance, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchWheelieBegin, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowFastSpeedThreshold, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlowSpeed, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlowSpeed, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchFastSpeed, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchFastSpeed, PsoDataType.Float, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowApproachRate, PsoDataType.Float, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.FastApproachRate, PsoDataType.Float, 184, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieApproachRate, PsoDataType.Float, 188, 0, 0), + new PsoStructureEntryInfo(MetaName.NewLeanSteerApproachRate, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenCloseDoorAttempts, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo(MetaName.ShuntDamageMultiplierAI, PsoDataType.Float, 200, 0, 0), + new PsoStructureEntryInfo(MetaName.ShuntDamageMultiplierPlayer, PsoDataType.Float, 204, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenToApplyDamageAI, PsoDataType.Float, 208, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageTakenToApplyDamagePlayer, PsoDataType.Float, 212, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInTaskToCheckForDamage, PsoDataType.Float, 216, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDamageToCheckForRandomDeath, PsoDataType.Float, 220, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDamageToCheckForRandomDeath, PsoDataType.Float, 224, 0, 0), + new PsoStructureEntryInfo(MetaName.MinHeavyCrashDeathChance, PsoDataType.Float, 228, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxHeavyCrashDeathChance, PsoDataType.Float, 232, 0, 0), + new PsoStructureEntryInfo(MetaName.SteeringDeadZoneCentreTimeMS, PsoDataType.UInt, 236, 0, 0), + new PsoStructureEntryInfo(MetaName.SteeringDeadZoneTimeMS, PsoDataType.UInt, 240, 0, 0), + new PsoStructureEntryInfo(MetaName.SteeringDeadZone, PsoDataType.Float, 244, 0, 0), + new PsoStructureEntryInfo(MetaName.SteeringChangeToStartProcessMoveSignals, PsoDataType.Float, 248, 0, 0), + new PsoStructureEntryInfo(MetaName.SteeringChangeToStopProcessMoveSignals, PsoDataType.Float, 252, 0, 0), + new PsoStructureEntryInfo(MetaName.SeatBlendLinSpeed, PsoDataType.Float, 256, 0, 0), + new PsoStructureEntryInfo(MetaName.SeatBlendAngSpeed, PsoDataType.Float, 260, 0, 0), + new PsoStructureEntryInfo(MetaName.HoldLegOutVelocity, PsoDataType.Float, 264, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelStillStart, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.MinVelStillStop, PsoDataType.Float, 272, 0, 0), + new PsoStructureEntryInfo(MetaName.ForcedLegUpVelocity, PsoDataType.Float, 276, 0, 0), + new PsoStructureEntryInfo(MetaName.BurnOutBlendInTol, PsoDataType.Float, 280, 0, 0), + new PsoStructureEntryInfo(MetaName.BurnOutBlendInSpeed, PsoDataType.Float, 284, 0, 0), + new PsoStructureEntryInfo(MetaName.BurnOutBlendOutSpeed, PsoDataType.Float, 288, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeInAirDriveToStandUpTimeMin, PsoDataType.Float, 292, 0, 0), + new PsoStructureEntryInfo(MetaName.BikeInAirDriveToStandUpTimeMax, PsoDataType.Float, 296, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSpeedToBlendInDriveFastFacial, PsoDataType.Float, 300, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDisplacementScale, PsoDataType.Float, 304, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplacementScaleApproachRateIn, PsoDataType.Float, 308, 0, 0), + new PsoStructureEntryInfo(MetaName.DisplacementScaleApproachRateOut, PsoDataType.Float, 312, 0, 0), + new PsoStructureEntryInfo((MetaName)640640576, PsoDataType.Float, 316, 0, 0), + new PsoStructureEntryInfo((MetaName)445721091, PsoDataType.Float, 320, 0, 0), + new PsoStructureEntryInfo((MetaName)2001571571, PsoDataType.Float, 324, 0, 0), + new PsoStructureEntryInfo((MetaName)1295618163, PsoDataType.Float, 328, 0, 0), + new PsoStructureEntryInfo((MetaName)622968896, PsoDataType.Float, 332, 0, 0), + new PsoStructureEntryInfo((MetaName)2029080904, PsoDataType.Float, 336, 0, 0), + new PsoStructureEntryInfo((MetaName)2895820001, PsoDataType.Float, 340, 0, 0), + new PsoStructureEntryInfo((MetaName)3604323696, PsoDataType.Float, 344, 0, 0), + new PsoStructureEntryInfo((MetaName)2175428814, PsoDataType.Float, 348, 0, 0), + new PsoStructureEntryInfo((MetaName)346108670, PsoDataType.Float, 352, 0, 0), + new PsoStructureEntryInfo((MetaName)3123171906, PsoDataType.Float, 356, 0, 0), + new PsoStructureEntryInfo((MetaName)3193879405, PsoDataType.Float, 360, 0, 0), + new PsoStructureEntryInfo((MetaName)1771118662, PsoDataType.Float, 364, 0, 0), + new PsoStructureEntryInfo((MetaName)1104842114, PsoDataType.Float, 368, 0, 0), + new PsoStructureEntryInfo((MetaName)2239621028, PsoDataType.UInt, 372, 0, 0), + new PsoStructureEntryInfo((MetaName)7898446, PsoDataType.UInt, 376, 0, 0), + new PsoStructureEntryInfo((MetaName)56684479, PsoDataType.UInt, 380, 0, 0), + new PsoStructureEntryInfo((MetaName)345487015, PsoDataType.UInt, 384, 0, 0), + new PsoStructureEntryInfo(MetaName.StartEngineClipId, PsoDataType.String, 388, 7, 0), + new PsoStructureEntryInfo((MetaName)2195918560, PsoDataType.String, 392, 7, 0), + new PsoStructureEntryInfo(MetaName.HotwireClipId, PsoDataType.String, 396, 7, 0), + new PsoStructureEntryInfo((MetaName)1348667163, PsoDataType.String, 400, 7, 0), + new PsoStructureEntryInfo(MetaName.PutOnHelmetClipId, PsoDataType.String, 404, 7, 0), + new PsoStructureEntryInfo((MetaName)1430534928, PsoDataType.String, 408, 7, 0), + new PsoStructureEntryInfo((MetaName)1851449258, PsoDataType.String, 412, 7, 0), + new PsoStructureEntryInfo((MetaName)2091354753, PsoDataType.String, 416, 7, 0), + new PsoStructureEntryInfo((MetaName)1023392893, PsoDataType.String, 420, 7, 0), + new PsoStructureEntryInfo((MetaName)2273702662, PsoDataType.String, 424, 7, 0), + new PsoStructureEntryInfo(MetaName.ChangeStationClipId, PsoDataType.String, 428, 7, 0), + new PsoStructureEntryInfo(MetaName.StillToSitClipId, PsoDataType.String, 432, 7, 0), + new PsoStructureEntryInfo(MetaName.SitToStillClipId, PsoDataType.String, 436, 7, 0), + new PsoStructureEntryInfo(MetaName.BurnOutClipId, PsoDataType.String, 440, 7, 0), + new PsoStructureEntryInfo((MetaName)1920935636, PsoDataType.String, 444, 7, 0), + new PsoStructureEntryInfo(MetaName.BikeHornClipId, PsoDataType.String, 448, 7, 0), + new PsoStructureEntryInfo((MetaName)4017603423, PsoDataType.String, 452, 7, 0), + new PsoStructureEntryInfo((MetaName)1797630730, PsoDataType.Float, 456, 0, 0), + new PsoStructureEntryInfo((MetaName)2658529211, PsoDataType.Float, 460, 0, 0), + new PsoStructureEntryInfo((MetaName)3474960988, PsoDataType.Float, 464, 0, 0), + new PsoStructureEntryInfo((MetaName)3061913457, PsoDataType.Float, 468, 0, 0), + new PsoStructureEntryInfo((MetaName)2713284751, PsoDataType.Float, 472, 0, 0), + new PsoStructureEntryInfo((MetaName)2044390676, PsoDataType.Float, 476, 0, 0), + new PsoStructureEntryInfo((MetaName)137806659, PsoDataType.Float, 480, 0, 0), + new PsoStructureEntryInfo((MetaName)402428981, PsoDataType.Float, 484, 0, 0), + new PsoStructureEntryInfo((MetaName)1039484179, PsoDataType.Float, 488, 0, 0), + new PsoStructureEntryInfo((MetaName)342194320, PsoDataType.Float, 492, 0, 0), + new PsoStructureEntryInfo((MetaName)2083391331, PsoDataType.Float, 496, 0, 0), + new PsoStructureEntryInfo((MetaName)2714021858, PsoDataType.Float, 500, 0, 0), + new PsoStructureEntryInfo((MetaName)2266547610, PsoDataType.Float, 504, 0, 0), + new PsoStructureEntryInfo((MetaName)1896779219, PsoDataType.Float, 508, 0, 0), + new PsoStructureEntryInfo((MetaName)1233910025, PsoDataType.Float, 512, 0, 0), + new PsoStructureEntryInfo((MetaName)1743777174, PsoDataType.Float, 516, 0, 0), + new PsoStructureEntryInfo((MetaName)868848233, PsoDataType.Float, 520, 0, 0), + new PsoStructureEntryInfo((MetaName)1182962200, PsoDataType.Float, 524, 0, 0), + new PsoStructureEntryInfo((MetaName)1798674235, PsoDataType.Float, 528, 0, 0), + new PsoStructureEntryInfo((MetaName)647907606, PsoDataType.Float, 532, 0, 0) + ); + case MetaName.CTaskMotionOnBicycle__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionOnBicycle__Tunables, 0, 0, 224, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.LeanAngleSmoothingRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.StillToSitPedalGearApproachRate, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.PedalGearApproachRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinXYVelForWantsToMove, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForStill, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedForStillReverse, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxThrottleForStill, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultPedalToFreewheelBlendDuration, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.SlowPedalToFreewheelBlendDuration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxRateForSlowBlendDuration, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.StillToSitLeanRate, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.StillToSitApproachRate, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.UpHillMinPitchToStandUp, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.DownHillMinPitchToStandUp, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInStandState, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1621924028, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.MinSprintResultToStand, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeSinceShiftedWeightForwardToAllowWheelie, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieShiftThreshold, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.MinPitchDefault, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchDefault, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForwardsPitchSlope, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxForwardsPitchSlope, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.OnSlopeThreshold, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxJumpHeightForSmallImpact, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRateSlope, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRate, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.LongitudinalBodyLeanApproachRateSlow, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.SideZoneThreshold, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.ReturnZoneThreshold, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxYIntentionToUseSlowApproach, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeToStayUprightAfterImpact, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultSitToStandBlendDuration, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieSitToStandBlendDuration, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.WheelieStickPullBackMinIntention, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeSinceNotWantingToTrackStandToAllowStillTransition, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInSitToStillStateToReverse, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.PreventDirectTransitionToReverseFromSit, PsoDataType.Bool, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultSmallImpactCharClipId, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultImpactCharClipId, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultSmallImpactBikeClipId, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo(MetaName.DefaultImpactBikeClipId, PsoDataType.String, 180, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillSmallImpactCharClipId, PsoDataType.String, 184, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillImpactCharClipId, PsoDataType.String, 188, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillSmallImpactBikeClipId, PsoDataType.String, 192, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillImpactBikeClipId, PsoDataType.String, 196, 7, 0), + new PsoStructureEntryInfo(MetaName.SitToStillCharClipId, PsoDataType.String, 200, 7, 0), + new PsoStructureEntryInfo(MetaName.SitToStillBikeClipId, PsoDataType.String, 204, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandToStillLeftCharClipId, PsoDataType.String, 208, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandToStillLeftBikeClipId, PsoDataType.String, 212, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandToStillRightCharClipId, PsoDataType.String, 216, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandToStillRightBikeClipId, PsoDataType.String, 220, 7, 0) + ); + case MetaName.CTaskMotionOnBicycleController__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionOnBicycleController__Tunables, 0, 0, 184, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInStateToAllowTransitionFromFixieSkid, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeStillToTransitionToTrackStand, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInPedalState, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeInFreewheelState, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAiSpeedForStandingUp, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToTriggerTrackStandTransition, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxSpeedToTriggerFixieSkidTransition, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.CruiseDuckPrepLeftCharClipId, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.CruiseDuckPrepRightCharClipId, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.CruiseDuckPrepLeftBikeClipId, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo(MetaName.CruiseDuckPrepRightBikeClipId, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo(MetaName.FastDuckPrepLeftCharClipId, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo(MetaName.FastDuckPrepRightCharClipId, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.FastDuckPrepLeftBikeClipId, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.FastDuckPrepRightBikeClipId, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.LaunchLeftCharClipId, PsoDataType.String, 76, 7, 0), + new PsoStructureEntryInfo(MetaName.LaunchRightCharClipId, PsoDataType.String, 80, 7, 0), + new PsoStructureEntryInfo(MetaName.LaunchLeftBikeClipId, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.LaunchRightBikeClipId, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandLeftCharClipId, PsoDataType.String, 92, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandRightCharClipId, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandLeftBikeClipId, PsoDataType.String, 100, 7, 0), + new PsoStructureEntryInfo(MetaName.TrackStandRightBikeClipId, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidLeftCharClip0Id, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidLeftCharClip1Id, PsoDataType.String, 112, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidRightCharClip0Id, PsoDataType.String, 116, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidRightCharClip1Id, PsoDataType.String, 120, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidLeftBikeClip0Id, PsoDataType.String, 124, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidLeftBikeClip1Id, PsoDataType.String, 128, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidRightBikeClip0Id, PsoDataType.String, 132, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidRightBikeClip1Id, PsoDataType.String, 136, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceLeftCharClip1Id, PsoDataType.String, 140, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceRightCharClip1Id, PsoDataType.String, 144, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceLeftBikeClip1Id, PsoDataType.String, 148, 7, 0), + new PsoStructureEntryInfo(MetaName.FixieSkidToBalanceRightBikeClip1Id, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo(MetaName.CruisePedalCharClipId, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo(MetaName.InAirFreeWheelCharClipId, PsoDataType.String, 160, 7, 0), + new PsoStructureEntryInfo(MetaName.InAirFreeWheelBikeClipId, PsoDataType.String, 164, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillInAirFreeWheelCharClipId, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo(MetaName.DownHillInAirFreeWheelBikeClipId, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo(MetaName.TuckFreeWheelToTrackStandRightCharClipId, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo(MetaName.TuckFreeWheelToTrackStandRightBikeClipId, PsoDataType.String, 180, 7, 0) + ); + case MetaName.CBikeLeanAngleHelper__Tunables: + return new PsoStructureInfo(MetaName.CBikeLeanAngleHelper__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.UseReturnOvershoot, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.UseInitialLeanForcing, PsoDataType.Bool, 17, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredLeanAngleTolToBringLegIn, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredSpeedToBringLegIn, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredLeanAngleRate, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredLeanAngleRateQuad, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanAngleReturnRate, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanAngleDefaultRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanAngleDefaultRatePassenger, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.DesiredOvershootLeanAngle, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.LeanAngleReturnedTol, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.HasStickInputThreshold, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.LeaningExtremeThreshold, PsoDataType.Float, 60, 0, 0) + ); + case MetaName.CTaskMotionInTurret__Tunables: + return new PsoStructureInfo(MetaName.CTaskMotionInTurret__Tunables, 0, 0, 248, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)4093217060, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)4102381397, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2540703340, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3512769803, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo((MetaName)171275597, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)2073783636, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)1235675432, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)2737439830, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)1027124968, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2183745831, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3114603561, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)943989780, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2556074717, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1811862646, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)216639291, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)1460193378, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)3098186043, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)1012095486, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)1934656831, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)2982819675, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)2624331049, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo((MetaName)1324859893, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo((MetaName)1057562451, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo((MetaName)1546988642, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo((MetaName)3067513344, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo((MetaName)1707713717, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo((MetaName)2395321832, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)1059545904, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)3062906436, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo((MetaName)2949666078, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo((MetaName)705780320, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo((MetaName)459162028, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo((MetaName)1797630730, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo((MetaName)1465756410, PsoDataType.String, 148, 7, 0), + new PsoStructureEntryInfo((MetaName)1144665981, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo((MetaName)790728667, PsoDataType.String, 156, 7, 0), + new PsoStructureEntryInfo((MetaName)2997429282, PsoDataType.String, 160, 7, 0), + new PsoStructureEntryInfo((MetaName)2148334725, PsoDataType.String, 164, 7, 0), + new PsoStructureEntryInfo((MetaName)356569692, PsoDataType.String, 168, 7, 0), + new PsoStructureEntryInfo((MetaName)2567235955, PsoDataType.String, 172, 7, 0), + new PsoStructureEntryInfo((MetaName)3042448153, PsoDataType.String, 176, 7, 0), + new PsoStructureEntryInfo(MetaName.TurnLeftSlowClipId, PsoDataType.String, 180, 7, 0), + new PsoStructureEntryInfo(MetaName.TurnLeftFastClipId, PsoDataType.String, 184, 7, 0), + new PsoStructureEntryInfo((MetaName)1206230540, PsoDataType.String, 188, 7, 0), + new PsoStructureEntryInfo((MetaName)3713053450, PsoDataType.String, 192, 7, 0), + new PsoStructureEntryInfo((MetaName)2463362878, PsoDataType.String, 196, 7, 0), + new PsoStructureEntryInfo((MetaName)3874294070, PsoDataType.String, 200, 7, 0), + new PsoStructureEntryInfo(MetaName.TurnRightSlowClipId, PsoDataType.String, 204, 7, 0), + new PsoStructureEntryInfo(MetaName.TurnRightFastClipId, PsoDataType.String, 208, 7, 0), + new PsoStructureEntryInfo((MetaName)1611862735, PsoDataType.String, 212, 7, 0), + new PsoStructureEntryInfo((MetaName)413072568, PsoDataType.String, 216, 7, 0), + new PsoStructureEntryInfo((MetaName)1114189303, PsoDataType.String, 220, 7, 0), + new PsoStructureEntryInfo((MetaName)531096295, PsoDataType.String, 224, 7, 0), + new PsoStructureEntryInfo((MetaName)2077576253, PsoDataType.String, 228, 7, 0), + new PsoStructureEntryInfo((MetaName)3278999439, PsoDataType.String, 232, 7, 0), + new PsoStructureEntryInfo((MetaName)4038706223, PsoDataType.String, 236, 7, 0), + new PsoStructureEntryInfo((MetaName)1558752243, PsoDataType.String, 240, 7, 0), + new PsoStructureEntryInfo((MetaName)4031618294, PsoDataType.String, 244, 7, 0) + ); + case MetaName.CWanted__Tunables: + return new PsoStructureInfo(MetaName.CWanted__Tunables, 0, 0, 2696, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.WantedClean, PsoDataType.Structure, 16, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.WantedLevel1, PsoDataType.Structure, 128, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.WantedLevel2, PsoDataType.Structure, 240, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.WantedLevel3, PsoDataType.Structure, 352, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.WantedLevel4, PsoDataType.Structure, 464, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.WantedLevel5, PsoDataType.Structure, 576, 0, MetaName.CWanted__Tunables__WantedLevel), + new PsoStructureEntryInfo(MetaName.Difficulty, PsoDataType.Structure, 688, 0, (MetaName)2685546187), + new PsoStructureEntryInfo(MetaName.Rendering, PsoDataType.Structure, 2640, 0, (MetaName)1581603972), + new PsoStructureEntryInfo(MetaName.Timers, PsoDataType.Structure, 2656, 0, (MetaName)4245193745), + new PsoStructureEntryInfo(MetaName.MaxTimeTargetVehicleMoving, PsoDataType.UInt, 2672, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultAmnestyTime, PsoDataType.UInt, 2676, 0, 0), + new PsoStructureEntryInfo(MetaName.DefaultHiddenEvasionTimeReduction, PsoDataType.UInt, 2680, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialAreaTimeoutWhenSeen, PsoDataType.UInt, 2684, 0, 0), + new PsoStructureEntryInfo(MetaName.InitialAreaTimeoutWhenCrimeReported, PsoDataType.UInt, 2688, 0, 0), + new PsoStructureEntryInfo((MetaName)2940774268, PsoDataType.Float, 2692, 0, 0) + ); + case MetaName.CWanted__Tunables__WantedLevel: + return new PsoStructureInfo(MetaName.CWanted__Tunables__WantedLevel, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Difficulty, PsoDataType.Structure, 8, 0, (MetaName)3660423994) + ); + case (MetaName)3660423994: + return new PsoStructureInfo((MetaName)3660423994, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Calculation, PsoDataType.Structure, 8, 0, (MetaName)1037717481), + new PsoStructureEntryInfo(MetaName.Helis, PsoDataType.Structure, 72, 0, (MetaName)3986648608) + ); + case (MetaName)1037717481: + return new PsoStructureInfo((MetaName)1037717481, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.FromWantedLevel, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 16, 0, (MetaName)1310408174), + new PsoStructureEntryInfo(MetaName.Decay, PsoDataType.Structure, 40, 0, (MetaName)3442100148) + ); + case (MetaName)1310408174: + return new PsoStructureInfo((MetaName)1310408174, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.WantedLevel, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.LastSpottedDistance, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Randomness, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)3442100148: + return new PsoStructureInfo((MetaName)3442100148, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.TimeEvadingForMaxValue, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxValue, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableWhenOffMission, PsoDataType.Bool, 16, 0, 0) + ); + case (MetaName)3986648608: + return new PsoStructureInfo((MetaName)3986648608, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Refuel, PsoDataType.Structure, 8, 0, (MetaName)2123007699) + ); + case (MetaName)2123007699: + return new PsoStructureInfo((MetaName)2123007699, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBefore, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.Delay, PsoDataType.Float, 16, 0, 0) + ); + case (MetaName)2685546187: + return new PsoStructureInfo((MetaName)2685546187, 0, 0, 1952, + new PsoStructureEntryInfo(MetaName.Spawning, PsoDataType.Structure, 8, 0, (MetaName)2145739988), + new PsoStructureEntryInfo(MetaName.Despawning, PsoDataType.Structure, 152, 0, (MetaName)1602748523), + new PsoStructureEntryInfo(MetaName.Peds, PsoDataType.Structure, 280, 0, (MetaName)3209293959), + new PsoStructureEntryInfo(MetaName.Dispatch, PsoDataType.Structure, 1920, 0, (MetaName)3840146119) + ); + case (MetaName)2145739988: + return new PsoStructureInfo((MetaName)2145739988, 0, 0, 144, + new PsoStructureEntryInfo(MetaName.Scoring, PsoDataType.Structure, 8, 0, (MetaName)3801009121), + new PsoStructureEntryInfo(MetaName.IdealDistance, PsoDataType.Structure, 96, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.ChancesToForceWaitInFront, PsoDataType.Structure, 120, 0, (MetaName)2528332511) + ); + case (MetaName)3801009121: + return new PsoStructureInfo((MetaName)3801009121, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.Weights, PsoDataType.Structure, 8, 0, (MetaName)2379615087) + ); + case (MetaName)2379615087: + return new PsoStructureInfo((MetaName)2379615087, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Distance, PsoDataType.Structure, 8, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.Direction, PsoDataType.Structure, 32, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.Randomness, PsoDataType.Structure, 56, 0, (MetaName)2528332511) + ); + case (MetaName)2528332511: + return new PsoStructureInfo((MetaName)2528332511, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Min, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Max, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMin, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.ValueForMax, PsoDataType.Float, 20, 0, 0) + ); + case (MetaName)1602748523: + return new PsoStructureInfo((MetaName)1602748523, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.MaxFacingThreshold, PsoDataType.Structure, 8, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.MaxMovingThreshold, PsoDataType.Structure, 32, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.MinDistanceToBeConsideredLaggingBehind, PsoDataType.Structure, 56, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.MinDistanceToCheckClumped, PsoDataType.Structure, 80, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.MaxDistanceToBeConsideredClumped, PsoDataType.Structure, 104, 0, (MetaName)2528332511) + ); + case (MetaName)3209293959: + return new PsoStructureInfo((MetaName)3209293959, 0, 0, 1640, + new PsoStructureEntryInfo(MetaName.Cops, PsoDataType.Structure, 8, 0, (MetaName)2022711333), + new PsoStructureEntryInfo(MetaName.Swat, PsoDataType.Structure, 552, 0, (MetaName)2022711333), + new PsoStructureEntryInfo(MetaName.Army, PsoDataType.Structure, 1096, 0, (MetaName)2022711333) + ); + case (MetaName)2022711333: + return new PsoStructureInfo((MetaName)2022711333, 0, 0, 544, + new PsoStructureEntryInfo(MetaName.Situations, PsoDataType.Structure, 8, 0, (MetaName)1181208064), + new PsoStructureEntryInfo(MetaName.AutomobileSpeedModifier, PsoDataType.Structure, 496, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.HeliSpeedModifier, PsoDataType.Structure, 520, 0, (MetaName)2528332511) + ); + case (MetaName)1181208064: + return new PsoStructureInfo((MetaName)1181208064, 0, 0, 488, + new PsoStructureEntryInfo(MetaName.Default, PsoDataType.Structure, 8, 0, (MetaName)3795144262), + new PsoStructureEntryInfo(MetaName.InVehicle, PsoDataType.Structure, 128, 0, (MetaName)3795144262), + new PsoStructureEntryInfo(MetaName.InHeli, PsoDataType.Structure, 248, 0, (MetaName)3795144262), + new PsoStructureEntryInfo(MetaName.InBoat, PsoDataType.Structure, 368, 0, (MetaName)3795144262) + ); + case (MetaName)3795144262: + return new PsoStructureInfo((MetaName)3795144262, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.SensesRange, PsoDataType.Structure, 8, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.IdentificationRange, PsoDataType.Structure, 32, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.ShootRateModifier, PsoDataType.Structure, 56, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.WeaponAccuracy, PsoDataType.Structure, 80, 0, (MetaName)2528332511), + new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForEvasiveMovement, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForOffScreen, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponAccuracyModifierForAimedAt, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinForDrivebys, PsoDataType.Float, 116, 0, 0) + ); + case (MetaName)3840146119: + return new PsoStructureInfo((MetaName)3840146119, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.TimeBetweenSpawnAttemptsModifier, PsoDataType.Structure, 8, 0, (MetaName)2528332511) + ); + case (MetaName)1581603972: + return new PsoStructureInfo((MetaName)1581603972, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.Enabled, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.Witnesses, PsoDataType.Bool, 9, 0, 0), + new PsoStructureEntryInfo(MetaName.Crimes, PsoDataType.Bool, 10, 0, 0) + ); + case (MetaName)4245193745: + return new PsoStructureInfo((MetaName)4245193745, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.TimeBetweenDifficultyUpdates, PsoDataType.Float, 8, 0, 0) + ); + case MetaName.CEventGunAimedAt__Tunables: + return new PsoStructureInfo(MetaName.CEventGunAimedAt__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CEventGunShot__Tunables: + return new PsoStructureInfo(MetaName.CEventGunShot__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.GunShotThresholdDistance, PsoDataType.Float, 24, 0, 0) + ); + case MetaName.CEventMeleeAction__Tunables: + return new PsoStructureInfo(MetaName.CEventMeleeAction__Tunables, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinDelayTimer, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDelayTimer, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.CTaskAimAndThrowProjectile__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimAndThrowProjectile__Tunables, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.bEnableGaitAdditive, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinHoldThrowPitch, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxRandomExplosionTime, PsoDataType.UInt, 24, 0, 0) + ); + case MetaName.CTaskSwapWeapon__Tunables: + return new PsoStructureInfo(MetaName.CTaskSwapWeapon__Tunables, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.OnFootClipRate, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.OnFootBlendInDuration, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.LowCoverClipRate, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.LowCoverBlendInDuration, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.HighCoverClipRate, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.HighCoverBlendInDuration, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.ActionClipRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.ActionBlendInDuration, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.BlendOutDuration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2181619027, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DebugSwapInstantly, PsoDataType.Bool, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.SkipHolsterWeapon, PsoDataType.Bool, 57, 0, 0) + ); + case MetaName.CTaskAimGunOnFoot__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimGunOnFoot__Tunables, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenFiringVariations, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.IdealPitchForFiringVariation, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxPitchDifferenceForFiringVariation, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.AssistedAimOutroTime, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.RunAndGunOutroTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AimOutroTime, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AimOutroTimeIfAimingOnStick, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AimOutroMinTaskTimeWhenRunPressed, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AimingOnStickExitCooldown, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeForRunAndGunOutroDelays, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.DampenRootTargetWeight, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.DampenRootTargetHeight, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.AlternativeAnimBlockedHeight, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.CoverAimOffsetFromBlocked, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.DelayTimeWhenOutOfAmmoInScope, PsoDataType.UInt, 96, 0, 0) + ); + case MetaName.CTaskGun__Tunables: + return new PsoStructureInfo(MetaName.CTaskGun__Tunables, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.iMinLookAtTime, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.iMaxLookAtTime, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeBetweenBulletReactions, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenBulletReactions, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxDistForOverheadReactions, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxAboveHeadForOverheadReactions, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fBulletReactionPosAdjustmentZ, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fMinTimeBetweenLookAt, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fMaxTimeBetweenLookAt, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.bDisable2HandedGetups, PsoDataType.Bool, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeForEyeIk, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenEyeIkProcesses, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToPointGunAtPositionWhenUnableToTurn, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.AssistedAimCamera, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.RunAndGunAimCamera, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.AssistedAimInterpolateInDuration, PsoDataType.UInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.RunAndGunInterpolateInDuration, PsoDataType.UInt, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenOverheadBulletReactions, PsoDataType.UInt, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxTimeInBulletReactionState, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo((MetaName)3228655867, PsoDataType.UInt, 92, 0, 0), + new PsoStructureEntryInfo((MetaName)270252777, PsoDataType.UInt, 96, 0, 0) + ); + case MetaName.CTaskAimGunVehicleDriveBy__Tunables: + return new PsoStructureInfo(MetaName.CTaskAimGunVehicleDriveBy__Tunables, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenInsults, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToInsult, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDotToInsult, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.MinAimTimeMs, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxAimTimeOnStickMs, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.AimingOnStickCooldownMs, PsoDataType.UInt, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.BicycleDrivebyFilterId, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.BikeDrivebyFilterId, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.JetskiDrivebyFilterId, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.ParachutingFilterId, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo((MetaName)2221302483, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo((MetaName)3323392529, PsoDataType.String, 60, 7, 0), + new PsoStructureEntryInfo((MetaName)2684719351, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo((MetaName)4246561663, PsoDataType.String, 68, 7, 0) + ); + case MetaName.CWildlifeManager__Tunables: + return new PsoStructureInfo(MetaName.CWildlifeManager__Tunables, 0, 0, 136, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BirdHeightMapDeltaMin, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.BirdHeightMapDeltaMax, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.BirdSpawnXYRangeMin, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.BirdSpawnXYRangeMax, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.IncreasedAerialSpawningFactor, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToSearchForGroundWildlifePoints, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToSearchForGroundWildlifePoints, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenGroundProbes, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundMaterialProbeDepth, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundMaterialProbeOffset, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.GroundMaterialSpawnCoordNormalZTolerance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.MinDistanceToSearchForAquaticPoints, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxDistanceToSearchForAquaticPoints, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenWaterHeightMapChecks, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.TimeBetweenWaterProbes, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.WaterProbeDepth, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.WaterProbeOffset, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.AquaticSpawnDepth, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.AquaticSpawnMaxHeightAbovePlayer, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.IncreasedAquaticSpawningFactor, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.CloseSpawningViewMultiplier, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.IncreasedGroundWildlifeSpawningFactor, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.SharkModelName, PsoDataType.String, 104, 7, 0), + new PsoStructureEntryInfo(MetaName.DeepWaterThreshold, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.PlayerSwimTimeThreshold, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.MinTimeBetweenSharkDispatches, PsoDataType.UInt, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.SharkAddRangeInViewMin, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo((MetaName)3653722296, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo((MetaName)1235067475, PsoDataType.Float, 128, 0, 0) + ); + case MetaName.CPopGroupList: + return new PsoStructureInfo(MetaName.CPopGroupList, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPopulationGroup), + new PsoStructureEntryInfo(MetaName.pedGroups, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPopulationGroup), + new PsoStructureEntryInfo(MetaName.vehGroups, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.wildlifeHabitats, PsoDataType.Array, 40, 0, (MetaName)4) + ); + case MetaName.CPopulationGroup: + return new PsoStructureInfo(MetaName.CPopulationGroup, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3852980612), + new PsoStructureEntryInfo(MetaName.models, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)4186696686), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 32, 0, (MetaName)2097155) + ); + case MetaName.CDoorTuningFile: + return new PsoStructureInfo(MetaName.CDoorTuningFile, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)607870603), + new PsoStructureEntryInfo(MetaName.NamedTuningArray, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)934147895), + new PsoStructureEntryInfo(MetaName.ModelToTuneMapping, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)607870603: + return new PsoStructureInfo((MetaName)607870603, 0, 0, 144, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Structure, 16, 0, (MetaName)2175119364) + ); + case (MetaName)2175119364: + return new PsoStructureInfo((MetaName)2175119364, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.AutoOpenVolumeOffset, PsoDataType.Float3a, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)2809332931), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 32, 0, (MetaName)2097153), + new PsoStructureEntryInfo(MetaName.AutoOpenRadiusModifier, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AutoOpenRate, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.AutoOpenCosineAngleBetweenThreshold, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.AutoOpenCloseRateTaper, PsoDataType.Bool, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.UseAutoOpenTriggerBox, PsoDataType.Bool, 49, 0, 0), + new PsoStructureEntryInfo(MetaName.CustomTriggerBox, PsoDataType.Bool, 50, 0, 0), + new PsoStructureEntryInfo(MetaName.TriggerBoxMinMax, PsoDataType.Structure, 64, 0, MetaName.rage__spdAABB), + new PsoStructureEntryInfo(MetaName.BreakableByVehicle, PsoDataType.Bool, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.BreakingImpulse, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.ShouldLatchShut, PsoDataType.Bool, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.MassMultiplier, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.WeaponImpulseMultiplier, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.RotationLimitAngle, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.TorqueAngularVelocityLimit, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.StdDoorRotDir, PsoDataType.Enum, 124, 0, MetaName.StdDoorRotDir) + ); + case (MetaName)934147895: + return new PsoStructureInfo((MetaName)934147895, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.TuningName, PsoDataType.String, 16, 2, 0) + ); + case (MetaName)3852980612: + return new PsoStructureInfo((MetaName)3852980612, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Variations, PsoDataType.Structure, 16, 3, 0) + ); + case MetaName.CAmbientPedModelVariations: + return new PsoStructureInfo(MetaName.CAmbientPedModelVariations, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3553377863), + new PsoStructureEntryInfo(MetaName.CompRestrictions, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3159204365), + new PsoStructureEntryInfo(MetaName.PropRestrictions, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.LoadOut, PsoDataType.String, 40, 7, 0) + ); + case (MetaName)3553377863: + return new PsoStructureInfo((MetaName)3553377863, 0, 0, 12, + new PsoStructureEntryInfo(MetaName.Component, PsoDataType.Enum, 0, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo(MetaName.DrawableIndex, PsoDataType.SInt, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.Restriction, PsoDataType.Enum, 8, 0, (MetaName)2065671281) + ); + case MetaName.CSlownessZoneManager: + return new PsoStructureInfo(MetaName.CSlownessZoneManager, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1778476350), + new PsoStructureEntryInfo(MetaName.aSlownessZone, PsoDataType.Array, 8, 0, 0) + ); + case (MetaName)1778476350: + return new PsoStructureInfo((MetaName)1778476350, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.bBox, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB) + ); + case MetaName.CScenarioPointManifest: + return new PsoStructureInfo(MetaName.CScenarioPointManifest, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.VersionNumber, PsoDataType.SInt, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.RegionDefs, PsoDataType.Array, 8, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Groups, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.InteriorNames, PsoDataType.Array, 40, 0, (MetaName)5) + ); + case MetaName.CScenarioPointRegionDef: + return new PsoStructureInfo(MetaName.CScenarioPointRegionDef, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 8, 0), + new PsoStructureEntryInfo(MetaName.AABB, PsoDataType.Structure, 16, 0, MetaName.rage__spdAABB) + ); + case MetaName.CScenarioPointGroup: + return new PsoStructureInfo(MetaName.CScenarioPointGroup, 0, 0, 8, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.EnabledByDefault, PsoDataType.Bool, 4, 0, 0) + ); + case MetaName.strRequestRecording: + return new PsoStructureInfo(MetaName.strRequestRecording, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.strRecordedRequest), + new PsoStructureEntryInfo(MetaName.Requests, PsoDataType.Array, 0, 0, 0) + ); + case MetaName.strRecordedRequest: + return new PsoStructureInfo(MetaName.strRecordedRequest, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Resource, PsoDataType.Structure, 0, 0, MetaName.strResourceReference), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.SInt, 24, 0, 0) + ); + case MetaName.strResourceReference: + return new PsoStructureInfo(MetaName.strResourceReference, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.AssetName, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Extension, PsoDataType.String, 16, 0, (MetaName)524288) + ); + case (MetaName)62557530: + return new PsoStructureInfo((MetaName)62557530, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3112305802), + new PsoStructureEntryInfo(MetaName.zones, PsoDataType.Array, 0, 0, 0) + ); + case (MetaName)3112305802: + return new PsoStructureInfo((MetaName)3112305802, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.zoneName, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.spName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.mpName, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.vfxRegion, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)1896983690, PsoDataType.UByte, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)1856972365, PsoDataType.Enum, 24, 0, (MetaName)1756502932), + new PsoStructureEntryInfo(MetaName.lawResponseTime, PsoDataType.Enum, 28, 0, (MetaName)3204395397), + new PsoStructureEntryInfo(MetaName.lawResponseType, PsoDataType.Enum, 32, 0, (MetaName)4286852891), + new PsoStructureEntryInfo(MetaName.specialZoneAttribute, PsoDataType.Enum, 36, 0, (MetaName)4095090001), + new PsoStructureEntryInfo(MetaName.vehDirtMin, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.vehDirtMax, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.vehDirtGrowScale, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.pedDirtMin, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.pedDirtMax, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.dirtRed, PsoDataType.UByte, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.dirtGreen, PsoDataType.UByte, 61, 0, 0), + new PsoStructureEntryInfo(MetaName.dirtBlue, PsoDataType.UByte, 62, 0, 0), + new PsoStructureEntryInfo((MetaName)1430479029, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)2056852733, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo((MetaName)1457405649, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo((MetaName)2304154060, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo((MetaName)1018913504, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)9361713, PsoDataType.Bool, 84, 0, 0), + new PsoStructureEntryInfo((MetaName)2931752685, PsoDataType.Bool, 85, 0, 0) + ); + case MetaName.CCoverTuningFile: + return new PsoStructureInfo(MetaName.CCoverTuningFile, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)912106952), + new PsoStructureEntryInfo(MetaName.NamedTuningArray, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3821651387), + new PsoStructureEntryInfo(MetaName.ModelToTuneMapping, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case (MetaName)912106952: + return new PsoStructureInfo((MetaName)912106952, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.Tuning, PsoDataType.Structure, 16, 0, (MetaName)61864478) + ); + case (MetaName)61864478: + return new PsoStructureInfo((MetaName)61864478, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)98189892), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 8, 0, (MetaName)2097152) + ); + case (MetaName)3821651387: + return new PsoStructureInfo((MetaName)3821651387, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ModelName, PsoDataType.String, 8, 2, 0), + new PsoStructureEntryInfo(MetaName.TuningName, PsoDataType.String, 16, 2, 0) + ); + case MetaName.CScenarioPointRegion: + return new PsoStructureInfo(MetaName.CScenarioPointRegion, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.VersionNumber, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CExtensionDefSpawnPoint), + new PsoStructureEntryInfo(MetaName.ScenarioPoints, PsoDataType.Array, 16, 0, (MetaName)1), + new PsoStructureEntryInfo(MetaName.ChainingGraph, PsoDataType.Structure, 32, 0, MetaName.CScenarioChainingGraph) + ); + case MetaName.CExtensionDefSpawnPoint: + return new PsoStructureInfo(MetaName.CExtensionDefSpawnPoint, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.offsetPosition, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.offsetRotation, PsoDataType.Float4, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.spawnType, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.pedType, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo(MetaName.group, PsoDataType.String, 56, 7, 0), + new PsoStructureEntryInfo(MetaName.availableInMpSp, PsoDataType.Enum, 60, 0, MetaName.CSpawnPoint__AvailabilityMpSp), + new PsoStructureEntryInfo(MetaName.timeTillPedLeaves, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.start, PsoDataType.UByte, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.end, PsoDataType.UByte, 69, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.CScenarioPointFlags__Flags), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.Flags, 72, 0, (MetaName)196618), + new PsoStructureEntryInfo(MetaName.highPri, PsoDataType.Bool, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.extendedRange, PsoDataType.Bool, 77, 0, 0) + ); + case MetaName.CScenarioChainingGraph: + return new PsoStructureInfo(MetaName.CScenarioChainingGraph, 0, 0, 40, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CScenarioChainingNode), + new PsoStructureEntryInfo(MetaName.Nodes, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CScenarioChainingEdge), + new PsoStructureEntryInfo(MetaName.Edges, PsoDataType.Array, 24, 0, (MetaName)2) + ); + case MetaName.CScenarioChainingNode: + return new PsoStructureInfo(MetaName.CScenarioChainingNode, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Float3a, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2602393771, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.ScenarioType, PsoDataType.String, 36, 7, 0), + new PsoStructureEntryInfo(MetaName.HasIncomingEdges, PsoDataType.Bool, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.HasOutgoingEdges, PsoDataType.Bool, 41, 0, 0) + ); + case MetaName.CScenarioChainingEdge: + return new PsoStructureInfo(MetaName.CScenarioChainingEdge, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.NodeIndexFrom, PsoDataType.UShort, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.NodeIndexTo, PsoDataType.UShort, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.NavMode, PsoDataType.Enum, 12, 2, MetaName.CScenarioChainingEdge__eNavMode), + new PsoStructureEntryInfo(MetaName.NavSpeed, PsoDataType.Enum, 13, 2, MetaName.CScenarioChainingEdge__eNavSpeed) + ); + case MetaName.CPedVariationInfo: + return new PsoStructureInfo(MetaName.CPedVariationInfo, 0, 0, 112, + new PsoStructureEntryInfo(MetaName.bHasTexVariations, PsoDataType.Bool, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.bHasDrawblVariations, PsoDataType.Bool, 1, 0, 0), + new PsoStructureEntryInfo(MetaName.bHasLowLODs, PsoDataType.Bool, 2, 0, 0), + new PsoStructureEntryInfo(MetaName.bIsSuperLOD, PsoDataType.Bool, 3, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.availComp, PsoDataType.Array, 4, 4, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVComponentData), + new PsoStructureEntryInfo(MetaName.aComponentData3, PsoDataType.Array, 16, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedSelectionSet), + new PsoStructureEntryInfo(MetaName.aSelectionSets, PsoDataType.Array, 32, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CComponentInfo), + new PsoStructureEntryInfo(MetaName.compInfos, PsoDataType.Array, 48, 0, (MetaName)10), + new PsoStructureEntryInfo(MetaName.propInfo, PsoDataType.Structure, 64, 0, MetaName.CPedPropInfo), + new PsoStructureEntryInfo(MetaName.dlcName, PsoDataType.String, 104, 8, 0) + ); + case MetaName.CPedPropInfo: + return new PsoStructureInfo(MetaName.CPedPropInfo, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.numAvailProps, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedPropMetaData), + new PsoStructureEntryInfo(MetaName.aPropMetaData, PsoDataType.Array, 8, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CAnchorProps), + new PsoStructureEntryInfo(MetaName.aAnchors, PsoDataType.Array, 24, 0, (MetaName)3) + ); + case MetaName.CPVComponentData: + return new PsoStructureInfo(MetaName.CPVComponentData, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.numAvailTex, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVDrawblData), + new PsoStructureEntryInfo(MetaName.aDrawblData3, PsoDataType.Array, 8, 0, (MetaName)1) + ); + case MetaName.CPVDrawblData: + return new PsoStructureInfo(MetaName.CPVDrawblData, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.propMask, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.numAlternatives, PsoDataType.UByte, 1, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVTextureData), + new PsoStructureEntryInfo(MetaName.aTexData, PsoDataType.Array, 8, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.clothData, PsoDataType.Structure, 24, 0, MetaName.CPVDrawblData__CPVClothComponentData) + ); + case MetaName.CPVDrawblData__CPVClothComponentData: + return new PsoStructureInfo(MetaName.CPVDrawblData__CPVClothComponentData, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ownsCloth, PsoDataType.Bool, 0, 0, 0) + ); + case MetaName.CPVTextureData: + return new PsoStructureInfo(MetaName.CPVTextureData, 0, 0, 3, + new PsoStructureEntryInfo(MetaName.texId, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.distribution, PsoDataType.UByte, 1, 0, 0) + ); + case MetaName.CComponentInfo: + return new PsoStructureInfo(MetaName.CComponentInfo, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)802196719, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)4233133352, PsoDataType.String, 4, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)128864925, PsoDataType.Array, 8, 4, (MetaName)327682), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.inclusions, PsoDataType.Flags, 32, 0, (MetaName)2101247), + new PsoStructureEntryInfo(MetaName.exclusions, PsoDataType.Flags, 36, 0, (MetaName)2101247), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.ePedVarComp), + new PsoStructureEntryInfo((MetaName)1613922652, PsoDataType.Flags, 40, 1, (MetaName)1048583), + new PsoStructureEntryInfo((MetaName)2114993291, PsoDataType.UShort, 42, 0, 0), + new PsoStructureEntryInfo((MetaName)3509540765, PsoDataType.UByte, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)4196345791, PsoDataType.UByte, 45, 0, 0) + ); + case MetaName.CCreatureMetaData: + return new PsoStructureInfo(MetaName.CCreatureMetaData, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CShaderVariableComponent), + new PsoStructureEntryInfo(MetaName.shaderVariableComponents, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedPropExpressionData), + new PsoStructureEntryInfo(MetaName.pedPropExpressions, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedCompExpressionData), + new PsoStructureEntryInfo(MetaName.pedCompExpressions, PsoDataType.Array, 40, 0, (MetaName)4) + ); + case MetaName.CShaderVariableComponent: + return new PsoStructureInfo(MetaName.CShaderVariableComponent, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.pedcompID, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.maskID, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.shaderVariableHashString, PsoDataType.String, 16, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER) + ); + case MetaName.CPedPropExpressionData: + return new PsoStructureInfo(MetaName.CPedPropExpressionData, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.pedPropID, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.pedPropVarIndex, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.pedPropExpressionIndex, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.types, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 72, 0, (MetaName)9) + ); + case MetaName.CPedCompExpressionData: + return new PsoStructureInfo(MetaName.CPedCompExpressionData, 0, 0, 88, + new PsoStructureEntryInfo(MetaName.pedCompID, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.pedCompVarIndex, PsoDataType.SInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.pedCompExpressionIndex, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.tracks, PsoDataType.Array, 24, 0, (MetaName)3), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UShort, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.ids, PsoDataType.Array, 40, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.types, PsoDataType.Array, 56, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.components, PsoDataType.Array, 72, 0, (MetaName)9) + ); + case MetaName.rage__cutfCutsceneFile2: + return new PsoStructureInfo(MetaName.rage__cutfCutsceneFile2, 0, 0, 3360, + new PsoStructureEntryInfo(MetaName.fTotalDuration, PsoDataType.Float, 268, 0, 0), + new PsoStructureEntryInfo(MetaName.cFaceDir, PsoDataType.String, 272, 0, (MetaName)16777216), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iCutsceneFlags, PsoDataType.Array, 528, 4, (MetaName)262146), + new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 544, 0, 0), + new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 560, 0, 0), + new PsoStructureEntryInfo(MetaName.vTriggerOffset, PsoDataType.Float3, 576, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.pCutsceneObjects, PsoDataType.Array, 592, 0, (MetaName)7), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.pCutsceneLoadEventList, PsoDataType.Array, 608, 0, (MetaName)9), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.pCutsceneEventList, PsoDataType.Array, 624, 0, (MetaName)11), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.pCutsceneEventArgsList, PsoDataType.Array, 640, 0, (MetaName)13), + new PsoStructureEntryInfo(MetaName.attributes, PsoDataType.Structure, 656, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 672, 4, 0), + new PsoStructureEntryInfo(MetaName.iRangeStart, PsoDataType.SInt, 680, 0, 0), + new PsoStructureEntryInfo(MetaName.iRangeEnd, PsoDataType.SInt, 684, 0, 0), + new PsoStructureEntryInfo(MetaName.iAltRangeEnd, PsoDataType.SInt, 688, 0, 0), + new PsoStructureEntryInfo(MetaName.fSectionByTimeSliceDuration, PsoDataType.Float, 692, 0, 0), + new PsoStructureEntryInfo(MetaName.fFadeOutCutsceneDuration, PsoDataType.Float, 696, 0, 0), + new PsoStructureEntryInfo(MetaName.fFadeInGameDuration, PsoDataType.Float, 700, 0, 0), + new PsoStructureEntryInfo(MetaName.fadeInColor, PsoDataType.UInt, 704, 1, 0), + new PsoStructureEntryInfo(MetaName.iBlendOutCutsceneDuration, PsoDataType.SInt, 708, 0, 0), + new PsoStructureEntryInfo(MetaName.iBlendOutCutsceneOffset, PsoDataType.SInt, 712, 0, 0), + new PsoStructureEntryInfo(MetaName.fFadeOutGameDuration, PsoDataType.Float, 716, 0, 0), + new PsoStructureEntryInfo(MetaName.fFadeInCutsceneDuration, PsoDataType.Float, 720, 0, 0), + new PsoStructureEntryInfo(MetaName.fadeOutColor, PsoDataType.UInt, 724, 1, 0), + new PsoStructureEntryInfo(MetaName.DayCoCHours, PsoDataType.UInt, 728, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.cameraCutList, PsoDataType.Array, 736, 0, (MetaName)30), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.sectionSplitList, PsoDataType.Array, 752, 0, (MetaName)32), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__cutfCutsceneFile2__SConcatData), + new PsoStructureEntryInfo(MetaName.concatDataList, PsoDataType.Array, 768, 1, (MetaName)2621474), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.vHaltFrequency), + new PsoStructureEntryInfo(MetaName.discardFrameList, PsoDataType.Array, 3344, 0, (MetaName)36) + ); + case MetaName.rage__parAttributeList: + return new PsoStructureInfo(MetaName.rage__parAttributeList, 0, 0, 12, + new PsoStructureEntryInfo(MetaName.UserData1, PsoDataType.UByte, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.UserData2, PsoDataType.UByte, 9, 0, 0) + ); + case MetaName.rage__cutfCutsceneFile2__SConcatData: + return new PsoStructureInfo(MetaName.rage__cutfCutsceneFile2__SConcatData, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.cSceneName, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fStartTime, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.fPitch, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.fRoll, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.iRangeStart, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.iRangeEnd, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.bValidForPlayBack, PsoDataType.Bool, 56, 0, 0) + ); + case MetaName.rage__cutfAssetManagerObject: + return new PsoStructureInfo(MetaName.rage__cutfAssetManagerObject, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0) + ); + case MetaName.rage__cutfAnimationManagerObject: + return new PsoStructureInfo(MetaName.rage__cutfAnimationManagerObject, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0) + ); + case MetaName.rage__cutfCameraObject: + return new PsoStructureInfo(MetaName.rage__cutfCameraObject, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fNearDrawDistance, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fFarDrawDistance, PsoDataType.Float, 60, 0, 0) + ); + case MetaName.rage__cutfPedModelObject: + return new PsoStructureInfo(MetaName.rage__cutfPedModelObject, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo(MetaName.overrideFaceAnimationFilename, PsoDataType.String, 96, 7, 0), + new PsoStructureEntryInfo(MetaName.bFoundFaceAnimation, PsoDataType.Bool, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.bFaceAndBodyAreMerged, PsoDataType.Bool, 105, 0, 0), + new PsoStructureEntryInfo(MetaName.bOverrideFaceAnimation, PsoDataType.Bool, 106, 0, 0), + new PsoStructureEntryInfo(MetaName.faceAnimationNodeName, PsoDataType.String, 108, 7, 0), + new PsoStructureEntryInfo(MetaName.faceAttributesFilename, PsoDataType.String, 112, 7, 0) + ); + case MetaName.rage__cutfPropModelObject: + return new PsoStructureInfo(MetaName.rage__cutfPropModelObject, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0) + ); + case MetaName.rage__cutfBlockingBoundsObject: + return new PsoStructureInfo(MetaName.rage__cutfBlockingBoundsObject, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float3, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.vCorners, PsoDataType.Array, 48, 4, (MetaName)262148), + new PsoStructureEntryInfo(MetaName.fHeight, PsoDataType.Float, 112, 0, 0) + ); + case MetaName.rage__cutfAudioObject: + return new PsoStructureInfo(MetaName.rage__cutfAudioObject, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 3, 0), + new PsoStructureEntryInfo(MetaName.fOffset, PsoDataType.Float, 56, 0, 0) + ); + case MetaName.rage__cutfHiddenModelObject: + return new PsoStructureInfo(MetaName.rage__cutfHiddenModelObject, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fRadius, PsoDataType.Float, 64, 0, 0) + ); + case MetaName.rage__cutfOverlayObject: + return new PsoStructureInfo(MetaName.rage__cutfOverlayObject, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 3, 0), + new PsoStructureEntryInfo(MetaName.cRenderTargetName, PsoDataType.String, 56, 3, 0), + new PsoStructureEntryInfo(MetaName.iOverlayType, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.modelHashName, PsoDataType.String, 76, 7, 0) + ); + case MetaName.rage__cutfSubtitleObject: + return new PsoStructureInfo(MetaName.rage__cutfSubtitleObject, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) + ); + case MetaName.rage__cutfLightObject: + return new PsoStructureInfo(MetaName.rage__cutfLightObject, 0, 0, 192, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.fFallOff, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.fConeAngle, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.fVolumeIntensity, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.fVolumeSizeScale, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaSize, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaIntensity, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaZBias, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.fInnerConeAngle, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.fExponentialFallOff, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.fShadowBlur, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.iLightType, PsoDataType.SInt, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.iLightProperty, PsoDataType.SInt, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.TextureDictID, PsoDataType.SInt, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.TextureKey, PsoDataType.SInt, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.uLightFlags, PsoDataType.UInt, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.uHourFlags, PsoDataType.UInt, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.bStatic, PsoDataType.Bool, 186, 0, 0) + ); + case MetaName.rage__cutfAnimatedLightObject: + return new PsoStructureInfo(MetaName.rage__cutfAnimatedLightObject, 0, 0, 208, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.fFallOff, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.fConeAngle, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.fVolumeIntensity, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.fVolumeSizeScale, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaSize, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaIntensity, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.fCoronaZBias, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.fInnerConeAngle, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.fExponentialFallOff, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.fShadowBlur, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.iLightType, PsoDataType.SInt, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.iLightProperty, PsoDataType.SInt, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.TextureDictID, PsoDataType.SInt, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.TextureKey, PsoDataType.SInt, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.uLightFlags, PsoDataType.UInt, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.uHourFlags, PsoDataType.UInt, 180, 0, 0), + new PsoStructureEntryInfo(MetaName.bStatic, PsoDataType.Bool, 186, 0, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 192, 0, 0) + ); + case MetaName.rage__cutfObjectIdEvent: + return new PsoStructureInfo(MetaName.rage__cutfObjectIdEvent, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.fTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.iEventId, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.iEventArgsIndex, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.pChildEvents, PsoDataType.Structure, 32, 3, 0), + new PsoStructureEntryInfo(MetaName.StickyId, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.IsChild, PsoDataType.Bool, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 48, 0, 0) + ); + case MetaName.rage__cutfObjectVariationEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfObjectVariationEventArgs, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.iComponent, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.iDrawable, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.iTexture, PsoDataType.SInt, 48, 0, 0) + ); + case MetaName.rage__cutfEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfEventArgs, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0) + ); + case MetaName.rage__cutfAttributeList: + return new PsoStructureInfo(MetaName.rage__cutfAttributeList, 0, 0, 16, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.Items, PsoDataType.Array, 0, 0, 0) + ); + case MetaName.cutf_int: + return new PsoStructureInfo(MetaName.cutf_int, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.SInt, 16, 0, 0) + ); + case MetaName.cutf_float: + return new PsoStructureInfo(MetaName.cutf_float, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.Float, 16, 0, 0) + ); + case MetaName.rage__cutfLoadSceneEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfLoadSceneEventArgs, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.vOffset, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fRotation, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fPitch, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.fRoll, PsoDataType.Float, 72, 0, 0) + ); + case MetaName.rage__cutfObjectIdEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfObjectIdEventArgs, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0) + ); + case MetaName.rage__cutfObjectIdListEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfObjectIdListEventArgs, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iObjectIdList, PsoDataType.Array, 32, 0, (MetaName)2) + ); + case MetaName.rage__cutfNameEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfNameEventArgs, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0) + ); + case MetaName.rage__cutfCameraCutEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfCameraCutEventArgs, 0, 0, 272, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.vRotationQuaternion, PsoDataType.Float4, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fNearDrawDistance, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.fFarDrawDistance, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.fMapLodScale, PsoDataType.Float, 88, 0, 0), + new PsoStructureEntryInfo(MetaName.ReflectionLodRangeStart, PsoDataType.Float, 92, 0, 0), + new PsoStructureEntryInfo(MetaName.ReflectionLodRangeEnd, PsoDataType.Float, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.ReflectionSLodRangeStart, PsoDataType.Float, 100, 0, 0), + new PsoStructureEntryInfo(MetaName.ReflectionSLodRangeEnd, PsoDataType.Float, 104, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultHD, PsoDataType.Float, 108, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultOrphanedHD, PsoDataType.Float, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultLod, PsoDataType.Float, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultSLod1, PsoDataType.Float, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultSLod2, PsoDataType.Float, 124, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultSLod3, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.LodMultSLod4, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.WaterReflectionFarClip, PsoDataType.Float, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.SSAOLightInten, PsoDataType.Float, 140, 0, 0), + new PsoStructureEntryInfo(MetaName.ExposurePush, PsoDataType.Float, 144, 0, 0), + new PsoStructureEntryInfo(MetaName.LightFadeDistanceMult, PsoDataType.Float, 148, 0, 0), + new PsoStructureEntryInfo(MetaName.LightShadowFadeDistanceMult, PsoDataType.Float, 152, 0, 0), + new PsoStructureEntryInfo(MetaName.LightSpecularFadeDistMult, PsoDataType.Float, 156, 0, 0), + new PsoStructureEntryInfo(MetaName.LightVolumetricFadeDistanceMult, PsoDataType.Float, 160, 0, 0), + new PsoStructureEntryInfo(MetaName.DirectionalLightMultiplier, PsoDataType.Float, 164, 0, 0), + new PsoStructureEntryInfo(MetaName.LensArtefactMultiplier, PsoDataType.Float, 168, 0, 0), + new PsoStructureEntryInfo(MetaName.BloomMax, PsoDataType.Float, 172, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableHighQualityDof, PsoDataType.Bool, 176, 0, 0), + new PsoStructureEntryInfo(MetaName.FreezeReflectionMap, PsoDataType.Bool, 177, 0, 0), + new PsoStructureEntryInfo(MetaName.DisableDirectionalLighting, PsoDataType.Bool, 178, 0, 0), + new PsoStructureEntryInfo(MetaName.AbsoluteIntensityEnabled, PsoDataType.Bool, 179, 0, 0), + new PsoStructureEntryInfo(MetaName.CharacterLight, PsoDataType.Structure, 192, 0, MetaName.rage__cutfCameraCutCharacterLightParams), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__cutfCameraCutTimeOfDayDofModifier), + new PsoStructureEntryInfo(MetaName.TimeOfDayDofModifers, PsoDataType.Array, 256, 0, (MetaName)34) + ); + case MetaName.rage__cutfCameraCutCharacterLightParams: + return new PsoStructureInfo(MetaName.rage__cutfCameraCutCharacterLightParams, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.bUseTimeCycleValues, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.vDirection, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.vColour, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fIntensity, PsoDataType.Float, 48, 0, 0) + ); + case MetaName.rage__cutfSubtitleEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfSubtitleEventArgs, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.iLanguageID, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.iTransitionIn, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.fTransitionInDuration, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.iTransitionOut, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.fTransitionOutDuration, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.fSubtitleDuration, PsoDataType.Float, 60, 0, 0) + ); + case MetaName.rage__cutfFinalNameEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfFinalNameEventArgs, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 32, 3, 0) + ); + case MetaName.rage__cutfObjectIdNameEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfObjectIdNameEventArgs, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) + ); + case MetaName.vHaltFrequency: + return new PsoStructureInfo(MetaName.vHaltFrequency, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.cSceneName, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.frames, PsoDataType.Array, 8, 0, (MetaName)1) + ); + case MetaName.rage__cutfVehicleModelObject: + return new PsoStructureInfo(MetaName.rage__cutfVehicleModelObject, 0, 0, 120, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.cRemoveBoneNameList, PsoDataType.Array, 96, 0, (MetaName)11), + new PsoStructureEntryInfo(MetaName.bCanApplyRealDamage, PsoDataType.Bool, 112, 0, 0) + ); + case MetaName.rage__cutfEvent: + return new PsoStructureInfo(MetaName.rage__cutfEvent, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.fTime, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.iEventId, PsoDataType.SInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.iEventArgsIndex, PsoDataType.SInt, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.pChildEvents, PsoDataType.Structure, 32, 3, 0), + new PsoStructureEntryInfo(MetaName.StickyId, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.IsChild, PsoDataType.Bool, 44, 0, 0) + ); + case MetaName.rage__cutfCascadeShadowEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfCascadeShadowEventArgs, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.cameraCutHashName, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.radius, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.interpTime, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.cascadeIndex, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.enabled, PsoDataType.Bool, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.interpolateToDisabled, PsoDataType.Bool, 77, 0, 0) + ); + case MetaName.rage__cutfFloatValueEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfFloatValueEventArgs, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.fValue, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.rage__cutfAnimatedParticleEffectObject: + return new PsoStructureInfo(MetaName.rage__cutfAnimatedParticleEffectObject, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.athFxListHash, PsoDataType.String, 64, 7, 0) + ); + case MetaName.rage__cutfWeaponModelObject: + return new PsoStructureInfo(MetaName.rage__cutfWeaponModelObject, 0, 0, 104, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.AnimStreamingBase, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.cAnimExportCtrlSpecFile, PsoDataType.String, 64, 7, 0), + new PsoStructureEntryInfo(MetaName.cFaceExportCtrlSpecFile, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo(MetaName.cAnimCompressionFile, PsoDataType.String, 72, 7, 0), + new PsoStructureEntryInfo(MetaName.cHandle, PsoDataType.String, 84, 7, 0), + new PsoStructureEntryInfo(MetaName.typeFile, PsoDataType.String, 88, 7, 0), + new PsoStructureEntryInfo(MetaName.GenericWeaponType, PsoDataType.UInt, 96, 0, 0) + ); + case MetaName.rage__cutfPlayParticleEffectEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfPlayParticleEffectEventArgs, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.vInitialBoneRotation, PsoDataType.Float4, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.vInitialBoneOffset, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.iAttachParentId, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.iAttachBoneHash, PsoDataType.UShort, 68, 0, 0) + ); + case MetaName.rage__cutfBoolValueEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfBoolValueEventArgs, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.bValue, PsoDataType.Bool, 32, 0, 0) + ); + case MetaName.rage__cutfRayfireObject: + return new PsoStructureInfo(MetaName.rage__cutfRayfireObject, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.vStartPosition, PsoDataType.Float3, 64, 0, 0) + ); + case MetaName.rage__cutfParticleEffectObject: + return new PsoStructureInfo(MetaName.rage__cutfParticleEffectObject, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.athFxListHash, PsoDataType.String, 56, 7, 0) + ); + case MetaName.rage__cutfDecalObject: + return new PsoStructureInfo(MetaName.rage__cutfDecalObject, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.StreamingName, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo(MetaName.RenderId, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.rage__cutfDecalEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfDecalEventArgs, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.vRotation, PsoDataType.Float4, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fWidth, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fHeight, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.Colour, PsoDataType.UInt, 72, 1, 0), + new PsoStructureEntryInfo(MetaName.fLifeTime, PsoDataType.Float, 76, 0, 0) + ); + case MetaName.rage__cutfScreenFadeObject: + return new PsoStructureInfo(MetaName.rage__cutfScreenFadeObject, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0) + ); + case MetaName.rage__cutfVehicleVariationEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfVehicleVariationEventArgs, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.iMainBodyColour, PsoDataType.SInt, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.iSecondBodyColour, PsoDataType.SInt, 44, 0, 0), + new PsoStructureEntryInfo(MetaName.iSpecularColour, PsoDataType.SInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.iWheelTrimColour, PsoDataType.SInt, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)2747538743, PsoDataType.SInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.iLivery, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.iLivery2, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.fDirtLevel, PsoDataType.Float, 68, 0, 0) + ); + case MetaName.cutf_string: + return new PsoStructureInfo(MetaName.cutf_string, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 8, 0), + new PsoStructureEntryInfo(MetaName.Value, PsoDataType.String, 16, 3, 0) + ); + case MetaName.rage__cutfScreenFadeEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfScreenFadeEventArgs, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.fValue, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 40, 1, 0) + ); + case MetaName.rage__cutfTriggerLightEffectEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfTriggerLightEffectEventArgs, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iAttachParentId, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.iAttachBoneHash, PsoDataType.UShort, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.AttachedParentName, PsoDataType.String, 40, 7, 0) + ); + case MetaName.rage__cutfVehicleExtraEventArgs: + return new PsoStructureInfo(MetaName.rage__cutfVehicleExtraEventArgs, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 12, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 24, 4, 0), + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.SInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.pExtraBoneIds, PsoDataType.Array, 40, 0, (MetaName)3) + ); + case MetaName.rage__cutfFixupModelObject: + return new PsoStructureInfo(MetaName.rage__cutfFixupModelObject, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.iObjectId, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.attributeList, PsoDataType.Structure, 20, 0, MetaName.rage__parAttributeList), + new PsoStructureEntryInfo(MetaName.cutfAttributes, PsoDataType.Structure, 32, 4, 0), + new PsoStructureEntryInfo(MetaName.cName, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo(MetaName.vPosition, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.fRadius, PsoDataType.Float, 64, 0, 0) + ); + case MetaName.CPackFileMetaData: + return new PsoStructureInfo(MetaName.CPackFileMetaData, 0, 0, 96, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CMapDataGroup), + new PsoStructureEntryInfo(MetaName.MapDataGroups, PsoDataType.Array, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CHDTxdAssetBinding), + new PsoStructureEntryInfo(MetaName.HDTxdBindingArray, PsoDataType.Array, 16, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CImapDependency), + new PsoStructureEntryInfo(MetaName.imapDependencies, PsoDataType.Array, 32, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CImapDependencies), + new PsoStructureEntryInfo(MetaName.imapDependencies_2, PsoDataType.Array, 48, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CItypDependencies), + new PsoStructureEntryInfo(MetaName.itypDependencies_2, PsoDataType.Array, 64, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CInteriorBoundsFiles), + new PsoStructureEntryInfo(MetaName.Interiors, PsoDataType.Array, 80, 0, (MetaName)10) + ); + case MetaName.CMapDataGroup: + return new PsoStructureInfo(MetaName.CMapDataGroup, 0, 0, 56, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Bounds, PsoDataType.Array, 8, 0, (MetaName)1), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, (MetaName)1193003611), + new PsoStructureEntryInfo(MetaName.Flags, PsoDataType.Flags, 24, 0, (MetaName)2097155), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.WeatherTypes, PsoDataType.Array, 32, 0, (MetaName)5), + new PsoStructureEntryInfo(MetaName.HoursOnOff, PsoDataType.UInt, 48, 0, 0) + ); + case MetaName.CHDTxdAssetBinding: + return new PsoStructureInfo(MetaName.CHDTxdAssetBinding, 0, 0, 132, + new PsoStructureEntryInfo(MetaName.assetType, PsoDataType.Enum, 0, 0, (MetaName)3387532954), + new PsoStructureEntryInfo(MetaName.targetAsset, PsoDataType.String, 4, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.HDTxd, PsoDataType.String, 68, 0, (MetaName)4194304) + ); + case MetaName.CImapDependencies: + return new PsoStructureInfo(MetaName.CImapDependencies, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.imapName, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.manifestFlags), + new PsoStructureEntryInfo(MetaName.manifestFlags, PsoDataType.Flags, 4, 0, (MetaName)2097153), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.itypDepArray, PsoDataType.Array, 8, 0, (MetaName)3) + ); + case MetaName.CItypDependencies: + return new PsoStructureInfo(MetaName.CItypDependencies, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.itypName, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Enum, 0, 0, MetaName.manifestFlags), + new PsoStructureEntryInfo(MetaName.manifestFlags, PsoDataType.Flags, 4, 0, (MetaName)2097153), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.itypDepArray, PsoDataType.Array, 8, 0, (MetaName)3) + ); + case MetaName.CInteriorBoundsFiles: + return new PsoStructureInfo(MetaName.CInteriorBoundsFiles, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.Bounds, PsoDataType.Array, 8, 0, (MetaName)1) + ); + case MetaName.CMapTypes: + return new PsoStructureInfo(MetaName.CMapTypes, 0, 0, 96, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.archetypes, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 40, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.dependencies, PsoDataType.Array, 48, 0, (MetaName)5), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTxdRelationship), + new PsoStructureEntryInfo(MetaName.txdRelationships, PsoDataType.Array, 64, 0, (MetaName)MetaTypeName.POINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompositeEntityType), + new PsoStructureEntryInfo(MetaName.compositeEntityTypes, PsoDataType.Array, 80, 0, (MetaName)9) + ); + case MetaName.CTxdRelationship: + return new PsoStructureInfo(MetaName.CTxdRelationship, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo(MetaName.child, PsoDataType.String, 24, 3, 0) + ); + case MetaName.CCompositeEntityType: + return new PsoStructureInfo(MetaName.CCompositeEntityType, 0, 0, 336, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 0, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.specialAttribute, PsoDataType.UInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.bbMin, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.bbMax, PsoDataType.Float3, 96, 0, 0), + new PsoStructureEntryInfo(MetaName.bsCentre, PsoDataType.Float3, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.bsRadius, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.StartModel, PsoDataType.String, 136, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.EndModel, PsoDataType.String, 200, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.StartImapFile, PsoDataType.String, 264, 3, 0), + new PsoStructureEntryInfo(MetaName.EndImapFile, PsoDataType.String, 280, 3, 0), + new PsoStructureEntryInfo(MetaName.PtFxAssetName, PsoDataType.String, 296, 3, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompEntityAnims), + new PsoStructureEntryInfo(MetaName.Animations, PsoDataType.Array, 312, 0, (MetaName)13) + ); + case MetaName.CCompEntityAnims: + return new PsoStructureInfo(MetaName.CCompEntityAnims, 0, 0, 216, + new PsoStructureEntryInfo(MetaName.AnimDict, PsoDataType.String, 0, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.AnimName, PsoDataType.String, 64, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.AnimatedModel, PsoDataType.String, 128, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.punchInPhase, PsoDataType.Float, 192, 0, 0), + new PsoStructureEntryInfo(MetaName.punchOutPhase, PsoDataType.Float, 196, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCompEntityEffectsData), + new PsoStructureEntryInfo(MetaName.effectsData, PsoDataType.Array, 200, 0, (MetaName)5) + ); + case MetaName.CCompEntityEffectsData: + return new PsoStructureInfo(MetaName.CCompEntityEffectsData, 0, 0, 160, + new PsoStructureEntryInfo(MetaName.fxType, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.fxOffsetPos, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.fxOffsetRot, PsoDataType.Float4, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.boneTag, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.startPhase, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.endPhase, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxIsTriggered, PsoDataType.Bool, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxTag, PsoDataType.String, 61, 0, (MetaName)4194304), + new PsoStructureEntryInfo(MetaName.ptFxScale, PsoDataType.Float, 128, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxProbability, PsoDataType.Float, 132, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxHasTint, PsoDataType.Bool, 136, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxTintR, PsoDataType.UByte, 137, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxTintG, PsoDataType.UByte, 138, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxTintB, PsoDataType.UByte, 139, 0, 0), + new PsoStructureEntryInfo(MetaName.ptFxSize, PsoDataType.Float3, 144, 0, 0) + ); + case MetaName.CExtensionDefParticleEffect: + return new PsoStructureInfo(MetaName.CExtensionDefParticleEffect, 0, 0, 96, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.offsetPosition, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.offsetRotation, PsoDataType.Float4, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.fxName, PsoDataType.String, 48, 3, 0), + new PsoStructureEntryInfo(MetaName.fxType, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.boneTag, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.scale, PsoDataType.Float, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.probability, PsoDataType.SInt, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.SInt, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 84, 1, 0) + ); + case MetaName.CBaseArchetypeDef: + return new PsoStructureInfo(MetaName.CBaseArchetypeDef, 0, 0, 176, + new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.specialAttribute, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.bbMin, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.bbMax, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.bsCentre, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.bsRadius, PsoDataType.Float, 80, 0, 0), + new PsoStructureEntryInfo(MetaName.hdTextureDist, PsoDataType.Float, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 88, 3, 0), + new PsoStructureEntryInfo(MetaName.textureDictionary, PsoDataType.String, 104, 3, 0), + new PsoStructureEntryInfo(MetaName.clipDictionary, PsoDataType.String, 120, 3, 0), + new PsoStructureEntryInfo(MetaName.drawableDictionary, PsoDataType.String, 136, 3, 0), + new PsoStructureEntryInfo(MetaName.physicsDictionary, PsoDataType.String, 152, 7, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 160, 0, (MetaName)13) + ); + case MetaName.CImapDependency: + return new PsoStructureInfo(MetaName.CImapDependency, 0, 0, 12, + new PsoStructureEntryInfo(MetaName.imapName, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.itypName, PsoDataType.String, 4, 7, 0), + new PsoStructureEntryInfo(MetaName.packFileName, PsoDataType.String, 8, 7, 0) + ); + case MetaName.CMapData: + return new PsoStructureInfo(MetaName.CMapData, 0, 0, 304, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.parent, PsoDataType.String, 12, 7, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.contentFlags, PsoDataType.UInt, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.streamingExtentsMin, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.streamingExtentsMax, PsoDataType.Float3, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.entitiesExtentsMin, PsoDataType.Float3, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.entitiesExtentsMax, PsoDataType.Float3, 80, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.entities, PsoDataType.Array, 96, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.rage__fwContainerLodDef), + new PsoStructureEntryInfo(MetaName.containerLods, PsoDataType.Array, 112, 0, (MetaName)10), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.BoxOccluder), + new PsoStructureEntryInfo(MetaName.boxOccluders, PsoDataType.Array, 128, 0, (MetaName)MetaTypeName.PsoPOINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.OccludeModel), + new PsoStructureEntryInfo(MetaName.occludeModels, PsoDataType.Array, 144, 0, (MetaName)14), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.physicsDictionaries, PsoDataType.Array, 160, 0, (MetaName)MetaTypeName.STRING), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTimeCycleModifier), + new PsoStructureEntryInfo(MetaName.timeCycleModifiers, PsoDataType.Array, 176, 0, (MetaName)18), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCarGen), + new PsoStructureEntryInfo(MetaName.carGenerators, PsoDataType.Array, 192, 0, (MetaName)20), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CLODLight), + new PsoStructureEntryInfo(MetaName.LODLights, PsoDataType.Array, 208, 0, (MetaName)22), + new PsoStructureEntryInfo(MetaName.block, PsoDataType.Structure, 224, 0, MetaName.CBlockDesc) + ); + case MetaName.rage__fwContainerLodDef: + return new PsoStructureInfo(MetaName.rage__fwContainerLodDef, 0, 0, 8, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 0, 7, 0), + new PsoStructureEntryInfo(MetaName.parentIndex, PsoDataType.UInt, 4, 0, 0) + ); + case MetaName.BoxOccluder: + return new PsoStructureInfo(MetaName.BoxOccluder, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.iCenterX, PsoDataType.SShort, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.iCenterY, PsoDataType.SShort, 2, 0, 0), + new PsoStructureEntryInfo(MetaName.iCenterZ, PsoDataType.SShort, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.iCosZ, PsoDataType.SShort, 6, 0, 0), + new PsoStructureEntryInfo(MetaName.iLength, PsoDataType.SShort, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.iWidth, PsoDataType.SShort, 10, 0, 0), + new PsoStructureEntryInfo(MetaName.iHeight, PsoDataType.SShort, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.iSinZ, PsoDataType.SShort, 14, 0, 0) + ); + case MetaName.OccludeModel: + return new PsoStructureInfo(MetaName.OccludeModel, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.bmin, PsoDataType.Float3a, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.bmax, PsoDataType.Float3a, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.dataSize, PsoDataType.UInt, 32, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.verts, PsoDataType.Array, 40, 6, (MetaName)2097155), + new PsoStructureEntryInfo(MetaName.numVertsInBytes, PsoDataType.UShort, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.numTris, PsoDataType.UShort, 50, 0, 0) + ); + case MetaName.CTimeCycleModifier: + return new PsoStructureInfo(MetaName.CTimeCycleModifier, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.minExtents, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.maxExtents, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.percentage, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.range, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo(MetaName.startHour, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.endHour, PsoDataType.UInt, 60, 0, 0) + ); + case MetaName.CCarGen: + return new PsoStructureInfo(MetaName.CCarGen, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.orientX, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.orientY, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.perpendicularLength, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.carModel, PsoDataType.String, 44, 7, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)2431193454, PsoDataType.UInt, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)379378343, PsoDataType.UInt, 56, 0, 0), + new PsoStructureEntryInfo(MetaName.bodyColorRemap1, PsoDataType.SInt, 60, 0, 0), + new PsoStructureEntryInfo(MetaName.bodyColorRemap2, PsoDataType.SInt, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.bodyColorRemap3, PsoDataType.SInt, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.bodyColorRemap4, PsoDataType.SInt, 72, 0, 0) + ); + case MetaName.CLODLight: + return new PsoStructureInfo(MetaName.CLODLight, 0, 0, 136, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.FloatXYZ), + new PsoStructureEntryInfo(MetaName.direction, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.falloff, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Float, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.falloffExponent, PsoDataType.Array, 40, 0, (MetaName)4), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.timeAndStateFlags, PsoDataType.Array, 56, 0, (MetaName)6), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.hash, PsoDataType.Array, 72, 0, (MetaName)8), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.coneInnerAngle, PsoDataType.Array, 88, 0, (MetaName)10), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.coneOuterAngleOrCapExt, PsoDataType.Array, 104, 0, (MetaName)MetaTypeName.PsoPOINTER), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.coronaIntensity, PsoDataType.Array, 120, 0, (MetaName)14) + ); + case MetaName.CBlockDesc: + return new PsoStructureInfo(MetaName.CBlockDesc, 0, 0, 72, + new PsoStructureEntryInfo(MetaName.version, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 3, 0), + new PsoStructureEntryInfo(MetaName.exportedBy, PsoDataType.String, 24, 3, 0), + new PsoStructureEntryInfo(MetaName.owner, PsoDataType.String, 40, 3, 0), + new PsoStructureEntryInfo(MetaName.time, PsoDataType.String, 56, 3, 0) + ); + case MetaName.CEntityDef: + return new PsoStructureInfo(MetaName.CEntityDef, 0, 0, 128, + new PsoStructureEntryInfo(MetaName.archetypeName, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.flags, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.guid, PsoDataType.UInt, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.position, PsoDataType.Float3, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.rotation, PsoDataType.Float4, 48, 0, 0), + new PsoStructureEntryInfo(MetaName.scaleXY, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo(MetaName.scaleZ, PsoDataType.Float, 68, 0, 0), + new PsoStructureEntryInfo(MetaName.parentIndex, PsoDataType.SInt, 72, 0, 0), + new PsoStructureEntryInfo(MetaName.lodDist, PsoDataType.Float, 76, 0, 0), + new PsoStructureEntryInfo(MetaName.lodLevel, PsoDataType.Enum, 80, 0, MetaName.rage__eLodType), + new PsoStructureEntryInfo(MetaName.numChildren, PsoDataType.UInt, 84, 0, 0), + new PsoStructureEntryInfo(MetaName.priorityLevel, PsoDataType.Enum, 88, 0, MetaName.rage__ePriorityLevel), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 3, 0), + new PsoStructureEntryInfo(MetaName.extensions, PsoDataType.Array, 96, 0, (MetaName)MetaTypeName.PsoPOINTER), + new PsoStructureEntryInfo(MetaName.ambientOcclusionMultiplier, PsoDataType.SInt, 112, 0, 0), + new PsoStructureEntryInfo(MetaName.artificialAmbientOcclusion, PsoDataType.SInt, 116, 0, 0), + new PsoStructureEntryInfo(MetaName.tintValue, PsoDataType.UInt, 120, 0, 0), + new PsoStructureEntryInfo(MetaName.lightGroup, PsoDataType.UInt, 124, 0, 0) + ); + case MetaName.CDistantLODLight: + return new PsoStructureInfo(MetaName.CDistantLODLight, 0, 0, 48, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.FloatXYZ), + new PsoStructureEntryInfo(MetaName.position, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.RGBI, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo(MetaName.numStreetLights, PsoDataType.UShort, 40, 0, 0), + new PsoStructureEntryInfo(MetaName.category, PsoDataType.UShort, 42, 0, 0) + ); + case (MetaName)3730683074: + return new PsoStructureInfo((MetaName)3730683074, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2166096847), + new PsoStructureEntryInfo(MetaName.PortalInfoList, PsoDataType.Array, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1998468471), + new PsoStructureEntryInfo(MetaName.PathNodeList, PsoDataType.Array, 16, 0, (MetaName)2) + ); + case (MetaName)2166096847: + return new PsoStructureInfo((MetaName)2166096847, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.InteriorProxyHash, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.PortalIdx, PsoDataType.SInt, 4, 0, 0), + new PsoStructureEntryInfo(MetaName.RoomIdx, PsoDataType.SInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.DestInteriorHash, PsoDataType.UInt, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.DestRoomIdx, PsoDataType.SInt, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4133637881), + new PsoStructureEntryInfo(MetaName.PortalEntityList, PsoDataType.Array, 24, 0, (MetaName)5) + ); + case (MetaName)4133637881: + return new PsoStructureInfo((MetaName)4133637881, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.LinkType, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.MaxOcclusion, PsoDataType.Float, 4, 0, 0), + new PsoStructureEntryInfo((MetaName)3815194629, PsoDataType.UInt, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.IsDoor, PsoDataType.Bool, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.IsGlass, PsoDataType.Bool, 13, 0, 0) + ); + case (MetaName)1998468471: + return new PsoStructureInfo((MetaName)1998468471, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.Key, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2301425487), + new PsoStructureEntryInfo(MetaName.PathNodeChildList, PsoDataType.Array, 8, 0, (MetaName)1) + ); + case (MetaName)2301425487: + return new PsoStructureInfo((MetaName)2301425487, 0, 0, 8, + new PsoStructureEntryInfo(MetaName.PathNodeKey, PsoDataType.UInt, 0, 0, 0), + new PsoStructureEntryInfo(MetaName.PortalInfoIdx, PsoDataType.SInt, 4, 0, 0) + ); + case MetaName.camMotionBlurSettingsMetadata: + return new PsoStructureInfo(MetaName.camMotionBlurSettingsMetadata, 0, 0, 64, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.MovementMotionBlurMinSpeed, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.MovementMotionBlurMaxSpeed, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.MovementMotionBlurMaxStrength, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.DamageMotionBlurMinDamage, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.DamageMotionBlurMaxDamage, PsoDataType.Float, 32, 0, 0), + new PsoStructureEntryInfo(MetaName.DamageMotionBlurMaxStrength, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo(MetaName.DamageMotionBlurDuration, PsoDataType.UInt, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)3109021193, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)2711268798, PsoDataType.Float, 48, 0, 0), + new PsoStructureEntryInfo((MetaName)960288180, PsoDataType.Float, 52, 0, 0), + new PsoStructureEntryInfo((MetaName)3693477470, PsoDataType.UInt, 56, 0, 0) + ); + case MetaName.camVehicleRocketSettings: + return new PsoStructureInfo(MetaName.camVehicleRocketSettings, 0, 0, 16, + new PsoStructureEntryInfo(MetaName.ShakeRef, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.ShakeAmplitude, PsoDataType.Float, 12, 0, 0) + ); + case MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring: + return new PsoStructureInfo(MetaName.camThirdPersonCameraMetadataQuadrupedalHeightSpring, 0, 0, 24, + new PsoStructureEntryInfo(MetaName.ShouldApply, PsoDataType.Bool, 8, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringConstant, PsoDataType.Float, 12, 0, 0), + new PsoStructureEntryInfo(MetaName.SpringDampingRatio, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)1065492607, PsoDataType.Float, 20, 0, 0) + ); + case MetaName.camInterpolatorMetadata: + return new PsoStructureInfo(MetaName.camInterpolatorMetadata, 0, 0, 40, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.Duration, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo(MetaName.EaseIn, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo(MetaName.EaseOut, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo(MetaName.Start, PsoDataType.Float, 28, 0, 0), + new PsoStructureEntryInfo(MetaName.End, PsoDataType.Float, 32, 0, 0) + ); + case MetaName.camAnimSceneDirectorMetadata: + return new PsoStructureInfo(MetaName.camAnimSceneDirectorMetadata, 0, 0, 32, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.CanBePaused, PsoDataType.Bool, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)2406434970, PsoDataType.String, 24, 7, 0) + ); + case MetaName.NonFlyableAreaArray: + return new PsoStructureInfo(MetaName.NonFlyableAreaArray, 0, 0, 24, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.NonFlyableArea), + new PsoStructureEntryInfo(MetaName.areas, PsoDataType.Array, 8, 0, 0) + ); + case MetaName.NonFlyableArea: + return new PsoStructureInfo(MetaName.NonFlyableArea, 0, 0, 32, + new PsoStructureEntryInfo((MetaName)2473579981, PsoDataType.Float4, 16, 0, 0) + ); + case MetaName.CAssassinsDispatch__Tunables: + return new PsoStructureInfo(MetaName.CAssassinsDispatch__Tunables, 0, 0, 80, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo((MetaName)2394623568, PsoDataType.Float, 16, 0, 0), + new PsoStructureEntryInfo((MetaName)3368196277, PsoDataType.Float, 20, 0, 0), + new PsoStructureEntryInfo((MetaName)2477967991, PsoDataType.Float, 24, 0, 0), + new PsoStructureEntryInfo((MetaName)3376433583, PsoDataType.String, 28, 7, 0), + new PsoStructureEntryInfo((MetaName)689054964, PsoDataType.String, 32, 7, 0), + new PsoStructureEntryInfo((MetaName)147587300, PsoDataType.Float, 36, 0, 0), + new PsoStructureEntryInfo((MetaName)201820320, PsoDataType.Float, 40, 0, 0), + new PsoStructureEntryInfo((MetaName)4035657267, PsoDataType.Float, 44, 0, 0), + new PsoStructureEntryInfo((MetaName)3058832678, PsoDataType.String, 48, 7, 0), + new PsoStructureEntryInfo((MetaName)2649613364, PsoDataType.String, 52, 7, 0), + new PsoStructureEntryInfo((MetaName)4282874513, PsoDataType.Float, 56, 0, 0), + new PsoStructureEntryInfo((MetaName)969882415, PsoDataType.Float, 60, 0, 0), + new PsoStructureEntryInfo((MetaName)2143223731, PsoDataType.Float, 64, 0, 0), + new PsoStructureEntryInfo((MetaName)1149455399, PsoDataType.String, 68, 7, 0), + new PsoStructureEntryInfo((MetaName)835576115, PsoDataType.String, 72, 7, 0) + ); + case MetaName.CTaskNMBuoyancy__Tunables: + return new PsoStructureInfo(MetaName.CTaskNMBuoyancy__Tunables, 0, 0, 48, + new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0), + new PsoStructureEntryInfo(MetaName.BlendOutThreshold, PsoDataType.Structure, 16, 0, (MetaName)3749122641) + ); + case MetaName.fwProfanityFilter: + return new PsoStructureInfo(MetaName.fwProfanityFilter, 0, 0, 56, + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.profaneTerms, PsoDataType.Array, 8, 0, 0), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.reservedTerms, PsoDataType.Array, 24, 0, (MetaName)2), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.String, 0, 2, 0), + new PsoStructureEntryInfo(MetaName.reservedFSCharacters, PsoDataType.Array, 40, 0, (MetaName)4) + ); + default: + return null; + } + } +} diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Rbf.cs b/CodeWalker.Core/GameFiles/MetaTypes/Rbf.cs index bbb5db6..dab302f 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Rbf.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Rbf.cs @@ -24,59 +24,72 @@ using System; +using System.Buffers; +using System.Buffers.Binary; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; +using CodeWalker.Core.Utils; +using Collections.Pooled; +using CommunityToolkit.Diagnostics; +using Microsoft.Extensions.ObjectPool; namespace CodeWalker.GameFiles { - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfFile + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfFile : IDisposable { - private const int RBF_IDENT = 0x30464252; + public const uint RBF_IDENT_LITTLE_ENDIAN = 0x30464252; public RbfStructure current { get; set; } - public Stack stack { get; set; } public List descriptors { get; set; } public Dictionary outDescriptors { get; private set; } = new Dictionary(); - public void Load(byte[] data) + public RbfStructure Load(byte[] data) { - using (var ms = new MemoryStream(data)) - Load(ms); + var sequence = new ReadOnlySequence(data); + var reader = new SequenceReader(sequence); + return Load(ref reader); } public RbfStructure Load(string fileName) { - using (var fileStream = new FileStream(fileName, FileMode.Open)) - { - return Load(fileStream); - } + var data = File.ReadAllBytes(fileName); + return Load(data); } - public RbfStructure Load(Stream stream) + public RbfStructure Load(ref SequenceReader reader) { - stack = new Stack(); + var stack = new Stack(); descriptors = new List(); - var reader = new DataReader(stream); + //var reader = new DataReader(stream); var ident = reader.ReadInt32(); - if (ident != RBF_IDENT) - throw new Exception("The file identifier does not match."); + if (ident != RBF_IDENT_LITTLE_ENDIAN) + { + ThrowHelper.ThrowInvalidOperationException("The file identifier does not match."); + return default; + } - while (reader.Position < reader.Length) + while (reader.Consumed < reader.Length) { var descriptorIndex = reader.ReadByte(); if (descriptorIndex == 0xFF) // close tag { var b = reader.ReadByte(); if (b != 0xFF) - throw new Exception("Expected 0xFF but was " + b.ToString("X2")); + { + ThrowHelper.ThrowInvalidOperationException($"Expected 0xFF but was {b:X2}"); + return default; + } + if (stack.Count > 0) { @@ -84,8 +97,12 @@ namespace CodeWalker.GameFiles } else { - if (reader.Position != reader.Length) - throw new Exception("Expected end of stream but was not."); + if (reader.Consumed != reader.Length) + { + ThrowHelper.ThrowInvalidOperationException("Expected end of stream but was not."); + return default; + } + return current; } } @@ -93,14 +110,17 @@ namespace CodeWalker.GameFiles { var b = reader.ReadByte(); if (b != 0xFF) - throw new Exception("Expected 0xFF but was " + b.ToString("X2")); + { + ThrowHelper.ThrowInvalidOperationException($"Expected 0xFF but was {b:X2}"); + return default; + } var dataLength = reader.ReadInt32(); var data = reader.ReadBytes(dataLength); var bytesValue = new RbfBytes(); - bytesValue.Value = data; - current.Children.Add(bytesValue); + bytesValue.Value = data.ToArray(); + current.AddChild(bytesValue); } else { @@ -116,10 +136,15 @@ namespace CodeWalker.GameFiles descriptor.Type = dataType; descriptors.Add(descriptor); - ParseElement(reader, descriptors.Count - 1, dataType); + ParseElement(ref reader, descriptors.Count - 1, dataType, stack); } else // existing descriptor + data { + if (descriptorIndex >= descriptors.Count) + { + ThrowHelper.ThrowInvalidOperationException("Index out of range"); + return default; + } if (dataType != descriptors[descriptorIndex].Type) { //throw new Exception("Data type does not match. Expected " @@ -127,15 +152,16 @@ namespace CodeWalker.GameFiles // + dataType.ToString() + ". Descriptor: " + descriptors[descriptorIndex].Name); } - ParseElement(reader, descriptorIndex, dataType); + ParseElement(ref reader, descriptorIndex, dataType, stack); } } } - throw new Exception("Unexpected end of stream."); + ThrowHelper.ThrowInvalidOperationException("Unexpected end of stream."); + return default; } - private void ParseElement(DataReader reader, int descriptorIndex, byte dataType) + private void ParseElement(ref SequenceReader reader, int descriptorIndex, byte dataType, Stack stack) { var descriptor = descriptors[descriptorIndex]; switch (dataType) @@ -145,9 +171,9 @@ namespace CodeWalker.GameFiles var structureValue = new RbfStructure(); structureValue.Name = descriptor.Name; - if (current != null) + if (current is not null) { - current.AddChild(structureValue); + current.AddChildOrAttribute(structureValue); stack.Push(current); } @@ -163,7 +189,7 @@ namespace CodeWalker.GameFiles var intValue = new RbfUint32(); intValue.Name = descriptor.Name; intValue.Value = reader.ReadUInt32(); - current.AddChild(intValue); + current.AddChildOrAttribute(intValue); break; } case 0x20: @@ -171,7 +197,7 @@ namespace CodeWalker.GameFiles var booleanValue = new RbfBoolean(); booleanValue.Name = descriptor.Name; booleanValue.Value = true; - current.AddChild(booleanValue); + current.AddChildOrAttribute(booleanValue); break; } case 0x30: @@ -179,7 +205,7 @@ namespace CodeWalker.GameFiles var booleanValue = new RbfBoolean(); booleanValue.Name = descriptor.Name; booleanValue.Value = false; - current.AddChild(booleanValue); + current.AddChildOrAttribute(booleanValue); break; } case 0x40: @@ -187,7 +213,7 @@ namespace CodeWalker.GameFiles var floatValue = new RbfFloat(); floatValue.Name = descriptor.Name; floatValue.Value = reader.ReadSingle(); - current.AddChild(floatValue); + current.AddChildOrAttribute(floatValue); break; } case 0x50: @@ -197,7 +223,7 @@ namespace CodeWalker.GameFiles floatVectorValue.X = reader.ReadSingle(); floatVectorValue.Y = reader.ReadSingle(); floatVectorValue.Z = reader.ReadSingle(); - current.AddChild(floatVectorValue); + current.AddChildOrAttribute(floatVectorValue); break; } case 0x60: @@ -207,24 +233,38 @@ namespace CodeWalker.GameFiles var stringValue = new RbfString(); stringValue.Name = descriptor.Name; stringValue.Value = value; - current.AddChild(stringValue); + current.AddChildOrAttribute(stringValue); break; } default: - throw new Exception("Unsupported data type."); + ThrowHelper.ThrowInvalidOperationException("Unsupported data type."); + return; } } public static bool IsRBF(Stream stream) { - var reader = new DataReader(stream); var origpos = stream.Position; - var ident = reader.ReadInt32(); - var isrbf = (ident == RBF_IDENT); + + Span buffer = stackalloc byte[4]; + + stream.Read(buffer); stream.Position = origpos; - return isrbf; + + return IsRBF(buffer); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsRBF(Span ident) + { + return IsRBF(BinaryPrimitives.ReadUInt32LittleEndian(ident)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsRBF(uint ident) + { + return ident == RBF_IDENT_LITTLE_ENDIAN; + } public byte GetDescriptorIndex(IRbfType t, out bool isNew) { @@ -268,12 +308,11 @@ namespace CodeWalker.GameFiles outDescriptors = new Dictionary(); var writer = new DataWriter(stream); - writer.Write(RBF_IDENT); + writer.Write(RBF_IDENT_LITTLE_ENDIAN); current.Save(this, writer); } - public void WriteRecordId(IRbfType type, DataWriter writer) { writer.Write(GetDescriptorIndex(type, out var isNew)); @@ -285,21 +324,36 @@ namespace CodeWalker.GameFiles writer.Write(Encoding.ASCII.GetBytes(type.Name)); } } + + public void Dispose() + { + current?.Dispose(); + GC.SuppressFinalize(this); + } + + ~RbfFile() + { + Dispose(); + } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfEntryDescription + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfEntryDescription { public string Name { get; set; } public int Type { get; set; } - public override string ToString() { return Name + ": " + Type.ToString(); } + public override string ToString() => $"{Name}: {Type}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public interface IRbfType + [TypeConverter(typeof(ExpandableObjectConverter))] + public interface IRbfType { string Name { get; set; } byte DataType { get; } void Save(RbfFile file, DataWriter writer); } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfBytes : IRbfType + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfBytes : IRbfType { public string Name { get; set; } public byte[] Value { get; set; } @@ -311,8 +365,20 @@ namespace CodeWalker.GameFiles writer.Write(Value.Length); writer.Write(Value); } - public override string ToString() { return Name + ": " + Value.ToString(); } + + public string GetNullTerminatedString() + { + var span = Value.AsSpan(); + var index = span.IndexOf((byte)0); + if (index == -1) + return Encoding.ASCII.GetString(span); + + return Encoding.ASCII.GetString(span.Slice(0, index)); + } + + public override string ToString() => $"{Name}: {Value}"; } + [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfUint32 : IRbfType { public string Name { get; set; } @@ -323,9 +389,11 @@ namespace CodeWalker.GameFiles file.WriteRecordId(this, writer); writer.Write(Value); } - public override string ToString() { return Name + ": " + Value.ToString(); } + public override string ToString() => $"{Name}: {Value}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfBoolean : IRbfType + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfBoolean : IRbfType { public string Name { get; set; } public bool Value { get; set; } @@ -334,7 +402,7 @@ namespace CodeWalker.GameFiles { file.WriteRecordId(this, writer); } - public override string ToString() { return Name + ": " + Value.ToString(); } + public override string ToString() => $"{Name}: {Value}"; } [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfFloat : IRbfType { @@ -346,9 +414,10 @@ namespace CodeWalker.GameFiles file.WriteRecordId(this, writer); writer.Write(Value); } - public override string ToString() { return Name + ": " + Value.ToString(); } + public override string ToString() => $"{Name}: {Value}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfFloat3 : IRbfType + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfFloat3 : IRbfType { public string Name { get; set; } public float X { get; set; } @@ -362,9 +431,10 @@ namespace CodeWalker.GameFiles writer.Write(Y); writer.Write(Z); } - public override string ToString() { return string.Format("{0}: X:{1}, Y:{2}, Z:{3}", Name, X, Y, Z); } + public override string ToString() => $"{Name}: X:{X}, Y:{Y}, Z:{Z}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfString : IRbfType + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfString : IRbfType { public string Name { get; set; } public string Value { get; set; } @@ -375,32 +445,47 @@ namespace CodeWalker.GameFiles writer.Write((short)Value.Length); writer.Write(Encoding.ASCII.GetBytes(Value)); } - public override string ToString() { return Name + ": " + Value.ToString(); } + public override string ToString() => $"{Name}: {Value}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RbfStructure : IRbfType + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RbfStructure : IRbfType, IDisposable { + private static ObjectPool> listPool = ObjectPool.Create(new DefaultPooledObjectPolicy>()); public string Name { get; set; } - public List Children { get; set; } = new List(); - public List Attributes { get; set; } = new List(); + + public PooledList? Children { get; set; } + public PooledList? Attributes { get; set; } internal int PendingAttributes { get; set; } public byte DataType => 0; - public override string ToString() { return Name + ": {" + Children.Count.ToString() + "}"; } - public IRbfType FindChild(string name) + public override string ToString() => $"{ Name }: {{{ Children?.Count ?? 0 }}}"; + public IRbfType? FindChild(string name) { + if (Children is null || Children.Count == 0) + return null; + foreach (var child in Children) { - if (child == null) continue; - if (child.Name == name) return child; + if (child is null) + continue; + + if (child.Name == name) + return child; } return null; } - public IRbfType FindAttribute(string name) + public IRbfType? FindAttribute(string name) { + if (Attributes is null || Attributes.Count == 0) + return null; + foreach (var attr in Attributes) { - if (attr == null) continue; - if (attr.Name == name) return attr; + if (attr is null) + continue; + if (attr.Name == name) + return attr; } + return null; } public void Save(RbfFile root, DataWriter writer) @@ -410,32 +495,71 @@ namespace CodeWalker.GameFiles writer.Write(new byte[4]); // 00 // count of non-primitive fields in this (... attributes??) - writer.Write((short)Attributes.Count); //writer.Write((short)Children.TakeWhile(a => !(a is RbfBytes || a is RbfStructure)).Count()); + writer.Write((short)(Attributes?.Count ?? 0)); //writer.Write((short)Children.TakeWhile(a => !(a is RbfBytes || a is RbfStructure)).Count()); - foreach (var attr in Attributes) + if (Attributes is not null) { - attr.Save(root, writer); + foreach (var attr in Attributes) + { + attr.Save(root, writer); + } } - foreach (var child in Children) + + if (Children is not null) { - child.Save(root, writer); + foreach (var child in Children) + { + child.Save(root, writer); + } } writer.Write((byte)0xFF); writer.Write((byte)0xFF); } + internal void AddChild(IRbfType value) + { + Children ??= listPool.Get(); + Children.Add(value); + } + + internal void AddAttribute(IRbfType value) + { + Attributes ??= listPool.Get(); + Attributes.Add(value); + } + + internal void AddChildOrAttribute(IRbfType value) { if (PendingAttributes > 0) { PendingAttributes--; - Attributes.Add(value); + AddAttribute(value); } else { - Children.Add(value); + AddChild(value); } } + + public void Dispose() + { + if (Children is PooledList children) + { + listPool.Return(children); + } + if (Attributes is PooledList attributes) + { + listPool.Return(attributes); + } + + GC.SuppressFinalize(this); + } + + ~RbfStructure() + { + Dispose(); + } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs index ed52163..32a2bcd 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using System.Xml; +using CodeWalker.Core.Utils; +using Collections.Pooled; using SharpDX; namespace CodeWalker.GameFiles @@ -64,150 +66,174 @@ namespace CodeWalker.GameFiles case MetaFormat.Mrf: return GetMrfData(doc); } - return null; + return []; } public static byte[] GetRSCData(XmlDocument doc) { var meta = GetMeta(doc); - if ((meta.DataBlocks?.Data == null) || (meta.DataBlocks.Count == 0)) return null; + if (meta.DataBlocks?.Data is null || meta.DataBlocks.Count == 0) + return []; return ResourceBuilder.Build(meta, 2); //meta is RSC V:2 } public static byte[] GetPSOData(XmlDocument doc) { var pso = XmlPso.GetPso(doc); - if ((pso.DataSection == null) || (pso.DataMapSection == null) || (pso.SchemaSection == null)) return null; + if (pso.DataSection == null || pso.DataMapSection == null || pso.SchemaSection == null) + return []; return pso.Save(); } public static byte[] GetRBFData(XmlDocument doc) { var rbf = XmlRbf.GetRbf(doc); - if (rbf.current == null) return null; + if (rbf.current is null) + return []; return rbf.Save(); } public static byte[] GetRelData(XmlDocument doc) { var rel = XmlRel.GetRel(doc); - if ((rel.RelDatasSorted == null) || (rel.RelDatas == null)) return null; + if (rel.RelDatas == null) + return []; return rel.Save(); } public static byte[] GetYndData(XmlDocument doc) { var ynd = XmlYnd.GetYnd(doc); - if (ynd.NodeDictionary == null) return null; + if (ynd.NodeDictionary == null) + return []; return ynd.Save(); } public static byte[] GetYnvData(XmlDocument doc) { var ynv = XmlYnv.GetYnv(doc); - if (ynv.Nav == null) return null; + if (ynv.Nav == null) + return []; return ynv.Save(); } public static byte[] GetYcdData(XmlDocument doc) { var ycd = XmlYcd.GetYcd(doc); - if (ycd.ClipDictionary == null) return null; + if (ycd.ClipDictionary == null) + return []; return ycd.Save(); } public static byte[] GetYbnData(XmlDocument doc) { var ybn = XmlYbn.GetYbn(doc); - if (ybn.Bounds == null) return null; + if (ybn.Bounds == null) + return []; return ybn.Save(); } public static byte[] GetYtdData(XmlDocument doc, string fpathin) { var ytd = XmlYtd.GetYtd(doc, fpathin); - if (ytd.TextureDict == null) return null; + if (ytd.TextureDict == null) + return []; return ytd.Save(); } public static byte[] GetYdrData(XmlDocument doc, string fpathin) { var ydr = XmlYdr.GetYdr(doc, fpathin); - if (ydr.Drawable == null) return null; + if (ydr.Drawable == null) + return []; return ydr.Save(); } public static byte[] GetYddData(XmlDocument doc, string fpathin) { var ydd = XmlYdd.GetYdd(doc, fpathin); - if (ydd.DrawableDict == null) return null; + if (ydd.DrawableDict == null) + return []; return ydd.Save(); } public static byte[] GetYftData(XmlDocument doc, string fpathin) { var yft = XmlYft.GetYft(doc, fpathin); - if (yft.Fragment == null) return null; + if (yft.Fragment == null) + return []; return yft.Save(); } public static byte[] GetYptData(XmlDocument doc, string fpathin) { var ypt = XmlYpt.GetYpt(doc, fpathin); - if (ypt.PtfxList == null) return null; + if (ypt.PtfxList == null) + return []; return ypt.Save(); } public static byte[] GetYldData(XmlDocument doc, string fpathin) { var yld = XmlYld.GetYld(doc, fpathin); - if (yld.ClothDictionary == null) return null; + if (yld.ClothDictionary == null) + return []; return yld.Save(); } public static byte[] GetYedData(XmlDocument doc, string fpathin) { var yed = XmlYed.GetYed(doc, fpathin); - if (yed.ExpressionDictionary == null) return null; + if (yed.ExpressionDictionary == null) + return []; return yed.Save(); } public static byte[] GetYwrData(XmlDocument doc, string fpathin) { var ywr = XmlYwr.GetYwr(doc, fpathin); - if (ywr.Waypoints == null) return null; + if (ywr.Waypoints == null) + return []; return ywr.Save(); } public static byte[] GetYvrData(XmlDocument doc, string fpathin) { var yvr = XmlYvr.GetYvr(doc, fpathin); - if (yvr.Records == null) return null; + if (yvr.Records == null) + return []; return yvr.Save(); } public static byte[] GetAwcData(XmlDocument doc, string fpathin) { var awc = XmlAwc.GetAwc(doc, fpathin); - if (awc.Streams == null) return null; + if (awc.Streams == null) + return []; return awc.Save(); } public static byte[] GetFxcData(XmlDocument doc, string fpathin) { var fxc = XmlFxc.GetFxc(doc, fpathin); - if (fxc.Shaders == null) return null; + if (fxc.Shaders == null) + return []; return fxc.Save(); } public static byte[] GetCacheFileData(XmlDocument doc) { var cdf = XmlCacheDat.GetCacheDat(doc); - if (cdf == null) return null; + if (cdf == null) + return []; return cdf.Save(); } public static byte[] GetHeightmapData(XmlDocument doc) { var hmf = XmlHmap.GetHeightmap(doc); - if (hmf.MaxHeights == null) return null; + if (hmf.MaxHeights == null) + return []; return hmf.Save(); } public static byte[] GetYpdbData(XmlDocument doc) { var ypdb = XmlYpdb.GetYpdb(doc); - if (ypdb.WeightSet == null) return null; + if (ypdb.WeightSet == null) + return []; return ypdb.Save(); } public static byte[] GetYfdData(XmlDocument doc) { var yfd = XmlYfd.GetYfd(doc); - if (yfd.FrameFilterDictionary == null) return null; + if (yfd.FrameFilterDictionary == null) + return []; return yfd.Save(); } public static byte[] GetMrfData(XmlDocument doc) { var mrf = XmlMrf.GetMrf(doc); - if (mrf == null) return null; + if (mrf == null) + return []; return mrf.Save(); } @@ -463,7 +489,7 @@ namespace CodeWalker.GameFiles if (!string.IsNullOrEmpty(cnode.InnerText)) { var ptr = mb.AddStringPtr(cnode.InnerText); - var val = MetaTypes.ConvertToBytes(ptr); + var val = MetaTypes.ConvertToBytes(in ptr); Buffer.BlockCopy(val, 0, data, entry.DataOffset, val.Length); } @@ -481,6 +507,7 @@ namespace CodeWalker.GameFiles var bytes = new List(); for (int j = 0; j < split.Length; j++) { + Console.WriteLine("Parsing byte"); byte val;// = Convert.ToByte(split[j], 10); if (byte.TryParse(split[j].Trim(), ns, ic, out val)) { @@ -488,7 +515,7 @@ namespace CodeWalker.GameFiles } } var ptr = mb.AddDataBlockPtr(bytes.ToArray(), (MetaName)MetaTypeName.BYTE); - var byt = MetaTypes.ConvertToBytes(ptr); + var byt = MetaTypes.ConvertToBytes(in ptr); Buffer.BlockCopy(byt, 0, data, entry.DataOffset, byt.Length); break; } @@ -1014,7 +1041,7 @@ namespace CodeWalker.GameFiles private static Array_uint TraverseHashArray(XmlNode node, MetaBuilder mb) { - var items = new List(); + using var items = new PooledList(); foreach (XmlNode cnode in node.ChildNodes) { @@ -1216,7 +1243,7 @@ namespace CodeWalker.GameFiles var inodes = vnode.SelectNodes("Item"); if (inodes?.Count > 0) { - var vlist = new List(); + using var vlist = new PooledList(); foreach (XmlNode inode in inodes) { vlist.Add(GetHash(inode.InnerText)); @@ -1258,7 +1285,7 @@ namespace CodeWalker.GameFiles public Dictionary Float_XYZs; public Dictionary Hashes; - public void WriteArrays(byte[] data) + public readonly void WriteArrays(byte[] data) { foreach (KeyValuePair ptr in Structures) { diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlPso.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlPso.cs index 6ed6e3a..0e2a8a7 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlPso.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlPso.cs @@ -32,7 +32,7 @@ namespace CodeWalker.GameFiles type = (MetaName)(uint)GetHash(node.Name); } - var infos = PsoTypes.GetStructureInfo(type); + var infos = PsoTypesStructureInfo.GetStructureInfo(type); if (infos != null) { byte[] data = new byte[infos.StructureLength]; @@ -49,7 +49,7 @@ namespace CodeWalker.GameFiles Array.Clear(data, 0, infos.StructureLength); //shouldn't really be necessary... - PsoStructureEntryInfo arrEntry = null; + PsoStructureEntryInfo arrEntry = default; //if (isRoot) @@ -78,7 +78,7 @@ namespace CodeWalker.GameFiles { case PsoDataType.Array: { - TraverseArray(cnode, pb, entry, arrEntry, arrayResults, data, infos); + TraverseArray(cnode, pb, in entry, in arrEntry, in arrayResults, data, infos); break; } case PsoDataType.Structure: @@ -110,8 +110,8 @@ namespace CodeWalker.GameFiles var bptr = pb.AddItem(stype, struc); var ptr = new PsoPOINTER(bptr.BlockID, bptr.Offset); - ptr.SwapEnd(); - var ptrb = MetaTypes.ConvertToBytes(ptr); + ptr = ptr.SwapEnd(); + var ptrb = MetaTypes.ConvertToBytes(in ptr); Buffer.BlockCopy(ptrb, 0, data, entry.DataOffset, ptrb.Length); @@ -263,24 +263,16 @@ namespace CodeWalker.GameFiles //uint fCount = (entry.ReferenceKey >> 16) & 0x0000FFFF; uint fEntry = (entry.ReferenceKey & 0xFFF); var fEnt = (fEntry != 0xFFF) ? infos.GetEntry((int)fEntry) : null; - PsoEnumInfo flagsInfo = null; + PsoEnumInfo? flagsInfo = null; MetaName fEnum = (MetaName)(fEnt?.ReferenceKey ?? 0); - if ((fEnt != null) && (fEnt.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) + if (fEnt is not null && (fEnt?.EntryNameHash == (MetaName)MetaTypeName.ARRAYINFO)) { - flagsInfo = PsoTypes.GetEnumInfo(fEnum); - } - if (flagsInfo == null) - { - if (fEntry != 0xFFF) - { } - //flagsInfo = PsoTypes.GetEnumInfo(entry.EntryNameHash); + flagsInfo = PsoTypesEnumInfo.GetEnumInfo(fEnum); } if (flagsInfo != null) { pb.AddEnumInfo(flagsInfo.IndexInfo.NameHash); } - else - { }//error? switch (entry.Unk_5h) { @@ -377,11 +369,8 @@ namespace CodeWalker.GameFiles var xStruct = pb.AddMapNodeStructureInfo((MetaName)mapreftype2.ReferenceKey); var xName = xStruct.IndexInfo.NameHash; - var kEntry = xStruct?.FindEntry(MetaName.Key); - var iEntry = xStruct?.FindEntry(MetaName.Item); - - if (kEntry.Type != PsoDataType.String) - { } + var kEntry = xStruct?.FindEntry(MetaName.Key) ?? default; + var iEntry = xStruct?.FindEntry(MetaName.Item) ?? default; @@ -408,8 +397,8 @@ namespace CodeWalker.GameFiles { //normal ARRAYINFO with pointer value var itemptr = pb.AddItemPtr(thash, strucBytes); - itemptr.SwapEnd(); //big schmigg - var ptrbytes = MetaTypes.ConvertToBytes(itemptr); + itemptr = itemptr.SwapEnd(); //big schmigg + var ptrbytes = MetaTypes.ConvertToBytes(in itemptr); Buffer.BlockCopy(ptrbytes, 0, nodeBytes, iEntry.DataOffset, ptrbytes.Length); } @@ -425,7 +414,7 @@ namespace CodeWalker.GameFiles arrayResults.Structures[entry.DataOffset + 8] = pb.AddItemArrayPtr(xName, nodesData.ToArray()); //pb.AddPointerArray(nodeptrs); } - private static void TraverseArray(XmlNode node, PsoBuilder pb, PsoStructureEntryInfo entry, PsoStructureEntryInfo arrEntry, PsoArrayResults results, byte[] data, PsoStructureInfo structInfo) + private static void TraverseArray(XmlNode node, PsoBuilder pb, in PsoStructureEntryInfo entry, in PsoStructureEntryInfo arrEntry, in PsoArrayResults results, byte[] data, PsoStructureInfo structInfo) { int offset = entry.DataOffset; uint aCount = (entry.ReferenceKey >> 16) & 0x0000FFFF; @@ -643,20 +632,17 @@ namespace CodeWalker.GameFiles if (arrEntry.ReferenceKey != 0) { - var _infos = PsoTypes.GetEnumInfo((MetaName)arrEntry.ReferenceKey); + var _infos = PsoTypesEnumInfo.GetEnumInfo((MetaName)arrEntry.ReferenceKey); pb.AddEnumInfo(_infos.IndexInfo.NameHash); var values = new uint[hashes.Length]; for (int i = 0; i < hashes.Length; i++) { var enumname = (MetaName)MetaTypes.SwapBytes(hashes[i]);//yeah swap it back to little endian..! - var enuminf = _infos.FindEntryByName(enumname); - if (enuminf != null) + if (_infos.TryFindEntryByName(enumname, out var enuminf)) { values[i] = MetaTypes.SwapBytes((uint)enuminf.EntryKey); } - else - { } //error? } if (embedded) @@ -682,18 +668,19 @@ namespace CodeWalker.GameFiles var rk1 = arrEntry.ReferenceKey & 0x0000FFFF; if (rk0 > 0) //should be count of items { - var subarrEntry = structInfo.GetEntry((int)rk1); - var subarrType = (MetaName)subarrEntry.ReferenceKey; + var subarrEntry = structInfo.GetEntry((int)rk1) ?? throw new InvalidOperationException("SubarrEntry not found!"); + //var subarrType = (MetaName)subarrEntry.ReferenceKey; - var origOffset = arrEntry.DataOffset; - arrEntry.DataOffset = entry.DataOffset;//slight hack for traversing array array + //var origOffset = arrEntry.DataOffset; + var _arrEntry = arrEntry; + _arrEntry = _arrEntry with { DataOffset = entry.DataOffset };//slight hack for traversing array array foreach (XmlNode cnode in node.ChildNodes) { - TraverseArray(cnode, pb, arrEntry, subarrEntry, results, data, structInfo); + TraverseArray(cnode, pb, in arrEntry, in subarrEntry, in results, data, structInfo); - arrEntry.DataOffset += 16;//ptr size... todo: what if not pointer array? + _arrEntry = _arrEntry with { DataOffset = (ushort)(arrEntry.DataOffset + 16) };//ptr size... todo: what if not pointer array? } - arrEntry.DataOffset = origOffset; + //arrEntry = arrEntry with { DataOffset = origOffset }; } @@ -748,9 +735,8 @@ namespace CodeWalker.GameFiles if (!string.IsNullOrEmpty(str)) { var bptr = pb.AddString(str); - var ptr = new PsoPOINTER(bptr.BlockID, bptr.Offset); - ptr.SwapEnd(); - var val = MetaTypes.ConvertToBytes(ptr); + var ptr = new PsoPOINTER(bptr.BlockID, bptr.Offset).SwapEnd(); + var val = MetaTypes.ConvertToBytes(in ptr); Buffer.BlockCopy(val, 0, data, entry.DataOffset, val.Length); } break; @@ -758,9 +744,8 @@ namespace CodeWalker.GameFiles if (!string.IsNullOrEmpty(str)) { var bptr = pb.AddString(str); - var ptr = new CharPointer(bptr.Pointer, str.Length); - ptr.SwapEnd(); - var val = MetaTypes.ConvertToBytes(ptr); + var ptr = new CharPointer(bptr.Pointer, str.Length).SwapEnd(); + var val = MetaTypes.ConvertToBytes(in ptr); Buffer.BlockCopy(val, 0, data, entry.DataOffset, val.Length); } break; @@ -816,7 +801,7 @@ namespace CodeWalker.GameFiles if (struc != null) { var ptr = pb.AddItemPtr(type, struc); - ptr.SwapEnd(); //big schmigg + ptr = ptr.SwapEnd(); //big schmigg ptrs.Add(ptr); } else @@ -1107,7 +1092,7 @@ namespace CodeWalker.GameFiles private static int GetEnumInt(MetaName type, string enumString, PsoDataType dataType) { - var infos = PsoTypes.GetEnumInfo(type); + var infos = PsoTypesEnumInfo.GetEnumInfo(type); if (infos == null) { @@ -1175,69 +1160,61 @@ namespace CodeWalker.GameFiles public Dictionary Float_XYZs; public Dictionary Hashes; - public void WriteArrays(byte[] data) + public readonly void WriteArrays(byte[] data) { foreach (KeyValuePair ptr in Structures) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in StructurePointers) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in UInts) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in UShorts) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in UBytes) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in Floats) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in Float_XYZs) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } foreach (KeyValuePair ptr in Hashes) { - var val = ptr.Value; - val.SwapEnd(); - var _data = MetaTypes.ConvertToBytes(val); + var val = ptr.Value.SwapEnd(); + var _data = MetaTypes.ConvertToBytes(in val); Buffer.BlockCopy(_data, 0, data, ptr.Key, _data.Length); } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlRbf.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlRbf.cs index 49db172..c699d14 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlRbf.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlRbf.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.Globalization; @@ -27,13 +28,13 @@ namespace CodeWalker.GameFiles return rbf; } - private static IRbfType Traverse(XNode node) + private static IRbfType? Traverse(XNode node) { if (node is XElement element) { - if (element.Attribute("value") != null) + if (element.TryGetAttribute("value", out var value)) { - var val = element.Attribute("value").Value; + var val = value.Value; if (!string.IsNullOrEmpty(val)) { var rval = CreateValueNode(element.Name.LocalName, val); @@ -43,11 +44,11 @@ namespace CodeWalker.GameFiles } } } - else if ((element.Attributes().Count() == 3) && (element.Attribute("x") != null) && (element.Attribute("y") != null) && (element.Attribute("z") != null)) + else if (element.Attributes().Count() == 3 && element.TryGetAttribute("x", out var xAttr) && element.TryGetAttribute("y", out var yAttr) && element.TryGetAttribute("z", out var zAttr)) { - FloatUtil.TryParse(element.Attribute("x").Value, out float x); - FloatUtil.TryParse(element.Attribute("y").Value, out float y); - FloatUtil.TryParse(element.Attribute("z").Value, out float z); + FloatUtil.TryParse(xAttr.Value, out float x); + FloatUtil.TryParse(yAttr.Value, out float y); + FloatUtil.TryParse(zAttr.Value, out float z); return new RbfFloat3() { Name = element.Name.LocalName, @@ -56,7 +57,7 @@ namespace CodeWalker.GameFiles Z = z }; } - else if ((element.Elements().Count() == 0) && (element.Attributes().Count() == 0) && (!element.IsEmpty)) //else if (element.Name == "type" || element.Name == "key" || element.Name == "platform") + else if (!element.HasElements && !element.HasAttributes && !element.IsEmpty) //else if (element.Name == "type" || element.Name == "key" || element.Name == "platform") { var bytearr = Encoding.ASCII.GetBytes(element.Value); var bytearrnt = new byte[bytearr.Length + 1]; @@ -69,7 +70,7 @@ namespace CodeWalker.GameFiles var n = new RbfStructure(); n.Name = element.Name.LocalName; - n.Children = element.Nodes().Select(c => Traverse(c)).ToList(); + n.Children = element.Nodes().Select(Traverse).ToPooledList(); foreach (var attr in element.Attributes()) { @@ -85,9 +86,8 @@ namespace CodeWalker.GameFiles } else if (node is XText text) { - byte[] bytes = null; - var contentAttr = node.Parent?.Attribute("content"); - if (contentAttr != null) + byte[]? bytes = null; + if (node.Parent?.TryGetAttribute("content", out var contentAttr) ?? false) { if (contentAttr.Value == "char_array") { @@ -97,14 +97,12 @@ namespace CodeWalker.GameFiles { bytes = GetUshortArray(text.Value); } - else - { } } else { bytes = Encoding.ASCII.GetBytes(text.Value).Concat(new byte[] { 0x00 }).ToArray(); } - if (bytes != null) + if (bytes is not null) { return new RbfBytes() { @@ -138,7 +136,7 @@ namespace CodeWalker.GameFiles } else if (val.StartsWith("0x")) { - uint.TryParse(val.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out uint u); + uint.TryParse(val.AsSpan(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out uint u); return new RbfUint32() { Name = name, @@ -167,37 +165,32 @@ namespace CodeWalker.GameFiles - private static byte[] GetByteArray(string text) + private static byte[]? GetByteArray(string text) { - if (string.IsNullOrEmpty(text)) return null; - var data = new List(); + if (string.IsNullOrEmpty(text)) + return null; + using var data = new PooledList(); var split = Regex.Split(text, @"[\s\r\n\t]"); - for (int i = 0; i < split.Length; i++) + foreach(var str in split) { - if (!string.IsNullOrEmpty(split[i])) - { - var str = split[i]; - if (string.IsNullOrEmpty(str)) continue; - var val = Convert.ToByte(str); - data.Add(val); - } + if (string.IsNullOrEmpty(str)) + continue; + var val = Convert.ToByte(str); + data.Add(val); } return data.ToArray(); } private static byte[] GetUshortArray(string text) { - var data = new List(); + using var data = new PooledList(); var split = Regex.Split(text, @"[\s\r\n\t]"); - for (int i = 0; i < split.Length; i++) + foreach(var str in split) { - if (!string.IsNullOrEmpty(split[i])) - { - var str = split[i]; - if (string.IsNullOrEmpty(str)) continue; - var val = Convert.ToUInt16(str); - data.Add((byte)((val >> 0) & 0xFF)); - data.Add((byte)((val >> 8) & 0xFF)); - } + if (string.IsNullOrEmpty(str)) + continue; + var val = Convert.ToUInt16(str); + data.Add((byte)((val >> 0) & 0xFF)); + data.Add((byte)((val >> 8) & 0xFF)); } return data.ToArray(); } diff --git a/CodeWalker.Core/GameFiles/Resources/Bounds.cs b/CodeWalker.Core/GameFiles/Resources/Bounds.cs index f2b0a71..572b9ba 100644 --- a/CodeWalker.Core/GameFiles/Resources/Bounds.cs +++ b/CodeWalker.Core/GameFiles/Resources/Bounds.cs @@ -37,6 +37,9 @@ using CodeWalker.World; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; +using static CodeWalker.GameFiles.MetaXmlBase; namespace CodeWalker.GameFiles { @@ -89,11 +92,11 @@ namespace CodeWalker.GameFiles writer.WriteBlock(this.Bounds); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, BoundNameHashes), - new Tuple(0x30, Bounds) + return new (long, IResourceBlock)[] { + (0x20, BoundNameHashes), + (0x30, Bounds) }; } } @@ -114,11 +117,7 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public class Bounds : ResourceFileBase, IResourceXXSystemBlock { - public override long BlockLength - { - get { return 112; } - } - + public override long BlockLength => 112; // structure data public BoundsType Type { get; set; } public byte Unknown_11h { get; set; } // 0x00000000 @@ -126,9 +125,9 @@ namespace CodeWalker.GameFiles public float SphereRadius { get; set; } public uint Unknown_18h { get; set; } // 0x00000000 public uint Unknown_1Ch { get; set; } // 0x00000000 - public Vector3 BoxMax { get; set; } + public Vector3 BoxMax; public float Margin { get; set; } - public Vector3 BoxMin { get; set; } + public Vector3 BoxMin; public uint Unknown_3Ch { get; set; } = 1; //1, 2 (yft only) public Vector3 BoxCenter { get; set; } public byte MaterialIndex { get; set; } @@ -144,10 +143,7 @@ namespace CodeWalker.GameFiles public byte RoomId { - get - { - return (byte)(RoomId_and_PedDensity & 0x1F); - } + get => (byte)(RoomId_and_PedDensity & 0x1F); set { RoomId_and_PedDensity = (byte)((RoomId_and_PedDensity & 0xE0) + (value & 0x1F)); @@ -155,10 +151,7 @@ namespace CodeWalker.GameFiles } public byte PedDensity { - get - { - return (byte)(RoomId_and_PedDensity >> 5); - } + get => (byte)(RoomId_and_PedDensity >> 5); set { RoomId_and_PedDensity = (byte)((RoomId_and_PedDensity & 0x1F) + ((value & 0x7) << 5)); @@ -170,13 +163,7 @@ namespace CodeWalker.GameFiles public YbnFile OwnerYbn { get; set; } public object Owner { get; set; } public string OwnerName { get; set; } - public bool OwnerIsFragment - { - get - { - return ((Owner is FragPhysicsLOD) || (Owner is FragPhysArchetype) || (Owner is FragDrawable)); - } - } + public bool OwnerIsFragment => (Owner is FragPhysicsLOD) || (Owner is FragPhysArchetype) || (Owner is FragDrawable); public string GetName() { string n = OwnerName; @@ -188,17 +175,12 @@ namespace CodeWalker.GameFiles } return n; } - public string GetTitle() - { - var n = GetName(); - var t = Type.ToString(); - return t + ": " + n; - } + public string GetTitle() => $"{Type}: {GetName()}"; public YbnFile GetRootYbn() { var r = OwnerYbn; var p = Parent; - while ((p != null) && (r == null)) + while (p is not null && r is null) { r = p.OwnerYbn; p = p.Parent; @@ -209,7 +191,7 @@ namespace CodeWalker.GameFiles { var r = Owner; var p = Parent; - while ((p != null) && (r == null)) + while (p is not null && r is null) { r = p.Owner; p = p.Parent; @@ -217,7 +199,9 @@ namespace CodeWalker.GameFiles return r; } - public Matrix Transform { get; set; } = Matrix.Identity; //when it's the child of a bound composite + + public Matrix _Transform = Matrix.Identity; + public Matrix Transform { get => _Transform; set => _Transform = value; } //when it's the child of a bound composite public Matrix TransformInv { get; set; } = Matrix.Identity; public BoundCompositeChildrenFlags CompositeFlags1 { get; set; } @@ -226,10 +210,7 @@ namespace CodeWalker.GameFiles public virtual Vector3 Scale { - get - { - return Transform.ScaleVector; - } + get => Transform.ScaleVector; set { var m = Transform; @@ -240,10 +221,7 @@ namespace CodeWalker.GameFiles } public virtual Vector3 Position { - get - { - return Transform.TranslationVector; - } + get => Transform.TranslationVector; set { var m = Transform; @@ -254,10 +232,7 @@ namespace CodeWalker.GameFiles } public virtual Quaternion Orientation { - get - { - return Transform.ToQuaternion(); - } + get => Transform.ToQuaternion(); set { var m = value.ToMatrix(); @@ -294,86 +269,6 @@ namespace CodeWalker.GameFiles this.Unknown_5Eh = reader.ReadUInt16(); this.Unknown_60h = reader.ReadVector3(); this.Volume = reader.ReadSingle(); - - if (Unknown_11h != 0) - { } - if (Unknown_12h != 0) - { } - if (Unknown_18h != 0) - { } - if (Unknown_1Ch != 0) - { } - if (Unknown_5Eh != 0) - { } - - - switch (Unknown_3Ch) - { - case 1: - case 2: // only found in .yft - case 0: //only found in .ypt - break; - default: - break; - } - switch (UnkFlags)//yeah it's probably flags - { - case 0://for all .ybn files - case 26: //v_corp_banktrolley.ydr - case 18: //v_corp_banktrolley.ydr - case 16: //v_corp_banktrolley.ydr - case 2: //v_corp_bk_bust.ydr - case 10: //v_corp_bk_bust.ydr - case 130://v_corp_bk_chair2.ydr - case 30: //v_corp_bk_flag.ydr - case 144://v_corp_bombbin.ydr - case 8: //v_corp_conftable2.ydr - case 12: //v_corp_conftable3.ydr - case 4: //v_corp_cubiclefd.ydr - case 22: //v_corp_hicksdoor.ydr - case 150://v_corp_hicksdoor.ydr - case 128://v_corp_officedesk003.ydr - case 24: //v_corp_potplant1.ydr - case 14: //v_ind_cm_aircomp.ydr - case 146://v_ind_rc_rubbish.ydr - case 134://v_ilev_bk_door.ydr - case 64: //v_ilev_carmod3lamp.ydr - case 28: //v_ilev_cbankvaulgate02.ydr - case 132://v_ilev_ch_glassdoor.ydr - case 6: //v_ilev_cs_door01.ydr - case 20: //v_ilev_fib_atrgl1s.ydr - case 94: //v_ilev_uvcheetah.ydr - case 148://v_serv_metro_elecpole_singlel.ydr - case 48: //v_serv_metro_statseat1.ydr - case 50: //v_serv_securitycam_03.ydr - case 80: //prop_bmu_02_ld.ydr - case 92: //prop_bmu_02_ld.ydr - case 82: //prop_roofvent_08a.ydr - case 1: //prop_portasteps_02.ydr - case 65: //prop_storagetank_01_cr.ydr - case 90: //prop_storagetank_01_cr.ydr - case 68: //prop_sub_frame_01a.ydr - case 66: //prop_ld_cable.ydr - case 78: //prop_ld_cable.ydr - case 72: //prop_snow_oldlight_01b.ydr - case 13: //prop_conslift_steps.ydr - case 86: //prop_scafold_01a.ydr - case 84: //prop_scafold_04a.ydr - case 76: //prop_fruitstand_b_nite.ydr - case 88: //prop_telegwall_01a.ydr - case 17: //prop_air_stair_04a_cr.ydr - case 196://prop_dock_rtg_ld.ydr - case 70: //prop_fnclink_02gate5.ydr - case 214://prop_facgate_04_l.ydr - case 198://prop_fncsec_01a.ydr - case 210://prop_rub_cardpile_01.yft - case 212://prop_streetlight_01b.yft - case 208://prop_streetlight_03e.yft - break; - default: - break; - } - } public override void Write(ResourceDataWriter writer, params object[] parameters) { @@ -464,7 +359,7 @@ namespace CodeWalker.GameFiles } public static void WriteXmlNode(Bounds b, StringBuilder sb, int indent, string name = "Bounds") { - if (b == null) + if (b is null) { YbnXml.SelfClosingTag(sb, indent, name + " type=\"" + BoundsType.None.ToString() + "\""); } @@ -475,9 +370,11 @@ namespace CodeWalker.GameFiles YbnXml.CloseTag(sb, indent, name); } } - public static Bounds ReadXmlNode(XmlNode node, object owner = null, BoundComposite parent = null) + public static Bounds? ReadXmlNode(XmlNode node, object owner = null, BoundComposite parent = null) { - if (node == null) return null; + if (node is null) + return null; + var typestr = Xml.GetStringAttribute(node, "type"); var type = Xml.GetEnumValue(typestr); var b = Create(type); @@ -498,27 +395,29 @@ namespace CodeWalker.GameFiles reader.Position -= 17; return Create(type); } - public static Bounds Create(BoundsType type) + public static Bounds? Create(BoundsType type) { - switch (type) + return type switch { - case BoundsType.None: return null; - case BoundsType.Sphere: return new BoundSphere(); - case BoundsType.Capsule: return new BoundCapsule(); - case BoundsType.Box: return new BoundBox(); - case BoundsType.Geometry: return new BoundGeometry(); - case BoundsType.GeometryBVH: return new BoundBVH(); - case BoundsType.Composite: return new BoundComposite(); - case BoundsType.Disc: return new BoundDisc(); - case BoundsType.Cylinder: return new BoundCylinder(); - case BoundsType.Cloth: return new BoundCloth(); - default: return null; // throw new Exception("Unknown bound type"); - } + BoundsType.None => null, + BoundsType.Sphere => new BoundSphere(), + BoundsType.Capsule => new BoundCapsule(), + BoundsType.Box => new BoundBox(), + BoundsType.Geometry => new BoundGeometry(), + BoundsType.GeometryBVH => new BoundBVH(), + BoundsType.Composite => new BoundComposite(), + BoundsType.Disc => new BoundDisc(), + BoundsType.Cylinder => new BoundCylinder(), + BoundsType.Cloth => new BoundCloth(), + _ => null,// throw new Exception("Unknown bound type"); + }; } - public virtual void CopyFrom(Bounds other) + public virtual void CopyFrom(Bounds? other) { - if (other == null) return; + if (other is null) + return; + SphereRadius = other.SphereRadius; SphereCenter = other.SphereCenter; BoxCenter = other.BoxCenter; @@ -546,7 +445,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class BoundSphere : Bounds + [TC(typeof(EXP))] + public class BoundSphere : Bounds { public override void ReadXml(XmlNode node) { @@ -632,7 +532,7 @@ namespace CodeWalker.GameFiles bcap.PointA = SphereCenter - extent; bcap.PointB = SphereCenter + extent; bcap.Radius = Margin; - if (sph.Intersects(ref bcap, out res.Normal)) + if (sph.Intersects(in bcap, out res.Normal)) { res.Hit = true; } @@ -647,13 +547,13 @@ namespace CodeWalker.GameFiles bcap.PointB = SphereCenter + extent; bcap.Radius = Margin; float testdist; - if (ray.Intersects(ref bcap, out testdist) && (testdist < maxdist)) + if (ray.Intersects(in bcap, out testdist) && (testdist < maxdist)) { res.Hit = true; res.HitDist = testdist; res.HitBounds = this; res.Position = ray.Position + ray.Direction * testdist; - res.Normal = bcap.Normal(ref res.Position); + res.Normal = bcap.Normal(in res.Position); res.Material.Type = MaterialIndex; } return res; @@ -780,7 +680,7 @@ namespace CodeWalker.GameFiles bcyl.Radius = SphereRadius; Vector3 n; float testdist; - if (ray.Intersects(ref bcyl, out testdist, out n) && (testdist < maxdist)) + if (ray.Intersects(in bcyl, out testdist, out n) && (testdist < maxdist)) { res.Hit = true; res.HitDist = testdist; @@ -841,7 +741,7 @@ namespace CodeWalker.GameFiles bcap.PointA = SphereCenter - size; bcap.PointB = SphereCenter + size; bcap.Radius = extent.X * 0.5f; - if (sph.Intersects(ref bcap, out res.Normal)) + if (sph.Intersects(in bcap, out res.Normal)) { res.Hit = true; } @@ -858,7 +758,7 @@ namespace CodeWalker.GameFiles bcyl.Radius = extent.X * 0.5f; Vector3 n; float testdist; - if (ray.Intersects(ref bcyl, out testdist, out n) && (testdist < maxdist)) + if (ray.Intersects(in bcyl, out testdist, out n) && (testdist < maxdist)) { res.Hit = true; res.HitDist = testdist; @@ -1266,17 +1166,16 @@ namespace CodeWalker.GameFiles UpdateEdgeIndices(); UpdateTriangleAreas(); - var list = new List(base.GetReferences()); + using var list = new PooledList(base.GetReferences()); if (VerticesShrunk != null) { - var verts = new List(); - foreach (var v in VerticesShrunk) + var verts = new BoundVertex_s[VerticesShrunk.Length]; + for (int i = 0; i < VerticesShrunk.Length; i++) { - var vq = v / Quantum; - var vs = new BoundVertex_s(vq); - verts.Add(vs); + var vq = VerticesShrunk[i] / Quantum; + verts[i] = new BoundVertex_s(vq); } - VerticesShrunkBlock = new ResourceSystemStructBlock(verts.ToArray()); + VerticesShrunkBlock = new ResourceSystemStructBlock(verts); list.Add(VerticesShrunkBlock); } if (Polygons != null) @@ -1359,8 +1258,8 @@ namespace CodeWalker.GameFiles byte b0 = polygonData[offset]; polygonData[offset] = (byte)(b0 & 0xF8);//mask it off BoundPolygonType type = (BoundPolygonType)(b0 & 7); - BoundPolygon p = CreatePolygon(type); - if (p != null) + BoundPolygon? p = CreatePolygon(type); + if (p is not null) { p.Index = i; p.Read(polygonData, offset); @@ -1387,18 +1286,21 @@ namespace CodeWalker.GameFiles } return r; } - public Vector3 GetVertex(int index) + public ref readonly Vector3 GetVertex(int index) { - return ((index >= 0) && (index < Vertices.Length)) ? Vertices[index] : Vector3.Zero; + if (index < 0 || index >= Vertices.Length) + return ref Vector3.Zero; + + return ref Vertices[index]; } public Vector3 GetVertexPos(int index) { var v = GetVertex(index) + CenterGeom; - return Vector3.Transform(v, Transform).XYZ(); + return Vector3.Transform(v, _Transform).XYZ(); } public void SetVertexPos(int index, Vector3 v) { - if ((index >= 0) && (index < Vertices.Length)) + if (index >= 0 && index < Vertices.Length) { var t = Vector3.Transform(v, TransformInv).XYZ() - CenterGeom; Vertices[index] = t; @@ -1497,7 +1399,7 @@ namespace CodeWalker.GameFiles tcap.PointA = GetVertexPos(pcap.capsuleIndex1); tcap.PointB = GetVertexPos(pcap.capsuleIndex2); tcap.Radius = pcap.capsuleRadius; - polyhit = sph.Intersects(ref tcap, out n1); + polyhit = sph.Intersects(in tcap, out n1); break; case BoundPolygonType.Box: var pbox = polygon as BoundPolygonBox; @@ -1550,7 +1452,7 @@ namespace CodeWalker.GameFiles ttcap.PointA = GetVertexPos(pcyl.cylinderIndex1); ttcap.PointB = GetVertexPos(pcyl.cylinderIndex2); ttcap.Radius = pcyl.cylinderRadius; - polyhit = sph.Intersects(ref ttcap, out n1); + polyhit = sph.Intersects(in ttcap, out n1); break; default: break; @@ -1604,9 +1506,9 @@ namespace CodeWalker.GameFiles tcap.PointA = GetVertexPos(pcap.capsuleIndex1); tcap.PointB = GetVertexPos(pcap.capsuleIndex2); tcap.Radius = pcap.capsuleRadius; - polyhit = ray.Intersects(ref tcap, out polyhittestdist); + polyhit = ray.Intersects(in tcap, out polyhittestdist); res.Position = (ray.Position + ray.Direction * polyhittestdist); - if (polyhit) n1 = tcap.Normal(ref res.Position); + if (polyhit) n1 = tcap.Normal(in res.Position); break; case BoundPolygonType.Box: var pbox = polygon as BoundPolygonBox; @@ -1650,7 +1552,7 @@ namespace CodeWalker.GameFiles tcyl.PointA = GetVertexPos(pcyl.cylinderIndex1); tcyl.PointB = GetVertexPos(pcyl.cylinderIndex2); tcyl.Radius = pcyl.cylinderRadius; - polyhit = ray.Intersects(ref tcyl, out polyhittestdist, out n1); + polyhit = ray.Intersects(in tcyl, out polyhittestdist, out n1); break; default: break; @@ -1799,8 +1701,7 @@ namespace CodeWalker.GameFiles for (int i = 0; i < Polygons.Length; i++) { - var tri = Polygons[i] as BoundPolygonTriangle; - if (tri == null) { continue; } + if (Polygons[i] is not BoundPolygonTriangle tri) { continue; } var p1 = tri.Vertex1; var p2 = tri.Vertex2; @@ -2017,7 +1918,7 @@ namespace CodeWalker.GameFiles var v1 = btri.Vertex1; var v2 = btri.Vertex2; var v3 = btri.Vertex3; - var area = TriangleMath.Area(ref v1, ref v2, ref v3); + var area = TriangleMath.Area(in v1, in v2, in v3); //if (Math.Abs(btri.triArea - area) > Math.Max(area*0.1f,0.1f)) //{ }//ehh good enough btri.triArea = area; @@ -2157,10 +2058,10 @@ namespace CodeWalker.GameFiles public int AddVertex() { - var verts = Vertices?.ToList() ?? new List(); - var verts2 = VerticesShrunk?.ToList(); - var vertcols = VertexColours?.ToList(); - var vertobjs = VertexObjects?.ToList(); + using var verts = Vertices?.ToPooledList() ?? new PooledList(); + using var verts2 = VerticesShrunk?.ToPooledList(); + using var vertcols = VertexColours?.ToPooledList(); + using var vertobjs = VertexObjects?.ToPooledList(); var index = verts.Count; verts.Add(Vector3.Zero); @@ -2206,30 +2107,19 @@ namespace CodeWalker.GameFiles return p; } - private BoundPolygon CreatePolygon(BoundPolygonType type) + private BoundPolygon? CreatePolygon(BoundPolygonType type) { - BoundPolygon p = null; - switch (type) + BoundPolygon? p = type switch { - case BoundPolygonType.Triangle: - p = new BoundPolygonTriangle(); - break; - case BoundPolygonType.Sphere: - p = new BoundPolygonSphere(); - break; - case BoundPolygonType.Capsule: - p = new BoundPolygonCapsule(); - break; - case BoundPolygonType.Box: - p = new BoundPolygonBox(); - break; - case BoundPolygonType.Cylinder: - p = new BoundPolygonCylinder(); - break; - default: - break; - } - if (p != null) + BoundPolygonType.Triangle => new BoundPolygonTriangle(), + BoundPolygonType.Sphere => new BoundPolygonSphere(), + BoundPolygonType.Capsule => new BoundPolygonCapsule(), + BoundPolygonType.Box => new BoundPolygonBox(), + BoundPolygonType.Cylinder => new BoundPolygonCylinder(), + _ => null, + }; + + if (p is not null) { p.Owner = this; } @@ -2254,7 +2144,7 @@ namespace CodeWalker.GameFiles public uint Unknown_14Ch { get; set; } // 0x00000000 // reference data - public BVH BVH { get; set; } + public BVH? BVH { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2322,8 +2212,12 @@ namespace CodeWalker.GameFiles { BuildBVH(false); - var list = new List(base.GetReferences()); - if (BVH != null) list.Add(BVH); + if (BVH is null) + return base.GetReferences(); + + using var list = new PooledList(base.GetReferences()); + if (BVH != null) + list.Add(BVH); return list.ToArray(); } @@ -2334,8 +2228,6 @@ namespace CodeWalker.GameFiles { if ((Polygons?.Length ?? 0) <= 0) //in some des_ drawables? { - if (BVH != null) - { } BVH = null; return; } @@ -2344,17 +2236,19 @@ namespace CodeWalker.GameFiles //var tnodes = BVHBuilder.Unbuild(BVH); } - var items = new List(); + var items = new List(Polygons.Length); for (int i = 0; i < Polygons.Length; i++) { var poly = Polygons[i]; if (poly != null) { - var it = new BVHBuilderItem(); - it.Min = poly.BoxMin; - it.Max = poly.BoxMax; - it.Index = i; - it.Polygon = poly; + var it = new BVHBuilderItem + { + Min = poly.BoxMin, + Max = poly.BoxMax, + Index = i, + Polygon = poly + }; items.Add(it); } } @@ -2568,20 +2462,20 @@ namespace CodeWalker.GameFiles // reference data public ResourcePointerArray64 Children { get; set; } - public Matrix4F_s[] ChildrenTransformation1 { get; set; } - public Matrix4F_s[] ChildrenTransformation2 { get; set; } - public AABB_s[] ChildrenBoundingBoxes { get; set; } - public BoundCompositeChildrenFlags[] ChildrenFlags1 { get; set; } - public BoundCompositeChildrenFlags[] ChildrenFlags2 { get; set; } + public Matrix4F_s[]? ChildrenTransformation1 { get; set; } + public Matrix4F_s[]? ChildrenTransformation2 { get; set; } + public AABB_s[]? ChildrenBoundingBoxes { get; set; } + public BoundCompositeChildrenFlags[] ChildrenFlags1 { get; set; } = []; + public BoundCompositeChildrenFlags[] ChildrenFlags2 { get; set; } = []; - public BVH BVH { get; set; } + public BVH? BVH { get; set; } - private ResourceSystemStructBlock ChildrenTransformation1Block = null; - private ResourceSystemStructBlock ChildrenTransformation2Block = null; - private ResourceSystemStructBlock ChildrenBoundingBoxesBlock = null; - private ResourceSystemStructBlock ChildrenFlags1Block = null; - private ResourceSystemStructBlock ChildrenFlags2Block = null; + private ResourceSystemStructBlock? ChildrenTransformation1Block = null; + private ResourceSystemStructBlock? ChildrenTransformation2Block = null; + private ResourceSystemStructBlock? ChildrenBoundingBoxesBlock = null; + private ResourceSystemStructBlock? ChildrenFlags1Block = null; + private ResourceSystemStructBlock? ChildrenFlags2Block = null; public override void Read(ResourceDataReader reader, params object[] parameters) @@ -2605,8 +2499,8 @@ namespace CodeWalker.GameFiles this.ChildrenTransformation1 = reader.ReadStructsAt(this.ChildrenTransformation1Pointer, this.ChildrenCount1); this.ChildrenTransformation2 = reader.ReadStructsAt(this.ChildrenTransformation2Pointer, this.ChildrenCount1); this.ChildrenBoundingBoxes = reader.ReadStructsAt(this.ChildrenBoundingBoxesPointer, this.ChildrenCount1); - this.ChildrenFlags1 = reader.ReadStructsAt(this.ChildrenFlags1Pointer, this.ChildrenCount1); - this.ChildrenFlags2 = reader.ReadStructsAt(this.ChildrenFlags2Pointer, this.ChildrenCount1); + this.ChildrenFlags1 = reader.ReadStructsAt(this.ChildrenFlags1Pointer, this.ChildrenCount1) ?? []; + this.ChildrenFlags2 = reader.ReadStructsAt(this.ChildrenFlags2Pointer, this.ChildrenCount1) ?? []; this.BVH = reader.ReadBlockAt(this.BVHPointer); //if (BVH != null) @@ -2630,8 +2524,8 @@ namespace CodeWalker.GameFiles var xform = ((childTransforms != null) && (i < childTransforms.Length)) ? childTransforms[i].ToMatrix() : Matrix.Identity; child.Transform = xform; child.TransformInv = Matrix.Invert(xform); - child.CompositeFlags1 = ((ChildrenFlags1 != null) && (i < ChildrenFlags1.Length)) ? ChildrenFlags1[i] : new BoundCompositeChildrenFlags(); - child.CompositeFlags2 = ((ChildrenFlags2 != null) && (i < ChildrenFlags2.Length)) ? ChildrenFlags2[i] : new BoundCompositeChildrenFlags(); + child.CompositeFlags1 = i < ChildrenFlags1.Length ? ChildrenFlags1[i] : new BoundCompositeChildrenFlags(); + child.CompositeFlags2 = i < ChildrenFlags2.Length ? ChildrenFlags2[i] : new BoundCompositeChildrenFlags(); //if ((child.CompositeFlags1.Flags1 != child.CompositeFlags2.Flags1) || (child.CompositeFlags1.Flags2 != child.CompositeFlags2.Flags2)) //{ } //no hits @@ -2805,34 +2699,63 @@ namespace CodeWalker.GameFiles UpdateChildrenBounds(); UpdateChildrenTransformations(); - var list = new List(base.GetReferences()); - if (Children != null) list.Add(Children); - if (ChildrenTransformation1 != null) + using var list = new PooledList(base.GetReferences()); + if (Children is not null) + list.Add(Children); + + if (ChildrenTransformation1 is not null && ChildrenTransformation1.Length > 0) { ChildrenTransformation1Block = new ResourceSystemStructBlock(ChildrenTransformation1); list.Add(ChildrenTransformation1Block); } - if (ChildrenTransformation2 != null) + else + { + ChildrenTransformation1Block = null; + } + + if (ChildrenTransformation2 is not null && ChildrenTransformation2.Length > 0) { ChildrenTransformation2Block = new ResourceSystemStructBlock(ChildrenTransformation2); list.Add(ChildrenTransformation2Block); } - if (ChildrenBoundingBoxes != null) + else + { + ChildrenTransformation2Block = null; + } + + if (ChildrenBoundingBoxes is not null && ChildrenBoundingBoxes.Length > 0) { ChildrenBoundingBoxesBlock = new ResourceSystemStructBlock(ChildrenBoundingBoxes); list.Add(ChildrenBoundingBoxesBlock); } - if (ChildrenFlags1 != null) + else + { + ChildrenBoundingBoxesBlock = null; + } + + if (ChildrenFlags1.Length > 0) { ChildrenFlags1Block = new ResourceSystemStructBlock(ChildrenFlags1); list.Add(ChildrenFlags1Block); } - if (ChildrenFlags2 != null) + else + { + ChildrenFlags1Block = null; + } + + if (ChildrenFlags2.Length > 0) { ChildrenFlags2Block = new ResourceSystemStructBlock(ChildrenFlags2); list.Add(ChildrenFlags2Block); } - if (BVH != null) list.Add(BVH); + else + { + ChildrenFlags2Block = null; + } + + if (BVH is not null) + list.Add(BVH); + return list.ToArray(); } @@ -2842,26 +2765,19 @@ namespace CodeWalker.GameFiles public void BuildBVH() { - if (Children?.data_items == null) + if (Children?.data_items is null || Children.data_items.Length <= 5) //composites only get BVHs if they have 6 or more children. { BVH = null; return; } - if (Children.data_items.Length <= 5) //composites only get BVHs if they have 6 or more children. - { - if (BVH != null) - { } - BVH = null; - return; - } - if (BVH != null) + if (BVH is not null) { //var tnodes = BVHBuilder.Unbuild(BVH); } else { //why are we here? yft's hit this... (and when loading XML!) - if (!(Owner is FragPhysicsLOD) && !(Owner is FragPhysArchetype) && !(Owner is VerletCloth)) + if (Owner is not FragPhysicsLOD && Owner is not FragPhysArchetype && Owner is not VerletCloth) { } } if (Owner is FragPhysArchetype fpa) @@ -2873,7 +2789,7 @@ namespace CodeWalker.GameFiles } } - var items = new List(); + var items = new List(Children.data_items.Length); for (int i = 0; i < Children.data_items.Length; i++) { var child = Children.data_items[i]; @@ -2881,11 +2797,13 @@ namespace CodeWalker.GameFiles { var cbox = new BoundingBox(child.BoxMin, child.BoxMax); var tcbox = cbox.Transform(child.Transform); - var it = new BVHBuilderItem(); - it.Min = tcbox.Minimum; - it.Max = tcbox.Maximum; - it.Index = i; - it.Bounds = child; + var it = new BVHBuilderItem + { + Min = tcbox.Minimum, + Max = tcbox.Maximum, + Index = i, + Bounds = child + }; items.Add(it); } else @@ -2899,37 +2817,38 @@ namespace CodeWalker.GameFiles public void UpdateChildrenFlags() { - if (Children?.data_items == null) + if (Children?.data_items is null) { - ChildrenFlags1 = null; - ChildrenFlags2 = null; + ChildrenFlags1 = []; + ChildrenFlags2 = []; return; } if (OwnerIsFragment)//don't use flags in fragments { - ChildrenFlags1 = null; - ChildrenFlags2 = null; + ChildrenFlags1 = []; + ChildrenFlags2 = []; return; } - var cf1 = new List(); - var cf2 = new List(); + var cf1 = new BoundCompositeChildrenFlags[Children.data_items.Length]; + var cf2 = new BoundCompositeChildrenFlags[Children.data_items.Length]; - foreach (var child in Children.data_items) + for(int i = 0; i < Children.data_items.Length; i++) { + var child = Children.data_items[i]; var f1 = new BoundCompositeChildrenFlags(); var f2 = new BoundCompositeChildrenFlags(); - if (child != null) + if (child is not null) { f1 = child.CompositeFlags1; f2 = child.CompositeFlags2; } - cf1.Add(f1); - cf2.Add(f2); + cf1[i] = f1; + cf2[i] = f2; } - ChildrenFlags1 = cf1.ToArray(); - ChildrenFlags2 = cf2.ToArray(); + ChildrenFlags1 = cf1; + ChildrenFlags2 = cf2; } public void UpdateChildrenBounds() @@ -2940,61 +2859,60 @@ namespace CodeWalker.GameFiles return; } - var cbl = new List(); - foreach (var child in Children.data_items) + var cbl = new AABB_s[Children.data_items.Length]; + for(int i = 0; i < Children.data_items.Length; i++) { - var aabb = new AABB_s(); - if (child != null) + var child = Children.data_items[i]; + if (child is not null) { - aabb.Min = new Vector4(child.BoxMin, float.Epsilon); - aabb.Max = new Vector4(child.BoxMax, child.Margin); + cbl[i] = new AABB_s() + { + Min = new Vector4(child.BoxMin, float.Epsilon), + Max = new Vector4(child.BoxMax, child.Margin), + }; } - cbl.Add(aabb); } - ChildrenBoundingBoxes = cbl.ToArray(); - + ChildrenBoundingBoxes = cbl; } public void UpdateChildrenTransformations() { - if (Children?.data_items == null) + var dataItems = Children?.data_items; + if (dataItems is null) { - ChildrenTransformation1 = null; - ChildrenTransformation2 = null; + ChildrenTransformation1 = []; + ChildrenTransformation2 = []; return; } - var ct1 = new List(); - foreach (var child in Children.data_items) + var ct1 = new Matrix4F_s[dataItems.Length]; + for (int i = 0; i < dataItems.Length; i++) { + var child = dataItems[i]; var m = Matrix4F_s.Identity; - if (child != null) + var ownerIsFragment = OwnerIsFragment; + if (child is not null) { - m = new Matrix4F_s(child.Transform); + m = new Matrix4F_s(in child._Transform); } - if (OwnerIsFragment) + if (!OwnerIsFragment) { - m.Flags1 = 0x7f800001; - m.Flags2 = 0x7f800001; - m.Flags3 = 0x7f800001; - m.Flags4 = 0x7f800001; - } - else - { - //m.Column4 = new Vector4(0.0f, float.Epsilon, float.Epsilon, 0.0f);//is this right? TODO: check! - m.Flags1 = 0; - m.Flags2 = 1; - m.Flags3 = 1; - m.Flags4 = 0; + m = m with + { + Flags1 = 0U, + Flags2 = 1U, + Flags3 = 1U, + Flags4 = 0U + }; } - ct1.Add(m); + ct1[i] = m; } - ChildrenTransformation1 = ct1.ToArray(); - ChildrenTransformation2 = null; + ChildrenTransformation1 = ct1; + ChildrenTransformation2 = []; } @@ -3011,7 +2929,8 @@ namespace CodeWalker.GameFiles for (int i = 0; i < compchilds.Length; i++) { var c = compchilds[i]; - if (c == null) continue; + if (c == null) + continue; tsph.Center = c.TransformInv.Multiply(sph.Center); @@ -3032,13 +2951,14 @@ namespace CodeWalker.GameFiles var tray = ray; var compchilds = Children?.data_items; - if (compchilds == null) - { return res; } + if (compchilds is null) + return res; for (int i = 0; i < compchilds.Length; i++) { var c = compchilds[i]; - if (c == null) continue; + if (c is null) + continue; tray.Position = c.TransformInv.Multiply(ray.Position); tray.Direction = c.TransformInv.MultiplyRot(ray.Direction); @@ -3048,7 +2968,7 @@ namespace CodeWalker.GameFiles chit.Position = c.Transform.Multiply(chit.Position); chit.Normal = c.Transform.MultiplyRot(chit.Normal); - res.TryUpdate(ref chit); + res.TryUpdate(in chit); } return res; @@ -3091,7 +3011,8 @@ namespace CodeWalker.GameFiles public void AddChild(Bounds child) { - if (Children == null) Children = new ResourcePointerArray64(); + if (Children is null) + Children = new ResourcePointerArray64(); var children = Children.data_items?.ToList() ?? new List(); var transforms1 = ChildrenTransformation1?.ToList() ?? new List(); @@ -3133,7 +3054,8 @@ namespace CodeWalker.GameFiles Box = 3, Cylinder = 4, } - [TC(typeof(EXP))] public abstract class BoundPolygon : IMetaXmlItem + [TC(typeof(EXP))] + public abstract class BoundPolygon : IMetaXmlItem { public BoundPolygonType Type { get; set; } public BoundGeometry Owner { get; set; } //for browsing/editing convenience @@ -3196,17 +3118,8 @@ namespace CodeWalker.GameFiles public abstract void Write(BinaryWriter bw); public abstract void WriteXml(StringBuilder sb, int indent); public abstract void ReadXml(XmlNode node); - public virtual string Title - { - get - { - return Type.ToString() + " " + Index.ToString(); - } - } - public override string ToString() - { - return Type.ToString(); - } + public virtual string Title => $"{Type} {Index}"; + public override string ToString() => Type.ToString(); } [TC(typeof(EXP))] public class BoundPolygonTriangle : BoundPolygon { @@ -3227,34 +3140,22 @@ namespace CodeWalker.GameFiles public Vector3 Vertex1 { - get { return (Owner != null) ? Owner.GetVertexPos(vertIndex1) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(vertIndex1, value); } + get => Owner?.GetVertexPos(vertIndex1) ?? Vector3.Zero; + set => Owner?.SetVertexPos(vertIndex1, value); } public Vector3 Vertex2 { - get { return (Owner != null) ? Owner.GetVertexPos(vertIndex2) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(vertIndex2, value); } + get => Owner?.GetVertexPos(vertIndex2) ?? Vector3.Zero; + set => Owner?.SetVertexPos(vertIndex2, value); } public Vector3 Vertex3 { - get { return (Owner != null) ? Owner.GetVertexPos(vertIndex3) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(vertIndex3, value); } + get => Owner?.GetVertexPos(vertIndex3) ?? Vector3.Zero; + set => Owner?.SetVertexPos(vertIndex3, value); } - public override Vector3 BoxMin - { - get - { - return Vector3.Min(Vector3.Min(Vertex1, Vertex2), Vertex3); - } - } - public override Vector3 BoxMax - { - get - { - return Vector3.Max(Vector3.Max(Vertex1, Vertex2), Vertex3); - } - } + public override Vector3 BoxMin => Vector3.Min(Vector3.Min(Vertex1, Vertex2), Vertex3); + public override Vector3 BoxMax => Vector3.Max(Vector3.Max(Vertex1, Vertex2), Vertex3); public override Vector3 Scale { get @@ -3325,10 +3226,7 @@ namespace CodeWalker.GameFiles public override int[] VertexIndices { - get - { - return new[] { vertIndex1, vertIndex2, vertIndex3 }; - } + get => [vertIndex1, vertIndex2, vertIndex3]; set { if (value?.Length >= 3) @@ -3363,18 +3261,12 @@ namespace CodeWalker.GameFiles switch (edgeid) { case 1: - if (edgeIndex1 != polyindex) - { } edgeIndex1 = polyindex; break; case 2: - if (edgeIndex2 != polyindex) - { } edgeIndex2 = polyindex; break; case 3: - if (edgeIndex3 != polyindex) - { } edgeIndex3 = polyindex; break; default: @@ -3516,11 +3408,11 @@ namespace CodeWalker.GameFiles } public override void Read(byte[] bytes, int offset) { - sphereType = BitConverter.ToUInt16(bytes, offset + 0); - sphereIndex = BitConverter.ToUInt16(bytes, offset + 2); - sphereRadius = BitConverter.ToSingle(bytes, offset + 4); - unused0 = BitConverter.ToUInt32(bytes, offset + 8); - unused1 = BitConverter.ToUInt32(bytes, offset + 12); + sphereType = BitConverter.ToUInt16(bytes.AsSpan(offset)); + sphereIndex = BitConverter.ToUInt16(bytes.AsSpan(offset + 2)); + sphereRadius = BitConverter.ToSingle(bytes.AsSpan(offset + 4)); + unused0 = BitConverter.ToUInt32(bytes.AsSpan(offset + 8)); + unused1 = BitConverter.ToUInt32(bytes.AsSpan(offset + 12)); } public override void Write(BinaryWriter bw) { @@ -3532,12 +3424,7 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - var s = string.Format("{0} m=\"{1}\" v=\"{2}\" radius=\"{3}\"", - Type, - MaterialIndex, - sphereIndex, - FloatUtil.ToString(sphereRadius) - ); + var s = $"{Type} m=\"{MaterialIndex}\" v=\"{sphereIndex}\" radius=\"{FloatUtil.ToString(sphereRadius)}\""; YbnXml.SelfClosingTag(sb, indent, s); } public override void ReadXml(XmlNode node) @@ -3546,10 +3433,7 @@ namespace CodeWalker.GameFiles sphereIndex = (ushort)Xml.GetUIntAttribute(node, "v"); sphereRadius = Xml.GetFloatAttribute(node, "radius"); } - public override string ToString() - { - return base.ToString() + ": " + sphereIndex.ToString() + ", " + sphereRadius.ToString(); - } + public override string ToString() => $"{base.ToString()}: {sphereIndex}, {sphereRadius}"; } [TC(typeof(EXP))] public class BoundPolygonCapsule : BoundPolygon { @@ -3562,29 +3446,17 @@ namespace CodeWalker.GameFiles public Vector3 Vertex1 { - get { return (Owner != null) ? Owner.GetVertexPos(capsuleIndex1) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(capsuleIndex1, value); } + get => Owner?.GetVertexPos(capsuleIndex1) ?? Vector3.Zero; + set => Owner?.SetVertexPos(capsuleIndex1, value); } public Vector3 Vertex2 { - get { return (Owner != null) ? Owner.GetVertexPos(capsuleIndex2) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(capsuleIndex2, value); } + get => Owner?.GetVertexPos(capsuleIndex2) ?? Vector3.Zero; + set => Owner?.SetVertexPos(capsuleIndex2, value); } - public override Vector3 BoxMin - { - get - { - return Vector3.Min(Vertex1, Vertex2) - capsuleRadius; - } - } - public override Vector3 BoxMax - { - get - { - return Vector3.Max(Vertex1, Vertex2) + capsuleRadius; - } - } + public override Vector3 BoxMin => Vector3.Min(Vertex1, Vertex2) - capsuleRadius; + public override Vector3 BoxMax => Vector3.Max(Vertex1, Vertex2) + capsuleRadius; public override Vector3 Scale { get @@ -3609,10 +3481,7 @@ namespace CodeWalker.GameFiles } public override Vector3 Position { - get - { - return (Vertex1 + Vertex2) * 0.5f; - } + get => (Vertex1 + Vertex2) * 0.5f; set { var offset = value - Position; @@ -4100,7 +3969,8 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public struct BoundEdgeRef //convenience struct for updating edge indices + [TC(typeof(EXP))] public struct BoundEdgeRef : IEquatable + //convenience struct for updating edge indices { public int Vertex1 { get; set; } public int Vertex2 { get; set; } @@ -4110,6 +3980,32 @@ namespace CodeWalker.GameFiles Vertex1 = Math.Min(i1, i2); Vertex2 = Math.Max(i1, i2); } + + public override bool Equals(object? obj) + { + return obj is BoundEdgeRef @ref && Equals(@ref); + } + + public bool Equals(BoundEdgeRef other) + { + return Vertex1 == other.Vertex1 && + Vertex2 == other.Vertex2; + } + + public override int GetHashCode() + { + return HashCode.Combine(Vertex1, Vertex2); + } + + public static bool operator ==(BoundEdgeRef left, BoundEdgeRef right) + { + return left.Equals(right); + } + + public static bool operator !=(BoundEdgeRef left, BoundEdgeRef right) + { + return !(left == right); + } } [TC(typeof(EXP))] public class BoundEdge //convenience class for updating edge indices { @@ -4136,7 +4032,8 @@ namespace CodeWalker.GameFiles Distance = dist; } } - [TC(typeof(EXP))] public class BoundVertex //class for editing convenience, to hold a reference to a BoundGeometry vertex + [TC(typeof(EXP))] + public class BoundVertex //class for editing convenience, to hold a reference to a BoundGeometry vertex { public BoundGeometry Owner { get; set; } public int Index { get; set; } @@ -4144,12 +4041,12 @@ namespace CodeWalker.GameFiles public Vector3 Position { get { return (Owner != null) ? Owner.GetVertexPos(Index) : Vector3.Zero; } - set { if (Owner != null) Owner.SetVertexPos(Index, value); } + set { Owner?.SetVertexPos(Index, value); } } public BoundMaterialColour Colour { get { return (Owner != null) ? Owner.GetVertexColour(Index) : new BoundMaterialColour(); } - set { if (Owner != null) Owner.SetVertexColour(Index, value); } + set { Owner?.SetVertexColour(Index, value); } } public BoundVertex(BoundGeometry owner, int index) @@ -4158,32 +4055,19 @@ namespace CodeWalker.GameFiles Index = index; } - public virtual string Title - { - get - { - return "Vertex " + Index.ToString(); - } - } + public virtual string Title => $"Vertex {Index}"; } - [TC(typeof(EXP))] public struct BoundVertex_s + [TC(typeof(EXP))] + public readonly struct BoundVertex_s(in Vector3 v) { - public short X { get; set; } - public short Y { get; set; } - public short Z { get; set; } - - public BoundVertex_s(Vector3 v) - { - X = (short)v.X; - Y = (short)v.Y; - Z = (short)v.Z; - } + public short X { get; init; } = (short)v.X; + public short Y { get; init; } = (short)v.Y; + public short Z { get; init; } = (short)v.Z; public Vector3 Vector { - get { return new Vector3(X, Y, Z); } - set { X = (short)value.X; Y = (short)value.Y; Z = (short)value.Z; } + get => new Vector3(X, Y, Z); } } @@ -4316,13 +4200,14 @@ namespace CodeWalker.GameFiles MAP_STAIRS = 1u << 30, MAP_DEEP_SURFACE = 1u << 31, } - [TC(typeof(EXP))] public struct BoundCompositeChildrenFlags + [TC(typeof(EXP))] + public struct BoundCompositeChildrenFlags { public EBoundCompositeFlags Flags1 { get; set; } public EBoundCompositeFlags Flags2 { get; set; } - public override string ToString() + public override readonly string ToString() { - return Flags1.ToString() + ", " + Flags2.ToString(); + return $"{Flags1}, {Flags2}"; } } @@ -4330,10 +4215,7 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public class BVH : ResourceSystemBlock { - public override long BlockLength - { - get { return 128; } - } + public override long BlockLength => 128; // structure data public ResourceSimpleList64b_s Nodes { get; set; } @@ -4392,21 +4274,22 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); + //var list = new List(); //if (Nodes != null) list.Add(Nodes); //if (Trees != null) list.Add(Trees); - return list.ToArray(); + return []; } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x0, Nodes), - new Tuple(0x70, Trees) + return new (long, IResourceBlock)[] { + (0x0, Nodes), + (0x70, Trees) }; } } - [TC(typeof(EXP))] public struct BVHTreeInfo_s + [TC(typeof(EXP))] + public struct BVHTreeInfo_s { public short MinX { get; set; } public short MinY { get; set; } @@ -4419,21 +4302,22 @@ namespace CodeWalker.GameFiles public Vector3 Min { - get { return new Vector3(MinX, MinY, MinZ); } + readonly get { return new Vector3(MinX, MinY, MinZ); } set { MinX = (short)value.X; MinY = (short)value.Y; MinZ = (short)value.Z; } } public Vector3 Max { - get { return new Vector3(MaxX, MaxY, MaxZ); } + readonly get { return new Vector3(MaxX, MaxY, MaxZ); } set { MaxX = (short)value.X; MaxY = (short)value.Y; MaxZ = (short)value.Z; } } - public override string ToString() + public override readonly string ToString() { - return NodeIndex1.ToString() + ", " + NodeIndex2.ToString() + " (" + (NodeIndex2 - NodeIndex1).ToString() + " nodes)"; + return $"{NodeIndex1}, {NodeIndex2} ({NodeIndex2 - NodeIndex1} nodes)"; } } - [TC(typeof(EXP))] public struct BVHNode_s + [TC(typeof(EXP))] + public struct BVHNode_s { public short MinX { get; set; } public short MinY { get; set; } @@ -4446,18 +4330,18 @@ namespace CodeWalker.GameFiles public Vector3 Min { - get { return new Vector3(MinX, MinY, MinZ); } + readonly get { return new Vector3(MinX, MinY, MinZ); } set { MinX = (short)value.X; MinY = (short)value.Y; MinZ = (short)value.Z; } } public Vector3 Max { - get { return new Vector3(MaxX, MaxY, MaxZ); } + readonly get { return new Vector3(MaxX, MaxY, MaxZ); } set { MaxX = (short)value.X; MaxY = (short)value.Y; MaxZ = (short)value.Z; } } - public override string ToString() + public override readonly string ToString() { - return ItemId.ToString() + ": " + ItemCount.ToString(); + return $"{ItemId}: {ItemCount}"; } } @@ -4468,23 +4352,33 @@ namespace CodeWalker.GameFiles public static int MaxTreeNodeCount = 127; //max number of nodes found in any tree - public static BVH Build(List items, int itemThreshold) + public static BVH? Build(List items, int itemThreshold) { - if (items == null) return null; + if (items is null) + return null; var bvh = new BVH(); var min = new Vector3(float.MaxValue); var max = new Vector3(float.MinValue); - var nodes = new List(); - var trees = new List(); - var iteml = new List(); - for (int i = 0; i < items.Count; i++) + using var nodes = new PooledList(); + using var trees = new PooledList(); + var iteml = new List(items.Count); + foreach(var item in items.AsSpan()) { - var item = items[i]; - if (item == null) continue; + if (item is null) + continue; iteml.Add(item); - min = Vector3.Min(min, item.Min); - max = Vector3.Max(max, item.Max); + Vector3.Min(ref min, ref item.Min, out min); + Vector3.Max(ref max, ref item.Max, out max); } + //for (int i = 0; i < items.Count; i++) + //{ + // var item = items[i]; + // if (item is null) + // continue; + // iteml.Add(item); + // Vector3.Min(ref min, ref item.Min, out min); + // Vector3.Max(ref max, ref item.Max, out max); + //} var cen = (min + max) * 0.5f; bvh.BoundingBoxMin = new Vector4(min, float.NaN); bvh.BoundingBoxMax = new Vector4(max, float.NaN); @@ -4493,7 +4387,7 @@ namespace CodeWalker.GameFiles bvh.QuantumInverse = new Vector4(1.0f / bvh.Quantum.XYZ(), float.NaN); var root = new BVHBuilderNode(); - root.Items = iteml.ToList(); + root.Items = iteml; root.Build(itemThreshold); root.GatherNodes(nodes); root.GatherTrees(trees); @@ -4502,11 +4396,11 @@ namespace CodeWalker.GameFiles if (itemThreshold > 1) //need to reorder items, since they need to be grouped by node for the node's item index { items.Clear(); - foreach (var node in nodes) + foreach (var node in nodes.Span) { if (node.Items != null) { - foreach (var item in node.Items) + foreach (var item in node.Items.AsSpan()) { item.Index = items.Count; items.Add(item); @@ -4517,13 +4411,12 @@ namespace CodeWalker.GameFiles else //don't need to reorder items, since nodes only have one item and one item index { } - var bvhtrees = new List(); - var bvhnodes = new List(); + using var bvhtrees = new PooledList(trees.Count); + using var bvhnodes = new PooledList(nodes.Count); var qi = bvh.QuantumInverse.XYZ(); var c = bvh.BoundingBoxCenter.XYZ(); - for (int i = 0; i < nodes.Count; i++) + foreach(var node in nodes.Span) { - var node = nodes[i]; var id = ((node.Items?.Count ?? 0) > 0) ? node.Items[0].Index : 0; var tn = node.TotalNodes; var bn = new BVHNode_s(); @@ -4534,9 +4427,8 @@ namespace CodeWalker.GameFiles bvhnodes.Add(bn); } - for (int i = 0; i < trees.Count; i++) + foreach(var tree in trees.Span) { - var tree = trees[i]; var bt = new BVHTreeInfo_s(); bt.Min = (tree.Min - c) * qi; bt.Max = (tree.Max - c) * qi; @@ -4586,8 +4478,8 @@ namespace CodeWalker.GameFiles } public class BVHBuilderNode { - public List Children; - public List Items; + public List? Children; + public List? Items; public Vector3 Min; public Vector3 Max; public int Index; @@ -4597,9 +4489,9 @@ namespace CodeWalker.GameFiles get { int c = 1; - if (Children != null) + if (Children is not null) { - foreach (var child in Children) + foreach (var child in Children.AsSpan()) { c += child.TotalNodes; } @@ -4612,9 +4504,9 @@ namespace CodeWalker.GameFiles get { int c = Items?.Count ?? 0; - if (Children != null) + if (Children is not null) { - foreach (var child in Children) + foreach (var child in Children.AsSpan()) { c += child.TotalItems; } @@ -4626,18 +4518,20 @@ namespace CodeWalker.GameFiles public void Build(int itemThreshold) { UpdateMinMax(); - if (Items == null) return; - if (Items.Count <= itemThreshold) return; + if (Items == null) + return; + if (Items.Count <= itemThreshold) + return; var avgsum = Vector3.Zero; - foreach (var item in Items) + foreach (var item in Items.AsSpan()) { avgsum += item.Min; avgsum += item.Max; } var avg = avgsum * (0.5f / Items.Count); int countx = 0, county = 0, countz = 0; - foreach (var item in Items) + foreach (var item in Items.AsSpan()) { var icen = (item.Min + item.Max) * 0.5f; if (icen.X < avg.X) countx++; @@ -4655,22 +4549,21 @@ namespace CodeWalker.GameFiles var l1 = new List(); var l2 = new List(); - foreach (var item in Items) + foreach (var item in Items.AsSpan()) { var icen = (item.Min + item.Max) * 0.5f; bool s = false; - switch (axis) + s = axis switch { - default: - case 0: s = (icen.X > avg.X); break; - case 1: s = (icen.Y > avg.Y); break; - case 2: s = (icen.Z > avg.Z); break; - } + 1 => (icen.Y > avg.Y), + 2 => (icen.Z > avg.Z), + _ => (icen.X > avg.X), + }; if (s) l1.Add(item); else l2.Add(item); } - if ((l1.Count == 0) || (l2.Count == 0)) //don't get stuck in a stack overflow... + if (l1.Count == 0 || l2.Count == 0) //don't get stuck in a stack overflow... { var l3 = new List();//we can recover from this... l3.AddRange(l1); @@ -4679,8 +4572,10 @@ namespace CodeWalker.GameFiles { l3.Sort((a, b) => { - var c = a.Min.CompareTo(b.Min); if (c != 0) return c; - return a.Max.CompareTo(b.Max); + var c = a.Min.CompareTo(in b.Min); + if (c != 0) + return c; + return a.Max.CompareTo(in b.Max); }); l1.Clear(); l2.Clear(); @@ -4715,43 +4610,43 @@ namespace CodeWalker.GameFiles { var min = new Vector3(float.MaxValue); var max = new Vector3(float.MinValue); - if (Items != null) + if (Items is not null) { - foreach (var item in Items) + foreach (var item in Items.AsSpan()) { - min = Vector3.Min(min, item.Min); - max = Vector3.Max(max, item.Max); + Vector3.Min(ref min, ref item.Min, out min); + Vector3.Max(ref max, ref item.Max, out max); } } - if (Children != null) + if (Children is not null) { - foreach (var child in Children) + foreach (var child in Children.AsSpan()) { child.UpdateMinMax(); - min = Vector3.Min(min, child.Min); - max = Vector3.Max(max, child.Max); + Vector3.Min(ref min, ref child.Min, out min); + Vector3.Max(ref max, ref child.Max, out max); } } Min = min; Max = max; } - public void GatherNodes(List nodes) + public void GatherNodes(IList nodes) { Index = nodes.Count; nodes.Add(this); - if (Children != null) + if (Children is not null) { - foreach (var child in Children) + foreach (var child in Children.AsSpan()) { child.GatherNodes(nodes); } } } - public void GatherTrees(List trees) + public void GatherTrees(IList trees) { if ((TotalNodes > BVHBuilder.MaxTreeNodeCount) && ((Children?.Count ?? 0) > 0)) { - foreach (var child in Children) + foreach (var child in Children.AsSpan()) { child.GatherTrees(trees); } @@ -4786,11 +4681,12 @@ namespace CodeWalker.GameFiles Children.Add(chi); cind1 = cind2; } + Console.WriteLine($"Children.Count: {Children.Count}; cind1: {nodeind + 1}; lcind: {nodeind + node.ItemId}"); nodeind += node.ItemId; } else //leaf node, with polygons { - Items = new List(); + Items = new List(node.ItemCount); for (int i = 0; i < node.ItemCount; i++) { var item = new BVHBuilderItem(); @@ -4807,12 +4703,14 @@ namespace CodeWalker.GameFiles public override string ToString() { - var fstr = (Children != null) ? (TotalNodes.ToString() + ", 0 - ") : (Items != null) ? ("i, " + TotalItems.ToString() + " - ") : "error!"; - var cstr = (Children != null) ? (Children.Count.ToString() + " children") : ""; - var istr = (Items != null) ? (Items.Count.ToString() + " items") : ""; - if (string.IsNullOrEmpty(cstr)) return fstr + istr; - if (string.IsNullOrEmpty(istr)) return fstr + cstr; - return cstr + ", " + istr; + var fstr = (Children != null) ? $"{TotalNodes}, 0 - " : (Items != null) ? ($"i, {TotalItems} - ") : "error!"; + var cstr = (Children != null) ? $"{Children.Count} children" : ""; + var istr = (Items != null) ? $"{Items.Count} items" : ""; + if (string.IsNullOrEmpty(cstr)) + return fstr + istr; + if (string.IsNullOrEmpty(istr)) + return fstr + cstr; + return $"{cstr}, {istr}"; } } public class BVHBuilderItem @@ -4846,7 +4744,7 @@ namespace CodeWalker.GameFiles FLAG_NO_NETWORK_SPAWN = 1 << 14, FLAG_NO_CAM_COLLISION_ALLOW_CLIPPING = 1 << 15, } - [TC(typeof(EXP))] public struct BoundMaterial_s : IMetaXmlItem + [TC(typeof(EXP))] public struct BoundMaterial_s : IMetaXmlItem, IEquatable { public uint Data1; @@ -4927,6 +4825,31 @@ namespace CodeWalker.GameFiles + Flags.ToString() + ", " + MaterialColorIndex.ToString() + ", " + Unk4.ToString(); } + public override bool Equals(object? obj) + { + return obj is BoundMaterial_s s && Equals(s); + } + + public bool Equals(BoundMaterial_s other) + { + return Data1 == other.Data1 && + Data2 == other.Data2; + } + + public override int GetHashCode() + { + return HashCode.Combine(Data1, Data2); + } + + public static bool operator ==(BoundMaterial_s left, BoundMaterial_s right) + { + return left.Equals(right); + } + + public static bool operator !=(BoundMaterial_s left, BoundMaterial_s right) + { + return !(left == right); + } } [TC(typeof(EXP))] public struct BoundMaterialColour { diff --git a/CodeWalker.Core/GameFiles/Resources/Clip.cs b/CodeWalker.Core/GameFiles/Resources/Clip.cs index ca35490..83dbd62 100644 --- a/CodeWalker.Core/GameFiles/Resources/Clip.cs +++ b/CodeWalker.Core/GameFiles/Resources/Clip.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; @@ -8,6 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.GameFiles.MetaXmlBase; /* Copyright(c) 2016 Neodymium @@ -41,10 +43,7 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipDictionary : ResourceFileBase { - public override long BlockLength - { - get { return 64; } - } + public override long BlockLength => 64; // structure data public uint Unknown_10h { get; set; } // 0x00000000 @@ -61,11 +60,11 @@ namespace CodeWalker.GameFiles // reference data public AnimationMap Animations { get; set; } - public ResourcePointerArray64 Clips { get; set; } + public ResourcePointerArray64 Clips { get; set; } //data used by CW for loading/saving - public Dictionary ClipMap { get; set; } - public Dictionary AnimMap { get; set; } + public Dictionary ClipMap { get; set; } + public Dictionary AnimMap { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) @@ -138,14 +137,14 @@ namespace CodeWalker.GameFiles public void BuildMaps() { - ClipMap = new Dictionary(); - AnimMap = new Dictionary(); + ClipMap = new Dictionary(); + AnimMap = new Dictionary(); - if ((Clips != null) && (Clips.data_items != null)) + if (Clips?.data_items is not null) { foreach (var cme in Clips.data_items) { - if (cme != null) + if (cme is not null) { ClipMap[cme.Hash] = cme; var nxt = cme.Next; @@ -157,11 +156,11 @@ namespace CodeWalker.GameFiles } } } - if ((Animations != null) && (Animations.Animations != null) && (Animations.Animations.data_items != null)) + if (Animations?.Animations?.data_items is not null) { foreach (var ame in Animations.Animations.data_items) { - if (ame != null) + if (ame is not null) { AnimMap[ame.Hash] = ame; var nxt = ame.NextEntry; @@ -174,21 +173,22 @@ namespace CodeWalker.GameFiles } } - foreach (var cme in ClipMap.Values) - { - var clip = cme.Clip; - if (clip == null) continue; + //foreach (var cme in ClipMap.Values) + //{ + // var clip = cme.Clip; + // if (clip == null) + // continue; - var name = clip.ShortName; //just to make sure ShortName is generated and in JenkIndex... + // var name = clip.ShortName; //just to make sure ShortName is generated and in JenkIndex... - //if (name.EndsWith("_uv_0")) //hash for these entries match string with this removed, +1 - //{ - //} - //if (name.EndsWith("_uv_1")) //same as above, but +2 - //{ - //} + // //if (name.EndsWith("_uv_0")) //hash for these entries match string with this removed, +1 + // //{ + // //} + // //if (name.EndsWith("_uv_1")) //same as above, but +2 + // //{ + // //} - } + //} //foreach (var ame in AnimMap.Values) //{ // var anim = ame.Animation; @@ -337,8 +337,7 @@ namespace CodeWalker.GameFiles foreach (var cme in clipList) { var cb = cme?.Clip; - var clipanim = cb as ClipAnimation; - if (clipanim != null) + if (cb is ClipAnimation clipanim) { animDict.TryGetValue(clipanim.AnimationHash, out Animation a); clipanim.Animation = a; @@ -370,25 +369,25 @@ namespace CodeWalker.GameFiles { var numClipBuckets = GetNumHashBuckets(clips?.Length ?? 0); var clipBuckets = new List[numClipBuckets]; - if (clips != null) + if (clips is not null) { foreach (var cme in clips) { var b = cme.Hash % numClipBuckets; - var bucket = clipBuckets[b]; - if (bucket == null) + ref var bucket = ref clipBuckets[b]; + if (bucket is null) { - bucket = new List(); - clipBuckets[b] = bucket; + bucket = new List(); } bucket.Add(cme); } } - var newClips = new List(); + var newClips = new List(); foreach (var b in clipBuckets) { - if ((b?.Count ?? 0) == 0) newClips.Add(null); + if ((b?.Count ?? 0) == 0) + newClips.Add(null); else { newClips.Add(b[0]); @@ -403,33 +402,33 @@ namespace CodeWalker.GameFiles } } - Clips = new ResourcePointerArray64(); + Clips = new ResourcePointerArray64(); Clips.data_items = newClips.ToArray(); } public void CreateAnimationsMap(AnimationMapEntry[] anims) { var numAnimBuckets = GetNumHashBuckets(anims?.Length ?? 0); - var animBuckets = new List[numAnimBuckets]; - if (anims != null) + var animBuckets = new List[numAnimBuckets]; + if (anims is not null) { foreach (var ame in anims) { var b = ame.Hash % numAnimBuckets; - var bucket = animBuckets[b]; - if (bucket == null) + ref var bucket = ref animBuckets[b]; + if (bucket is null) { - bucket = new List(); - animBuckets[b] = bucket; + bucket = new List(); } bucket.Add(ame); } } - var newAnims = new List(); + var newAnims = new List(); foreach (var b in animBuckets) { - if ((b?.Count ?? 0) == 0) newAnims.Add(null); + if (b is null || b.Count == 0) + newAnims.Add(null); else { newAnims.Add(b[0]); @@ -479,10 +478,7 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class AnimationMap : ResourceSystemBlock { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; // structure data public uint VFT { get; set; } @@ -548,17 +544,17 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (Animations != null) list.Add(Animations); - return list.ToArray(); + if (Animations is null) + { + return []; + } + + return [ Animations ]; } } [TypeConverter(typeof(ExpandableObjectConverter))] public class AnimationMapEntry : ResourceSystemBlock { - public override long BlockLength - { - get { return 32; } - } + public override long BlockLength => 32; // structure data public MetaHash Hash { get; set; } @@ -569,8 +565,8 @@ namespace CodeWalker.GameFiles public uint Unknown_1Ch { get; set; } // 0x00000000 // reference data - public Animation Animation { get; set; } - public AnimationMapEntry NextEntry { get; set; } + public Animation? Animation { get; set; } + public AnimationMapEntry? NextEntry { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -590,10 +586,8 @@ namespace CodeWalker.GameFiles this.NextEntryPtr // offset ); - if (Animation != null) + if (Animation is not null) { - if (Animation.Hash != 0) - { } Animation.Hash = Hash; } } @@ -616,23 +610,19 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (Animation != null) list.Add(Animation); - if (NextEntry != null) list.Add(NextEntry); + if (Animation is not null) + list.Add(Animation); + if (NextEntry is not null) + list.Add(NextEntry); return list.ToArray(); } - public override string ToString() - { - return Hash.ToString(); - } + public override string ToString() => Hash.ToString(); } [TypeConverter(typeof(ExpandableObjectConverter))] public class Animation : ResourceSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 96; } - } + public override long BlockLength => 96; // structure data public uint VFT { get; set; } @@ -687,80 +677,6 @@ namespace CodeWalker.GameFiles this.BoneIds = reader.ReadBlock>(); AssignSequenceBoneIds(); - - - - //bool hasUVs = false; - //if (BoneIds?.data_items != null) - //{ - // foreach (var boneid in BoneIds.data_items) - // { - // if (boneid.Track == 17)//UV0 - // { hasUVs = true; } - // if (boneid.Track == 18)//UV1 - // { hasUVs = true; } - // } - //} - - //bool hasRootMotion = false; // (Unknown_10h & 16) == hasRootMotion - //if (Sequences?.data_items != null) - //{ - // foreach (var seq in Sequences.data_items) - // { - // if (seq == null) continue; - // if (seq.RootMotionRefCounts != 0) { hasRootMotion = true; } - // } - //} - - //var b0 = (Unknown_1Ch) & 0xFF; - //var b1 = (Unknown_1Ch >> 8) & 0xFF; - //var b2 = (Unknown_1Ch >> 16) & 0xFF; - //var b3 = (Unknown_1Ch >> 24) & 0xFF; - //if (hasUVs) - //{ - // if (Unknown_1Ch != 0x6B002400) - // { } - //} - //else - //{ - //} - - - //switch (Unknown_10h) - //{ - // case 0: - // if (hasRootMotion) { } - // break; - // case 1://is prop? - // if (hasRootMotion) { } - // break; - // case 8: - // if (hasRootMotion) { } - // break; - // case 16: - // if (!hasRootMotion) { } - // break; - // case 24: - // if (!hasRootMotion) { } - // break; - // default: break; - //} - - - - - - - - //if (Unknown_04h != 1) - //{ } - //if (Unknown_11h != 1) - //{ } - - - - - } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -791,13 +707,13 @@ namespace CodeWalker.GameFiles writer.WriteBlock(this.BoneIds); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { BuildSequencesData();//TODO: move this somewhere better? - return new Tuple[] { - new Tuple(0x40, Sequences), - new Tuple(0x50, BoneIds) + return new (long, IResourceBlock)[] { + (0x40, Sequences), + (0x50, BoneIds) }; } @@ -879,29 +795,34 @@ namespace CodeWalker.GameFiles - public struct FramePosition + public readonly struct FramePosition { - public int Frame0; - public int Frame1; - public float Alpha0; - public float Alpha1; + public int Frame0 { get; init; } + public int Frame1 { get; init; } + public float Alpha0 { get; init; } + public float Alpha1 { get; init; } } + public FramePosition GetFramePosition(float t) { bool ignoreLastFrame = true;//if last frame is equivalent to the first one, eg rollercoaster small light "globes" don't - FramePosition p = new FramePosition(); var nframes = (ignoreLastFrame) ? (Frames - 1) : Frames; var curPos = (t / Duration) * nframes; - p.Frame0 = ((ushort)curPos) % Frames; - p.Frame1 = (p.Frame0 + 1);// % frames; - p.Alpha1 = (float)(curPos - Math.Floor(curPos)); - p.Alpha0 = 1.0f - p.Alpha1; - return p; + var frame0 = ((ushort)curPos) % Frames; + var alpha1 = (float)(curPos - Math.Floor(curPos)); + + return new FramePosition + { + Frame0 = frame0, + Frame1 = frame0 + 1, + Alpha0 = 1.0f - alpha1, + Alpha1 = alpha1, + }; } - public Vector4 EvaluateVector4(FramePosition frame, int boneIndex, bool interpolate) + public Vector4 EvaluateVector4(in FramePosition frame, int boneIndex, bool interpolate) { var s = frame.Frame0 / SequenceFrameLimit; int f0 = frame.Frame0 % SequenceFrameLimit; @@ -913,7 +834,7 @@ namespace CodeWalker.GameFiles var v = interpolate ? (v0 * frame.Alpha0) + (v1 * frame.Alpha1) : v0; return v; } - public Quaternion EvaluateQuaternion(FramePosition frame, int boneIndex, bool interpolate) + public Quaternion EvaluateQuaternion(in FramePosition frame, int boneIndex, bool interpolate) { var s = frame.Frame0 / SequenceFrameLimit; int f0 = frame.Frame0 % SequenceFrameLimit; @@ -922,7 +843,7 @@ namespace CodeWalker.GameFiles var aseq = seq.Sequences[boneIndex]; var q0 = aseq.EvaluateQuaternion(f0); var q1 = aseq.EvaluateQuaternion(f1); - var q = interpolate ? QuaternionExtension.FastLerp(q0, q1, frame.Alpha1) : q0; + var q = interpolate ? QuaternionExtension.FastLerp(in q0, in q1, frame.Alpha1) : q0; return q; } @@ -939,20 +860,18 @@ namespace CodeWalker.GameFiles } return -1; } - } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct AnimationBoneId : IMetaXmlItem + + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct AnimationBoneId : IMetaXmlItem { public ushort BoneId { get; set; } public byte Unk0 { get; set; } public byte Track { get; set; } - public override string ToString() - { - return BoneId.ToString() + ": " + Unk0.ToString() + ", " + Track.ToString(); - } + public readonly override string ToString() => $"{BoneId}: {Unk0}, {Track}"; - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { YcdXml.ValueTag(sb, indent, "BoneId", BoneId.ToString()); YcdXml.ValueTag(sb, indent, "Track", Track.ToString()); @@ -1292,7 +1211,7 @@ namespace CodeWalker.GameFiles YcdXml.ValueTag(sb, indent, "Quantum", FloatUtil.ToString(Quantum)); YcdXml.ValueTag(sb, indent, "Offset", FloatUtil.ToString(Offset)); YcdXml.WriteRawArray(sb, Values, indent, "Values", "", FloatUtil.ToString, 10);// (Values?.Length ?? 0) + 1); - YcdXml.WriteRawArray(sb, Frames, indent, "Frames", "", null, 10);// (Frames?.Length ?? 0) + 1); + YcdXml.WriteRawArray(sb, Frames, indent, "Frames", "", (FormatterRef?)null, 10);// (Frames?.Length ?? 0) + 1); } public override void ReadXml(XmlNode node) { @@ -1687,7 +1606,7 @@ namespace CodeWalker.GameFiles public override void ReadFrame(AnimChannelDataReader reader) { uint bits = reader.ReadFrameBits(32); - float v = MetaTypes.ConvertData(MetaTypes.ConvertToBytes(bits)); + float v = MetaTypes.ConvertData(MetaTypes.ConvertToBytes(in bits)); Values[reader.Frame] = v; } public override void WriteFrame(AnimChannelDataWriter writer) @@ -2180,8 +2099,8 @@ namespace CodeWalker.GameFiles ); } - var t7 = Channels[3] as AnimChannelCachedQuaternion;//type 1 - if (t7 == null) t7 = Channels[4] as AnimChannelCachedQuaternion;//type 2 + //type 1 + if (Channels[3] is not AnimChannelCachedQuaternion t7) t7 = Channels[4] as AnimChannelCachedQuaternion;//type 2 var x = Channels[0].EvaluateFloat(frame); var y = Channels[1].EvaluateFloat(frame); @@ -2219,9 +2138,7 @@ namespace CodeWalker.GameFiles { if (c >= 4) break; var channel = Channels[i]; - var sv3c = channel as AnimChannelStaticVector3; - var ssqc = channel as AnimChannelStaticQuaternion; - if (sv3c != null) + if (channel is AnimChannelStaticVector3 sv3c) { for (int n = 0; n < 3; n++) { @@ -2230,7 +2147,7 @@ namespace CodeWalker.GameFiles } c += 3; } - else if (ssqc != null) + else if (channel is AnimChannelStaticQuaternion ssqc) { for (int n = 0; n < 4; n++) { @@ -2898,8 +2815,8 @@ namespace CodeWalker.GameFiles public uint Unknown_1Ch { get; set; } // 0x00000000 // reference data - public ClipBase Clip { get; set; } - public ClipMapEntry Next { get; set; } + public ClipBase? Clip { get; set; } + public ClipMapEntry? Next { get; set; } public bool EnableRootMotion { get; set; } = false; //used by CW to toggle whether or not to include root motion when playing animations public bool OverridePlayTime { get; set; } = false; //used by CW to manually override the animation playback time @@ -2925,12 +2842,10 @@ namespace CodeWalker.GameFiles ); - if (Clip != null) + if (Clip is not null) { Clip.Hash = Hash; } - else - { } } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -2956,18 +2871,12 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override string ToString() - { - return Clip?.Name ?? Hash.ToString(); - } + public override string ToString() => Clip?.Name ?? Hash.ToString(); } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipBase : ResourceSystemBlock, IResourceXXSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; // structure data public uint VFT { get; set; } @@ -3054,9 +2963,6 @@ namespace CodeWalker.GameFiles this.PropertiesPointer // offset ); - if (Unknown_28hPtr != 0x50000000) - { } - switch (VFT)//some examples { case 1079664808: @@ -3074,9 +2980,6 @@ namespace CodeWalker.GameFiles default: break; } - - if (Tags?.Tags?.data_items == null) - { } } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -3117,8 +3020,10 @@ namespace CodeWalker.GameFiles NameBlock = (string_r)Name; list.Add(NameBlock); } - if (Tags != null) list.Add(Tags); - if (Properties != null) list.Add(Properties); + if (Tags is not null) + list.Add(Tags); + if (Properties is not null) + list.Add(Properties); return list.ToArray(); } @@ -3132,21 +3037,18 @@ namespace CodeWalker.GameFiles } - public static ClipBase ConstructClip(ClipType type) + public static ClipBase? ConstructClip(ClipType type) { - switch (type) + return type switch { - case ClipType.Animation: return new ClipAnimation(); - case ClipType.AnimationList: return new ClipAnimationList(); - default: return null;// throw new Exception("Unknown type"); - } + ClipType.Animation => new ClipAnimation(), + ClipType.AnimationList => new ClipAnimationList(), + _ => null,// throw new Exception("Unknown type"); + }; } - public override string ToString() - { - return Name; - } + public override string ToString() => Name; public virtual void WriteXml(StringBuilder sb, int indent) @@ -3179,12 +3081,11 @@ namespace CodeWalker.GameFiles Properties.CreatePropertyMap(props); } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipAnimation : ClipBase + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipAnimation : ClipBase { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; // structure data public ulong AnimationPointer { get; set; } @@ -3196,7 +3097,7 @@ namespace CodeWalker.GameFiles public uint Unknown_6Ch { get; set; } // 0x00000000 // reference data - public Animation Animation { get; set; } + public Animation? Animation { get; set; } public MetaHash AnimationHash { get; set; } //used when reading XML. public ClipAnimation() @@ -3239,7 +3140,8 @@ namespace CodeWalker.GameFiles { var list = new List(); list.AddRange(base.GetReferences()); - if (Animation != null) list.Add(Animation); + if (Animation is not null) + list.Add(Animation); return list.ToArray(); } @@ -3270,10 +3172,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipAnimationList : ClipBase { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; // structure data public ulong AnimationsPointer { get; set; } @@ -3286,7 +3185,7 @@ namespace CodeWalker.GameFiles public uint Unknown_6Ch { get; set; } // 0x00000000 // reference data - public ResourceSimpleArray Animations { get; set; } + public ResourceSimpleArray? Animations { get; set; } public ClipAnimationList() @@ -3334,7 +3233,8 @@ namespace CodeWalker.GameFiles { var list = new List(); list.AddRange(base.GetReferences()); - if (Animations != null) list.Add(Animations); + if (Animations is not null) + list.Add(Animations); return list.ToArray(); } @@ -3360,18 +3260,22 @@ namespace CodeWalker.GameFiles base.ReadXml(node); Duration = Xml.GetChildFloatAttribute(node, "Duration", "value"); - Animations = new ResourceSimpleArray(); - Animations.Data = new List(); var anims = XmlMeta.ReadItemArrayNullable(node, "Animations"); - if (anims != null) Animations.Data.AddRange(anims); + Animations = new ResourceSimpleArray(); + + if (anims != null) + { + Animations.Data = anims.ToList(); + } else + { + Animations.Data = new List(); + } } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipAnimationsEntry : ResourceSystemBlock, IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipAnimationsEntry : ResourceSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 24; } - } + public override long BlockLength => 24; // structure data public float StartTime { get; set; } @@ -3381,7 +3285,7 @@ namespace CodeWalker.GameFiles public ulong AnimationPointer { get; set; } // reference data - public Animation Animation { get; set; } + public Animation? Animation { get; set; } public MetaHash AnimationHash { get; set; } //used when reading XML. public override void Read(ResourceDataReader reader, params object[] parameters) @@ -3402,7 +3306,7 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.AnimationPointer = (ulong)(this.Animation != null ? this.Animation.FilePosition : 0); + AnimationPointer = (ulong)(Animation?.FilePosition ?? 0); // write structure data writer.Write(this.StartTime); @@ -3451,12 +3355,10 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyMap : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipPropertyMap : ResourceSystemBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong PropertyEntriesPointer { get; set; } @@ -3465,10 +3367,10 @@ namespace CodeWalker.GameFiles public uint Unknown_0Ch { get; set; } = 0x01000000; // 0x01000000 // reference data - public ResourcePointerArray64 Properties { get; set; } + public ResourcePointerArray64? Properties { get; set; } - public ClipProperty[] AllProperties { get; set; } - public Dictionary PropertyMap { get; set; } + public ClipProperty[]? AllProperties { get; set; } + public Dictionary? PropertyMap { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) @@ -3509,17 +3411,14 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override string ToString() - { - return "Count: " + (AllProperties?.Length ?? 0).ToString(); - } + public override string ToString() => $"Count: {AllProperties?.Length ?? 0}"; public void BuildPropertyMap() { - if (Properties?.data_items != null) + if (Properties?.data_items is not null) { - List pl = new List(); + using PooledList pl = new PooledList(); foreach (var pme in Properties.data_items) { ClipPropertyMapEntry cpme = pme; @@ -3562,10 +3461,11 @@ namespace CodeWalker.GameFiles } } - var newProperties = new List(); + var newProperties = new List(); foreach (var b in buckets) { - if ((b?.Count ?? 0) == 0) newProperties.Add(null); + if (b is null || b.Count == 0) + newProperties.Add(null); else { newProperties.Add(b[0]); @@ -3580,19 +3480,18 @@ namespace CodeWalker.GameFiles } } - Properties = new ResourcePointerArray64(); + Properties = new ResourcePointerArray64(); Properties.data_items = newProperties.ToArray(); AllProperties = properties; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyMapEntry : ResourceSystemBlock + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipPropertyMapEntry : ResourceSystemBlock { - public override long BlockLength - { - get { return 32; } - } + public override long BlockLength => 32; // structure data public MetaHash PropertyNameHash { get; set; } @@ -3651,10 +3550,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipProperty : ResourceSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 64; } - } + public override long BlockLength => 64; // structure data public uint VFT { get; set; } @@ -3744,23 +3640,25 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (Attributes != null) list.Add(Attributes); - return list.ToArray(); + if (Attributes is null) + return []; + + return [Attributes]; } public override string ToString() { - StringBuilder sb = new StringBuilder(); - if ((Attributes != null) && (Attributes.data_items != null)) + if (Attributes?.data_items is not null) { + StringBuilder sb = new StringBuilder(); foreach (var item in Attributes.data_items) { if (sb.Length > 0) sb.Append(", "); sb.Append(item.ToString()); } + return $"{NameHash}: {UnkHash}: {sb}"; } - return NameHash.ToString() + ": " + UnkHash.ToString() + ": " + sb.ToString(); + return $"{NameHash}: {UnkHash}"; } @@ -3798,10 +3696,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttribute : ResourceSystemBlock, IResourceXXSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; public uint VFT { get; set; } public uint Unknown_04h { get; set; } = 1; // 0x00000001 @@ -3896,10 +3791,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeFloat : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public float Value { get; set; } public uint Unknown_24h { get; set; } // 0x00000000 @@ -3930,7 +3822,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Float:" + FloatUtil.ToString(Value); + return $"Float:{FloatUtil.ToString(Value)}"; } @@ -3947,10 +3839,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeInt : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public int Value { get; set; } public uint Unknown_24h { get; set; } // 0x00000000 @@ -3981,7 +3870,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Int:" + Value.ToString(); + return $"Int:{Value}"; } @@ -3998,10 +3887,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeBool : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public uint Value { get; set; } public uint Unknown_24h { get; set; } // 0x00000000 @@ -4032,7 +3918,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Uint:" + Value.ToString(); + return $"Uint:{Value}"; } @@ -4049,10 +3935,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeString : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public ulong ValuePointer { get; set; } public ushort ValueLength { get; set; } @@ -4095,17 +3978,19 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(base.GetReferences()); - if (Value != null) + + if (Value is not null) { ValueBlock = (string_r)Value; list.Add(ValueBlock); } + return list.ToArray(); } public override string ToString() { - return "String:" + Value; + return $"String:{Value}"; } @@ -4122,12 +4007,10 @@ namespace CodeWalker.GameFiles ValueCapacity = ValueLength; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeVector3 : ClipPropertyAttribute + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipPropertyAttributeVector3 : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public Vector3 Value { get; set; } public float Unknown_02Ch { get; set; } @@ -4152,7 +4035,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Vector3:" + FloatUtil.GetVector3String(Value); + return $"Vector3:{FloatUtil.GetVector3String(Value)}"; } @@ -4171,10 +4054,7 @@ namespace CodeWalker.GameFiles } [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeVector4 : ClipPropertyAttribute { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public Vector4 Value { get; set; } @@ -4196,7 +4076,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Vector4:" + FloatUtil.GetVector4String(Value); + return $"Vector4:{FloatUtil.GetVector4String(Value)}"; } @@ -4211,7 +4091,8 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildVector4Attributes(node, "Value"); } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipPropertyAttributeHashString : ClipPropertyAttribute + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipPropertyAttributeHashString : ClipPropertyAttribute { public override long BlockLength => 0x30; @@ -4244,7 +4125,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "Hash:" + Value.ToString(); + return $"Hash:{Value}"; } @@ -4313,9 +4194,6 @@ namespace CodeWalker.GameFiles ); BuildAllTags(); - - if (TagCount1 != TagCount2) - { } } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -4340,72 +4218,72 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (Tags != null) list.Add(Tags); - return list.ToArray(); + if (Tags is null) + return []; + + return [Tags]; } public override string ToString() { - return "Count: " + (AllTags?.Length ?? 0).ToString(); + return $"Count: {AllTags?.Length ?? 0}"; } public void BuildAllTags() { - if ((Tags != null) && (Tags.data_items != null)) + if (Tags?.data_items is not null) { - List tl = new List(); + using var tl = new PooledList(); foreach (var te in Tags.data_items) { - if (te.Tags != this) - { } - if (te != null) - { - tl.Add(te); - } + if (te is null) + continue; + + tl.Add(te); } AllTags = tl.ToArray(); } uint hasBlock = 0; - if (AllTags != null) + if (AllTags is not null) { foreach (var tag in AllTags) { if (tag.NameHash == (uint)MetaName.block) - { hasBlock = 1; break; } + { + hasBlock = 1; + break; + } } } - if (HasBlockTag != hasBlock) - { } HasBlockTag = hasBlock; } public void AssignTagOwners() { - if (Tags?.data_items == null) return; + if (Tags?.data_items is null) + return; + foreach (var tag in Tags.data_items) { tag.Tags = this; } } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClipTag : ClipProperty + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClipTag : ClipProperty { - public override long BlockLength - { - get { return 80; } - } + public override long BlockLength => 80; public float StartPhase { get; set; } public float EndPhase { get; set; } public ulong TagsPointer { get; set; } // reference data - public ClipTagList Tags { get; set; } + public ClipTagList? Tags { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) @@ -4439,13 +4317,14 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(base.GetReferences()); - if (Tags != null) list.Add(Tags); + if (Tags is not null) + list.Add(Tags); return list.ToArray(); } public override string ToString() { - return base.ToString() + ": " + StartPhase.ToString() + ", " + EndPhase.ToString(); + return $"{base.ToString()}: {StartPhase}, {EndPhase}"; } diff --git a/CodeWalker.Core/GameFiles/Resources/Clothes.cs b/CodeWalker.Core/GameFiles/Resources/Clothes.cs index 24dcd31..4a65b06 100644 --- a/CodeWalker.Core/GameFiles/Resources/Clothes.cs +++ b/CodeWalker.Core/GameFiles/Resources/Clothes.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; @@ -6,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.GameFiles.MetaXmlBase; /* Copyright(c) 2017 Neodymium @@ -101,8 +103,8 @@ namespace CodeWalker.GameFiles } public void ReadXml(XmlNode node) { - var clothes = new List(); - var clothhashes = new List(); + using var clothes = new PooledList(); + using var clothhashes = new PooledList(); var inodes = node.SelectNodes("Item"); if (inodes != null) @@ -144,17 +146,18 @@ namespace CodeWalker.GameFiles return cd; } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, ClothNameHashes), - new Tuple(0x30, Clothes) + return new (long, IResourceBlock)[] { + (0x20, ClothNameHashes), + (0x30, Clothes) }; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ClothController : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ClothController : ResourceSystemBlock { // clothController public override long BlockLength => 0x80; @@ -333,12 +336,17 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (BridgeSimGfx != null) list.Add(BridgeSimGfx); - if (MorphController != null) list.Add(MorphController); - if (VerletCloth1 != null) list.Add(VerletCloth1); - if (VerletCloth2 != null) list.Add(VerletCloth2); - if (VerletCloth3 != null) list.Add(VerletCloth3); + using var list = new PooledList(); + if (BridgeSimGfx is not null) + list.Add(BridgeSimGfx); + if (MorphController is not null) + list.Add(MorphController); + if (VerletCloth1 is not null) + list.Add(VerletCloth1); + if (VerletCloth2 is not null) + list.Add(VerletCloth2); + if (VerletCloth3 is not null) + list.Add(VerletCloth3); return list.ToArray(); } } @@ -535,55 +543,55 @@ namespace CodeWalker.GameFiles YldXml.ValueTag(sb, indent, "VertexCount", VertexCount.ToString()); YldXml.ValueTag(sb, indent, "Unknown14", Unknown_14h.ToString()); YldXml.ValueTag(sb, indent, "Unknown18", Unknown_18h.ToString()); - if (Unknown_20h?.data_items != null) + if (Unknown_20h?.data_items is not null && Unknown_20h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_20h.data_items, indent, "Unknown20", "", FloatUtil.ToString); } - if (Unknown_30h?.data_items != null) + if (Unknown_30h?.data_items != null && Unknown_30h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_30h.data_items, indent, "Unknown30", "", FloatUtil.ToString); } - if (Unknown_40h?.data_items != null) + if (Unknown_40h?.data_items != null && Unknown_40h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_40h.data_items, indent, "Unknown40", "", FloatUtil.ToString); } - if (Unknown_60h?.data_items != null) + if (Unknown_60h?.data_items != null && Unknown_60h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_60h.data_items, indent, "Unknown60", "", FloatUtil.ToString); } - if (Unknown_70h?.data_items != null) + if (Unknown_70h?.data_items != null && Unknown_70h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_70h.data_items, indent, "Unknown70", ""); } - if (Unknown_80h?.data_items != null) + if (Unknown_80h?.data_items != null && Unknown_80h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_80h.data_items, indent, "Unknown80", ""); } - if (Unknown_A0h?.data_items != null) + if (Unknown_A0h?.data_items != null && Unknown_A0h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_A0h.data_items, indent, "UnknownA0", "", FloatUtil.ToString); } - if (Unknown_B0h?.data_items != null) + if (Unknown_B0h?.data_items != null && Unknown_B0h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_B0h.data_items, indent, "UnknownB0", ""); } - if (Unknown_C0h?.data_items != null) + if (Unknown_C0h?.data_items != null && Unknown_C0h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_C0h.data_items, indent, "UnknownC0", ""); } - if (Unknown_E0h?.data_items != null) + if (Unknown_E0h?.data_items != null && Unknown_E0h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_E0h.data_items, indent, "UnknownE0", ""); } - if (Unknown_F0h?.data_items != null) + if (Unknown_F0h?.data_items != null && Unknown_F0h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_F0h.data_items, indent, "UnknownF0", ""); } - if (Unknown_100h?.data_items != null) + if (Unknown_100h?.data_items != null && Unknown_100h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_100h.data_items, indent, "Unknown100", ""); } - if (Unknown_128h?.data_items != null) + if (Unknown_128h?.data_items != null && Unknown_128h.data_items.Length > 0) { YldXml.WriteRawArray(sb, Unknown_128h.data_items, indent, "Unknown128", ""); } @@ -622,22 +630,22 @@ namespace CodeWalker.GameFiles } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, Unknown_20h), - new Tuple(0x30, Unknown_30h), - new Tuple(0x40, Unknown_40h), - new Tuple(0x60, Unknown_60h), - new Tuple(0x70, Unknown_70h), - new Tuple(0x80, Unknown_80h), - new Tuple(0xA0, Unknown_A0h), - new Tuple(0xB0, Unknown_B0h), - new Tuple(0xC0, Unknown_C0h), - new Tuple(0xE0, Unknown_E0h), - new Tuple(0xF0, Unknown_F0h), - new Tuple(0x100, Unknown_100h), - new Tuple(0x128, Unknown_128h) + return new (long, IResourceBlock)[] { + (0x20, Unknown_20h), + (0x30, Unknown_30h), + (0x40, Unknown_40h), + (0x60, Unknown_60h), + (0x70, Unknown_70h), + (0x80, Unknown_80h), + (0xA0, Unknown_A0h), + (0xB0, Unknown_B0h), + (0xC0, Unknown_C0h), + (0xE0, Unknown_E0h), + (0xF0, Unknown_F0h), + (0x100, Unknown_100h), + (0x128, Unknown_128h) }; } } @@ -1335,20 +1343,23 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (Bound != null) list.Add(Bound); - if (Behavior != null) list.Add(Behavior); - if (Unknown_140h_Data != null) list.Add(Unknown_140h_Data); + using var list = new PooledList(); + if (Bound is not null) + list.Add(Bound); + if (Behavior is not null) + list.Add(Behavior); + if (Unknown_140h_Data is not null) + list.Add(Unknown_140h_Data); return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x70, Vertices2), - new Tuple(0x80, Vertices), - new Tuple(0x100, Constraints2), - new Tuple(0x110, Constraints) + return new (long, IResourceBlock)[] { + (0x70, Vertices2), + (0x80, Vertices), + (0x100, Constraints2), + (0x110, Constraints) }; } } @@ -1794,12 +1805,12 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x10, Unknown_10h), - new Tuple(0x30, Unknown_30h), - new Tuple(0x90, Unknown_90h) + return new (long, IResourceBlock)[] { + (0x10, Unknown_10h), + (0x30, Unknown_30h), + (0x90, Unknown_90h) }; } } @@ -1923,14 +1934,14 @@ namespace CodeWalker.GameFiles } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x80, Indices), - new Tuple(0x90, Vertices), - new Tuple(0xB0, Unknown_B0h), - new Tuple(0xC0, BoneWeightsInds), - new Tuple(0xE0, BoneIds) + return new (long, IResourceBlock)[] { + (0x80, Indices), + (0x90, Vertices), + (0xB0, Unknown_B0h), + (0xC0, BoneWeightsInds), + (0xE0, BoneIds) }; } } @@ -2339,7 +2350,7 @@ namespace CodeWalker.GameFiles YldXml.ValueTag(sb, indent, "Unknown180", FloatUtil.ToString(Unknown_180h)); if (Unknown_50h?.data_items != null) { - YldXml.WriteRawArray(sb, Unknown_50h.data_items, indent, "Unknown50", "", v => FloatUtil.GetVector4String(v), 1); + YldXml.WriteRawArray(sb, Unknown_50h.data_items, indent, "Unknown50", "", FloatUtil.GetVector4String, 1); } if (Unknown_60h?.data_items != null) { @@ -2359,7 +2370,7 @@ namespace CodeWalker.GameFiles } if (Unknown_A0h?.data_items != null) { - YldXml.WriteRawArray(sb, Unknown_A0h.data_items, indent, "UnknownA0", "", v => FloatUtil.GetVector4String(v), 1); + YldXml.WriteRawArray(sb, Unknown_A0h.data_items, indent, "UnknownA0", "", FloatUtil.GetVector4String, 1); } if (Unknown_B0h?.data_items != null) { @@ -2415,21 +2426,21 @@ namespace CodeWalker.GameFiles Unknown_160h.data_items = Xml.GetChildRawUshortArrayNullable(node, "Unknown160"); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x50, Unknown_50h), - new Tuple(0x60, Unknown_60h), - new Tuple(0x70, Unknown_70h), - new Tuple(0x80, Unknown_80h), - new Tuple(0x90, Unknown_90h), - new Tuple(0xA0, Unknown_A0h), - new Tuple(0xB0, Unknown_B0h), - new Tuple(0xC0, Unknown_C0h), - new Tuple(0xD0, Unknown_D0h), - new Tuple(0xE0, Unknown_E0h), - new Tuple(0x150, Unknown_150h), - new Tuple(0x160, Unknown_160h) + return new (long, IResourceBlock)[] { + (0x50, Unknown_50h), + (0x60, Unknown_60h), + (0x70, Unknown_70h), + (0x80, Unknown_80h), + (0x90, Unknown_90h), + (0xA0, Unknown_A0h), + (0xB0, Unknown_B0h), + (0xC0, Unknown_C0h), + (0xD0, Unknown_D0h), + (0xE0, Unknown_E0h), + (0x150, Unknown_150h), + (0x160, Unknown_160h) }; } } diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index 54d2518..2ec84b8 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; @@ -7,6 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.GameFiles.MetaXmlBase; namespace CodeWalker.GameFiles { @@ -444,7 +446,7 @@ namespace CodeWalker.GameFiles Count = Convert.ToInt32(parameters[0]); Owner = parameters[1] as ShaderFX; - var paras = new List(); + using var paras = new PooledList(); for (int i = 0; i < Count; i++) { var p = new ShaderParameter(); @@ -478,7 +480,7 @@ namespace CodeWalker.GameFiles reader.Position += offset; //Vector4 data gets embedded here... but why pointers in params also??? - var hashes = new List(); + using var hashes = new PooledList(); for (int i = 0; i < Count; i++) { hashes.Add((MetaName)reader.ReadUInt32()); @@ -672,8 +674,8 @@ namespace CodeWalker.GameFiles } public void ReadXml(XmlNode node) { - var plist = new List(); - var hlist = new List(); + using var plist = new PooledList(); + using var hlist = new PooledList(); var pnodes = node.SelectNodes("Item"); foreach (XmlNode pnode in pnodes) { @@ -702,7 +704,7 @@ namespace CodeWalker.GameFiles } else if (type == "Array") { - var vecs = new List(); + using var vecs = new PooledList(); var inodes = pnode.SelectNodes("Value"); foreach (XmlNode inode in inodes) { @@ -749,7 +751,7 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); + var list = new List(Parameters.Length); list.AddRange(base.GetReferences()); foreach (var x in Parameters) @@ -763,9 +765,9 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - var list = new List>(); + var list = new List<(long, IResourceBlock)>(); list.AddRange(base.GetParts()); long offset = Parameters.Length * 16; @@ -775,15 +777,13 @@ namespace CodeWalker.GameFiles { if (x.DataType != 0) { - var vecs = x.Data as Vector4[]; - if (vecs == null) + if (x.Data is not Vector4[] vecs) { vecs = new[] { (Vector4)x.Data }; } - if (vecs == null) - { } + var block = new ResourceSystemStructBlock(vecs); - list.Add(new Tuple(offset, block)); + list.Add((offset, (IResourceBlock)block)); blist.Add(block); } else @@ -802,10 +802,7 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class Skeleton : ResourceSystemBlock { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; // structure data public uint VFT { get; set; } = 1080114336; @@ -1308,9 +1305,9 @@ namespace CodeWalker.GameFiles m.Column4 = bone.TransformUnk;// new Vector4(0, 4, -3, 0);//??? var pbone = bone.Parent; - while (pbone != null) + while (pbone is not null) { - pos = pbone.Rotation.Multiply(pos /** pbone.Scale*/) + pbone.Translation; + pos = pbone.Rotation.Multiply(in pos /** pbone.Scale*/) + pbone.Translation; ori = pbone.Rotation * ori; pbone = pbone.Parent; } @@ -1404,11 +1401,12 @@ namespace CodeWalker.GameFiles { var bone = Bones.Items[i]; Matrix b = bone.SkinTransform; - Matrix3_s bt = new Matrix3_s(); - bt.Row1 = b.Column1; - bt.Row2 = b.Column2; - bt.Row3 = b.Column3; - BoneTransforms[i] = bt; + BoneTransforms[i] = new Matrix3_s + { + Row1 = b.Column1, + Row2 = b.Column2, + Row3 = b.Column3 + }; } } @@ -1569,19 +1567,23 @@ namespace CodeWalker.GameFiles } } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - var list = new List>(); - long length = 16; - if (Items != null) + if (Items is null || Items.Length == 0) { - foreach (var b in Items) - { - list.Add(new Tuple(length, b)); - length += b.BlockLength; - } + return Array.Empty<(long, IResourceBlock)>(); } - return list.ToArray(); + + var result = new (long, IResourceBlock)[Items.Length]; + long length = 16; + + for (int i = 0; i < Items.Length; i++) + { + result[i] = (length, Items[i]); + length += Items[i].BlockLength; + } + + return result; } } @@ -2023,10 +2025,7 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class Bone : ResourceSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 80; } - } + public override long BlockLength => 80; // structure data public Quaternion Rotation { get; set; } @@ -2047,9 +2046,9 @@ namespace CodeWalker.GameFiles // reference data public string Name { get; set; } - public Bone Parent { get; set; } + public Bone? Parent { get; set; } - private string_r NameBlock = null; + private string_r? NameBlock = null; //used by CW for animating skeletons. @@ -2152,28 +2151,29 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (Name != null) + if (Name is null) { - NameBlock = (string_r)Name; - list.Add(NameBlock); + return Array.Empty(); } - return list.ToArray(); + + NameBlock = (string_r)Name; + + return new[] { NameBlock }; } public override string ToString() { - return Tag.ToString() + ": " + Name; + return $"{Tag}: {Name}"; } public void UpdateAnimTransform() { - AnimTransform = Matrix.AffineTransformation(1.0f, AnimRotation, AnimTranslation); + Matrix.AffineTransformation(1.0f, ref AnimRotation, ref AnimTranslation, out AnimTransform); AnimTransform.ScaleVector *= AnimScale; - if (Parent != null) + if (Parent is not null) { - AnimTransform = AnimTransform * Parent.AnimTransform; + AnimTransform *= Parent.AnimTransform; } ////AnimTransform = Matrix.AffineTransformation(1.0f, AnimRotation, AnimTranslation);//(local transform) @@ -2237,12 +2237,10 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class Joints : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class Joints : ResourceSystemBlock { - public override long BlockLength - { - get { return 64; } - } + public override long BlockLength => 64; // structure data public uint VFT { get; set; } = 1080130656; @@ -2262,8 +2260,8 @@ namespace CodeWalker.GameFiles public JointRotationLimit_s[] RotationLimits { get; set; } public JointTranslationLimit_s[] TranslationLimits { get; set; } - private ResourceSystemStructBlock RotationLimitsBlock = null; //for saving only - private ResourceSystemStructBlock TranslationLimitsBlock = null; + private ResourceSystemStructBlock? RotationLimitsBlock = null; //for saving only + private ResourceSystemStructBlock? TranslationLimitsBlock = null; public override void Read(ResourceDataReader reader, params object[] parameters) @@ -2283,8 +2281,8 @@ namespace CodeWalker.GameFiles this.Unknown_38h = reader.ReadUInt64(); // read reference data - this.RotationLimits = reader.ReadStructsAt(this.RotationLimitsPointer, this.RotationLimitsCount); - this.TranslationLimits = reader.ReadStructsAt(this.TranslationLimitsPointer, this.TranslationLimitsCount); + this.RotationLimits = reader.ReadStructsAt(this.RotationLimitsPointer, this.RotationLimitsCount) ?? Array.Empty(); + this.TranslationLimits = reader.ReadStructsAt(this.TranslationLimitsPointer, this.TranslationLimitsCount) ?? Array.Empty(); //if (Unknown_4h != 1) //{ } @@ -2306,10 +2304,10 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.RotationLimitsPointer = (ulong)(this.RotationLimitsBlock != null ? this.RotationLimitsBlock.FilePosition : 0); - this.TranslationLimitsPointer = (ulong)(this.TranslationLimitsBlock != null ? this.TranslationLimitsBlock.FilePosition : 0); - this.RotationLimitsCount = (ushort)(this.RotationLimitsBlock != null ? this.RotationLimitsBlock.ItemCount : 0); - this.TranslationLimitsCount = (ushort)(this.TranslationLimitsBlock != null ? this.TranslationLimitsBlock.ItemCount : 0); + this.RotationLimitsPointer = (ulong)(this.RotationLimitsBlock is not null ? this.RotationLimitsBlock.FilePosition : 0); + this.TranslationLimitsPointer = (ulong)(this.TranslationLimitsBlock is not null ? this.TranslationLimitsBlock.FilePosition : 0); + this.RotationLimitsCount = (ushort)(this.RotationLimitsBlock is not null ? this.RotationLimitsBlock.ItemCount : 0); + this.TranslationLimitsCount = (ushort)(this.TranslationLimitsBlock is not null ? this.TranslationLimitsBlock.ItemCount : 0); // write structure data @@ -2328,11 +2326,11 @@ namespace CodeWalker.GameFiles } public void WriteXml(StringBuilder sb, int indent) { - if (RotationLimits != null) + if (RotationLimits is not null && RotationLimits.Length > 0) { YdrXml.WriteItemArray(sb, RotationLimits, indent, "RotationLimits"); } - if (TranslationLimits != null) + if (TranslationLimits is not null && TranslationLimits.Length > 0) { YdrXml.WriteItemArray(sb, TranslationLimits, indent, "TranslationLimits"); } @@ -2346,12 +2344,12 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (RotationLimits != null) + if (RotationLimits.Length > 0) { RotationLimitsBlock = new ResourceSystemStructBlock(RotationLimits); list.Add(RotationLimitsBlock); } - if (TranslationLimits != null) + if (TranslationLimits.Length > 0) { TranslationLimitsBlock = new ResourceSystemStructBlock(TranslationLimits); list.Add(TranslationLimitsBlock); @@ -2360,7 +2358,8 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct JointRotationLimit_s : IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct JointRotationLimit_s : IMetaXmlItem { // structure data public uint Unknown_0h { get; set; } // 0x00000000 @@ -2459,7 +2458,7 @@ namespace CodeWalker.GameFiles Unknown_BCh = 0x100; } - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { YdrXml.ValueTag(sb, indent, "BoneId", BoneId.ToString()); YdrXml.ValueTag(sb, indent, "UnknownA", Unknown_Ah.ToString()); @@ -2476,7 +2475,8 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct JointTranslationLimit_s : IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct JointTranslationLimit_s : IMetaXmlItem { public uint Unknown_0h { get; set; } // 0x00000000 public uint Unknown_4h { get; set; } // 0x00000000 @@ -2491,7 +2491,7 @@ namespace CodeWalker.GameFiles public Vector3 Max { get; set; } public uint Unknown_3Ch { get; set; } // 0x00000000 - public void WriteXml(StringBuilder sb, int indent) + public readonly void WriteXml(StringBuilder sb, int indent) { YdrXml.ValueTag(sb, indent, "BoneId", BoneId.ToString()); YdrXml.SelfClosingTag(sb, indent, "Min " + FloatUtil.GetVector3XmlString(Min)); @@ -2509,7 +2509,8 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawableModelsBlock : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawableModelsBlock : ResourceSystemBlock { public override long BlockLength { @@ -2525,64 +2526,64 @@ namespace CodeWalker.GameFiles } } - public DrawableBase Owner; + public DrawableBase? Owner; - public DrawableModel[] High { get; set; } - public DrawableModel[] Med { get; set; } - public DrawableModel[] Low { get; set; } - public DrawableModel[] VLow { get; set; } - public DrawableModel[] Extra { get; set; } //shouldn't be used + public DrawableModel[]? High { get; set; } + public DrawableModel[]? Med { get; set; } + public DrawableModel[]? Low { get; set; } + public DrawableModel[]? VLow { get; set; } + public DrawableModel[]? Extra { get; set; } //shouldn't be used - public ResourcePointerListHeader HighHeader { get; set; } - public ResourcePointerListHeader MedHeader { get; set; } - public ResourcePointerListHeader LowHeader { get; set; } - public ResourcePointerListHeader VLowHeader { get; set; } - public ResourcePointerListHeader ExtraHeader { get; set; } + public ResourcePointerListHeader HighHeader; + public ResourcePointerListHeader MedHeader; + public ResourcePointerListHeader LowHeader; + public ResourcePointerListHeader VLowHeader; + public ResourcePointerListHeader ExtraHeader; - public ulong[] HighPointers { get; set; } - public ulong[] MedPointers { get; set; } - public ulong[] LowPointers { get; set; } - public ulong[] VLowPointers { get; set; } - public ulong[] ExtraPointers { get; set; } + public ulong[]? HighPointers { get; set; } + public ulong[]? MedPointers { get; set; } + public ulong[]? LowPointers { get; set; } + public ulong[]? VLowPointers { get; set; } + public ulong[]? ExtraPointers { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { Owner = parameters[0] as DrawableBase; var pos = (ulong)reader.Position; - var highPointer = (Owner?.DrawableModelsHighPointer ?? 0); - var medPointer = (Owner?.DrawableModelsMediumPointer ?? 0); - var lowPointer = (Owner?.DrawableModelsLowPointer ?? 0); - var vlowPointer = (Owner?.DrawableModelsVeryLowPointer ?? 0); + var highPointer = Owner?.DrawableModelsHighPointer ?? 0; + var medPointer = Owner?.DrawableModelsMediumPointer ?? 0; + var lowPointer = Owner?.DrawableModelsLowPointer ?? 0; + var vlowPointer = Owner?.DrawableModelsVeryLowPointer ?? 0; var extraPointer = (pos != highPointer) ? pos : 0; if (highPointer != 0) { - HighHeader = reader.ReadStructAt((long)highPointer); + reader.TryReadStructAt((long)highPointer, out HighHeader); HighPointers = reader.ReadUlongsAt(HighHeader.Pointer, HighHeader.Capacity, false); High = reader.ReadBlocks(HighPointers); } if (medPointer != 0) { - MedHeader = reader.ReadStructAt((long)medPointer); + reader.TryReadStructAt((long)medPointer, out MedHeader); MedPointers = reader.ReadUlongsAt(MedHeader.Pointer, MedHeader.Capacity, false); Med = reader.ReadBlocks(MedPointers); } if (lowPointer != 0) { - LowHeader = reader.ReadStructAt((long)lowPointer); + reader.TryReadStructAt((long)lowPointer, out LowHeader); LowPointers = reader.ReadUlongsAt(LowHeader.Pointer, LowHeader.Capacity, false); Low = reader.ReadBlocks(LowPointers); } if (vlowPointer != 0) { - VLowHeader = reader.ReadStructAt((long)vlowPointer); + reader.TryReadStructAt((long)vlowPointer, out VLowHeader); VLowPointers = reader.ReadUlongsAt(VLowHeader.Pointer, VLowHeader.Capacity, false); VLow = reader.ReadBlocks(VLowPointers); } if (extraPointer != 0) { - ExtraHeader = reader.ReadStructAt((long)extraPointer); + reader.TryReadStructAt((long)extraPointer, out ExtraHeader); ExtraPointers = reader.ReadUlongsAt(ExtraHeader.Pointer, ExtraHeader.Capacity, false); Extra = reader.ReadBlocks(ExtraPointers); } @@ -2656,32 +2657,39 @@ namespace CodeWalker.GameFiles } - private long Pad(long o) => ((16 - (o % 16)) % 16); + private long Pad(long o) => (16 - (o % 16)) % 16; private long HeaderLength(int listlength) => 16 + ((listlength) * 8); - private long ListLength(DrawableModel[] list, long o) + private long ListLength(DrawableModel[]? list, long o) { - if (list == null) return 0; + if (list is null) + return 0; + long l = 0; l += HeaderLength(list.Length); - foreach (var m in list) l += Pad(l) + m.BlockLength; + foreach (var m in list) + { + l += Pad(l) + m.BlockLength; + } return Pad(o) + l; } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - var parts = new List>(); + var parts = new List<(long, IResourceBlock)>(); parts.AddRange(base.GetParts()); - void addParts(ref long p, DrawableModel[] a) + void addParts(ref long p, DrawableModel[]? a) { - if (a == null) return; + if (a is null) + return; + p += Pad(p); p += HeaderLength(a.Length); foreach (var m in a) { p += Pad(p); - parts.Add(new Tuple(p, m)); + parts.Add((p, m)); p += m.BlockLength; } } @@ -2699,12 +2707,14 @@ namespace CodeWalker.GameFiles public long GetHighPointer() { - if (High == null) return 0; + if (High is null) + return 0; return FilePosition; } public long GetMedPointer() { - if (Med == null) return 0; + if (Med is null) + return 0; var p = FilePosition; p += ListLength(High, p); p += Pad(p); @@ -2712,7 +2722,8 @@ namespace CodeWalker.GameFiles } public long GetLowPointer() { - if (Low == null) return 0; + if (Low is null) + return 0; var p = GetMedPointer(); p += ListLength(Med, p); p += Pad(p); @@ -2720,7 +2731,8 @@ namespace CodeWalker.GameFiles } public long GetVLowPointer() { - if (VLow == null) return 0; + if (VLow is null) + return 0; var p = GetLowPointer(); p += ListLength(Low, p); p += Pad(p); @@ -2728,7 +2740,8 @@ namespace CodeWalker.GameFiles } public long GetExtraPointer() { - if (Extra == null) return 0; + if (Extra is null) + return 0; var p = GetVLowPointer(); p += ListLength(VLow, p); p += Pad(p); @@ -2737,7 +2750,8 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawableModel : ResourceSystemBlock, IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawableModel : ResourceSystemBlock, IMetaXmlItem { public override long BlockLength { @@ -2752,8 +2766,8 @@ namespace CodeWalker.GameFiles off += (GeometriesCount1 + ((GeometriesCount1 > 1) ? 1 : 0)) * 32; //BoundsData for (int i = 0; i < GeometriesCount1; i++) { - var geom = (Geometries != null) ? Geometries[i] : null; - if (geom != null) + var geom = (Geometries is not null && i < Geometries.Length) ? Geometries[i] : null; + if (geom is not null) { off += ((16 - (off % 16)) % 16); off += geom.BlockLength; //Geometries @@ -2782,34 +2796,34 @@ namespace CodeWalker.GameFiles public byte BoneIndex { - get { return (byte)((SkeletonBinding >> 24) & 0xFF); } - set { SkeletonBinding = (SkeletonBinding & 0x00FFFFFF) + ((value & 0xFFu) << 24); } + get => (byte)((SkeletonBinding >> 24) & 0xFF); + set => SkeletonBinding = (SkeletonBinding & 0x00FFFFFF) + ((value & 0xFFu) << 24); } public byte SkeletonBindUnk2 //always 0 { - get { return (byte)((SkeletonBinding >> 16) & 0xFF); } - set { SkeletonBinding = (SkeletonBinding & 0xFF00FFFF) + ((value & 0xFFu) << 16); } + get => (byte)((SkeletonBinding >> 16) & 0xFF); + set => SkeletonBinding = (SkeletonBinding & 0xFF00FFFF) + ((value & 0xFFu) << 16); } public byte HasSkin //only 0 or 1 { - get { return (byte)((SkeletonBinding >> 8) & 0xFF); } - set { SkeletonBinding = (SkeletonBinding & 0xFFFF00FF) + ((value & 0xFFu) << 8); } + get => (byte)((SkeletonBinding >> 8) & 0xFF); + set => SkeletonBinding = (SkeletonBinding & 0xFFFF00FF) + ((value & 0xFFu) << 8); } public byte SkeletonBindUnk1 //only 0 or 43 (in rare cases, see below) { - get { return (byte)((SkeletonBinding >> 0) & 0xFF); } - set { SkeletonBinding = (SkeletonBinding & 0xFFFFFF00) + ((value & 0xFFu) << 0); } + get => (byte)((SkeletonBinding >> 0) & 0xFF); + set => SkeletonBinding = (SkeletonBinding & 0xFFFFFF00) + ((value & 0xFFu) << 0); } public byte RenderMask { - get { return (byte)((RenderMaskFlags >> 0) & 0xFF); } - set { RenderMaskFlags = (ushort)((RenderMaskFlags & 0xFF00u) + ((value & 0xFFu) << 0)); } + get => (byte)((RenderMaskFlags >> 0) & 0xFF); + set => RenderMaskFlags = (ushort)((RenderMaskFlags & 0xFF00u) + ((value & 0xFFu) << 0)); } public byte Flags { - get { return (byte)((RenderMaskFlags >> 8) & 0xFF); } - set { RenderMaskFlags = (ushort)((RenderMaskFlags & 0xFFu) + ((value & 0xFFu) << 8)); } + get => (byte)((RenderMaskFlags >> 8) & 0xFF); + set => RenderMaskFlags = (ushort)((RenderMaskFlags & 0xFFu) + ((value & 0xFFu) << 8)); } @@ -2871,20 +2885,20 @@ namespace CodeWalker.GameFiles this.RenderMaskFlags = reader.ReadUInt16(); this.GeometriesCount3 = reader.ReadUInt16(); - this.ShaderMapping = reader.ReadUshortsAt(this.ShaderMappingPointer, this.GeometriesCount1, false); - this.GeometryPointers = reader.ReadUlongsAt(this.GeometriesPointer, this.GeometriesCount1, false); - this.BoundsData = reader.ReadStructsAt(this.BoundsPointer, (uint)(this.GeometriesCount1 > 1 ? this.GeometriesCount1 + 1 : this.GeometriesCount1), false); - this.Geometries = reader.ReadBlocks(this.GeometryPointers); + this.ShaderMapping = reader.ReadUshortsAt(this.ShaderMappingPointer, this.GeometriesCount1, false) ?? Array.Empty(); + this.GeometryPointers = reader.ReadUlongsAt(this.GeometriesPointer, this.GeometriesCount1, false) ?? Array.Empty(); + this.BoundsData = reader.ReadStructsAt(this.BoundsPointer, (uint)(this.GeometriesCount1 > 1 ? this.GeometriesCount1 + 1 : this.GeometriesCount1), false) ?? Array.Empty(); + this.Geometries = reader.ReadBlocks(this.GeometryPointers) ?? Array.Empty(); - if (Geometries != null) + if (Geometries is not null) { for (int i = 0; i < Geometries.Length; i++) { var geom = Geometries[i]; - if (geom != null) + if (geom is not null) { - geom.ShaderID = ((ShaderMapping != null) && (i < ShaderMapping.Length)) ? ShaderMapping[i] : (ushort)0; - geom.AABB = (BoundsData != null) ? ((BoundsData.Length > 1) && ((i + 1) < BoundsData.Length)) ? BoundsData[i + 1] : BoundsData[0] : new AABB_s(); + geom.ShaderID = ((ShaderMapping.Length > 0) && (i < ShaderMapping.Length)) ? ShaderMapping[i] : (ushort)0; + geom.AABB = (BoundsData.Length > 0) ? ((BoundsData.Length > 1) && ((i + 1) < BoundsData.Length)) ? BoundsData[i + 1] : BoundsData[0] : new AABB_s(); } } } @@ -2953,7 +2967,7 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.GeometriesCount1 = (ushort)(this.Geometries != null ? this.Geometries.Length : 0); + this.GeometriesCount1 = (ushort)(this.Geometries?.Length ?? 0); this.GeometriesCount2 = this.GeometriesCount1;//is this correct? this.GeometriesCount3 = this.GeometriesCount1;//is this correct? @@ -2971,8 +2985,8 @@ namespace CodeWalker.GameFiles this.GeometryPointers = new ulong[GeometriesCount1]; for (int i = 0; i < GeometriesCount1; i++) { - var geom = (Geometries != null) ? Geometries[i] : null; - if (geom != null) + var geom = Geometries[i]; + if (geom is not null) { off += pad(off); this.GeometryPointers[i] = (ulong)off; @@ -3019,8 +3033,8 @@ namespace CodeWalker.GameFiles } for (int i = 0; i < GeometriesCount1; i++) { - var geom = (Geometries != null) ? Geometries[i] : null; - if (geom != null) + var geom = Geometries[i]; + if (geom is not null) { writer.WritePadding(16); writer.WriteBlock(geom); @@ -3036,7 +3050,7 @@ namespace CodeWalker.GameFiles YdrXml.ValueTag(sb, indent, "BoneIndex", BoneIndex.ToString()); YdrXml.ValueTag(sb, indent, "Unknown1", SkeletonBindUnk1.ToString()); - if (Geometries != null) + if (Geometries is not null) { YdrXml.WriteItemArray(sb, Geometries, indent, "Geometries"); } @@ -3050,12 +3064,12 @@ namespace CodeWalker.GameFiles BoneIndex = (byte)Xml.GetChildUIntAttribute(node, "BoneIndex", "value"); SkeletonBindUnk1 = (byte)Xml.GetChildUIntAttribute(node, "Unknown1", "value"); - var aabbs = new List(); - var shids = new List(); + using var aabbs = new PooledList(); + using var shids = new PooledList(); var min = new Vector4(float.MaxValue); var max = new Vector4(float.MinValue); var geoms = XmlMeta.ReadItemArray(node, "Geometries"); - if (geoms != null) + if (geoms is not null) { Geometries = geoms; foreach (var geom in geoms) @@ -3069,18 +3083,18 @@ namespace CodeWalker.GameFiles } if (aabbs.Count > 1) { - var outeraabb = new AABB_s() { Min = min, Max = max }; + var outeraabb = new AABB_s(min, max); aabbs.Insert(0, outeraabb); } - BoundsData = (aabbs.Count > 0) ? aabbs.ToArray() : null; - ShaderMapping = (shids.Count > 0) ? shids.ToArray() : null; + BoundsData = (aabbs.Count > 0) ? aabbs.ToArray() : []; + ShaderMapping = (shids.Count > 0) ? shids.ToArray() : []; } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - var parts = new List>(); + var parts = new List<(long, IResourceBlock)>(); parts.AddRange(base.GetParts()); var off = (long)48; @@ -3092,11 +3106,11 @@ namespace CodeWalker.GameFiles off += (GeometriesCount1 + ((GeometriesCount1 > 1) ? 1 : 0)) * 32; //BoundsData for (int i = 0; i < GeometriesCount1; i++) { - var geom = (Geometries != null) ? Geometries[i] : null; + var geom = (Geometries != null && i < Geometries.Length) ? Geometries[i] : null; if (geom != null) { off += ((16 - (off % 16)) % 16); - parts.Add(new Tuple(off, geom)); + parts.Add((off, geom)); off += geom.BlockLength; //Geometries } } @@ -3106,19 +3120,21 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "(" + (Geometries?.Length ?? 0).ToString() + " geometr" + ((Geometries?.Length ?? 0) != 1 ? "ies)" : "y)"); + var suffix = (Geometries?.Length ?? 0) != 1 ? "ies" : "y"; + return $"({Geometries?.Length ?? 0} geometr{suffix} {Geometries?.Sum(p => p.VerticesCount) ?? 0} verts)"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawableGeometry : ResourceSystemBlock, IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawableGeometry : ResourceSystemBlock, IMetaXmlItem { public override long BlockLength { get { long l = 152; - if (BoneIds != null) + if (BoneIds is not null) { if (BoneIds.Length > 4) l += 8; l += (BoneIds.Length) * 2; @@ -3155,11 +3171,11 @@ namespace CodeWalker.GameFiles public ulong Unknown_90h; // 0x0000000000000000 // reference data - public VertexBuffer VertexBuffer { get; set; } - public IndexBuffer IndexBuffer { get; set; } - public VertexData VertexData { get; set; } - public ushort[] BoneIds { get; set; }//embedded at the end of this struct - public ShaderFX Shader { get; set; }//written by parent DrawableBase, using ShaderID + public VertexBuffer? VertexBuffer { get; set; } + public IndexBuffer? IndexBuffer { get; set; } + public VertexData? VertexData { get; set; } + public ushort[]? BoneIds { get; set; }//embedded at the end of this struct + public ShaderFX? Shader { get; set; }//written by parent DrawableBase, using ShaderID public ushort ShaderID { get; set; }//read/written by parent model public AABB_s AABB { get; set; }//read/written by parent model @@ -3204,7 +3220,7 @@ namespace CodeWalker.GameFiles this.IndexBufferPointer // offset ); this.BoneIds = reader.ReadUshortsAt(this.BoneIdsPointer, this.BoneIdsCount, false); - if (this.BoneIds != null) //skinned mesh bones to use? peds, also yft props... + if (this.BoneIds is not null) //skinned mesh bones to use? peds, also yft props... { } //if (BoneIdsPointer != 0) @@ -3215,7 +3231,7 @@ namespace CodeWalker.GameFiles // { }//no hit - interesting alignment, boneids array always packed after this struct //} - if (this.VertexBuffer != null) + if (this.VertexBuffer is not null) { this.VertexData = this.VertexBuffer.Data1 ?? this.VertexBuffer.Data2; @@ -3284,14 +3300,14 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.VertexBufferPointer = (ulong)(this.VertexBuffer != null ? this.VertexBuffer.FilePosition : 0); - this.IndexBufferPointer = (ulong)(this.IndexBuffer != null ? this.IndexBuffer.FilePosition : 0); - this.VertexDataPointer = (ulong)(this.VertexData != null ? this.VertexData.FilePosition : 0); - this.VerticesCount = (ushort)(this.VertexData != null ? this.VertexData.VertexCount : 0); //TODO: fix? - this.VertexStride = (ushort)(this.VertexBuffer != null ? this.VertexBuffer.VertexStride : 0); //TODO: fix? - this.IndicesCount = (this.IndexBuffer != null ? this.IndexBuffer.IndicesCount : 0); //TODO: fix? - this.TrianglesCount = this.IndicesCount / 3; //TODO: fix? - this.BoneIdsPointer = (BoneIds != null) ? (ulong)(writer.Position + 152 + ((BoneIds.Length > 4) ? 8 : 0)) : 0; + this.VertexBufferPointer = (ulong)(VertexBuffer?.FilePosition ?? 0); + this.IndexBufferPointer = (ulong)(IndexBuffer?.FilePosition ?? 0); + this.VertexDataPointer = (ulong)(VertexData?.FilePosition ?? 0); + this.VerticesCount = (ushort)(VertexData?.VertexCount ?? 0); //TODO: fix? + this.VertexStride = (ushort)(VertexBuffer?.VertexStride ?? 0); //TODO: fix? + this.IndicesCount = (IndexBuffer?.IndicesCount ?? 0); //TODO: fix? + this.TrianglesCount = IndicesCount / 3; //TODO: fix? + this.BoneIdsPointer = (BoneIds is not null) ? (ulong)(writer.Position + 152 + ((BoneIds.Length > 4) ? 8 : 0)) : 0; this.BoneIdsCount = (ushort)(BoneIds?.Length ?? 0); @@ -3366,12 +3382,14 @@ namespace CodeWalker.GameFiles public void ReadXml(XmlNode node) { ShaderID = (ushort)Xml.GetChildUIntAttribute(node, "ShaderIndex", "value"); - var aabb = new AABB_s(); - aabb.Min = Xml.GetChildVector4Attributes(node, "BoundingBoxMin"); - aabb.Max = Xml.GetChildVector4Attributes(node, "BoundingBoxMax"); + var aabb = new AABB_s + { + Min = Xml.GetChildVector4Attributes(node, "BoundingBoxMin"), + Max = Xml.GetChildVector4Attributes(node, "BoundingBoxMax"), + }; AABB = aabb; var bnode = node.SelectSingleNode("BoneIDs"); - if (bnode != null) + if (bnode is not null) { var astr = bnode.InnerText; var arr = astr.Split(','); @@ -3388,14 +3406,14 @@ namespace CodeWalker.GameFiles BoneIds = (blist.Count > 0) ? blist.ToArray() : null; } var vnode = node.SelectSingleNode("VertexBuffer"); - if (vnode != null) + if (vnode is not null) { VertexBuffer = new VertexBuffer(); VertexBuffer.ReadXml(vnode); VertexData = VertexBuffer.Data1 ?? VertexBuffer.Data2; } var inode = node.SelectSingleNode("IndexBuffer"); - if (inode != null) + if (inode is not null) { IndexBuffer = new IndexBuffer(); IndexBuffer.ReadXml(inode); @@ -3405,9 +3423,12 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (VertexBuffer != null) list.Add(VertexBuffer); - if (IndexBuffer != null) list.Add(IndexBuffer); - if (VertexData != null) list.Add(VertexData); + if (VertexBuffer is not null) + list.Add(VertexBuffer); + if (IndexBuffer is not null) + list.Add(IndexBuffer); + if (VertexData is not null) + list.Add(VertexData); return list.ToArray(); } @@ -3417,12 +3438,10 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class VertexBuffer : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class VertexBuffer : ResourceSystemBlock { - public override long BlockLength - { - get { return 128; } - } + public override long BlockLength => 128; // structure data public uint VFT { get; set; } = 1080153080; @@ -3613,25 +3632,21 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (Data1 != null) list.Add(Data1); - if (Data2 != null) list.Add(Data2); - if (Info != null) list.Add(Info); + if (Data1 is not null) + list.Add(Data1); + if (Data2 is not null) + list.Add(Data2); + if (Info is not null) + list.Add(Info); return list.ToArray(); } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class VertexData : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class VertexData : ResourceSystemBlock { - - //private int length = 0; - public override long BlockLength - { - get - { - return VertexBytes?.Length ?? 0; //this.length; - } - } + public override long BlockLength => VertexBytes?.Length ?? 0; public int VertexStride { get; set; } @@ -3639,16 +3654,10 @@ namespace CodeWalker.GameFiles public VertexDeclaration Info { get; set; } public VertexType VertexType { get; set; } - public byte[] VertexBytes { get; set; } + public byte[]? VertexBytes { get; set; } - public long MemoryUsage - { - get - { - return (long)VertexCount * (long)VertexStride; - } - } + public long MemoryUsage => VertexCount * VertexStride; public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3684,7 +3693,7 @@ namespace CodeWalker.GameFiles } public override void Write(ResourceDataWriter writer, params object[] parameters) { - if (VertexBytes != null) + if (VertexBytes is not null) { writer.Write(VertexBytes); //not dealing with individual vertex data here any more! } @@ -3727,7 +3736,8 @@ namespace CodeWalker.GameFiles foreach (var row in rows) { var rowt = row.Trim(); - if (string.IsNullOrEmpty(rowt)) continue; + if (string.IsNullOrEmpty(rowt)) + continue; var cols = row.Split(coldelim, StringSplitOptions.RemoveEmptyEntries); vstrs.Add(cols); } @@ -3825,162 +3835,163 @@ namespace CodeWalker.GameFiles } public void SetVector3(int v, int c, Vector3 val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 12;//sizeof(Vector3) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 12;//sizeof(Vector3) - if (e <= VertexBytes.Length) - { - var x = BitConverter.GetBytes(val.X); - var y = BitConverter.GetBytes(val.Y); - var z = BitConverter.GetBytes(val.Z); - Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 4); - Buffer.BlockCopy(y, 0, VertexBytes, o + 4, 4); - Buffer.BlockCopy(z, 0, VertexBytes, o + 8, 4); - } + var x = BitConverter.GetBytes(val.X); + var y = BitConverter.GetBytes(val.Y); + var z = BitConverter.GetBytes(val.Z); + Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 4); + Buffer.BlockCopy(y, 0, VertexBytes, o + 4, 4); + Buffer.BlockCopy(z, 0, VertexBytes, o + 8, 4); } } public void SetVector4(int v, int c, Vector4 val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 16;//sizeof(Vector4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 16;//sizeof(Vector4) - if (e <= VertexBytes.Length) - { - var x = BitConverter.GetBytes(val.X); - var y = BitConverter.GetBytes(val.Y); - var z = BitConverter.GetBytes(val.Z); - var w = BitConverter.GetBytes(val.W); - Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 4); - Buffer.BlockCopy(y, 0, VertexBytes, o + 4, 4); - Buffer.BlockCopy(z, 0, VertexBytes, o + 8, 4); - Buffer.BlockCopy(w, 0, VertexBytes, o + 12, 4); - } + var x = BitConverter.GetBytes(val.X); + var y = BitConverter.GetBytes(val.Y); + var z = BitConverter.GetBytes(val.Z); + var w = BitConverter.GetBytes(val.W); + Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 4); + Buffer.BlockCopy(y, 0, VertexBytes, o + 4, 4); + Buffer.BlockCopy(z, 0, VertexBytes, o + 8, 4); + Buffer.BlockCopy(w, 0, VertexBytes, o + 12, 4); } } public void SetDec3N(int v, int c, Vector3 val) { + if (Info is null || VertexBytes is null) + return; //see https://docs.microsoft.com/en-us/previous-versions/windows/desktop/bb322868(v%3Dvs.85) - if ((Info != null) && (VertexBytes != null)) + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Dec3N) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Dec3N) - if (e <= VertexBytes.Length) - { - var sx = (val.X < 0.0f); - var sy = (val.X < 0.0f); - var sz = (val.X < 0.0f); - var x = Math.Min((uint)(Math.Abs(val.X) * 511.0f), 511); - var y = Math.Min((uint)(Math.Abs(val.Y) * 511.0f), 511); - var z = Math.Min((uint)(Math.Abs(val.Z) * 511.0f), 511); - var ux = ((sx ? ~x : x) & 0x1FF) + (sx ? 0x200 : 0); - var uy = ((sy ? ~y : y) & 0x1FF) + (sy ? 0x200 : 0); - var uz = ((sz ? ~z : z) & 0x1FF) + (sz ? 0x200 : 0); - var uw = 0u; - var u = ux + (uy << 10) + (uz << 20) + (uw << 30); - var b = BitConverter.GetBytes(u); - Buffer.BlockCopy(b, 0, VertexBytes, o, 4); - } + var sx = (val.X < 0.0f); + var sy = (val.X < 0.0f); + var sz = (val.X < 0.0f); + var x = Math.Min((uint)(Math.Abs(val.X) * 511.0f), 511); + var y = Math.Min((uint)(Math.Abs(val.Y) * 511.0f), 511); + var z = Math.Min((uint)(Math.Abs(val.Z) * 511.0f), 511); + var ux = ((sx ? ~x : x) & 0x1FF) + (sx ? 0x200 : 0); + var uy = ((sy ? ~y : y) & 0x1FF) + (sy ? 0x200 : 0); + var uz = ((sz ? ~z : z) & 0x1FF) + (sz ? 0x200 : 0); + var uw = 0u; + var u = ux + (uy << 10) + (uz << 20) + (uw << 30); + var b = BitConverter.GetBytes(u); + Buffer.BlockCopy(b, 0, VertexBytes, o, 4); } } public void SetHalf2(int v, int c, Half2 val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Half2) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Half2) - if (e <= VertexBytes.Length) - { - var x = BitConverter.GetBytes(val.X.RawValue); - var y = BitConverter.GetBytes(val.Y.RawValue); - Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 2); - Buffer.BlockCopy(y, 0, VertexBytes, o + 2, 2); - } + var x = BitConverter.GetBytes(val.X.RawValue); + var y = BitConverter.GetBytes(val.Y.RawValue); + Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 2); + Buffer.BlockCopy(y, 0, VertexBytes, o + 2, 2); } } public void SetHalf4(int v, int c, Half4 val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 8;//sizeof(Half4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 8;//sizeof(Half4) - if (e <= VertexBytes.Length) - { - var x = BitConverter.GetBytes(val.X.RawValue); - var y = BitConverter.GetBytes(val.Y.RawValue); - var z = BitConverter.GetBytes(val.Z.RawValue); - var w = BitConverter.GetBytes(val.W.RawValue); - Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 2); - Buffer.BlockCopy(y, 0, VertexBytes, o + 2, 2); - Buffer.BlockCopy(z, 0, VertexBytes, o + 4, 2); - Buffer.BlockCopy(w, 0, VertexBytes, o + 6, 2); - } + var x = BitConverter.GetBytes(val.X.RawValue); + var y = BitConverter.GetBytes(val.Y.RawValue); + var z = BitConverter.GetBytes(val.Z.RawValue); + var w = BitConverter.GetBytes(val.W.RawValue); + Buffer.BlockCopy(x, 0, VertexBytes, o + 0, 2); + Buffer.BlockCopy(y, 0, VertexBytes, o + 2, 2); + Buffer.BlockCopy(z, 0, VertexBytes, o + 4, 2); + Buffer.BlockCopy(w, 0, VertexBytes, o + 6, 2); } } public void SetColour(int v, int c, Color val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Color) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Color) - if (e <= VertexBytes.Length) - { - var u = val.ToRgba(); - var b = BitConverter.GetBytes(u); - Buffer.BlockCopy(b, 0, VertexBytes, o, 4); - } + var u = val.ToRgba(); + var b = BitConverter.GetBytes(u); + Buffer.BlockCopy(b, 0, VertexBytes, o, 4); } } public void SetUByte4(int v, int c, Color val) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(UByte4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(UByte4) - if (e <= VertexBytes.Length) - { - var u = val.ToRgba(); - var b = BitConverter.GetBytes(u); - Buffer.BlockCopy(b, 0, VertexBytes, o, 4); - } + var u = val.ToRgba(); + var b = BitConverter.GetBytes(u); + Buffer.BlockCopy(b, 0, VertexBytes, o, 4); } } public string GetString(int v, int c, string d = ", ") { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return string.Empty; + + var ct = Info.GetComponentType(c); + switch (ct) { - var ct = Info.GetComponentType(c); - switch (ct) - { - case VertexComponentType.Float: return FloatUtil.ToString(GetFloat(v, c)); - case VertexComponentType.Float2: return FloatUtil.GetVector2String(GetVector2(v, c), d); - case VertexComponentType.Float3: return FloatUtil.GetVector3String(GetVector3(v, c), d); - case VertexComponentType.Float4: return FloatUtil.GetVector4String(GetVector4(v, c), d); - case VertexComponentType.Dec3N: return FloatUtil.GetVector3String(GetDec3N(v, c), d); - case VertexComponentType.Half2: return FloatUtil.GetHalf2String(GetHalf2(v, c), d); - case VertexComponentType.Half4: return FloatUtil.GetHalf4String(GetHalf4(v, c), d); - case VertexComponentType.Colour: return FloatUtil.GetColourString(GetColour(v, c), d); - case VertexComponentType.UByte4: return FloatUtil.GetColourString(GetUByte4(v, c), d); - default: - break; - } + case VertexComponentType.Float: return FloatUtil.ToString(GetFloat(v, c)); + case VertexComponentType.Float2: return FloatUtil.GetVector2String(GetVector2(v, c), d); + case VertexComponentType.Float3: return FloatUtil.GetVector3String(GetVector3(v, c), d); + case VertexComponentType.Float4: return FloatUtil.GetVector4String(GetVector4(v, c), d); + case VertexComponentType.Dec3N: return FloatUtil.GetVector3String(GetDec3N(v, c), d); + case VertexComponentType.Half2: return FloatUtil.GetHalf2String(GetHalf2(v, c), d); + case VertexComponentType.Half4: return FloatUtil.GetHalf4String(GetHalf4(v, c), d); + case VertexComponentType.Colour: return FloatUtil.GetColourString(GetColour(v, c), d); + case VertexComponentType.UByte4: return FloatUtil.GetColourString(GetUByte4(v, c), d); + default: + break; } + return string.Empty; } public float GetFloat(int v, int c) @@ -4001,151 +4012,153 @@ namespace CodeWalker.GameFiles } public Vector2 GetVector2(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return Vector2.Zero; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 8;//sizeof(Vector2) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 8;//sizeof(Vector2) - if (e <= VertexBytes.Length) - { - var x = BitConverter.ToSingle(VertexBytes, o + 0); - var y = BitConverter.ToSingle(VertexBytes, o + 4); - return new Vector2(x, y); - } + var x = BitConverter.ToSingle(VertexBytes, o + 0); + var y = BitConverter.ToSingle(VertexBytes, o + 4); + return new Vector2(x, y); } + return Vector2.Zero; } public Vector3 GetVector3(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return Vector3.Zero; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 12;//sizeof(Vector3) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 12;//sizeof(Vector3) - if (e <= VertexBytes.Length) - { - var x = BitConverter.ToSingle(VertexBytes, o + 0); - var y = BitConverter.ToSingle(VertexBytes, o + 4); - var z = BitConverter.ToSingle(VertexBytes, o + 8); - return new Vector3(x, y, z); - } + var x = BitConverter.ToSingle(VertexBytes, o + 0); + var y = BitConverter.ToSingle(VertexBytes, o + 4); + var z = BitConverter.ToSingle(VertexBytes, o + 8); + return new Vector3(x, y, z); } return Vector3.Zero; } public Vector4 GetVector4(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return Vector4.Zero; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 16;//sizeof(Vector4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 16;//sizeof(Vector4) - if (e <= VertexBytes.Length) - { - var x = BitConverter.ToSingle(VertexBytes, o + 0); - var y = BitConverter.ToSingle(VertexBytes, o + 4); - var z = BitConverter.ToSingle(VertexBytes, o + 8); - var w = BitConverter.ToSingle(VertexBytes, o + 12); - return new Vector4(x, y, z, w); - } + var x = BitConverter.ToSingle(VertexBytes, o + 0); + var y = BitConverter.ToSingle(VertexBytes, o + 4); + var z = BitConverter.ToSingle(VertexBytes, o + 8); + var w = BitConverter.ToSingle(VertexBytes, o + 12); + return new Vector4(x, y, z, w); } + return Vector4.Zero; } public Vector3 GetDec3N(int v, int c) { + if (Info is null || VertexBytes is null) + return Vector3.Zero; + //see https://docs.microsoft.com/en-us/previous-versions/windows/desktop/bb322868(v%3Dvs.85) - if ((Info != null) && (VertexBytes != null)) + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Dec3N) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Dec3N) - if (e <= VertexBytes.Length) - { - var u = BitConverter.ToUInt32(VertexBytes, o); - var ux = (u >> 0) & 0x3FF; - var uy = (u >> 10) & 0x3FF; - var uz = (u >> 20) & 0x3FF; - var uw = (u >> 30); - var sx = (ux & 0x200) > 0; - var sy = (uy & 0x200) > 0; - var sz = (uz & 0x200) > 0; - var x = ((sx ? ~ux : ux) & 0x1FF) / (sx ? -511.0f : 511.0f); - var y = ((sy ? ~uy : uy) & 0x1FF) / (sy ? -511.0f : 511.0f); - var z = ((sz ? ~uz : uz) & 0x1FF) / (sz ? -511.0f : 511.0f); - return new Vector3(x, y, z); - } + var u = BitConverter.ToUInt32(VertexBytes, o); + var ux = (u >> 0) & 0x3FF; + var uy = (u >> 10) & 0x3FF; + var uz = (u >> 20) & 0x3FF; + var uw = (u >> 30); + var sx = (ux & 0x200) > 0; + var sy = (uy & 0x200) > 0; + var sz = (uz & 0x200) > 0; + var x = ((sx ? ~ux : ux) & 0x1FF) / (sx ? -511.0f : 511.0f); + var y = ((sy ? ~uy : uy) & 0x1FF) / (sy ? -511.0f : 511.0f); + var z = ((sz ? ~uz : uz) & 0x1FF) / (sz ? -511.0f : 511.0f); + return new Vector3(x, y, z); } return Vector3.Zero; } public Half2 GetHalf2(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return new Half2(0, 0); + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Half2) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Half2) - if (e <= VertexBytes.Length) - { - var x = BitConverter.ToUInt16(VertexBytes, o + 0); - var y = BitConverter.ToUInt16(VertexBytes, o + 2); - return new Half2(x, y); - } + var x = BitConverter.ToUInt16(VertexBytes, o + 0); + var y = BitConverter.ToUInt16(VertexBytes, o + 2); + return new Half2(x, y); } return new Half2(0, 0); } public Half4 GetHalf4(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return new Half4(0, 0, 0, 0); + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 8;//sizeof(Half4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 8;//sizeof(Half4) - if (e <= VertexBytes.Length) - { - var x = BitConverter.ToUInt16(VertexBytes, o + 0); - var y = BitConverter.ToUInt16(VertexBytes, o + 2); - var z = BitConverter.ToUInt16(VertexBytes, o + 4); - var w = BitConverter.ToUInt16(VertexBytes, o + 6); - return new Half4(x, y, z, w); - } + var x = BitConverter.ToUInt16(VertexBytes, o + 0); + var y = BitConverter.ToUInt16(VertexBytes, o + 2); + var z = BitConverter.ToUInt16(VertexBytes, o + 4); + var w = BitConverter.ToUInt16(VertexBytes, o + 6); + return new Half4(x, y, z, w); } return new Half4(0, 0, 0, 0); } public Color GetColour(int v, int c) { - if ((Info != null) && (VertexBytes != null)) + if (Info is null || VertexBytes is null) + return Color.Black; + + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(Color) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(Color) - if (e <= VertexBytes.Length) - { - var rgba = BitConverter.ToUInt32(VertexBytes, o); - return new Color(rgba); - } + var rgba = BitConverter.ToUInt32(VertexBytes, o); + return new Color(rgba); } return Color.Black; } public Color GetUByte4(int v, int c) { + if (Info is null || VertexBytes is null) + return new Color(0, 0, 0, 0); + //Color is the same as UByte4 really - if ((Info != null) && (VertexBytes != null)) + var s = Info.Stride; + var co = Info.GetComponentOffset(c); + var o = (v * s) + co; + var e = o + 4;//sizeof(UByte4) + if (e <= VertexBytes.Length) { - var s = Info.Stride; - var co = Info.GetComponentOffset(c); - var o = (v * s) + co; - var e = o + 4;//sizeof(UByte4) - if (e <= VertexBytes.Length) - { - var rgba = BitConverter.ToUInt32(VertexBytes, o); - return new Color(rgba); - } + var rgba = BitConverter.ToUInt32(VertexBytes, o); + return new Color(rgba); } return new Color(0, 0, 0, 0); } @@ -4157,12 +4170,10 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class VertexDeclaration : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class VertexDeclaration : ResourceSystemBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public uint Flags { get; set; } @@ -4296,12 +4307,10 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class IndexBuffer : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class IndexBuffer : ResourceSystemBlock { - public override long BlockLength - { - get { return 96; } - } + public override long BlockLength => 96; // structure data public uint VFT { get; set; } = 1080152408; @@ -4401,15 +4410,15 @@ namespace CodeWalker.GameFiles } public void WriteXml(StringBuilder sb, int indent) { - if (Indices != null) + if (Indices is not null && Indices.Length > 0) { - YdrXml.WriteRawArray(sb, Indices, indent, "Data", "", null, 24); + YdrXml.WriteRawArray(sb, Indices, indent, "Data", "", (FormatterRef?)null, 24); } } public void ReadXml(XmlNode node) { var inode = node.SelectSingleNode("Data"); - if (inode != null) + if (inode is not null) { Indices = Xml.GetRawUshortArray(node); IndicesCount = (uint)(Indices?.Length ?? 0); @@ -4420,7 +4429,7 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (Indices != null) + if (Indices is not null) { IndicesBlock = new ResourceSystemStructBlock(Indices); list.Add(IndicesBlock); @@ -4437,17 +4446,14 @@ namespace CodeWalker.GameFiles Capsule = 4, } - [TypeConverter(typeof(ExpandableObjectConverter))] public class LightAttributes : ResourceSystemBlock, IMetaXmlItem + [TypeConverter(typeof(ExpandableObjectConverter))] + public class LightAttributes : ResourceSystemBlock, IMetaXmlItem { - public override long BlockLength - { - get { return 168; } - } - + public override long BlockLength => 168; // structure data public uint Unknown_0h { get; set; } // 0x00000000 public uint Unknown_4h { get; set; } // 0x00000000 - public Vector3 Position { get; set; } + public Vector3 Position; public uint Unknown_14h { get; set; } // 0x00000000 public byte ColorR { get; set; } public byte ColorG { get; set; } @@ -4717,23 +4723,25 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawableBase : ResourceFileBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawableBase : ResourceFileBase { - private DrawableModel[] allModels; + private DrawableModel[]? allModels; - public override long BlockLength - { - get { return 168; } - } + public override long BlockLength => 168; // structure data public ulong ShaderGroupPointer { get; set; } public ulong SkeletonPointer { get; set; } public Vector3 BoundingCenter { get; set; } public float BoundingSphereRadius { get; set; } - public Vector3 BoundingBoxMin { get; set; } + + public Vector3 _BoundingBoxMin; + public ref Vector3 BoundingBoxMin { get => ref _BoundingBoxMin; } public uint Unknown_3Ch { get; set; } = 0x7f800001; - public Vector3 BoundingBoxMax { get; set; } + + public Vector3 _BoundingBoxMax; + public ref Vector3 BoundingBoxMax { get => ref _BoundingBoxMax; } public uint Unknown_4Ch { get; set; } = 0x7f800001; public ulong DrawableModelsHighPointer { get; set; } public ulong DrawableModelsMediumPointer { get; set; } @@ -4755,43 +4763,43 @@ namespace CodeWalker.GameFiles public byte FlagsHigh { - get { return (byte)(RenderMaskFlagsHigh & 0xFF); } - set { RenderMaskFlagsHigh = (RenderMaskFlagsHigh & 0xFFFFFF00) + (value & 0xFFu); } + get => (byte)(RenderMaskFlagsHigh & 0xFF); + set => RenderMaskFlagsHigh = (RenderMaskFlagsHigh & 0xFFFFFF00) + (value & 0xFFu); } public byte FlagsMed { - get { return (byte)(RenderMaskFlagsMed & 0xFF); } - set { RenderMaskFlagsMed = (RenderMaskFlagsMed & 0xFFFFFF00) + (value & 0xFFu); } + get => (byte)(RenderMaskFlagsMed & 0xFF); + set => RenderMaskFlagsMed = (RenderMaskFlagsMed & 0xFFFFFF00) + (value & 0xFFu); } public byte FlagsLow { - get { return (byte)(RenderMaskFlagsLow & 0xFF); } - set { RenderMaskFlagsLow = (RenderMaskFlagsLow & 0xFFFFFF00) + (value & 0xFFu); } + get => (byte)(RenderMaskFlagsLow & 0xFF); + set => RenderMaskFlagsLow = (RenderMaskFlagsLow & 0xFFFFFF00) + (value & 0xFFu); } public byte FlagsVlow { - get { return (byte)(RenderMaskFlagsVlow & 0xFF); } - set { RenderMaskFlagsVlow = (RenderMaskFlagsVlow & 0xFFFFFF00) + (value & 0xFFu); } + get => (byte)(RenderMaskFlagsVlow & 0xFF); + set => RenderMaskFlagsVlow = (RenderMaskFlagsVlow & 0xFFFFFF00) + (value & 0xFFu); } public byte RenderMaskHigh { - get { return (byte)((RenderMaskFlagsHigh >> 8) & 0xFF); } - set { RenderMaskFlagsHigh = (RenderMaskFlagsHigh & 0xFFFF00FF) + ((value & 0xFFu) << 8); } + get => (byte)((RenderMaskFlagsHigh >> 8) & 0xFF); + set => RenderMaskFlagsHigh = (RenderMaskFlagsHigh & 0xFFFF00FF) + ((value & 0xFFu) << 8); } public byte RenderMaskMed { - get { return (byte)((RenderMaskFlagsMed >> 8) & 0xFF); } - set { RenderMaskFlagsMed = (RenderMaskFlagsMed & 0xFFFF00FF) + ((value & 0xFFu) << 8); } + get => (byte)((RenderMaskFlagsMed >> 8) & 0xFF); + set => RenderMaskFlagsMed = (RenderMaskFlagsMed & 0xFFFF00FF) + ((value & 0xFFu) << 8); } public byte RenderMaskLow { - get { return (byte)((RenderMaskFlagsLow >> 8) & 0xFF); } - set { RenderMaskFlagsLow = (RenderMaskFlagsLow & 0xFFFF00FF) + ((value & 0xFFu) << 8); } + get => (byte)((RenderMaskFlagsLow >> 8) & 0xFF); + set => RenderMaskFlagsLow = (RenderMaskFlagsLow & 0xFFFF00FF) + ((value & 0xFFu) << 8); } public byte RenderMaskVlow { - get { return (byte)((RenderMaskFlagsVlow >> 8) & 0xFF); } - set { RenderMaskFlagsVlow = (RenderMaskFlagsVlow & 0xFFFF00FF) + ((value & 0xFFu) << 8); } + get => (byte)((RenderMaskFlagsVlow >> 8) & 0xFF); + set => RenderMaskFlagsVlow = (RenderMaskFlagsVlow & 0xFFFF00FF) + ((value & 0xFFu) << 8); } @@ -4809,7 +4817,7 @@ namespace CodeWalker.GameFiles { BuildAllModels(); } - return allModels; + return allModels!; } set => allModels = value; } @@ -4817,14 +4825,16 @@ namespace CodeWalker.GameFiles public object Owner { get; set; } - public long MemoryUsage + public long MemoryUsage => PhysicalMemoryUsage + VirtualMemoryUsage; + + public long VirtualMemoryUsage { get { long val = 0; if (AllModels != null) { - foreach(DrawableModel m in AllModels) + foreach (DrawableModel m in AllModels) { if (m != null) { @@ -4832,14 +4842,13 @@ namespace CodeWalker.GameFiles } } } - if ((ShaderGroup != null) && (ShaderGroup.TextureDictionary != null)) - { - val += ShaderGroup.TextureDictionary.MemoryUsage; - } + return val; } } + public long PhysicalMemoryUsage => ShaderGroup?.TextureDictionary?.MemoryUsage ?? 0; + public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -5114,43 +5123,46 @@ namespace CodeWalker.GameFiles YdrXml.ValueTag(sb, indent, "FlagsMed", FlagsMed.ToString()); YdrXml.ValueTag(sb, indent, "FlagsLow", FlagsLow.ToString()); YdrXml.ValueTag(sb, indent, "FlagsVlow", FlagsVlow.ToString()); - if (ShaderGroup != null) + if (ShaderGroup is not null) { YdrXml.OpenTag(sb, indent, "ShaderGroup"); ShaderGroup.WriteXml(sb, indent + 1, ddsfolder); YdrXml.CloseTag(sb, indent, "ShaderGroup"); } - if (Skeleton != null) + if (Skeleton is not null) { YdrXml.OpenTag(sb, indent, "Skeleton"); Skeleton.WriteXml(sb, indent + 1); YdrXml.CloseTag(sb, indent, "Skeleton"); } - if (Joints != null) + if (Joints is not null) { YdrXml.OpenTag(sb, indent, "Joints"); Joints.WriteXml(sb, indent + 1); YdrXml.CloseTag(sb, indent, "Joints"); } - if (DrawableModels?.High != null) + if (DrawableModels is not null) { - YdrXml.WriteItemArray(sb, DrawableModels.High, indent, "DrawableModelsHigh"); - } - if (DrawableModels?.Med != null) - { - YdrXml.WriteItemArray(sb, DrawableModels.Med, indent, "DrawableModelsMedium"); - } - if (DrawableModels?.Low != null) - { - YdrXml.WriteItemArray(sb, DrawableModels.Low, indent, "DrawableModelsLow"); - } - if (DrawableModels?.VLow != null) - { - YdrXml.WriteItemArray(sb, DrawableModels.VLow, indent, "DrawableModelsVeryLow"); - } - if (DrawableModels?.Extra != null)//is this right? duplicates..? - { - YdrXml.WriteItemArray(sb, DrawableModels.Extra, indent, "DrawableModelsX"); + if (DrawableModels.High is not null) + { + YdrXml.WriteItemArray(sb, DrawableModels.High, indent, "DrawableModelsHigh"); + } + if (DrawableModels.Med is not null) + { + YdrXml.WriteItemArray(sb, DrawableModels.Med, indent, "DrawableModelsMedium"); + } + if (DrawableModels.Low is not null) + { + YdrXml.WriteItemArray(sb, DrawableModels.Low, indent, "DrawableModelsLow"); + } + if (DrawableModels.VLow is not null) + { + YdrXml.WriteItemArray(sb, DrawableModels.VLow, indent, "DrawableModelsVeryLow"); + } + if (DrawableModels.Extra is not null)//is this right? duplicates..? + { + YdrXml.WriteItemArray(sb, DrawableModels.Extra, indent, "DrawableModelsX"); + } } } public virtual void ReadXml(XmlNode node, string ddsfolder) @@ -5206,10 +5218,16 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(base.GetReferences()); - if (ShaderGroup != null) list.Add(ShaderGroup); - if (Skeleton != null) list.Add(Skeleton); - if (Joints != null) list.Add(Joints); - if (DrawableModels != null) list.Add(DrawableModels); + + if (ShaderGroup is not null) + list.Add(ShaderGroup); + if (Skeleton is not null) + list.Add(Skeleton); + if (Joints is not null) + list.Add(Joints); + if (DrawableModels is not null) + list.Add(DrawableModels); + return list.ToArray(); } @@ -5222,17 +5240,16 @@ namespace CodeWalker.GameFiles //} //map the shaders to the geometries - if (shaderGrp != null) + if (shaderGrp is not null) { var shaders = shaderGrp.Shaders.data_items; foreach (DrawableModel model in AllModels) { - if (model?.Geometries == null) continue; + if (model?.Geometries is null) + continue; - int geomcount = model.Geometries.Length; - for (int i = 0; i < geomcount; i++) + foreach(var geom in model.Geometries) { - var geom = model.Geometries[i]; var sid = geom.ShaderID; geom.Shader = (sid < shaders.Length) ? shaders[sid] : null; } @@ -5254,45 +5271,50 @@ namespace CodeWalker.GameFiles return; } var length = (DrawableModels.High?.Length ?? 0) + (DrawableModels.Med?.Length ?? 0) + (DrawableModels.Low?.Length ?? 0) + (DrawableModels.VLow?.Length ?? 0); + if (length == 0) + { + allModels = Array.Empty(); + return; + } allModels = new DrawableModel[length]; var currIndex = 0; - if (DrawableModels.High != null) + if (DrawableModels.High is not null) { - for (int i = 0; i < DrawableModels.High.Length; i++) + foreach(var model in DrawableModels.High) { - allModels[currIndex] = DrawableModels.High[i]; + allModels[currIndex] = model; currIndex++; } } - if (DrawableModels.Med != null) + if (DrawableModels.Med is not null) { - for (int i = 0; i < DrawableModels.Med.Length; i++) + foreach(var model in DrawableModels.Med) { - allModels[currIndex] = DrawableModels.Med[i]; + allModels[currIndex] = model; currIndex++; } } - if (DrawableModels.Low != null) + if (DrawableModels.Low is not null) { - for (int i = 0; i < DrawableModels.Low.Length; i++) + foreach(var model in DrawableModels.Low) { - allModels[currIndex] = DrawableModels.Low[i]; + allModels[currIndex] = model; currIndex++; } } - if (DrawableModels.VLow != null) + if (DrawableModels.VLow is not null) { - for (int i = 0; i < DrawableModels.VLow.Length; i++) + foreach(var model in DrawableModels.VLow) { - allModels[currIndex] = DrawableModels.VLow[i]; + allModels[currIndex] = model; currIndex++; } } - if (DrawableModels.Extra != null) + if (DrawableModels.Extra is not null) { - for (int i = 0; i < DrawableModels.Extra.Length; i++) + foreach(var model in DrawableModels.Extra) { - allModels[currIndex] = DrawableModels.Extra[i]; + allModels[currIndex] = model; currIndex++; } } @@ -5303,25 +5325,22 @@ namespace CodeWalker.GameFiles var vds = new Dictionary(); foreach (DrawableModel model in AllModels) { - if (model.Geometries == null) continue; + if (model.Geometries is null) + continue; + foreach (var geom in model.Geometries) { + if (geom.VertexBuffer is null) + continue; + var info = geom.VertexBuffer.Info; var declid = info.GetDeclarationId(); - if (!vds.ContainsKey(declid)) - { - vds.Add(declid, info); - } - //else //debug test - //{ - // if ((VertexDecls[declid].Stride != info.Stride)||(VertexDecls[declid].Types != info.Types)) - // { - // } - //} + _ = vds.TryAdd(declid, info); } } - VertexDecls = new Dictionary(vds); + + VertexDecls = vds; } @@ -5332,31 +5351,20 @@ namespace CodeWalker.GameFiles var lmask = BuildRenderMask(DrawableModels?.Low); var vmask = BuildRenderMask(DrawableModels?.VLow); - ////just testing - //if (hmask != RenderMaskHigh) - //{ }//no hit - //if (mmask != RenderMaskMed) - //{ }//no hit - //if (lmask != RenderMaskLow) - //{ }//no hit - //if (vmask != RenderMaskVlow) - //{ }//no hit - RenderMaskHigh = hmask; RenderMaskMed = mmask; RenderMaskLow = lmask; RenderMaskVlow = vmask; } - private byte BuildRenderMask(DrawableModel[] models) + private byte BuildRenderMask(DrawableModel[]? models) { + if (models is null) + return 0; byte mask = 0; - if (models != null) + foreach (var model in models) { - foreach (var model in models) - { - mask = (byte)(mask | model.RenderMask); - } + mask = (byte)(mask | model.RenderMask); } return mask; } @@ -5364,7 +5372,7 @@ namespace CodeWalker.GameFiles public DrawableBase ShallowCopy() { - DrawableBase r = null; + DrawableBase? r = null; if (this is FragDrawable fd) { var f = new FragDrawable(); @@ -5431,12 +5439,10 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class Drawable : DrawableBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class Drawable : DrawableBase { - public override long BlockLength - { - get { return 208; } - } + public override long BlockLength => 208; // structure data public ulong NamePointer { get; set; } @@ -5445,14 +5451,14 @@ namespace CodeWalker.GameFiles public ulong BoundPointer { get; set; } // reference data - public string Name { get; set; } + public string? Name { get; set; } public uint Hash { get; set; } public Bounds Bound { get; set; } public string ErrorMessage { get; set; } - private string_r NameBlock = null;//only used when saving.. + private string_r? NameBlock = null;//only used when saving.. #if DEBUG @@ -5472,7 +5478,6 @@ namespace CodeWalker.GameFiles try { - // read reference data this.Name = reader.ReadStringAt(//BlockAt( this.NamePointer // offset @@ -5486,17 +5491,12 @@ namespace CodeWalker.GameFiles { Bound.Owner = this; } - } catch (Exception ex) { ErrorMessage = ex.ToString(); } - if (UnkPointer != 0) - { } - - #if DEBUG Analyzer = new ResourceAnalyzer(reader); #endif @@ -5567,34 +5567,33 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(base.GetReferences()); - if (Name != null) + if (Name is not null) { NameBlock = (string_r)Name; list.Add(NameBlock); } - if (Bound != null) list.Add(Bound); + if (Bound is not null) + list.Add(Bound); return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0xB0, LightAttributes), - }; + return [ + (0xB0, LightAttributes), + ]; } - public override string ToString() + public override string? ToString() { return Name; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawablePtfx : DrawableBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawablePtfx : DrawableBase { - public override long BlockLength - { - get { return 176; } - } + public override long BlockLength => 176; // structure data public ulong UnkPointer { get; set; } @@ -5606,9 +5605,6 @@ namespace CodeWalker.GameFiles // read structure data this.UnkPointer = reader.ReadUInt64(); - - if (UnkPointer != 0) - { } } public override void Write(ResourceDataWriter writer, params object[] parameters) { @@ -5642,12 +5638,10 @@ namespace CodeWalker.GameFiles } - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawablePtfxDictionary : ResourceFileBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawablePtfxDictionary : ResourceFileBase { - public override long BlockLength - { - get { return 64; } - } + public override long BlockLength => 64; // structure data public ulong Unknown_10h; // 0x0000000000000000 @@ -5666,10 +5660,8 @@ namespace CodeWalker.GameFiles public uint[] Hashes { get; set; } public ResourcePointerArray64 Drawables { get; set; } - private ResourceSystemStructBlock HashesBlock = null;//only used for saving - public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); @@ -5689,16 +5681,8 @@ namespace CodeWalker.GameFiles // read reference data this.Hashes = reader.ReadUintsAt(this.HashesPointer, this.HashesCount1); this.Drawables = reader.ReadBlockAt>(this.DrawablesPointer, this.DrawablesCount1); - - //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) { base.Write(writer, parameters); @@ -5764,7 +5748,8 @@ namespace CodeWalker.GameFiles } public static void WriteXmlNode(DrawablePtfxDictionary d, StringBuilder sb, int indent, string ddsfolder, string name = "DrawableDictionary") { - if (d == null) return; + if (d == null) + return; YddXml.OpenTag(sb, indent, name); d.WriteXml(sb, indent + 1, ddsfolder); YddXml.CloseTag(sb, indent, name); @@ -5785,17 +5770,16 @@ namespace CodeWalker.GameFiles HashesBlock = new ResourceSystemStructBlock(Hashes); list.Add(HashesBlock); } - if (Drawables != null) list.Add(Drawables); + if (Drawables != null) + list.Add(Drawables); return list.ToArray(); } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class DrawableDictionary : ResourceFileBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class DrawableDictionary : ResourceFileBase { - public override long BlockLength - { - get { return 64; } - } + public override long BlockLength => 64; // structure data public ulong Unknown_10h; // 0x0000000000000000 @@ -5834,6 +5818,38 @@ namespace CodeWalker.GameFiles } } + public long PhysicalMemoryUsage + { + get + { + long val = 0; + if (Drawables?.data_items != null) + { + foreach (var drawable in Drawables.data_items) + { + val += drawable.PhysicalMemoryUsage; + } + } + return val; + } + } + + public long VirtualMemoryUsage + { + get + { + long val = 0; + if (Drawables?.data_items != null) + { + foreach (var drawable in Drawables.data_items) + { + val += drawable.VirtualMemoryUsage; + } + } + return val; + } + } + public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); @@ -5959,6 +5975,4 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - - } diff --git a/CodeWalker.Core/GameFiles/Resources/Expression.cs b/CodeWalker.Core/GameFiles/Resources/Expression.cs index 47b726f..d679493 100644 --- a/CodeWalker.Core/GameFiles/Resources/Expression.cs +++ b/CodeWalker.Core/GameFiles/Resources/Expression.cs @@ -147,11 +147,11 @@ namespace CodeWalker.GameFiles var list = new List(base.GetReferences()); return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, ExpressionNameHashes), - new Tuple(0x30, Expressions) + return new (long, IResourceBlock)[] { + (0x20, ExpressionNameHashes), + (0x30, Expressions) }; } @@ -416,13 +416,13 @@ namespace CodeWalker.GameFiles if (Name != null) list.Add(Name); return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, Streams), - new Tuple(0x30, BoneTracks), - new Tuple(0x40, JiggleData), - new Tuple(0x50, ItemHashes) + return new (long, IResourceBlock)[] { + (0x20, Streams), + (0x30, BoneTracks), + (0x40, JiggleData), + (0x50, ItemHashes) }; } diff --git a/CodeWalker.Core/GameFiles/Resources/Filter.cs b/CodeWalker.Core/GameFiles/Resources/Filter.cs index 172ec46..093f741 100644 --- a/CodeWalker.Core/GameFiles/Resources/Filter.cs +++ b/CodeWalker.Core/GameFiles/Resources/Filter.cs @@ -90,11 +90,11 @@ namespace CodeWalker.GameFiles writer.WriteBlock(this.Filters); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, FilterNameHashes), - new Tuple(0x30, Filters) + return new (long, IResourceBlock)[] { + (0x20, FilterNameHashes), + (0x30, Filters) }; } @@ -215,9 +215,9 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_14h); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return Array.Empty>(); + return Array.Empty<(long, IResourceBlock)>(); } public IResourceSystemBlock GetType(ResourceDataReader reader, params object[] parameters) @@ -364,11 +364,11 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_38h); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x18, Entries), - new Tuple(0x28, Weights) + return new (long, IResourceBlock)[] { + (0x18, Entries), + (0x28, Weights) }; } @@ -396,7 +396,7 @@ namespace CodeWalker.GameFiles public void SortEntries() { - if (Entries?.data_items == null) + if (Entries?.data_items == null || Entries.data_items.Length == 0) { return; } @@ -408,12 +408,12 @@ namespace CodeWalker.GameFiles { // CRC-32 hash of the Entries and Weights arrays uint s = 0; - if (Entries?.data_items != null && Entries?.data_items.Length > 0) + if (Entries?.data_items is not null && Entries?.data_items.Length > 0) { var data = MetaTypes.ConvertArrayToBytes(Entries.data_items); s = Crc32Hash(data, s); } - if (Weights?.data_items != null && Weights?.data_items.Length > 0) + if (Weights?.data_items is not null && Weights?.data_items.Length > 0) { var data = MetaTypes.ConvertArrayToBytes(Weights.data_items); s = Crc32Hash(data, s); @@ -430,7 +430,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return BoneId + ", " + Track + ": " + WeightIndex; + return $"{BoneId}, {Track}: {WeightIndex}"; } public uint GetSortKey() => (uint)(BoneId | (Track << 16)); diff --git a/CodeWalker.Core/GameFiles/Resources/Frag.cs b/CodeWalker.Core/GameFiles/Resources/Frag.cs index b197f9d..4427771 100644 --- a/CodeWalker.Core/GameFiles/Resources/Frag.cs +++ b/CodeWalker.Core/GameFiles/Resources/Frag.cs @@ -32,6 +32,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.GameFiles.MetaXmlBase; namespace CodeWalker.GameFiles { @@ -736,11 +737,11 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x60, Cloths), - new Tuple(0x110, LightAttributes) + return new (long, IResourceBlock)[] { + (0x60, Cloths), + (0x110, LightAttributes) }; } } @@ -2854,11 +2855,11 @@ namespace CodeWalker.GameFiles { if (ItemIndices != null) { - YftXml.WriteRawArray(sb, ItemIndices, indent, "ItemIndices", "", null, 22); + YftXml.WriteRawArray(sb, ItemIndices, indent, "ItemIndices", "", (FormatterRef?)null, 22); } if (ItemFlags != null) { - YftXml.WriteRawArray(sb, ItemFlags, indent, "ItemFlags", "", null, 22); + YftXml.WriteRawArray(sb, ItemFlags, indent, "ItemFlags", "", (FormatterRef?)null, 22); } if (UnknownVectors != null) { @@ -4362,7 +4363,7 @@ namespace CodeWalker.GameFiles Unknown_24h = u(36); } - public override string ToString() + public override readonly string ToString() { UintStringBuilder usb = new UintStringBuilder(); usb.Add(Unknown_00h); diff --git a/CodeWalker.Core/GameFiles/Resources/Nav.cs b/CodeWalker.Core/GameFiles/Resources/Nav.cs index f5b95dd..8e40ed4 100644 --- a/CodeWalker.Core/GameFiles/Resources/Nav.cs +++ b/CodeWalker.Core/GameFiles/Resources/Nav.cs @@ -350,12 +350,13 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "(Size: " + FloatUtil.GetVector3String(AABBSize) + ")"; + return $"(Size: {FloatUtil.GetVector3String(AABBSize)})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshUintArray + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct NavMeshUintArray { public uint Count { get; set; } public uint v00; @@ -391,7 +392,7 @@ namespace CodeWalker.GameFiles public uint v30; // 0x00000000 public uint v31; // 0x00000000 - public uint[] RawValues + public readonly uint[] RawValues { get { @@ -404,7 +405,7 @@ namespace CodeWalker.GameFiles public uint[] Values { - get + readonly get { uint[] vals = new uint[Count]; uint[] rvals = RawValues; @@ -452,44 +453,43 @@ namespace CodeWalker.GameFiles } } - public uint Get(uint i) + public readonly uint Get(uint i) { - switch (i) + return i switch { - default: - case 0: return v00; - case 1: return v01; - case 2: return v02; - case 3: return v03; - case 4: return v04; - case 5: return v05; - case 6: return v06; - case 7: return v07; - case 8: return v08; - case 9: return v09; - case 10: return v10; - case 11: return v11; - case 12: return v12; - case 13: return v13; - case 14: return v14; - case 15: return v15; - case 16: return v16; - case 17: return v17; - case 18: return v18; - case 19: return v19; - case 20: return v20; - case 21: return v21; - case 22: return v22; - case 23: return v23; - case 24: return v24; - case 25: return v25; - case 26: return v26; - case 27: return v27; - case 28: return v28; - case 29: return v29; - case 30: return v30; - case 31: return v31; - } + 1 => v01, + 2 => v02, + 3 => v03, + 4 => v04, + 5 => v05, + 6 => v06, + 7 => v07, + 8 => v08, + 9 => v09, + 10 => v10, + 11 => v11, + 12 => v12, + 13 => v13, + 14 => v14, + 15 => v15, + 16 => v16, + 17 => v17, + 18 => v18, + 19 => v19, + 20 => v20, + 21 => v21, + 22 => v22, + 23 => v23, + 24 => v24, + 25 => v25, + 26 => v26, + 27 => v27, + 28 => v28, + 29 => v29, + 30 => v30, + 31 => v31, + _ => v00, + }; } public void Set(uint[] arr) @@ -497,19 +497,17 @@ namespace CodeWalker.GameFiles Values = arr; } - public override string ToString() + public override readonly string ToString() { - return "(Count: " + Count.ToString() + ")"; + return $"(Count: {Count})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class NavMeshList : ResourceSystemBlock where T : struct + [TypeConverter(typeof(ExpandableObjectConverter))] + public class NavMeshList : ResourceSystemBlock where T : struct { - public override long BlockLength - { - get { return 48; } - } + public override long BlockLength => 48; public uint VFT { get; set; } public uint Unknown_04h { get; set; } // 0x00000001 @@ -525,16 +523,9 @@ namespace CodeWalker.GameFiles public ResourceSimpleArray> ListParts { get; set; } public uint[] ListOffsets { get; set; } - private ResourceSystemStructBlock ListOffsetsBlock = null; - public int ItemSize { get { return System.Runtime.InteropServices.Marshal.SizeOf(); } } - - public uint ByteCount - { - get - { - return ItemCount * (uint)ItemSize; - } - } + private ResourceSystemStructBlock? ListOffsetsBlock = null; + public int ItemSize => System.Runtime.InteropServices.Marshal.SizeOf(); + public uint ByteCount => ItemCount * (uint)ItemSize; @@ -577,13 +568,18 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(); - if (ListParts != null) list.Add(ListParts); + if (ListParts is not null) + list.Add(ListParts); - if ((ListOffsets != null) && (ListOffsets.Length > 0)) + if (ListOffsets is not null && ListOffsets.Length > 0) { ListOffsetsBlock = new ResourceSystemStructBlock(ListOffsets); list.Add(ListOffsetsBlock); } + else + { + ListOffsetsBlock = null; + } return list.ToArray(); } @@ -594,11 +590,11 @@ namespace CodeWalker.GameFiles { List list = new List((int)ItemCount); - if (ListParts != null) + if (ListParts is not null) { foreach (var part in ListParts) { - if (part.Items != null) + if (part.Items is not null) { list.AddRange(part.Items); } @@ -646,16 +642,14 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "(" + ItemCount.ToString() + " total items, " + ListPartsCount.ToString() + " parts)"; + return $"({ItemCount} total items, {ListPartsCount} parts)"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class NavMeshListPart : ResourceSystemBlock where T : struct + [TypeConverter(typeof(ExpandableObjectConverter))] + public class NavMeshListPart : ResourceSystemBlock where T : struct { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; public ulong Pointer { get; set; } public uint Count { get; set; } @@ -701,7 +695,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "(" + Count.ToString() + " items)"; + return $"({Count} items)"; } } @@ -714,14 +708,14 @@ namespace CodeWalker.GameFiles public ushort Z { get; set; } - public Vector3 Position { get { return ToVector3(); } set { FromVector3(value); } } + public Vector3 Position { readonly get { return ToVector3(); } set { FromVector3(value); } } - public Vector3 ToVector3() + public readonly Vector3 ToVector3() { const float usmax = ushort.MaxValue; return new Vector3(X / usmax, Y / usmax, Z / usmax); } - public void FromVector3(Vector3 v) + public void FromVector3(in Vector3 v) { const float usmax = ushort.MaxValue; X = (ushort)Math.Round(v.X * usmax); @@ -729,44 +723,53 @@ namespace CodeWalker.GameFiles Z = (ushort)Math.Round(v.Z * usmax); } - public static NavMeshVertex Create(Vector3 v) + public static NavMeshVertex Create(in Vector3 v) { var nmv = new NavMeshVertex(); - nmv.FromVector3(v); + nmv.FromVector3(in v); return nmv; } - public override string ToString() - { - return X.ToString() + ", " + Y.ToString() + ", " + Z.ToString(); - } + public override readonly string ToString() => $"{X}, {Y}, {Z}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshAABB + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct NavMeshAABB(in Vector3 min, in Vector3 max) { - public short MinX { get; set; } - public short MaxX { get; set; } - public short MinY { get; set; } - public short MaxY { get; set; } - public short MinZ { get; set; } - public short MaxZ { get; set; } + public short MinX { get; init; } = (short)Math.Floor(min.X * 4.0f); + public short MaxX { get; init; } = (short)Math.Ceiling(max.X * 4.0f); + public short MinY { get; init; } = (short)Math.Floor(min.Y * 4.0f); + public short MaxY { get; init; } = (short)Math.Ceiling(max.Y * 4.0f); + public short MinZ { get; init; } = (short)Math.Floor(min.Z * 4.0f); + public short MaxZ { get; init; } = (short)Math.Ceiling(max.Z * 4.0f); - public Vector3 Min + public readonly Vector3 Min { - get { return new Vector3(MinX / 4.0f, MinY / 4.0f, MinZ / 4.0f); } - set { var v = value * 4.0f; MinX = (short)Math.Floor(v.X); MinY = (short)Math.Floor(v.Y); MinZ = (short)Math.Floor(v.Z); } + get => new Vector3(MinX / 4.0f, MinY / 4.0f, MinZ / 4.0f); + //set + //{ + // var v = value * 4.0f; + // MinX = (short)Math.Floor(v.X); + // MinY = (short)Math.Floor(v.Y); + // MinZ = (short)Math.Floor(v.Z); + //} } - public Vector3 Max + public readonly Vector3 Max { - get { return new Vector3(MaxX / 4.0f, MaxY / 4.0f, MaxZ / 4.0f); } - set { var v = value * 4.0f; MaxX = (short)Math.Ceiling(v.X); MaxY = (short)Math.Ceiling(v.Y); MaxZ = (short)Math.Ceiling(v.Z); } + get => new Vector3(MaxX / 4.0f, MaxY / 4.0f, MaxZ / 4.0f); + //set { + // var v = value * 4.0f; + // MaxX = (short)Math.Ceiling(v.X); + // MaxY = (short)Math.Ceiling(v.Y); + // MaxZ = (short)Math.Ceiling(v.Z); + //} } - public override string ToString() + public override readonly string ToString() { Vector3 min = Min; Vector3 max = Max; - return string.Format("({0}, {1}, {2}) | ({3}, {4}, {5})", min.X, min.Y, min.Z, max.X, max.Y, max.Z); + return $"({min.X}, {min.Y}, {min.Z}) | ({max.X}, {max.Y}, {max.Z})"; //return string.Format("({0}, {1}, {2}) | ({3}, {4}, {5})", MinX, MinY, MinZ, MaxX, MaxY, MaxZ); } } @@ -777,43 +780,35 @@ namespace CodeWalker.GameFiles { public NavMeshEdgePart _Poly1; public NavMeshEdgePart _Poly2; - public NavMeshEdgePart Poly1 { get { return _Poly1; } set { _Poly1 = value; } } - public NavMeshEdgePart Poly2 { get { return _Poly2; } set { _Poly2 = value; } } + public readonly NavMeshEdgePart Poly1 => _Poly1; + public readonly NavMeshEdgePart Poly2 => _Poly2; - public override string ToString() - { - return //Poly1.Bin + " | " + Poly2.Bin + " | " + - _Poly1.ToString() + " | " + _Poly2.ToString(); - } + public override readonly string ToString() => $"{_Poly1} | {_Poly2}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshEdgePart + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct NavMeshEdgePart { public uint Value { get; set; } - public string Bin - { - get - { - return Convert.ToString(Value, 2).PadLeft(32, '0'); - } - } + public readonly string Bin => Value.ToString("b32"); - public uint AreaIDInd { get { return (Value >> 0) & 0x1F; } set { Value = (Value & 0xFFFFFFE0) | (value & 0x1F); } } - public uint PolyID { get { return (Value >> 5) & 0x3FFF; } set { Value = (Value & 0xFFF8001F) | ((value & 0x3FFF) << 5); } } - public uint Unk2 { get { return (Value >> 19) & 0x3; } set { Value = (Value & 0xFFE7FFFF) | ((value & 0x3) << 19); } } - public uint Unk3 { get { return (Value >> 21) & 0x7FF; } set { Value = (Value & 0x001FFFFF) | ((value & 0x7FF) << 21); } } + public uint AreaIDInd { readonly get { return (Value >> 0) & 0x1F; } set { Value = (Value & 0xFFFFFFE0) | (value & 0x1F); } } + public uint PolyID { readonly get { return (Value >> 5) & 0x3FFF; } set { Value = (Value & 0xFFF8001F) | ((value & 0x3FFF) << 5); } } + public uint Unk2 { readonly get { return (Value >> 19) & 0x3; } set { Value = (Value & 0xFFE7FFFF) | ((value & 0x3) << 19); } } + public uint Unk3 { readonly get { return (Value >> 21) & 0x7FF; } set { Value = (Value & 0x001FFFFF) | ((value & 0x7FF) << 21); } } - public override string ToString() + public override readonly string ToString() { string pid = (PolyID == 0x3FFF) ? "-" : PolyID.ToString(); - return AreaIDInd.ToString() + ", " + pid + ", " + Unk2.ToString() + ", " + Unk3.ToString(); + return $"{AreaIDInd}, {pid}, {Unk2}, {Unk3}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshPoly + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct NavMeshPoly { public ushort PolyFlags0 { get; set; } public ushort IndexFlags { get; set; } @@ -830,52 +825,36 @@ namespace CodeWalker.GameFiles //public int IndexUnk { get { return (IndexFlags >> 0) & 31; } } //always 0 - public int IndexCount { get { return (IndexFlags >> 5); } set { IndexFlags = (ushort)((IndexFlags & 31) | ((value & 0x7FF) << 5)); } } + public int IndexCount { readonly get { return (IndexFlags >> 5); } set { IndexFlags = (ushort)((IndexFlags & 31) | ((value & 0x7FF) << 5)); } } //public int PartUnk1 { get { return (PartFlags >> 0) & 0xF; } } //always 0 - public ushort PartID { get { return (ushort)((PartFlags >> 4) & 0xFF); } set { PartFlags = ((PartFlags & 0xFFFFF00F) | (((uint)value & 0xFF) << 4)); } } - public byte PortalLinkCount { get { return (byte)((PartFlags >> 12) & 0x7); } set { PartFlags = ((PartFlags & 0xFFFF8FFF) | (((uint)value & 0x7) << 12)); } } - public uint PortalLinkID { get { return ((PartFlags >> 15) & 0x1FFFF); } set { PartFlags = ((PartFlags & 0x7FFF) | ((value & 0x1FFFF) << 15)); } } + public ushort PartID { readonly get { return (ushort)((PartFlags >> 4) & 0xFF); } set { PartFlags = ((PartFlags & 0xFFFFF00F) | (((uint)value & 0xFF) << 4)); } } + public byte PortalLinkCount { readonly get { return (byte)((PartFlags >> 12) & 0x7); } set { PartFlags = ((PartFlags & 0xFFFF8FFF) | (((uint)value & 0x7) << 12)); } } + public uint PortalLinkID { readonly get { return ((PartFlags >> 15) & 0x1FFFF); } set { PartFlags = ((PartFlags & 0x7FFF) | ((value & 0x1FFFF) << 15)); } } - public byte UnkX { get { return (byte)((PolyFlags2 >> 0) & 0xFF); } set { PolyFlags2 = (PolyFlags2 & 0xFFFFFF00) | ((value & 0xFFu)<<0); } } - public byte UnkY { get { return (byte)((PolyFlags2 >> 8) & 0xFF); } set { PolyFlags2 = (PolyFlags2 & 0xFFFF00FF) | ((value & 0xFFu)<<8); } } + public byte UnkX { readonly get { return (byte)((PolyFlags2 >> 0) & 0xFF); } set { PolyFlags2 = (PolyFlags2 & 0xFFFFFF00) | ((value & 0xFFu)<<0); } } + public byte UnkY { readonly get { return (byte)((PolyFlags2 >> 8) & 0xFF); } set { PolyFlags2 = (PolyFlags2 & 0xFFFF00FF) | ((value & 0xFFu)<<8); } } - public byte Flags1 { get { return (byte)(PolyFlags0 & 0xFF); } set { PolyFlags0 = (ushort)((PolyFlags0 & 0xFF00) | (value & 0xFF)); } } - public byte Flags2 { get { return (byte)((PolyFlags1 >> 0) & 0xFF); } set { PolyFlags1 = ((PolyFlags1 & 0xFFFFFF00u) | ((value & 0xFFu) << 0)); } } - public byte Flags3 { get { return (byte)((PolyFlags1 >> 9) & 0xFF); } set { PolyFlags1 = ((PolyFlags1 & 0xFFFE01FFu) | ((value & 0xFFu) << 9)); } } - public byte Flags4 { get { return (byte)((PolyFlags2 >> 16) & 0xFF); } set { PolyFlags2 = ((PolyFlags2 & 0xFF00FFFFu) | ((value & 0xFFu) << 16)); } } + public byte Flags1 { readonly get { return (byte)(PolyFlags0 & 0xFF); } set { PolyFlags0 = (ushort)((PolyFlags0 & 0xFF00) | (value & 0xFF)); } } + public byte Flags2 { readonly get { return (byte)((PolyFlags1 >> 0) & 0xFF); } set { PolyFlags1 = ((PolyFlags1 & 0xFFFFFF00u) | ((value & 0xFFu) << 0)); } } + public byte Flags3 { readonly get { return (byte)((PolyFlags1 >> 9) & 0xFF); } set { PolyFlags1 = ((PolyFlags1 & 0xFFFE01FFu) | ((value & 0xFFu) << 9)); } } + public byte Flags4 { readonly get { return (byte)((PolyFlags2 >> 16) & 0xFF); } set { PolyFlags2 = ((PolyFlags2 & 0xFF00FFFFu) | ((value & 0xFFu) << 16)); } } //public uint UnkFlags0 { get { return (uint)((PolyFlags0 >> 8) & 0xFF); } } //always 0 //public uint UnkFlags1 { get { return (uint)((PolyFlags1 >> 17) & 0xFFFF); } } //always 0 //public uint UnkFlags2 { get { return (uint)((PolyFlags2 >> 24) & 0xFF); } } //always 0 - public override string ToString() - { - return - PolyFlags0.ToString() + ", " + - //IndexFlags.ToString() + ", " + - IndexCount.ToString() + ", " + //IndexUnk.ToString() + ", " + - IndexID.ToString() + ", " + AreaID.ToString() + ", " + - CellAABB.ToString() + ", " + - //PolyFlags1.ToString() + ", " + - //PolyFlags2.ToString() + ", " + - //PartFlags.ToString() + ", " + //PartUnk1.ToString() + ", " + - PartID.ToString() + ", " + - PortalLinkCount.ToString() + ", " + - PortalLinkID.ToString(); - } + public override readonly string ToString() => $"{PolyFlags0}, {IndexCount}, {IndexID}, {AreaID}, {CellAABB}, {PartID}, {PortalLinkCount}, {PortalLinkID}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class NavMeshSector : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class NavMeshSector : ResourceSystemBlock { - public override long BlockLength - { - get { return 96; } - } + public override long BlockLength => 96; public Vector4 AABBMin { get; set; } //W==NaN public Vector4 AABBMax { get; set; } //W==NaN @@ -913,7 +892,8 @@ namespace CodeWalker.GameFiles { get { - if (Data == null) return 0; + if (Data == null) + return 0; return Data.PointsCount; } } @@ -976,22 +956,17 @@ namespace CodeWalker.GameFiles { AABBMin = new Vector4(min, float.NaN); AABBMax = new Vector4(max, float.NaN); - CellAABB = new NavMeshAABB() { Min = min, Max = max }; + CellAABB = new NavMeshAABB(in min, in max); } - public override string ToString() - { - return "[Min: "+AABBMin.ToString() + "], [Max:" + AABBMax.ToString() + "]"; - } + public override string ToString() => $"[Min: {AABBMin}], [Max:{AABBMax}]"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class NavMeshSectorData : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class NavMeshSectorData : ResourceSystemBlock { - public override long BlockLength - { - get { return 32; } - } + public override long BlockLength => 32; public uint PointsStartID { get; set; } public uint Unused_04h { get; set; } // 0x00000000 @@ -1004,8 +979,8 @@ namespace CodeWalker.GameFiles public ushort[] PolyIDs { get; set; } public NavMeshPoint[] Points { get; set; } - public ResourceSystemStructBlock PolyIDsBlock = null; - public ResourceSystemStructBlock PointsBlock = null; + public ResourceSystemStructBlock? PolyIDsBlock = null; + public ResourceSystemStructBlock? PointsBlock = null; public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -1043,12 +1018,12 @@ namespace CodeWalker.GameFiles { var list = new List(); - if ((PolyIDs != null) && (PolyIDs.Length > 0)) + if (PolyIDs != null && PolyIDs.Length > 0) { PolyIDsBlock = new ResourceSystemStructBlock(PolyIDs); list.Add(PolyIDsBlock); } - if ((Points != null) && (Points.Length > 0)) + if (Points != null && Points.Length > 0) { PointsBlock = new ResourceSystemStructBlock(Points); list.Add(PointsBlock); @@ -1060,7 +1035,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return "(Polys: " + PolyIDsCount.ToString() + ", PointsCount: " + PointsCount.ToString() + ", PointsStartID: " + PointsStartID.ToString() + ")"; + return $"(Polys: {PolyIDsCount}, PointsCount: {PointsCount}, PointsStartID: {PointsStartID})"; } } @@ -1075,7 +1050,7 @@ namespace CodeWalker.GameFiles public Vector3 Position { - get + readonly get { const float usmax = ushort.MaxValue; return new Vector3(X / usmax, Y / usmax, Z / usmax); @@ -1089,9 +1064,9 @@ namespace CodeWalker.GameFiles } } - public override string ToString() + public override readonly string ToString() { - return Type.ToString() + ": " + Angle.ToString() + ", " + Position.ToString(); + return $"{Type}: {Angle}, {Position}"; } @@ -1099,7 +1074,8 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshPortal + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct NavMeshPortal { public byte Type { get; set; }//1,2,3 public byte Angle { get; set; } @@ -1112,18 +1088,11 @@ namespace CodeWalker.GameFiles public ushort PolyIDTo2 { get; set; } //always same as PolyIDTo1 public uint AreaFlags { get; set; } - public ushort AreaIDFrom { get { return (ushort)(AreaFlags & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xFFFFC000) | (value & 0x3FFFu); } }//always Ynv.AreaID - public ushort AreaIDTo { get { return (ushort)((AreaFlags >> 14) & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xF0003FFF) | ((value & 0x3FFFu) << 14); } }//always Ynv.AreaID - public byte AreaUnk { get { return (byte)((AreaFlags >> 28) & 0xF); } set { AreaFlags = (AreaFlags & 0x0FFFFFFF) | ((value & 0xFu) << 28); } }//always 0 + public ushort AreaIDFrom { readonly get { return (ushort)(AreaFlags & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xFFFFC000) | (value & 0x3FFFu); } }//always Ynv.AreaID + public ushort AreaIDTo { readonly get { return (ushort)((AreaFlags >> 14) & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xF0003FFF) | ((value & 0x3FFFu) << 14); } }//always Ynv.AreaID + public byte AreaUnk { readonly get { return (byte)((AreaFlags >> 28) & 0xF); } set { AreaFlags = (AreaFlags & 0x0FFFFFFF) | ((value & 0xFu) << 28); } }//always 0 - public override string ToString() - { - return AreaIDFrom.ToString() + ", " + AreaIDTo.ToString() + ", " + AreaUnk.ToString() + ", " + - PolyIDFrom1.ToString() + ", " + PolyIDFrom2.ToString() + ", " + - PolyIDTo1.ToString() + ", " + PolyIDTo2.ToString() + ", " + - Type.ToString() + ", " + Angle.ToString() + ", " + FlagsUnk.ToString() + ", " + - "(" + PositionFrom.ToString() + " | " + PositionTo.ToString() + ")"; - } + public override readonly string ToString() => $"{AreaIDFrom}, {AreaIDTo}, {AreaUnk}, {PolyIDFrom1}, {PolyIDFrom2}, {PolyIDTo1}, {PolyIDTo2}, {Type}, {Angle}, {FlagsUnk}, ({PositionFrom} | {PositionTo})"; } diff --git a/CodeWalker.Core/GameFiles/Resources/Node.cs b/CodeWalker.Core/GameFiles/Resources/Node.cs index 6d24ead..62a0635 100644 --- a/CodeWalker.Core/GameFiles/Resources/Node.cs +++ b/CodeWalker.Core/GameFiles/Resources/Node.cs @@ -23,6 +23,7 @@ //mangled to fit +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; @@ -36,10 +37,7 @@ namespace CodeWalker.GameFiles { [TypeConverter(typeof(ExpandableObjectConverter))] public class NodeDictionary : ResourceFileBase, IMetaXmlItem { - public override long BlockLength - { - get { return 112; } - } + public override long BlockLength => 112; public ulong NodesPointer { get; set; } public uint NodesCount { get; set; } @@ -62,18 +60,18 @@ namespace CodeWalker.GameFiles public uint Unk68 { get; set; } // 0x00000000 public uint Unk6C { get; set; } // 0x00000000 - public Node[] Nodes { get; set; } - public NodeLink[] Links { get; set; } - public NodeJunction[] Junctions { get; set; } - public byte[] JunctionHeightmapBytes { get; set; } - public NodeJunctionRef[] JunctionRefs { get; set; } + public Node[]? Nodes { get; set; } + public NodeLink[]? Links { get; set; } + public NodeJunction[]? Junctions { get; set; } + public byte[]? JunctionHeightmapBytes { get; set; } + public NodeJunctionRef[]? JunctionRefs { get; set; } - private ResourceSystemStructBlock NodesBlock = null; - private ResourceSystemStructBlock LinksBlock = null; - private ResourceSystemStructBlock JunctionsBlock = null; - private ResourceSystemStructBlock JunctionHeightmapBytesBlock = null; - private ResourceSystemStructBlock JunctionRefsBlock = null; + private ResourceSystemStructBlock? NodesBlock = null; + private ResourceSystemStructBlock? LinksBlock = null; + private ResourceSystemStructBlock? JunctionsBlock = null; + private ResourceSystemStructBlock? JunctionHeightmapBytesBlock = null; + private ResourceSystemStructBlock? JunctionRefsBlock = null; @@ -155,29 +153,29 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(base.GetReferences()); + using var list = new PooledList(base.GetReferences()); - if ((JunctionRefs != null) && (JunctionRefs.Length > 0)) + if (JunctionRefs is not null && JunctionRefs.Length > 0) { JunctionRefsBlock = new ResourceSystemStructBlock(JunctionRefs); list.Add(JunctionRefsBlock); } - if ((JunctionHeightmapBytes != null) && (JunctionHeightmapBytes.Length > 0)) + if (JunctionHeightmapBytes is not null && JunctionHeightmapBytes.Length > 0) { JunctionHeightmapBytesBlock = new ResourceSystemStructBlock(JunctionHeightmapBytes); list.Add(JunctionHeightmapBytesBlock); } - if ((Junctions != null) && (Junctions.Length > 0)) + if (Junctions is not null && Junctions.Length > 0) { JunctionsBlock = new ResourceSystemStructBlock(Junctions); list.Add(JunctionsBlock); } - if ((Links != null) && (Links.Length > 0)) + if (Links is not null && Links.Length > 0) { LinksBlock = new ResourceSystemStructBlock(Links); list.Add(LinksBlock); } - if ((Nodes != null) && (Nodes.Length > 0)) + if (Nodes is not null && Nodes.Length > 0) { NodesBlock = new ResourceSystemStructBlock(Nodes); list.Add(NodesBlock); @@ -195,7 +193,7 @@ namespace CodeWalker.GameFiles YndXml.ValueTag(sb, indent, "VehicleNodeCount", NodesCountVehicle.ToString()); YndXml.ValueTag(sb, indent, "PedNodeCount", NodesCountPed.ToString()); - XmlNodeWrapper[] nodes = null; + XmlNodeWrapper[]? nodes = null; int nodecount = Nodes?.Length ?? 0; if (nodecount > 0) { @@ -208,7 +206,7 @@ namespace CodeWalker.GameFiles YndXml.WriteItemArray(sb, nodes, indent, "Nodes"); - XmlJunctionWrapper[] juncs = null; + XmlJunctionWrapper[]? juncs = null; int junccount = Junctions?.Length ?? 0; if (junccount > 0) { @@ -337,7 +335,8 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct Node + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct Node { public uint Unused0 { get; set; } // 0x00000000 public uint Unused1 { get; set; } // 0x00000000 @@ -358,7 +357,7 @@ namespace CodeWalker.GameFiles public FlagsByte Flags3 { get; set; } public FlagsByte Flags4 { get; set; } - public override string ToString() + public override readonly string ToString() { //return Unused0.ToString() + ", " + Unused1.ToString() + ", " + Unused2.ToString() + ", " + // Unused3.ToString() + ", " + AreaID.ToString() + ", " + NodeID.ToString() + ", " + @@ -366,7 +365,7 @@ namespace CodeWalker.GameFiles // PositionX.ToString() + ", " + PositionY.ToString() + ", " + Unk20.ToString() + ", " + Unk21.ToString() + ", " + // Unk22.ToString() + ", " + Unk24.ToString() + ", " + Unk26.ToString(); - return AreaID.ToString() + ", " + NodeID.ToString() + ", " + StreetName.ToString();// + ", X:" + + return $"{AreaID}, {NodeID}, {StreetName}";// + ", X:" + //PositionX.ToString() + ", Y:" + PositionY.ToString() + ", " + PositionZ.ToString();// + ", " + //Flags0.ToString() + ", " + Flags1.ToString() + ", Z:" + //Flags2.ToString() + ", " + LinkCountFlags.ToString() + ", " + @@ -374,7 +373,7 @@ namespace CodeWalker.GameFiles } - public void WriteXml(StringBuilder sb, int indent, NodeLink[] allLinks) + public readonly void WriteXml(StringBuilder sb, int indent, NodeLink[] allLinks) { Vector3 p = new Vector3(); p.X = PositionX / 4.0f; @@ -449,9 +448,9 @@ namespace CodeWalker.GameFiles public FlagsByte Flags2 { get; set; } public FlagsByte LinkLength { get; set; } - public override string ToString() + public override readonly string ToString() { - return AreaID.ToString() + ", " + NodeID.ToString() + ", " + Flags0.Value.ToString() + ", " + Flags1.Value.ToString() + ", " + Flags2.Value.ToString() + ", " + LinkLength.Value.ToString(); + return $"{AreaID}, {NodeID}, {Flags0.Value}, {Flags1.Value}, {Flags2.Value}, {LinkLength.Value}"; } public void WriteXml(StringBuilder sb, int indent) @@ -486,7 +485,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return PositionX.ToString() + ", " + PositionY.ToString() + ": " + MinZ.ToString() + ", " + MaxZ.ToString() + ": " + HeightmapDimX.ToString() + " x " + HeightmapDimY.ToString(); + return $"{PositionX}, {PositionY}: {MinZ}, {MaxZ}: {HeightmapDimX} x {HeightmapDimY}"; } public void WriteXml(StringBuilder sb, int indent, byte[] allHeightmapData) @@ -544,7 +543,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return AreaID.ToString() + ", " + NodeID.ToString() + ", " + JunctionID.ToString(); + return $"{AreaID}, {NodeID}, {JunctionID}"; } public void WriteXml(StringBuilder sb, int indent) diff --git a/CodeWalker.Core/GameFiles/Resources/Particle.cs b/CodeWalker.Core/GameFiles/Resources/Particle.cs index 03b3bff..8c6653a 100644 --- a/CodeWalker.Core/GameFiles/Resources/Particle.cs +++ b/CodeWalker.Core/GameFiles/Resources/Particle.cs @@ -453,11 +453,11 @@ namespace CodeWalker.GameFiles ParticleRules.data_items = rules.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, ParticleRuleNameHashes), - new Tuple(0x30, ParticleRules) + return new (long, IResourceBlock)[] { + (0x20, ParticleRuleNameHashes), + (0x30, ParticleRules) }; } } @@ -551,11 +551,11 @@ namespace CodeWalker.GameFiles EffectRules.data_items = rules.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, EffectRuleNameHashes), - new Tuple(0x30, EffectRules) + return new (long, IResourceBlock)[] { + (0x20, EffectRuleNameHashes), + (0x30, EffectRules) }; } } @@ -652,11 +652,11 @@ namespace CodeWalker.GameFiles EmitterRules.data_items = rules.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, EmitterRuleNameHashes), - new Tuple(0x30, EmitterRules) + return new (long, IResourceBlock)[] { + (0x20, EmitterRuleNameHashes), + (0x30, EmitterRules) }; } } @@ -1439,19 +1439,19 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - 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, Drawables) + return new (long, IResourceBlock)[] { + (88, Spawner1), + (96, Spawner2), + (0x128, BehaviourList1), + (0x138, BehaviourList2), + (0x148, BehaviourList3), + (0x158, BehaviourList4), + (0x168, BehaviourList5), + (0x188, UnknownList1), + (0x1F0, ShaderVars), + (0x210, Drawables) }; } @@ -1556,10 +1556,10 @@ namespace CodeWalker.GameFiles Unknown_40h.data_items = XmlMeta.ReadHashItemArray(node, "Unknown40"); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x40, Unknown_40h) + return new (long, IResourceBlock)[] { + (0x40, Unknown_40h) }; } @@ -2685,14 +2685,14 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(192, KeyframeProp0), - new Tuple(336, KeyframeProp1), - new Tuple(480, KeyframeProp2), - new Tuple(624, KeyframeProp3), - new Tuple(768, KeyframeProp4) + return new (long, IResourceBlock)[] { + (192, KeyframeProp0), + (336, KeyframeProp1), + (480, KeyframeProp2), + (624, KeyframeProp3), + (768, KeyframeProp4) }; } @@ -3134,12 +3134,12 @@ namespace CodeWalker.GameFiles } } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0, EventEmitterFlags), - new Tuple(0x10, Unknown_10h), - new Tuple(0x28, Unknown_28h) + return new (long, IResourceBlock)[] { + (0, EventEmitterFlags), + (0x10, Unknown_10h), + (0x28, Unknown_28h) }; } @@ -3307,10 +3307,10 @@ namespace CodeWalker.GameFiles Unknown_0h.data_items = XmlMeta.ReadItemArray(node, "Items"); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0, Unknown_0h) + return new (long, IResourceBlock)[] { + (0, Unknown_0h) }; } @@ -3397,10 +3397,10 @@ namespace CodeWalker.GameFiles Unknown_0h.data_items = XmlMeta.ReadItemArray(node, "Keyframes"); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0, Unknown_0h) + return new (long, IResourceBlock)[] { + (0, Unknown_0h) }; } @@ -3675,19 +3675,19 @@ namespace CodeWalker.GameFiles return list.ToArray(); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - 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]), + return new (long, IResourceBlock)[] { + (120, KeyframeProps1[0]), + (264, KeyframeProps1[1]), + (408, KeyframeProps1[2]), + (552, KeyframeProps1[3]), + (696, KeyframeProps1[4]), + (840, KeyframeProps1[5]), + (984, KeyframeProps1[6]), + (1128, KeyframeProps1[7]), + (1272, KeyframeProps1[8]), + (1416, KeyframeProps1[9]), }; } @@ -3728,13 +3728,15 @@ namespace CodeWalker.GameFiles public override string ToString() { var str = ParticleKeyframeProp.GetName(Hash); - if (!string.IsNullOrEmpty(str)) return str; + if (!string.IsNullOrEmpty(str)) + return str; return YptXml.HashString((MetaHash)Hash); } public string ToCleanString() { - if (Hash == 0) return string.Empty; + if (Hash == 0) + return string.Empty; return ToString(); } @@ -3754,7 +3756,8 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public class ParticleKeyframeProp : ResourceSystemBlock, IMetaXmlItem + [TC(typeof(EXP))] + public class ParticleKeyframeProp : ResourceSystemBlock, IMetaXmlItem { // datBase // ptxKeyframeProp @@ -3917,16 +3920,16 @@ namespace CodeWalker.GameFiles } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x70, Values) + return new (long, IResourceBlock)[] { + (0x70, Values) }; } public override string ToString() { - return Name.ToString() + " (" + (Values?.data_items?.Length ?? 0).ToString() + " values)"; + return $"{Name} ({ Values?.data_items?.Length ?? 0} values)"; } @@ -4014,10 +4017,12 @@ namespace CodeWalker.GameFiles d[0x851d3d14] = "ptxAttractorDomain:m_sizeInnerKFP"; NameDict = d; } + if (NameDict.TryGetValue(hash, out string str)) { return str; } + return YptXml.HashString((MetaHash)hash); } private static Dictionary NameDict; @@ -4193,7 +4198,8 @@ namespace CodeWalker.GameFiles Attractor = 3, } - [TC(typeof(EXP))] public class ParticleDomain : ResourceSystemBlock, IResourceXXSystemBlock, IMetaXmlItem + [TC(typeof(EXP))] + public class ParticleDomain : ResourceSystemBlock, IResourceXXSystemBlock, IMetaXmlItem { // datBase // ptxDomain @@ -4397,21 +4403,21 @@ namespace CodeWalker.GameFiles } public static void WriteXmlNode(ParticleDomain d, StringBuilder sb, int indent, string name) { - if (d != null) + if (d is not null) { YptXml.OpenTag(sb, indent, name); d.WriteXml(sb, indent + 1); YptXml.CloseTag(sb, indent, name); } } - public static ParticleDomain ReadXmlNode(XmlNode node) + public static ParticleDomain? ReadXmlNode(XmlNode node) { if (node != null) { var typestr = Xml.GetChildStringAttribute(node, "Type"); var type = Xml.GetEnumValue(typestr); var s = Create(type); - if (s != null) + if (s is not null) { s.ReadXml(node); } @@ -4420,19 +4426,19 @@ namespace CodeWalker.GameFiles return null; } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { KeyframeProps.ManualCountOverride = true; KeyframeProps.ManualReferenceOverride = true; KeyframeProps.EntriesCount = 4; KeyframeProps.EntriesCapacity = 16; - return new Tuple[] { - new Tuple(24, KeyframeProp0), - new Tuple(168, KeyframeProp1), - new Tuple(312, KeyframeProp2), - new Tuple(456, KeyframeProp3), - new Tuple(0x260, KeyframeProps) + return new (long, IResourceBlock)[] { + (24, KeyframeProp0), + (168, KeyframeProp1), + (312, KeyframeProp2), + (456, KeyframeProp3), + (0x260, KeyframeProps) }; } @@ -4591,14 +4597,14 @@ namespace CodeWalker.GameFiles YptXml.CloseTag(sb, indent, name); } } - public static ParticleBehaviour ReadXmlNode(XmlNode node) + public static ParticleBehaviour? ReadXmlNode(XmlNode node) { if (node != null) { var typestr = Xml.GetChildStringAttribute(node, "Type"); var type = Xml.GetEnumValue(typestr); var s = Create(type); - if (s != null) + if (s is not null) { s.ReadXml(node); } @@ -4673,10 +4679,10 @@ namespace CodeWalker.GameFiles } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x10, KeyframeProps) + return new (long, IResourceBlock)[] { + (0x10, KeyframeProps) }; } @@ -4814,12 +4820,12 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x10, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1) + return new (long, IResourceBlock)[] { + (0x10, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1) }; } } @@ -5011,14 +5017,14 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2, KeyframeProp3); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2), - new Tuple(480, KeyframeProp3) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2), + (480, KeyframeProp3) }; } } @@ -5154,14 +5160,14 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2, KeyframeProp3); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2), - new Tuple(480, KeyframeProp3) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2), + (480, KeyframeProp3) }; } } @@ -5263,12 +5269,12 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1) }; } } @@ -5344,11 +5350,11 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0) }; } } @@ -5496,12 +5502,12 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1) }; } } @@ -5622,11 +5628,11 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0) }; } } @@ -5746,13 +5752,13 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2) }; } } @@ -6146,11 +6152,11 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0) }; } } @@ -6405,19 +6411,19 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2, KeyframeProp3, KeyframeProp4, KeyframeProp5, KeyframeProp6, KeyframeProp7, KeyframeProp8); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2), - new Tuple(480, KeyframeProp3), - new Tuple(624, KeyframeProp4), - new Tuple(768, KeyframeProp5), - new Tuple(912, KeyframeProp6), - new Tuple(1056, KeyframeProp7), - new Tuple(1200, KeyframeProp8) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2), + (480, KeyframeProp3), + (624, KeyframeProp4), + (768, KeyframeProp5), + (912, KeyframeProp6), + (1056, KeyframeProp7), + (1200, KeyframeProp8) }; } } @@ -6706,12 +6712,12 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1) }; } } @@ -6825,12 +6831,12 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1) }; } } @@ -6956,14 +6962,14 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2, KeyframeProp3); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2), - new Tuple(480, KeyframeProp3) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2), + (480, KeyframeProp3) }; } } @@ -7016,11 +7022,11 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0) }; } } @@ -7215,11 +7221,11 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0) }; } } @@ -7415,17 +7421,17 @@ namespace CodeWalker.GameFiles CreateKeyframeProps(KeyframeProp0, KeyframeProp1, KeyframeProp2, KeyframeProp3, KeyframeProp4, KeyframeProp5, KeyframeProp6); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, KeyframeProps), - new Tuple(48, KeyframeProp0), - new Tuple(192, KeyframeProp1), - new Tuple(336, KeyframeProp2), - new Tuple(480, KeyframeProp3), - new Tuple(624, KeyframeProp4), - new Tuple(768, KeyframeProp5), - new Tuple(912, KeyframeProp6) + return new (long, IResourceBlock)[] { + (16, KeyframeProps), + (48, KeyframeProp0), + (192, KeyframeProp1), + (336, KeyframeProp2), + (480, KeyframeProp3), + (624, KeyframeProp4), + (768, KeyframeProp5), + (912, KeyframeProp6) }; } } @@ -8113,8 +8119,10 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { var list = new List(base.GetReferences()); - if (Texture != null) list.Add(Texture); - if (TextureName != null) list.Add(TextureName); + if (Texture != null) + list.Add(Texture); + if (TextureName != null) + list.Add(TextureName); return list.ToArray(); } } @@ -8199,10 +8207,10 @@ namespace CodeWalker.GameFiles Items.data_items = XmlMeta.ReadItemArray(node, "Items"); } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x28, Items) + return new (long, IResourceBlock)[] { + (0x28, Items) }; } } diff --git a/CodeWalker.Core/GameFiles/Resources/PedsFiles.cs b/CodeWalker.Core/GameFiles/Resources/PedsFiles.cs new file mode 100644 index 0000000..e5b917c --- /dev/null +++ b/CodeWalker.Core/GameFiles/Resources/PedsFiles.cs @@ -0,0 +1,158 @@ +using CodeWalker.GameFiles; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Core.GameFiles.Resources +{ + public class CustomTypeConverter : ExpandableObjectConverter + { + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes) + { + Console.WriteLine($"{context}: {value}"); + + var properties = TypeDescriptor.GetProperties(value, attributes); + + Console.WriteLine(properties); + + return properties; + } + } + + public class DictionaryTypeConverter : ExpandableObjectConverter + { + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes) + { + Console.WriteLine($"{context}: {value}"); + + var properties = TypeDescriptor.GetProperties(value, attributes); + + if (value is IDictionary dict) + { + foreach (var v in dict) + { + properties.Add(TypeDescriptor.GetDefaultProperty(v.Value)); + } + } + + + Console.WriteLine(properties); + + return properties; + } + } + + + public class DictionaryConvert : TypeConverter + { + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes) + { + Console.WriteLine($"{context}: {value}"); + + var properties = TypeDescriptor.GetProperties(value, attributes); + + Console.WriteLine(properties); + + return properties; + } + } + + + [TypeConverter(typeof(CustomTypeConverter))] + public class PedsDlcFiles + { + public MetaHash DlcName { get; set; } + public PedsDlcFiles(MetaHash dlcName) + { + DlcName = dlcName; + } + [Browsable(true)] + public PedFile PedFile { get; set; } + [Browsable(true)] + public ConcurrentDictionary Drawables { get; set; } = new ConcurrentDictionary(); + [Browsable(true)] + public ConcurrentDictionary TextureDicts { get; set; } = new ConcurrentDictionary(); + [Browsable(true)] + public ConcurrentDictionary ClothDicts { get; set; } = new ConcurrentDictionary(); + + public int Index + { + get { + if (!GameFileCache.Instance.DlcNameLookup.TryGetValue(DlcName, out var dlcName)) + { + return -1; + } + + return GameFileCache.Instance.DlcNameList.FindIndex(0, (value) => value.Equals(dlcName, StringComparison.OrdinalIgnoreCase)); + } + } + } + + [TypeConverter(typeof(CustomTypeConverter))] + public class PedsFiles + { + [Browsable(true)] + [TypeConverter(typeof(DictionaryTypeConverter))] + public ConcurrentDictionary Dlcs { get; set; } = new ConcurrentDictionary(); + [Browsable(true)] + [TypeConverter(typeof(CollectionConverter))] + public ICollection Ymts { get; set; } = new HashSet(GameFileByPathComparer.Instance); + + public string kaas = "Kaas"; + + public PedsDlcFiles GetPedsDlcFiles(PedFile pedFile) + { + var pedsDlcFiles = GetPedsDlcFiles(pedFile.DlcName); + pedsDlcFiles.PedFile = pedFile; + return pedsDlcFiles; + } + + public PedsDlcFiles GetPedsDlcFiles(MetaHash dlcName) + { + if (!Dlcs.TryGetValue(dlcName, out var pedsFiles)) + { + _ = Dlcs.TryAdd(dlcName, new PedsDlcFiles(dlcName)); + + pedsFiles = Dlcs[dlcName]; + } + + return pedsFiles; + } + + public bool TryGetPedsDlcFiles(PedFile pedFile, out PedsDlcFiles pedsDlcFiles) + { + return TryGetPedsDlcFiles(pedFile.DlcName, out pedsDlcFiles); + } + + public bool TryGetPedsDlcFiles(MetaHash dlcName, out PedsDlcFiles pedsDlcFiles) + { + return Dlcs.TryGetValue(dlcName, out pedsDlcFiles); + } + + public void AddDrawable(PedFile pedFile, RpfFileEntry entry) + { + var pedsFiles = GetPedsDlcFiles(pedFile); + + pedsFiles.Drawables.TryAdd(entry.ShortNameHash, entry); + } + + public void AddTextureDict(PedFile pedFile, RpfFileEntry entry) + { + var pedsFiles = GetPedsDlcFiles(pedFile); + + pedsFiles.TextureDicts.TryAdd(entry.ShortNameHash, entry); + } + + public void AddClothsDict(PedFile pedFile, RpfFileEntry entry) + { + var pedsFiles = GetPedsDlcFiles(pedFile); + + pedsFiles.ClothDicts.TryAdd(entry.ShortNameHash, entry); + } + } +} diff --git a/CodeWalker.Core/GameFiles/Resources/ResourceAnalyzer.cs b/CodeWalker.Core/GameFiles/Resources/ResourceAnalyzer.cs index 6cb556a..9d2b095 100644 --- a/CodeWalker.Core/GameFiles/Resources/ResourceAnalyzer.cs +++ b/CodeWalker.Core/GameFiles/Resources/ResourceAnalyzer.cs @@ -63,6 +63,7 @@ namespace CodeWalker.GameFiles GraphicsPages = FileEntry?.GraphicsFlags.Pages; var dlist = new List(); +#if DEBUG foreach (var kvp in reader.blockPool) { var item = new ResourceAnalyzerItem(); @@ -98,6 +99,7 @@ namespace CodeWalker.GameFiles } dlist.Add(item); } +#endif dlist.Sort((a, b) => a.Position.CompareTo(b.Position)); diff --git a/CodeWalker.Core/GameFiles/Resources/ResourceBaseTypes.cs b/CodeWalker.Core/GameFiles/Resources/ResourceBaseTypes.cs index e14e037..dd59078 100644 --- a/CodeWalker.Core/GameFiles/Resources/ResourceBaseTypes.cs +++ b/CodeWalker.Core/GameFiles/Resources/ResourceBaseTypes.cs @@ -23,8 +23,13 @@ //shamelessly stolen and mangled +using CodeWalker.Core.Utils; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; using SharpDX; using System; +using System.Buffers; +using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Linq; @@ -37,17 +42,15 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public class string_r : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class string_r : ResourceSystemBlock { // Represents a string that can be referenced in a resource structure. /// /// Gets the length of the string. /// - public override long BlockLength - { - get { return Value.Length + 1; } - } + public override long BlockLength => Value.Length + 1; /// /// Gets or sets the string value. @@ -71,22 +74,22 @@ namespace CodeWalker.GameFiles public static explicit operator string_r(string value) { - var x = new string_r(); - x.Value = value; + var x = new string_r + { + Value = value + }; return x; } - public override string ToString() - { - return Value; - } + public override string ToString() => Value; } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct Matrix3_s + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct Matrix3_s { - public Vector4 Row1 { get; set; } - public Vector4 Row2 { get; set; } - public Vector4 Row3 { get; set; } + public Vector4 Row1 { get; init; } + public Vector4 Row2 { get; init; } + public Vector4 Row3 { get; init; } // structure data //public float Unknown_01 { get; set; } @@ -118,23 +121,24 @@ namespace CodeWalker.GameFiles Row3 = new Vector4(0, 0, 1, 0); } } - public float[] ToArray() + public readonly float[] ToArray() { - return new[] { Row1.X, Row1.Y, Row1.Z, Row1.W, Row2.X, Row2.Y, Row2.Z, Row2.W, Row3.X, Row3.Y, Row3.Z, Row3.W }; + return [Row1.X, Row1.Y, Row1.Z, Row1.W, Row2.X, Row2.Y, Row2.Z, Row2.W, Row3.X, Row3.Y, Row3.Z, Row3.W]; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct Matrix4F_s + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct Matrix4F_s { - public Vector3 Column1 { get; set; } - public uint Flags1 { get; set; } - public Vector3 Column2 { get; set; } - public uint Flags2 { get; set; } - public Vector3 Column3 { get; set; } - public uint Flags3 { get; set; } - public Vector3 Column4 { get; set; } - public uint Flags4 { get; set; } + public Vector3 Column1 { get; init; } + public uint Flags1 { get; init; } + public Vector3 Column2 { get; init; } + public uint Flags2 { get; init; } + public Vector3 Column3 { get; init; } + public uint Flags3 { get; init; } + public Vector3 Column4 { get; init; } + public uint Flags4 { get; init; } public Matrix4F_s(bool identity) { @@ -189,7 +193,7 @@ namespace CodeWalker.GameFiles Flags3 = 0x7f800001; Flags4 = 0x7f800001; } - public Matrix4F_s(Matrix m) + public Matrix4F_s(in Matrix m) { Column1 = new Vector3(m.M11, m.M12, m.M13); Column2 = new Vector3(m.M21, m.M22, m.M23); @@ -201,236 +205,112 @@ namespace CodeWalker.GameFiles Flags4 = 0x7f800001; } - public float[] ToArray() + public readonly float[] ToArray() { - return new[] { Column1.X, Column1.Y, Column1.Z, Column2.X, Column2.Y, Column2.Z, Column3.X, Column3.Y, Column3.Z, Column4.X, Column4.Y, Column4.Z }; + return [Column1.X, Column1.Y, Column1.Z, Column2.X, Column2.Y, Column2.Z, Column3.X, Column3.Y, Column3.Z, Column4.X, Column4.Y, Column4.Z]; } - public Matrix ToMatrix() + public readonly Matrix ToMatrix() { return new Matrix(Column1.X, Column1.Y, Column1.Z, 0, Column2.X, Column2.Y, Column2.Z, 0, Column3.X, Column3.Y, Column3.Z, 0, Column4.X, Column4.Y, Column4.Z, 1); } - - public static Matrix4F_s Identity { get { return new Matrix4F_s(true); } } - public static Matrix4F_s Zero { get { return new Matrix4F_s(false); } } - - - + public static Matrix4F_s Identity => new Matrix4F_s(true); + public static Matrix4F_s Zero => new Matrix4F_s(false); } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct AABB_s + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct AABB_s(Vector4 min, Vector4 max) { - public Vector4 Min { get; set; } - public Vector4 Max { get; set; } + public readonly Vector4 _Min = min; + public readonly Vector4 _Max = max; + public Vector4 Min { get => _Min; init => _Min = value; } + public Vector4 Max { get => _Max; init => _Max = value; } } - - - [TypeConverter(typeof(ExpandableObjectConverter))] public struct FlagsByte + + + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly record struct FlagsByte(byte Value) { - public byte Value { get; set; } + public string Hex => Value.ToString("X2"); - public string Hex - { - get - { - return Convert.ToString(Value, 16).ToUpper().PadLeft(2, '0'); - } - } + public string Bin => Value.ToString("b8"); - public string Bin - { - get - { - return Convert.ToString(Value, 2).PadLeft(8, '0'); - } - } + public override string ToString() => $"{Bin} | 0x{Hex} | {Value}"; + public string ToShortString() => $"{Bin} | 0x{Hex}"; + public string ToHexString() => $"0x{Hex}"; + public static implicit operator FlagsByte(byte v) => new FlagsByte(v); - public FlagsByte(byte v) - { - Value = v; - } - - public override string ToString() - { - return Bin + " | 0x" + Hex + " | " + Value.ToString(); - } - public string ToShortString() - { - return Bin + " | 0x" + Hex; - } - public string ToHexString() - { - return "0x" + Hex; - } - - public static implicit operator FlagsByte(byte v) - { - return new FlagsByte(v); - } - public static implicit operator byte(FlagsByte v) - { - return v.Value; //implicit conversion - } + public static implicit operator byte(FlagsByte v) => v.Value; } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct FlagsUshort + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly record struct FlagsUshort(ushort Value) { - public ushort Value { get; set; } + public string Hex => Value.ToString("X4"); + public string Bin => Value.ToString("b16"); - public string Hex - { - get - { - return Convert.ToString(Value, 16).ToUpper().PadLeft(4, '0'); - } - } + public override string ToString() => $"{Bin} | 0x{Hex} | {Value}"; + public string ToShortString() => $"{Bin} | 0x{Hex}"; - public string Bin - { - get - { - return Convert.ToString(Value, 2).PadLeft(16, '0'); - } - } - - public FlagsUshort(ushort v) - { - Value = v; - } - - public override string ToString() - { - return Bin + " | 0x" + Hex + " | " + Value.ToString(); - } - public string ToShortString() - { - return Bin + " | 0x" + Hex; - } - - public static implicit operator FlagsUshort(ushort v) - { - return new FlagsUshort(v); - } - public static implicit operator ushort(FlagsUshort v) - { - return v.Value; //implicit conversion - } + public static implicit operator FlagsUshort(ushort v) => new FlagsUshort(v); + public static implicit operator ushort(FlagsUshort v) => v.Value; } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct FlagsUint + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly record struct FlagsUint(uint Value) : IEquatable { - public uint Value { get; set; } + //public uint Value { get; init; } = v; - public string Hex - { - get - { - return Convert.ToString(Value, 16).ToUpper().PadLeft(8, '0'); - } - } + public string Hex => Value.ToString("X8"); - public string Bin - { - get - { - return Convert.ToString(Value, 2).PadLeft(32, '0'); - } - } + public string Bin => Value.ToString("b32"); - public FlagsUint(uint v) - { - Value = v; - } - - public override string ToString() - { - return Bin + " | 0x" + Hex + " | " + Value.ToString(); - } - public string ToShortString() - { - return Bin + " | 0x" + Hex; - } - - public static implicit operator FlagsUint(uint v) - { - return new FlagsUint(v); - } - public static implicit operator uint(FlagsUint v) - { - return v.Value; //implicit conversion - } + public override string ToString() => $"{Bin} | 0x{Hex} | {Value}"; + public string ToShortString() => $"{Bin} | 0x{Hex}"; + public static implicit operator FlagsUint(uint v) => new FlagsUint(v); + public static implicit operator uint(FlagsUint v) => v.Value; } - [TypeConverter(typeof(ExpandableObjectConverter))] public abstract class ListBase : ResourceSystemBlock, ICustomTypeDescriptor, IList where T : IResourceSystemBlock, new() + [TypeConverter(typeof(ExpandableObjectConverter))] + public abstract class ListBase : ResourceSystemBlock, ICustomTypeDescriptor, IList where T : IResourceSystemBlock, new() { // this is the data... public List Data { get; set; } - - - public T this[int index] { - get - { - return Data[index]; - } - set - { - Data[index] = value; - } + get => Data[index]; + set => Data[index] = value; } - public int Count - { - get - { - return Data?.Count ?? 0; - } - } - - public bool IsReadOnly - { - get - { - return false; - } - } - - - + public int Count => Data?.Count ?? 0; + public bool IsReadOnly => false; + public Span Span => Data.AsSpan(); public ListBase() { //Data = new List(); } - - - - public void Add(T item) { - if (Data == null) - { - Data = new List(); - } + Data ??= new List(); Data.Add(item); } @@ -449,11 +329,16 @@ namespace CodeWalker.GameFiles Data.CopyTo(array, arrayIndex); } - public IEnumerator GetEnumerator() + public List.Enumerator GetEnumerator() { return Data.GetEnumerator(); } + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + public int IndexOf(T item) { return Data.IndexOf(item); @@ -479,6 +364,11 @@ namespace CodeWalker.GameFiles return Data.GetEnumerator(); } + public ref T GetByRef(int index) + { + return ref Data.AsSpan()[index]; + } + @@ -555,68 +445,29 @@ namespace CodeWalker.GameFiles private ListBase collection = null; private int index = -1; - public ListBasePropertyDescriptor(ListBase coll, int i) : base("#" + i.ToString(), null) + public ListBasePropertyDescriptor(ListBase coll, int i) : base($"#{i}", null) { collection = coll; index = i; } - public override AttributeCollection Attributes - { - get - { - return new AttributeCollection(null); - } - } + public override AttributeCollection Attributes => new AttributeCollection(null); - public override bool CanResetValue(object component) - { - return true; - } + public override bool CanResetValue(object component) => true; - public override Type ComponentType - { - get - { - return this.collection.GetType(); - } - } + public override Type ComponentType => this.collection.GetType(); - public override string DisplayName - { - get - { - return "[" + index.ToString() + "]"; - } - } + public override string DisplayName => $"[{index}]"; - public override string Description - { - get - { - return collection[index].ToString(); - } - } + public override string Description => collection[index].ToString(); - public override object GetValue(object component) - { - return this.collection[index]; - } + public override object GetValue(object component) => this.collection[index]; - public override bool IsReadOnly - { - get { return true; } - } + public override bool IsReadOnly => true; - public override string Name - { - get { return "#" + index.ToString(); } - } + public override string Name => $"#{index}"; - public override Type PropertyType - { - get { return this.collection[index].GetType(); } - } + public override Type PropertyType => this.collection[index].GetType(); public override void ResetValue(object component) { } @@ -636,7 +487,8 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleArray : ListBase, IResourceNoCacheBlock where T : IResourceSystemBlock, new() + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleArray : ListBase, IResourceNoCacheBlock where T : IResourceSystemBlock, new() { /// /// Gets the length of the data block. @@ -645,11 +497,14 @@ namespace CodeWalker.GameFiles { get { + if (Data is null || Data.Count == 0) + return 0; + long length = 0; - if (Data != null) + + foreach(ref var data in Span) { - foreach (var x in Data) - length += x.BlockLength; + length += data.BlockLength; } return length; } @@ -661,6 +516,11 @@ namespace CodeWalker.GameFiles //Data = new List(); } + public ResourceSimpleArray(IEnumerable items) + { + Data = new List(items); + } + @@ -688,46 +548,43 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { foreach (var f in Data) + { f.Write(writer); + } } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - var list = new List>(); + if (Data is null || Data.Count == 0) + return []; + + var result = new (long, IResourceBlock)[Data.Count]; long length = 0; - if (Data != null) + for (int i = 0; i < Data.Count; i++) { - foreach (var x in Data) - { - list.Add(new Tuple(length, x)); - length += x.BlockLength; - } + result[i] = (length, Data[i]); + length += Data[i].BlockLength; } - return list.ToArray(); + return result; } - public override string ToString() - { - return "(Count: " + Count.ToString() + ")"; - } + public override string ToString() => $"(Count: {Count})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64 : ResourceSystemBlock, IResourceNoCacheBlock where T : IResourceSystemBlock, new() + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64 : ResourceSystemBlock, IResourceNoCacheBlock where T : IResourceSystemBlock, new() { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -736,9 +593,9 @@ namespace CodeWalker.GameFiles // reference data //public ResourceSimpleArray Entries; - public T[] data_items { get; set; } + public T[] data_items { get; set; } = []; - private ResourceSimpleArray data_block;//used for saving. + private ResourceSimpleArray? data_block;//used for saving. /// @@ -758,6 +615,12 @@ namespace CodeWalker.GameFiles // this.EntriesCount //); + if (EntriesCount == 0) + { + data_items = []; + return; + } + //TODO: NEEDS TO BE TESTED!!! data_items = new T[EntriesCount]; var posbckp = reader.Position; @@ -771,7 +634,6 @@ namespace CodeWalker.GameFiles } reader.Position = posbckp; - } /// @@ -780,9 +642,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.Count : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.Count : 0); + this.EntriesPointer = (ulong)(this.data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(this.data_block?.Count ?? 0); + this.EntriesCapacity = (ushort)(this.data_block?.Count ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -796,34 +658,25 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSimpleArray(); - data_block.Data = new List(); - data_block.Data.AddRange(data_items); - list.Add(data_block); - } - else + if (data_items is null || data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSimpleArray(); + data_block.Data = new List(data_items); + + return [data_block]; } - public override string ToString() - { - return "(Count: " + EntriesCount.ToString() + ")"; - } + public override string ToString() => $"(Count: {EntriesCount})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_s : ResourceSystemBlock, IResourceNoCacheBlock where T : struct + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_s : ResourceSystemBlock, IResourceNoCacheBlock, IResourceBlockSpan where T : struct { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -831,9 +684,9 @@ namespace CodeWalker.GameFiles public ushort EntriesCapacity { get; private set; } // reference data - public T[] data_items { get; set; } + public T[] data_items { get; set; } = Array.Empty(); - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -850,10 +703,21 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadStructsAt(EntriesPointer, EntriesCount); + data_items = reader.ReadStructsAt(EntriesPointer, EntriesCount) ?? Array.Empty(); + } - if (EntriesCount != EntriesCapacity) - { } + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.EntriesPointer = reader.ReadUInt64(); + this.EntriesCount = reader.ReadUInt16(); + this.EntriesCapacity = reader.ReadUInt16(); + reader.Advance(4); + + // read reference data + + //TODO: NEEDS TO BE TESTED!!! + data_items = reader.ReadStructsAt(EntriesPointer, EntriesCount).ToArray(); } /// @@ -862,9 +726,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -878,35 +742,31 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } - public override string ToString() + public Span.Enumerator GetEnumerator() { - return "(Count: " + EntriesCount.ToString() + ")"; + return data_items.AsSpan().GetEnumerator(); } + + public override string ToString() => $"(Count: {EntriesCount})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64b_s : ResourceSystemBlock, IResourceNoCacheBlock where T : struct + + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64b_s : ResourceSystemBlock, IResourceNoCacheBlock, IResourceBlockSpan where T : struct { //this version uses uints for the count/cap! - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -914,9 +774,9 @@ namespace CodeWalker.GameFiles public uint EntriesCapacity { get; private set; } // reference data - public T[] data_items { get; set; } + public T[] data_items { get; set; } = []; - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -933,7 +793,21 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadStructsAt(EntriesPointer, EntriesCapacity); + data_items = reader.ReadStructsAt(EntriesPointer, EntriesCapacity) ?? []; + } + + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.EntriesPointer = reader.ReadUInt64(); + this.EntriesCount = reader.ReadUInt32(); + this.EntriesCapacity = reader.ReadUInt32(); + //reader.Position += 4; + + // read reference data + + //TODO: NEEDS TO BE TESTED!!! + data_items = reader.ReadStructsAt(EntriesPointer, EntriesCapacity).ToArray(); } /// @@ -942,9 +816,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); //this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -958,33 +832,28 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items is null || data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } - public override string ToString() + public Span.Enumerator GetEnumerator() { - return "(Count: " + EntriesCount.ToString() + ")"; + return data_items.AsSpan().GetEnumerator(); } + + public override string ToString() => $"(Count: {EntriesCount})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_byte : ResourceSystemBlock, IResourceNoCacheBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_byte : ResourceSystemBlock, IResourceBlockSpan, IResourceNoCacheBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -992,9 +861,9 @@ namespace CodeWalker.GameFiles public ushort EntriesCapacity { get; private set; } // reference data - public byte[] data_items { get; private set; } + public byte[] data_items { get; private set; } = []; - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -1011,7 +880,21 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadBytesAt(EntriesPointer, EntriesCount); + data_items = reader.ReadBytesAt(EntriesPointer, EntriesCount) ?? []; + } + + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.EntriesPointer = reader.ReadUInt64(); + this.EntriesCount = reader.ReadUInt16(); + this.EntriesCapacity = reader.ReadUInt16(); + reader.Advance(4); + + // read reference data + + //TODO: NEEDS TO BE TESTED!!! + data_items = reader.ReadBytesAt(EntriesPointer, EntriesCount).ToArray(); } /// @@ -1020,9 +903,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(this.data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(this.data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(this.data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -1036,33 +919,23 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items is null || data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } - public override string ToString() - { - return "(Count: " + EntriesCount.ToString() + ")"; - } + public override string ToString() => $"(Count: {EntriesCount})"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_ushort : ResourceSystemBlock, IResourceNoCacheBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_ushort : ResourceSystemBlock, IResourceNoCacheBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -1070,9 +943,9 @@ namespace CodeWalker.GameFiles public ushort EntriesCapacity { get; private set; } // reference data - public ushort[] data_items { get; set; } + public ushort[] data_items { get; set; } = []; - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -1089,7 +962,7 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadUshortsAt(EntriesPointer, EntriesCount); + data_items = reader.ReadUshortsAt(EntriesPointer, EntriesCount) ?? []; } /// @@ -1098,9 +971,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(this.data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -1114,33 +987,26 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } - public override string ToString() - { - return "(Count: " + EntriesCount.ToString() + ")"; - } + public override string ToString() => $"(Count: {EntriesCount})"; + + + } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_uint : ResourceSystemBlock, IResourceNoCacheBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_uint : ResourceSystemBlock, IResourceNoCacheBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -1148,9 +1014,9 @@ namespace CodeWalker.GameFiles public ushort EntriesCapacity { get; private set; } // reference data - public uint[] data_items { get; set; } + public uint[] data_items { get; set; } = Array.Empty(); - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -1167,7 +1033,7 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadUintsAt(EntriesPointer, EntriesCount); + data_items = reader.ReadUintsAt(EntriesPointer, EntriesCount) ?? Array.Empty(); } /// @@ -1176,9 +1042,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -1192,33 +1058,26 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items is null || data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } public override string ToString() { - return "(Count: " + EntriesCount.ToString() + ")"; + return $"(Count: {EntriesCount})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_ulong : ResourceSystemBlock, IResourceNoCacheBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_ulong : ResourceSystemBlock, IResourceNoCacheBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -1228,7 +1087,7 @@ namespace CodeWalker.GameFiles // reference data public ulong[] data_items { get; private set; } - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -1245,7 +1104,21 @@ namespace CodeWalker.GameFiles // read reference data //TODO: NEEDS TO BE TESTED!!! - data_items = reader.ReadUlongsAt(EntriesPointer, EntriesCount); + data_items = reader.ReadUlongsAt(EntriesPointer, EntriesCount) ?? Array.Empty(); + } + + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.EntriesPointer = reader.ReadUInt64(); + this.EntriesCount = reader.ReadUInt16(); + this.EntriesCapacity = reader.ReadUInt16(); + reader.Advance(4); + + // read reference data + + //TODO: NEEDS TO BE TESTED!!! + data_items = reader.ReadUlongsAt(EntriesPointer, EntriesCount).ToArray(); } /// @@ -1254,9 +1127,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -1270,33 +1143,25 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + return [data_block]; } public override string ToString() { - return "(Count: " + EntriesCount.ToString() + ")"; + return $"(Count: {EntriesCount})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceSimpleList64_float : ResourceSystemBlock, IResourceNoCacheBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceSimpleList64_float : ResourceSystemBlock, IResourceNoCacheBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -1306,7 +1171,7 @@ namespace CodeWalker.GameFiles // reference data public float[] data_items { get; set; } - private ResourceSystemStructBlock data_block;//used for saving. + private ResourceSystemStructBlock? data_block;//used for saving. /// @@ -1332,9 +1197,9 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data //TODO: fix - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.ItemCount : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); + this.EntriesCount = (ushort)(data_block?.ItemCount ?? 0); + this.EntriesCapacity = (ushort)(data_block?.ItemCount ?? 0); // write structure data writer.Write(this.EntriesPointer); @@ -1348,48 +1213,38 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourceSystemStructBlock(data_items); - - list.Add(data_block); - } - else + if (data_items is null || data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); + data_block = new ResourceSystemStructBlock(data_items); + + return [data_block]; } public override string ToString() { - return "(Count: " + EntriesCount.ToString() + ")"; + return $"(Count: {EntriesCount})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourcePointerArray64 : ResourceSystemBlock, IList where T : IResourceSystemBlock, new() + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourcePointerArray64 : ResourceSystemBlock, IList where T : IResourceSystemBlock, new() { public int GetNonEmptyNumber() { int i = 0; foreach (var q in data_items) - if (q != null) + if (q is not null) i++; return i; } - public override long BlockLength - { - get - { - return (data_items != null) ? 8 * data_items.Length : 0; - } - } + public override long BlockLength => (data_items != null) ? 8 * data_items.Length : 0; public ulong[] data_pointers { get; set; } @@ -1406,8 +1261,15 @@ namespace CodeWalker.GameFiles { int numElements = Convert.ToInt32(parameters[0]); + if (numElements == 0) + { + data_pointers = []; + data_items = []; + return; + } - data_pointers = reader.ReadUlongsAt((ulong)reader.Position, (uint)numElements, false); + + data_pointers = reader.ReadUlongsAt((ulong)reader.Position, (uint)numElements, false) ?? []; data_items = new T[numElements]; @@ -1422,10 +1284,10 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update... - var list = new List(); + using var list = new PooledList(data_items.Length); foreach (var x in data_items) { - if (x != null) + if (x is not null) { list.Add((uint)x.FilePosition); } @@ -1434,6 +1296,7 @@ namespace CodeWalker.GameFiles list.Add(0); } } + data_pointers = list.ToArray(); @@ -1445,17 +1308,12 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (ManualReferenceOverride == false) + if (ManualReferenceOverride || data_items is null || data_items.Length == 0) { - foreach (var x in data_items) - { - list.Add(x); - } + return []; } - return list.ToArray(); + return [.. data_items]; } @@ -1480,14 +1338,8 @@ namespace CodeWalker.GameFiles public T this[int index] { - get - { - return data_items[index]; - } - set - { - throw new NotImplementedException(); - } + get => data_items[index]; + set => throw new NotImplementedException(); } public void Add(T item) @@ -1496,65 +1348,36 @@ namespace CodeWalker.GameFiles throw new NotImplementedException(); } - public void Clear() - { - throw new NotImplementedException(); - } + public void Clear() => throw new NotImplementedException(); - public bool Contains(T item) - { - throw new NotImplementedException(); - } + public bool Contains(T item) => throw new NotImplementedException(); - public void CopyTo(T[] array, int arrayIndex) - { - throw new NotImplementedException(); - } + public void CopyTo(T[] array, int arrayIndex) => throw new NotImplementedException(); - public int Count - { - //get { return data_items.Count; } - get { return (data_items != null) ? data_items.Length : 0; } - } + public int Count => data_items?.Length ?? 0; - public bool IsReadOnly - { - get { return false; } - } + public bool IsReadOnly => false; - public bool Remove(T item) - { - //return data_items.Remove(item); - throw new NotImplementedException(); - } + public bool Remove(T item) => throw new NotImplementedException(); - public IEnumerator GetEnumerator() - { - //return data_items.GetEnumerator(); - throw new NotImplementedException(); - } + public IEnumerator GetEnumerator() => throw new NotImplementedException(); - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw new NotImplementedException(); public override string ToString() { - return "(Count: " + ((data_items != null) ? data_items.Length : 0).ToString() + ")"; + return $"(Count: {data_items?.Length ?? 0})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourcePointerList64 : ResourceSystemBlock, IList where T : IResourceSystemBlock, new() + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourcePointerList64 : ResourceSystemBlock, IList where T : IResourceSystemBlock, new() { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public ulong EntriesPointer { get; private set; } @@ -1564,13 +1387,13 @@ namespace CodeWalker.GameFiles // reference data //public ResourcePointerArray64 Entries; - public ulong[] data_pointers { get; private set; } - public T[] data_items { get; set; } + public ulong[] data_pointers { get; private set; } = []; + public T[] data_items { get; set; } = []; public bool ManualCountOverride = false; //use this to manually specify the count public bool ManualReferenceOverride = false; //use this if the items are embedded in something else - private ResourcePointerArray64 data_block;//used for saving. + private ResourcePointerArray64? data_block;//used for saving. public override void Read(ResourceDataReader reader, params object[] parameters) @@ -1585,7 +1408,14 @@ namespace CodeWalker.GameFiles // this.EntriesCount //); - data_pointers = reader.ReadUlongsAt(EntriesPointer, EntriesCapacity); + data_pointers = reader.ReadUlongsAt(EntriesPointer, EntriesCapacity) ?? []; + + if (EntriesCount == 0) + { + data_items = []; + return; + } + data_items = new T[EntriesCount]; for (int i = 0; i < EntriesCount; i++) { @@ -1598,11 +1428,11 @@ namespace CodeWalker.GameFiles public override void Write(ResourceDataWriter writer, params object[] parameters) { // update... - this.EntriesPointer = (ulong)(this.data_block != null ? this.data_block.FilePosition : 0); + this.EntriesPointer = (ulong)(data_block?.FilePosition ?? 0); if (ManualCountOverride == false) { - this.EntriesCapacity = (ushort)(this.data_block != null ? this.data_block.Count : 0); - this.EntriesCount = (ushort)(this.data_block != null ? this.data_block.Count : 0); + this.EntriesCapacity = (ushort)(data_block?.Count ?? 0); + this.EntriesCount = (ushort)(data_block?.Count ?? 0); } @@ -1615,118 +1445,57 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - - if (data_items?.Length > 0) - { - data_block = new ResourcePointerArray64(); - data_block.data_items = data_items; - data_block.ManualReferenceOverride = ManualReferenceOverride; - list.Add(data_block); - } - else + if (data_items.Length == 0) { data_block = null; + return []; } - return list.ToArray(); - } + data_block = new ResourcePointerArray64(); + data_block.data_items = data_items; + data_block.ManualReferenceOverride = ManualReferenceOverride; - - - - public int IndexOf(T item) - { - throw new NotImplementedException(); - } - - public void Insert(int index, T item) - { - throw new NotImplementedException(); - } - - public void RemoveAt(int index) - { - throw new NotImplementedException(); + return [data_block]; } public T this[int index] { - get - { - return data_items[index]; - } - set - { - throw new NotImplementedException(); - } + get => data_items[index]; + set => throw new NotImplementedException(); } - public void Add(T item) - { - throw new NotImplementedException(); - } + public int IndexOf(T item) => throw new NotImplementedException(); + public void Insert(int index, T item) => throw new NotImplementedException(); + public void RemoveAt(int index) => throw new NotImplementedException(); + public void Add(T item) => throw new NotImplementedException(); + public void Clear() => throw new NotImplementedException(); + public bool Contains(T item) => throw new NotImplementedException(); + public void CopyTo(T[] array, int arrayIndex) => throw new NotImplementedException(); - public void Clear() - { - throw new NotImplementedException(); - } + public int Count => EntriesCount; - public bool Contains(T item) - { - throw new NotImplementedException(); - } + public bool IsReadOnly => false; - public void CopyTo(T[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - public int Count - { - get { return EntriesCount; } - } - - public bool IsReadOnly - { - get { return false; } - } - - public bool Remove(T item) - { - throw new NotImplementedException(); - } - - public IEnumerator GetEnumerator() - { - throw new NotImplementedException(); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } - - - public IResourceBlock CheckForCast(ResourceDataReader reader, params object[] parameters) - { - throw new NotImplementedException(); - } + public bool Remove(T item) => throw new NotImplementedException(); + public IEnumerator GetEnumerator() => throw new NotImplementedException(); + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw new NotImplementedException(); + public IResourceBlock CheckForCast(ResourceDataReader reader, params object[] parameters) => throw new NotImplementedException(); public override string ToString() { - return "(Count: " + EntriesCount.ToString() + ")"; + return $"(Count: {EntriesCount})"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct ResourcePointerListHeader + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly record struct ResourcePointerListHeader { - public ulong Pointer { get; set; } - public ushort Count { get; set; } - public ushort Capacity { get; set; } - public uint Unknown { get; set; } + public ulong Pointer { get; init; } + public ushort Count { get; init; } + public ushort Capacity { get; init; } + public uint Unknown { get; init; } } @@ -1743,19 +1512,13 @@ namespace CodeWalker.GameFiles public byte[] Data { get; set; } public int DataLength { get; set; } - public override long BlockLength - { - get - { - return (Data != null) ? Data.Length : DataLength; - } - } + public override long BlockLength => (Data != null) ? Data.Length : DataLength; public ResourceSystemDataBlock(byte[] data) { Data = data; - DataLength = (Data != null) ? Data.Length : 0; + DataLength = Data?.Length ?? 0; } @@ -1776,18 +1539,12 @@ namespace CodeWalker.GameFiles public int ItemCount { get; set; } public int StructureSize { get; set; } - public override long BlockLength - { - get - { - return ((Items != null) ? Items.Length : ItemCount) * StructureSize; - } - } + public override long BlockLength => (Items?.Length ?? ItemCount) * StructureSize; public ResourceSystemStructBlock(T[] items) { Items = items; - ItemCount = (Items != null) ? Items.Length : 0; + ItemCount = Items?.Length ?? 0; StructureSize = Marshal.SizeOf(typeof(T)); } @@ -1802,13 +1559,15 @@ namespace CodeWalker.GameFiles { byte[] data = MetaTypes.ConvertArrayToBytes(Items); - if (data != null) + if (data is not null) { writer.Write(data); } } + + public Span.Enumerator GetEnumerator() + { + return Items.AsSpan().GetEnumerator(); + } } - - - } diff --git a/CodeWalker.Core/GameFiles/Resources/ResourceBuilder.cs b/CodeWalker.Core/GameFiles/Resources/ResourceBuilder.cs index 5c0f05e..22299f1 100644 --- a/CodeWalker.Core/GameFiles/Resources/ResourceBuilder.cs +++ b/CodeWalker.Core/GameFiles/Resources/ResourceBuilder.cs @@ -459,7 +459,7 @@ namespace CodeWalker.GameFiles { using (MemoryStream ms = RpfFile.recyclableMemoryStreamManager.GetStream()) { - DeflateStream ds = new DeflateStream(ms, CompressionMode.Compress, true); + DeflateStream ds = new DeflateStream(ms, CompressionLevel.SmallestSize, true); ds.Write(data, 0, data.Length); ds.Close(); return ms.ToArray(); @@ -470,12 +470,23 @@ namespace CodeWalker.GameFiles using (MemoryStream ms = new MemoryStream(data)) { DeflateStream ds = new DeflateStream(ms, CompressionMode.Decompress); - MemoryStream outstr = RpfFile.recyclableMemoryStreamManager.GetStream("Decompress", data.Length); + MemoryStream outstr = RpfFile.recyclableMemoryStreamManager.GetStream("Decompress", data.Length * 2); ds.CopyTo(outstr, 524288); return outstr.ToArray(); } } + public static async Task DecompressAsync(byte[] data) + { + using (MemoryStream ms = new MemoryStream(data)) + { + DeflateStream ds = new DeflateStream(ms, CompressionMode.Decompress); + MemoryStream outstr = RpfFile.recyclableMemoryStreamManager.GetStream("Decompress", data.Length * 2); + await ds.CopyToAsync(outstr, 524288); + return outstr.ToArray(); + } + } + public static DeflateStream Decompress(Stream stream) { DeflateStream ds = new DeflateStream(stream, CompressionMode.Decompress); diff --git a/CodeWalker.Core/GameFiles/Resources/ResourceData.cs b/CodeWalker.Core/GameFiles/Resources/ResourceData.cs index 779e307..6031b6b 100644 --- a/CodeWalker.Core/GameFiles/Resources/ResourceData.cs +++ b/CodeWalker.Core/GameFiles/Resources/ResourceData.cs @@ -22,16 +22,21 @@ //shamelessly stolen and mangled - using CodeWalker.Utils; using System; using System.Buffers; +using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Linq.Expressions; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace CodeWalker.GameFiles @@ -47,29 +52,23 @@ namespace CodeWalker.GameFiles private readonly Stream systemStream; private readonly Stream graphicsStream; - private readonly long systemSize = 0; - private readonly long graphicsSize = 0; + private readonly int systemSize = 0; + private readonly int graphicsSize = 0; public RpfResourceFileEntry FileEntry { get; set; } // this is a dictionary that contains all the resource blocks // which were read from this resource reader - public Dictionary blockPool - { - get - { - return _blockPool ??= new Dictionary(); - } - } - public Dictionary arrayPool { - get - { - return _arrayPool ??= new Dictionary(); - } - } + // This is needed to avoid a stack overflow because a ResourcePointerArray will try to read itself + private Dictionary _blockPool; + public Dictionary blockPool => _blockPool ??= new Dictionary(17); + +#if DEBUG + public Dictionary arrayPool => _arrayPool ??= new Dictionary(); private Dictionary _arrayPool; - private Dictionary _blockPool; +#endif + private long position = SYSTEM_BASE; /// @@ -109,16 +108,16 @@ namespace CodeWalker.GameFiles /// Initializes a new resource data reader for the specified system- and graphics-stream. /// public ResourceDataReader(Stream systemStream, Stream graphicsStream, Endianess endianess = Endianess.LittleEndian) - : base(null, endianess) + : base((Stream?)null, endianess) { this.systemStream = systemStream; this.graphicsStream = graphicsStream; - this.systemSize = systemStream.Length; - this.graphicsSize = graphicsStream.Length; + this.systemSize = (int)systemStream.Length; + this.graphicsSize = (int)graphicsStream.Length; } public ResourceDataReader(RpfResourceFileEntry resentry, byte[] data, Endianess endianess = Endianess.LittleEndian) - : base(null, endianess) + : this(resentry.SystemSize, resentry.GraphicsSize, data, endianess) { FileEntry = resentry; this.systemSize = resentry.SystemSize; @@ -137,11 +136,11 @@ namespace CodeWalker.GameFiles // } //} - if ((int)systemSize > data.Length) + if (systemSize > data.Length) { throw new ArgumentException($"systemSize {systemSize} is larger than data length ({data.Length})", nameof(resentry)); } - if ((int)graphicsSize > data.Length) + if (graphicsSize > data.Length) { throw new ArgumentException($"graphicsSize {graphicsSize} is larger than data length ({data.Length})", nameof(resentry)); } @@ -150,8 +149,21 @@ namespace CodeWalker.GameFiles } public ResourceDataReader(int systemSize, int graphicsSize, byte[] data, Endianess endianess = Endianess.LittleEndian) - : base(null, endianess) + : base((Stream)null, endianess) { + if (systemSize > data.Length) + { + throw new ArgumentException($"systemSize {systemSize} is larger than data length ({data.Length})", nameof(systemSize)); + } + if (graphicsSize > data.Length) + { + throw new ArgumentException($"graphicsSize {graphicsSize} is larger than data length ({data.Length})", nameof(graphicsSize)); + } + if (systemSize + graphicsSize > data.Length) + { + throw new ArgumentException($"systemSize + graphicsSize {systemSize} is larger than data length ({data.Length})", nameof(systemSize)); + } + this.systemStream = new MemoryStream(data, 0, systemSize); this.graphicsStream = new MemoryStream(data, systemSize, graphicsSize); } @@ -188,22 +200,38 @@ namespace CodeWalker.GameFiles } } + private static ConcurrentDictionary cacheableTypes = new ConcurrentDictionary(); + private static bool fetchUsePool(Type type) + { + return !typeof(IResourceNoCacheBlock).IsAssignableFrom(type); + } + private static bool usePool() where T : IResourceBlock, new() + { + return cacheableTypes.GetOrAdd(typeof(T), fetchUsePool); + } + + public static T validate(Func instantiator) + where T : IResourceBlock + { + return instantiator(); + } + /// /// Reads a block. /// public T ReadBlock(params object[] parameters) where T : IResourceBlock, new() { - var usepool = !typeof(IResourceNoCacheBlock).IsAssignableFrom(typeof(T)); + var usepool = usePool(); if (usepool) { // make sure to return the same object if the same // block is read again... - if (blockPool.ContainsKey(Position)) + if (blockPool.TryGetValue(Position, out IResourceBlock? value)) { - var block = blockPool[Position]; - if (block is T tblk) + var cachedBlock = value; + if (cachedBlock is T tblk) { - Position += block.BlockLength; + Position += cachedBlock.BlockLength; return tblk; } else @@ -217,14 +245,9 @@ namespace CodeWalker.GameFiles // replace with correct type... - if (result is IResourceXXSystemBlock) + if (result is IResourceXXSystemBlock block) { - result = (T)((IResourceXXSystemBlock)result).GetType(this, parameters); - } - - if (result == null) - { - return default; + result = (T)block.GetType(this, parameters); } if (usepool) @@ -240,27 +263,28 @@ namespace CodeWalker.GameFiles /// /// Reads a block at a specified position. /// - public T ReadBlockAt(ulong position, params object[] parameters) where T : IResourceBlock, new() + public T? ReadBlockAt(ulong position, params object[] parameters) where T : IResourceBlock, new() { - if (position != 0) + if (position == 0) { - var positionBackup = Position; - - Position = (long)position; - var result = ReadBlock(parameters); - Position = positionBackup; - - return result; - } - else - { - return default(T); + return default; } + + var positionBackup = Position; + + Position = (long)position; + var result = ReadBlock(parameters); + Position = positionBackup; + + return result; } - public T[] ReadBlocks(ulong[] pointers) where T : IResourceBlock, new() + [return: NotNullIfNotNull(nameof(pointers))] + public T[]? ReadBlocks(ulong[]? pointers) where T : IResourceBlock, new() { - if (pointers == null) return null; + if (pointers is null) + return null; + var count = pointers.Length; var items = new T[count]; for (int i = 0; i < count; i++) @@ -270,20 +294,40 @@ namespace CodeWalker.GameFiles return items; } - public unsafe byte[] ReadBytesAt(ulong position, uint count, bool cache = true, byte[] buffer = null) +#if DEBUG + public static int EntryAddedToCache = 0; +#endif + // Only used for ResourceAnalyzer so can be made conditional, this optimizes away the if branch and arrayPool adition + [Conditional("DEBUG")] + private void AddEntryToArrayPool(long position, object result) + { +#if DEBUG + Interlocked.Increment(ref EntryAddedToCache); + arrayPool[position] = result; +#endif + } + + public unsafe byte[]? ReadBytesAt(ulong position, uint count, bool cache = true, byte[]? buffer = null) { long pos = (long)position; - if ((pos <= 0) || (count == 0)) return null; + if ((pos <= 0) || (count == 0)) + return null; + var posbackup = Position; Position = pos; - var result = ReadBytes((int)count, buffer); + var result = ReadFromStream((int)count, true, buffer); Position = posbackup; - if (cache) arrayPool[(long)position] = result; + + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public ushort[] ReadUshortsAt(ulong position, uint count, bool cache = true) + public ushort[]? ReadUshortsAt(ulong position, uint count, bool cache = true) { - if ((position <= 0) || (count == 0)) return null; + if ((position <= 0) || (count == 0)) + return null; var result = new ushort[count]; var length = count * sizeof(ushort); @@ -308,11 +352,14 @@ namespace CodeWalker.GameFiles //} //Position = posbackup; - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public short[] ReadShortsAt(ulong position, uint count, bool cache = true) + public short[]? ReadShortsAt(ulong position, uint count, bool cache = true) { if ((position <= 0) || (count == 0)) return null; var result = new short[count]; @@ -329,13 +376,17 @@ namespace CodeWalker.GameFiles } - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public uint[] ReadUintsAt(ulong position, uint count, bool cache = true) + public uint[]? ReadUintsAt(ulong position, uint count, bool cache = true) { - if ((position <= 0) || (count == 0)) return null; + if ((position <= 0) || (count == 0)) + return null; var result = new uint[count]; var length = count * sizeof(uint); @@ -350,13 +401,17 @@ namespace CodeWalker.GameFiles } - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public ulong[] ReadUlongsAt(ulong position, uint count, bool cache = true) + public ulong[]? ReadUlongsAt(ulong position, uint count, bool cache = true) { - if ((position <= 0) || (count == 0)) return null; + if (position <= 0 || count == 0) + return null; var result = new ulong[count]; var length = count * sizeof(ulong); @@ -371,13 +426,17 @@ namespace CodeWalker.GameFiles ArrayPool.Shared.Return(data); } - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public float[] ReadFloatsAt(ulong position, uint count, bool cache = true) + public float[]? ReadFloatsAt(ulong position, uint count, bool cache = true) { - if ((position <= 0) || (count == 0)) return null; + if ((position <= 0) || (count == 0)) + return null; var result = new float[count]; var length = count * sizeof(float); @@ -392,13 +451,17 @@ namespace CodeWalker.GameFiles ArrayPool.Shared.Return(data); } - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } - public T[] ReadStructsAt(ulong position, uint count, bool cache = true) where T : struct + public T[]? ReadStructsAt(ulong position, uint count, bool cache = true) where T : struct { - if ((position <= 0) || (count == 0)) return null; + if ((position <= 0) || (count == 0)) + return null; uint structsize = (uint)Marshal.SizeOf(typeof(T)); var length = count * structsize; @@ -412,7 +475,10 @@ namespace CodeWalker.GameFiles var resultSpan = MemoryMarshal.Cast(data.AsSpan(0, (int)length)); resultSpan.CopyTo(result); - if (cache) arrayPool[(long)position] = result; + if (cache) + { + AddEntryToArrayPool((long)position, result); + } return result; } @@ -421,7 +487,7 @@ namespace CodeWalker.GameFiles ArrayPool.Shared.Return(data); } } - public T[] ReadStructs(uint count) where T : struct + public T[]? ReadStructs(uint count) where T : struct { uint structsize = (uint)Marshal.SizeOf(typeof(T)); var result = new T[count]; @@ -443,43 +509,66 @@ namespace CodeWalker.GameFiles } - public T ReadStruct() where T : struct + public bool TryReadStruct(out T result) where T : struct { - uint structsize = (uint)Marshal.SizeOf(typeof(T)); + var structsize = Marshal.SizeOf(typeof(T)); var length = structsize; - var data = ArrayPool.Shared.Rent((int)length); + var data = ArrayPool.Shared.Rent(length); try { - ReadBytes((int)length, data); - MemoryMarshal.TryRead(data, out var value); - - return value; - } finally + var buffer = data.AsSpan(0, length); + ReadBytes(buffer); + return MemoryMarshal.TryRead(buffer, out result); + } + finally { ArrayPool.Shared.Return(data); } + } + public T ReadStruct() where T : struct + { + TryReadStruct(out var result); + return result; + } + + public bool TryReadStructAt(long position, out T result) where T : struct + { + if (position <= 0) + { + result = default; + return false; + } + + var posbackup = Position; + try + { + Position = position; + return TryReadStruct(out result); + } + finally + { + Position = posbackup; + } } public T ReadStructAt(long position) where T : struct { - if ((position <= 0)) return default(T); - var posbackup = Position; - Position = (long)position; - var result = ReadStruct(); - Position = posbackup; + TryReadStructAt(position, out var result); return result; } - public string ReadStringAt(ulong position) + public string? ReadStringAt(ulong position) { long newpos = (long)position; - if ((newpos <= 0)) return null; + if (newpos <= 0) + return null; + var lastpos = Position; Position = newpos; var result = ReadString(); Position = lastpos; - arrayPool[newpos] = result; + AddEntryToArrayPool((long)position, result); return result; } @@ -587,7 +676,7 @@ namespace CodeWalker.GameFiles var arr = new byte[size]; - MemoryMarshal.TryWrite(arr, ref val); + MemoryMarshal.TryWrite(arr, in val); Write(arr); @@ -654,7 +743,15 @@ namespace CodeWalker.GameFiles + public interface IResourceBlockSpan + { + void Read(ref SequenceReader reader, params object[] parameters); + } + public interface IResourceXXSytemBlockSpan + { + IResourceSystemBlock GetType(ref SequenceReader reader, params object[] parameters); + } /// /// Represents a data block in a resource file. @@ -690,7 +787,7 @@ namespace CodeWalker.GameFiles /// /// Returns a list of data blocks that are part of this block. /// - Tuple[] GetParts(); + (long, IResourceBlock)[] GetParts(); /// /// Returns a list of data blocks that are referenced by this block. @@ -721,7 +818,8 @@ namespace CodeWalker.GameFiles /// /// Represents a data block of the system segement in a resource file. /// - [TypeConverter(typeof(ExpandableObjectConverter))] public abstract class ResourceSystemBlock : IResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public abstract class ResourceSystemBlock : IResourceSystemBlock { private long position; @@ -765,9 +863,9 @@ namespace CodeWalker.GameFiles /// /// Returns a list of data blocks that are part of this block. /// - public virtual Tuple[] GetParts() + public virtual (long, IResourceBlock)[] GetParts() { - return new Tuple[0]; + return Array.Empty<(long, IResourceBlock)>(); } /// @@ -775,7 +873,7 @@ namespace CodeWalker.GameFiles /// public virtual IResourceBlock[] GetReferences() { - return new IResourceBlock[0]; + return Array.Empty(); } } diff --git a/CodeWalker.Core/GameFiles/Resources/ResourceFile.cs b/CodeWalker.Core/GameFiles/Resources/ResourceFile.cs index 65d9b2d..7277fb7 100644 --- a/CodeWalker.Core/GameFiles/Resources/ResourceFile.cs +++ b/CodeWalker.Core/GameFiles/Resources/ResourceFile.cs @@ -23,8 +23,10 @@ //shamelessly stolen and mangled +using CodeWalker.Core.Utils; using SharpDX; using System; +using System.Buffers; using System.Collections.Generic; using System.ComponentModel; using System.IO; @@ -35,12 +37,10 @@ using System.Threading.Tasks; namespace CodeWalker.GameFiles { - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourceFileBase : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourceFileBase : ResourceSystemBlock { - public override long BlockLength - { - get { return 16; } - } + public override long BlockLength => 16; // structure data public uint FileVFT { get; set; } @@ -66,6 +66,19 @@ namespace CodeWalker.GameFiles ); } + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.FileVFT = reader.ReadUInt32(); + this.FileUnknown = reader.ReadUInt32(); + this.FilePagesInfoPointer = reader.ReadUInt64(); + + // read reference data + this.FilePagesInfo = reader.ReadBlockAt( + this.FilePagesInfoPointer // offset + ); + } + /// /// Writes the data-block to a stream. /// @@ -85,19 +98,20 @@ namespace CodeWalker.GameFiles /// public override IResourceBlock[] GetReferences() { - var list = new List(); - if (FilePagesInfo != null) list.Add(FilePagesInfo); - return list.ToArray(); + if (FilePagesInfo is null) + { + return []; + } + + return [FilePagesInfo]; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ResourcePagesInfo : ResourceSystemBlock + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ResourcePagesInfo : ResourceSystemBlock, IResourceBlockSpan { - public override long BlockLength - { - get { return 20 + (256 * 16); } - } + public override long BlockLength => 20 + (256 * 16); // structure data public uint Unknown_0h { get; set; } @@ -123,6 +137,18 @@ namespace CodeWalker.GameFiles this.Unknown_10h = reader.ReadUInt32(); } + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadUInt32(); + this.Unknown_4h = reader.ReadUInt32(); + this.SystemPagesCount = reader.ReadByte(); + this.GraphicsPagesCount = reader.ReadByte(); + this.Unknown_Ah = reader.ReadUInt16(); + this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt32(); + } + /// /// Writes the data-block to a stream. /// @@ -143,7 +169,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return SystemPagesCount.ToString() + ", " + GraphicsPagesCount.ToString(); + return $"{SystemPagesCount}, {GraphicsPagesCount}"; } } diff --git a/CodeWalker.Core/GameFiles/Resources/Texture.cs b/CodeWalker.Core/GameFiles/Resources/Texture.cs index 89d7788..8872f1d 100644 --- a/CodeWalker.Core/GameFiles/Resources/Texture.cs +++ b/CodeWalker.Core/GameFiles/Resources/Texture.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; +using static CodeWalker.Utils.DDSIO; namespace CodeWalker.GameFiles { @@ -136,11 +137,11 @@ namespace CodeWalker.GameFiles } - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(0x20, TextureNameHashes), - new Tuple(0x30, Textures) + return new (long, IResourceBlock)[] { + (0x20, TextureNameHashes), + (0x30, Textures) }; } @@ -422,27 +423,20 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(); - if (!string.IsNullOrEmpty(Name)) - { - NameBlock = (string_r)Name; - list.Add(NameBlock); - } - return list.ToArray(); + if (string.IsNullOrEmpty(Name)) + return []; + + NameBlock = (string_r)Name; + return [NameBlock]; } - public override string ToString() - { - return "TextureBase: " + Name; - } + public override string ToString() => $"TextureBase: {Name}"; } - [TypeConverter(typeof(ExpandableObjectConverter))] public class Texture : TextureBase + [TypeConverter(typeof(ExpandableObjectConverter))] + public class Texture : TextureBase { - public override long BlockLength - { - get { return 144; } - } + public override long BlockLength => 144; // structure data public ushort Width { get; set; } @@ -469,18 +463,7 @@ namespace CodeWalker.GameFiles // reference data public TextureData Data { get; set; } - public long MemoryUsage - { - get - { - long val = 0; - if (Data != null) - { - val += Data.FullData.LongLength; - } - return val; - } - } + public long MemoryUsage => Data?.FullData?.LongLength ?? 0; public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -560,7 +543,9 @@ namespace CodeWalker.GameFiles File.WriteAllBytes(filepath, dds); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } public override void ReadXml(XmlNode node, string ddsfolder) { @@ -608,26 +593,19 @@ namespace CodeWalker.GameFiles public override IResourceBlock[] GetReferences() { - var list = new List(base.GetReferences()); - list.Add(Data); + var list = new List(base.GetReferences()) + { + Data + }; return list.ToArray(); } - public override string ToString() - { - return "Texture: " + Width.ToString() + "x" + Height.ToString() + ": " + Name; - } + public override string ToString() => $"Texture: {Width}x{Height}: {Name}"; } [TypeConverter(typeof(ExpandableObjectConverter))] public class TextureData : ResourceGraphicsBlock { - public override long BlockLength - { - get - { - return FullData.Length; - } - } + public override long BlockLength => FullData.Length; public byte[] FullData { get; set; } @@ -636,17 +614,34 @@ namespace CodeWalker.GameFiles /// public override void Read(ResourceDataReader reader, params object[] parameters) { - //uint format = Convert.ToUInt32(parameters[0]); - //int Width = Convert.ToInt32(parameters[1]); + uint format = Convert.ToUInt32(parameters[0]); + + var dxgiFormat = DDSIO.GetDXGIFormat((TextureFormat)format); + + int Width = Convert.ToInt32(parameters[1]); int Height = Convert.ToInt32(parameters[2]); int Levels = Convert.ToInt32(parameters[3]); int Stride = Convert.ToInt32(parameters[4]); + int div = 1; int fullLength = 0; int length = Stride * Height; for (int i = 0; i < Levels; i++) { - fullLength += Math.Max(length, 4 * 4); + //var thisLength = Math.Max(length, 4 * 4); + //if (thisLength % 16 != 0) + //{ + // thisLength += (16 - (thisLength % 16)); + //} + + var width = Math.Max(Width / div, 1); + var height = Math.Max(Height / div, 1); + + DXTex.ComputePitch(dxgiFormat, width, height, out var ddsRowPitch, out var ddsSlicePitch, 0); + + div *= 2; + + fullLength += ddsSlicePitch; length /= 4; } @@ -670,6 +665,7 @@ namespace CodeWalker.GameFiles D3DFMT_A1R5G5B5 = 25, D3DFMT_A8 = 28, D3DFMT_A8B8G8R8 = 32, + D3DFMT_A16R16G16B16 = 36, D3DFMT_L8 = 50, // fourCC diff --git a/CodeWalker.Core/GameFiles/Resources/VehicleRecord.cs b/CodeWalker.Core/GameFiles/Resources/VehicleRecord.cs index 723f428..67a0735 100644 --- a/CodeWalker.Core/GameFiles/Resources/VehicleRecord.cs +++ b/CodeWalker.Core/GameFiles/Resources/VehicleRecord.cs @@ -89,10 +89,10 @@ namespace CodeWalker.GameFiles - public override Tuple[] GetParts() + public override (long, IResourceBlock)[] GetParts() { - return new Tuple[] { - new Tuple(16, Entries) + return new (long, IResourceBlock)[] { + (16, Entries) }; } } diff --git a/CodeWalker.Core/GameFiles/Resources/VertexType.cs b/CodeWalker.Core/GameFiles/Resources/VertexType.cs index d154bab..0bf3c2b 100644 --- a/CodeWalker.Core/GameFiles/Resources/VertexType.cs +++ b/CodeWalker.Core/GameFiles/Resources/VertexType.cs @@ -185,10 +185,15 @@ namespace CodeWalker.GameFiles public Half4 Tangent; } - public struct EditorVertex //vertex data to be used by the editor. TODO: maybe move somewhere else. + public struct EditorVertex(Vector3 position, uint colour) //vertex data to be used by the editor. TODO: maybe move somewhere else. { - public Vector3 Position; - public uint Colour; + public Vector3 Position = position; + public uint Colour = colour; + + public EditorVertex(): this(default, default) + { + + } } diff --git a/CodeWalker.Core/GameFiles/Resources/WaypointRecord.cs b/CodeWalker.Core/GameFiles/Resources/WaypointRecord.cs index 8421d08..3308a3e 100644 --- a/CodeWalker.Core/GameFiles/Resources/WaypointRecord.cs +++ b/CodeWalker.Core/GameFiles/Resources/WaypointRecord.cs @@ -1,5 +1,7 @@ -using SharpDX; +using CodeWalker.Core.Utils; +using SharpDX; using System; +using System.Buffers; using System.Collections.Generic; using System.Linq; using System.Text; @@ -141,6 +143,17 @@ namespace CodeWalker.GameFiles this.Unk2 = reader.ReadUInt16(); this.Unk3 = reader.ReadUInt16(); } + + public void Read(ref SequenceReader reader, params object[] parameters) + { + // read structure data + this.Position = reader.ReadVector3(); + this.Unk0 = reader.ReadUInt16(); + this.Unk1 = reader.ReadUInt16(); + this.Unk2 = reader.ReadUInt16(); + this.Unk3 = reader.ReadUInt16(); + } + public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data diff --git a/CodeWalker.Core/GameFiles/RpfFile.cs b/CodeWalker.Core/GameFiles/RpfFile.cs index 4002ece..a5b69f8 100644 --- a/CodeWalker.Core/GameFiles/RpfFile.cs +++ b/CodeWalker.Core/GameFiles/RpfFile.cs @@ -1,4 +1,7 @@ using CodeWalker.Core.Utils; +using CodeWalker.World; +using Collections.Pooled; +using Microsoft.Extensions.ObjectPool; using Microsoft.IO; using System; using System.Buffers; @@ -6,10 +9,15 @@ using System.Buffers.Binary; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; using System.IO; using System.IO.Compression; using System.IO.Pipes; using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; @@ -25,7 +33,17 @@ namespace CodeWalker.GameFiles public uint Resources; public uint BinaryFiles; - public static FileCounts operator +(FileCounts a, FileCounts b) + public readonly bool Equals(in FileCounts b) + { + return + Rpfs == b.Rpfs + && Files == b.Files + && Folders == b.Folders + && Resources == b.Resources + && BinaryFiles == b.BinaryFiles; + } + + public static FileCounts operator +(in FileCounts a, in FileCounts b) { return new FileCounts { @@ -36,6 +54,16 @@ namespace CodeWalker.GameFiles BinaryFiles = a.BinaryFiles + b.BinaryFiles }; } + + public static bool operator ==(in FileCounts left, in FileCounts right) + { + return left.Equals(in right); + } + + public static bool operator !=(in FileCounts left, in FileCounts right) + { + return !(left == right); + } } public class RpfFile @@ -63,8 +91,8 @@ namespace CodeWalker.GameFiles public RpfEncryption Encryption { get; set; } //object linkage - public List AllEntries { get; set; } - public List Children { get; set; } + public PooledList AllEntries { get; set; } + public PooledList Children { get; set; } public RpfFile Parent { get; set; } public RpfBinaryFileEntry ParentFileEntry { get; set; } @@ -74,29 +102,6 @@ namespace CodeWalker.GameFiles public uint TotalFileCount { get; set; } - static RpfFile() - { - recyclableMemoryStreamManager.BufferDiscarded += (sender, args) => - { - Console.WriteLine($"Buffer Discarded: BufferType: {args.BufferType}; Reason: {args.Reason};"); - }; - - recyclableMemoryStreamManager.StreamDoubleDisposed += (sender, args) => - { - Console.WriteLine($"StreamDoubleDisposed: Stack1: {args.DisposeStack1}; Stack2: {args.DisposeStack2};"); - }; - - recyclableMemoryStreamManager.StreamOverCapacity += (sender, args) => - { - Console.WriteLine($"StreamOverCapacity: MaximumCapacity is {args.MaximumCapacity / 1024f / 1024f} MB, requisted: {args.RequestedCapacity / 1024f / 1024f:0.##} MB Stack: {args.AllocationStack}"); - }; - - recyclableMemoryStreamManager.StreamFinalized += (sender, args) => - { - Console.WriteLine($"StreamFinalized: {args.AllocationStack}"); - }; - } - public RpfFile(FileInfo fileInfo) { Name = fileInfo.Name; @@ -179,14 +184,15 @@ namespace CodeWalker.GameFiles throw new Exception("Invalid Resource - not GTAV!"); } + [ThreadStatic] + private static Stack cachedStack; private void ReadHeader(BinaryReader br) { - CurrentFileReader = br; - StartPos = br.BaseStream.Position; Version = br.ReadUInt32(); //RPF Version - GTAV should be 0x52504637 (1380992567) - EntryCount = br.ReadUInt32(); //Number of Entries + var entryCount = br.ReadUInt32(); //Number of Entries + EntryCount = entryCount; NamesLength = br.ReadUInt32(); Encryption = (RpfEncryption)br.ReadUInt32(); //0x04E45504F (1313165391): none; 0x0ffffff9 (268435449): AES @@ -195,7 +201,7 @@ namespace CodeWalker.GameFiles ThrowInvalidResource(); } - var entriesLength = (int)EntryCount * 16; + var entriesLength = (int)entryCount * 16; var namesLength = (int)NamesLength; byte[] entriesdata = ArrayPool.Shared.Rent(entriesLength); byte[] namesdata = ArrayPool.Shared.Rent(namesLength); @@ -207,6 +213,7 @@ namespace CodeWalker.GameFiles { case RpfEncryption.NONE: //no encryption case RpfEncryption.OPEN: //OpenIV style RPF with unencrypted TOC + case RpfEncryption.CFXP: break; case RpfEncryption.AES: GTACrypto.DecryptAES(entriesdata, entriesLength); @@ -216,26 +223,30 @@ namespace CodeWalker.GameFiles break; case RpfEncryption.NG: default: - GTACrypto.DecryptNG(entriesdata.AsSpan(0, entriesLength), Name, (uint)FileSize); - GTACrypto.DecryptNG(namesdata.AsSpan(0, namesLength), Name, (uint)FileSize); + GTACrypto.DecryptNG(entriesdata.AsMemory(0, entriesLength), Name, (uint)FileSize); + GTACrypto.DecryptNG(namesdata.AsMemory(0, namesLength), Name, (uint)FileSize); IsNGEncrypted = true; break; } - using var entriesrdr = new DataReader(new MemoryStream(entriesdata, 0, entriesLength)); - using var namesrdr = new DataReader(new MemoryStream(namesdata, 0, namesLength)); + + var entriessequence = new ReadOnlySequence(entriesdata); + var entriesrdr = new SequenceReader(entriessequence); + + var namessequence = new ReadOnlySequence(namesdata); + var namesrdr = new SequenceReader(namessequence); - AllEntries = new List((int)EntryCount); - TotalFileCount = 0; + var allEntries = new PooledList((int)entryCount); + AllEntries = allEntries; + var totalFileCount = 0u; - for (uint i = 0; i < EntryCount; i++) + for (uint i = 0; i < entryCount; i++) { - //entriesrdr.Position += 4; - uint y = entriesrdr.ReadUInt32(); - uint x = entriesrdr.ReadUInt32(); - entriesrdr.Position -= 8; + ulong xy = entriesrdr.ReadUInt64(); + + uint x = (uint)(xy >> 32); RpfEntry e; @@ -246,133 +257,124 @@ namespace CodeWalker.GameFiles else if ((x & 0x80000000) == 0) //binary file entry { e = new RpfBinaryFileEntry(); - TotalFileCount++; + totalFileCount++; } else //assume resource file entry { e = new RpfResourceFileEntry(); - TotalFileCount++; + totalFileCount++; } e.File = this; - e.H1 = y; - e.H2 = x; + e.Header = xy; - e.Read(entriesrdr); + e.Read(ref entriesrdr, br); - AllEntries.Add(e); - } + namesrdr.SetPosition(e.NameOffset); - foreach(var entry in AllEntries) - { - namesrdr.Position = entry.NameOffset; - entry.Name = namesrdr.ReadString(256); - JenkIndex.EnsureLower(entry.Name); - if (entry is RpfResourceFileEntry rfe)// && string.IsNullOrEmpty(e.Name)) + namesrdr.TryReadTo(out ReadOnlySpan buffer, 0); + if (buffer.Length > 256) + { + buffer = buffer.Slice(0, 256); + } + + e.Name = Encoding.UTF8.GetStringPooled(buffer); + JenkIndex.EnsureLower(e.Name); + if (e is RpfResourceFileEntry rfe)// && string.IsNullOrEmpty(e.Name)) { rfe.IsEncrypted = rfe.IsExtension(".ysc");//any other way to know..? } + + + allEntries.Add(e); } - Root = (RpfDirectoryEntry)AllEntries[0]; - Root.Path = Path;// + "\\" + Root.Name; - //var stack = new Stack(); + TotalFileCount = totalFileCount; - void addSubDirectory(RpfDirectoryEntry item) + Root = (RpfDirectoryEntry)allEntries[0]; + Root.Path = Path; + + var entriesSpan = AllEntries.Span; + + var stack = new Stack();; + stack.Push(Root); + while (stack.Count > 0) { + var item = stack.Pop(); + int starti = (int)item.EntriesIndex; - int endi = (int)(item.EntriesIndex + item.EntriesCount); + int endi = (int)(starti + item.EntriesCount); for (int i = starti; i < endi; i++) { - RpfEntry e = AllEntries[i]; + RpfEntry e = entriesSpan[i]; e.Parent = item; if (e is RpfDirectoryEntry rde) { - rde.Path = item.Path + '\\' + rde.Name; + rde.Path = $"{item.Path}\\{rde.Name}"; item.Directories.Add(rde); - addSubDirectory(rde); + stack.Push(rde); } else if (e is RpfFileEntry rfe) { - rfe.Path = item.Path + '\\' + rfe.Name; + rfe.Path = $"{item.Path}\\{rfe.Name}"; item.Files.Add(rfe); } } } - addSubDirectory(Root); - //stack.Push(Root); - //while (stack.Count > 0) - //{ - // var item = stack.Pop(); - - // int starti = (int)item.EntriesIndex; - // int endi = (int)(item.EntriesIndex + item.EntriesCount); - - // for (int i = starti; i < endi; i++) - // { - // RpfEntry e = AllEntries[i]; - // e.Parent = item; - // if (e is RpfDirectoryEntry rde) - // { - // rde.Path = item.Path + "\\" + rde.Name; - // item.Directories.Add(rde); - // stack.Push(rde); - // } - // else if (e is RpfFileEntry) - // { - // RpfFileEntry rfe = e as RpfFileEntry; - // rfe.Path = item.Path + "\\" + rfe.Name; - // item.Files.Add(rfe); - // } - // } - //} - br.BaseStream.Position = StartPos; - CurrentFileReader = null; ArrayPool.Shared.Return(entriesdata); ArrayPool.Shared.Return(namesdata); + stack.Clear(); } - public FileCounts ScanStructure(Action updateStatus, Action errorLog) + public bool ScanStructure(Action? updateStatus, Action? errorLog, out FileCounts fileCounts) { using var fileStream = File.OpenRead(FilePath); using var br = new BinaryReader(fileStream); try { - return ScanStructure(br, updateStatus, errorLog) ?? default; + return ScanStructure(br, updateStatus, errorLog, out fileCounts); } catch (Exception ex) { LastError = ex.ToString(); LastException = ex; - errorLog?.Invoke(FilePath + ": " + LastError); - return default; + errorLog?.Invoke($"{FilePath}: {ex}"); + Console.WriteLine($"{FilePath}: {ex}"); + fileCounts = default; + return false; } } - private FileCounts? ScanStructure(BinaryReader br, Action updateStatus, Action errorLog) + private bool ScanStructure(BinaryReader br, Action? updateStatus, Action? errorLog, out FileCounts fileCounts) { - if (FilePath == "update\\update.rpf\\dlc_patch\\patchday1ng\\x64\\patch\\data\\lang\\chinesesimp.rpf") return null; + if (FilePath == "update\\update.rpf\\dlc_patch\\patchday1ng\\x64\\patch\\data\\lang\\chinesesimp.rpf") + { + fileCounts = default; + return false; + } try { ReadHeader(br); - } catch + } + catch { - return null; + fileCounts = default; + return false; } - var fileCounts = new FileCounts + fileCounts = new FileCounts { Rpfs = 1, Files = 1 }; - Children = new List(); + Children = new PooledList(); - updateStatus?.Invoke("Scanning " + Path + "..."); + updateStatus?.Invoke($"Scanning {Path}..."); foreach (RpfEntry entry in AllEntries) { @@ -391,11 +393,11 @@ namespace CodeWalker.GameFiles subfile.Parent = this; subfile.ParentFileEntry = binentry; - var result = subfile.ScanStructure(br, updateStatus, errorLog); + var success = subfile.ScanStructure(br, updateStatus, errorLog, out var result); - if (result is not null) + if (success) { - fileCounts += result.Value; + fileCounts += result; Children.Add(subfile); } } @@ -418,10 +420,11 @@ namespace CodeWalker.GameFiles } catch (Exception ex) { - errorLog?.Invoke(entry.Path + ": " + ex.ToString()); + Console.WriteLine(ex); + errorLog?.Invoke($"{entry.Path}: {ex}"); } } - return fileCounts; + return true; } @@ -446,7 +449,7 @@ namespace CodeWalker.GameFiles } private void ExtractScripts(BinaryReader br, string outputfolder, Action updateStatus) { - updateStatus?.Invoke("Searching " + Name + "..."); + updateStatus?.Invoke($"Searching {Name}..."); ReadHeader(br); @@ -478,10 +481,10 @@ namespace CodeWalker.GameFiles if (resentry.IsExtension(".ysc")) { - updateStatus?.Invoke("Extracting " + resentry.Name + "..."); + updateStatus?.Invoke($"Extracting {resentry.Name}..."); //found a YSC file. extract it! - string ofpath = outputfolder + "\\" + resentry.Name; + string ofpath = $"{outputfolder}\\{resentry.Name}"; br.BaseStream.Position = StartPos + ((long)resentry.FileOffset * 512); @@ -501,11 +504,11 @@ namespace CodeWalker.GameFiles GTACrypto.DecryptAES(tbytes); //special case! probable duplicate pilot_school.ysc - ofpath = outputfolder + "\\" + Name + "___" + resentry.Name; + ofpath = $"{outputfolder}\\{Name}___{resentry.Name}"; } else { - GTACrypto.DecryptNG(tbytes.AsSpan(0, (int)totlen), resentry.Name, resentry.FileSize); + GTACrypto.DecryptNG(tbytes.AsMemory(0, (int)totlen), resentry.Name, resentry.FileSize); } @@ -521,10 +524,10 @@ namespace CodeWalker.GameFiles bool pathok = true; if (File.Exists(ofpath)) { - ofpath = outputfolder + "\\" + Name + "_" + resentry.Name; + ofpath = $"{outputfolder}\\{Name}_{resentry.Name}"; if (File.Exists(ofpath)) { - LastError = "Output file " + ofpath + " already exists!"; + LastError = $"Output file {ofpath} already exists!"; pathok = false; } } @@ -582,11 +585,11 @@ namespace CodeWalker.GameFiles // } //} - public byte[] ExtractFile(RpfFileEntry entry) + public byte[]? ExtractFile(RpfFileEntry entry) { try { - using var fileStream = new FileStream(GetPhysicalFilePath(), FileMode.Open, FileAccess.Read, FileShare.Read, 4096); + using var fileStream = new FileStream(GetPhysicalFilePath(), FileMode.Open, FileAccess.Read, FileShare.Read, 0); using (BinaryReader br = new BinaryReader(fileStream)) { if (entry is RpfBinaryFileEntry binaryFileEntry) @@ -612,26 +615,23 @@ namespace CodeWalker.GameFiles } } - public async ValueTask ExtractFileAsync(RpfFileEntry entry) + public async ValueTask ExtractFileAsync(RpfFileEntry entry) { try { - using var fileStream = new FileStream(GetPhysicalFilePath(), FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.Asynchronous); - using (BinaryReader br = new BinaryReader(fileStream)) + using var fileStream = new FileStream(GetPhysicalFilePath(), FileMode.Open, FileAccess.Read, FileShare.Read, 0, FileOptions.Asynchronous); + if (entry is RpfBinaryFileEntry binaryFileEntry) { - if (entry is RpfBinaryFileEntry binaryFileEntry) - { - return await ExtractFileBinaryAsync(binaryFileEntry, br).ConfigureAwait(false); - } - else if (entry is RpfResourceFileEntry resourceFileEntry) - { - return await ExtractFileResourceAsync(resourceFileEntry, br).ConfigureAwait(false); - } - else - { - Console.WriteLine($"{entry} is not a BinaryFileEntry of ResourceFileEntry"); - return null; - } + return await ExtractFileBinaryAsync(binaryFileEntry, fileStream); + } + else if (entry is RpfResourceFileEntry resourceFileEntry) + { + return await ExtractFileResourceAsync(resourceFileEntry, fileStream); + } + else + { + Console.WriteLine($"{entry} is not a BinaryFileEntry of ResourceFileEntry"); + return null; } } catch (Exception ex) @@ -642,9 +642,9 @@ namespace CodeWalker.GameFiles } } - public async ValueTask ExtractFileBinaryAsync(RpfBinaryFileEntry entry, BinaryReader br) + public async ValueTask ExtractFileBinaryAsync(RpfBinaryFileEntry entry, Stream stream) { - br.BaseStream.Position = StartPos + ((long)entry.FileOffset * 512); + stream.Position = StartPos + ((long)entry.FileOffset * 512); long l = entry.GetFileSize(); @@ -658,8 +658,8 @@ namespace CodeWalker.GameFiles byte[] tbytes = ArrayPool.Shared.Rent((int)totlen); - br.BaseStream.Position += offset; - await br.ReadAsync(tbytes, 0, (int)totlen).ConfigureAwait(false); + stream.Position += offset; + await stream.ReadAsync(tbytes, 0, (int)totlen).ConfigureAwait(false); if (entry.IsEncrypted) { @@ -669,14 +669,14 @@ namespace CodeWalker.GameFiles } else //if (IsNGEncrypted) //assume the archive is set to NG encryption if not AES... (comment: fix for openIV modded files) { - GTACrypto.DecryptNG(tbytes.AsSpan(0, (int)totlen), entry.Name, entry.FileUncompressedSize); + GTACrypto.DecryptNG(tbytes.AsMemory(0, (int)totlen), entry.Name, entry.FileUncompressedSize); } } byte[] defl; if (entry.FileSize > 0) //apparently this means it's compressed { - defl = await DecompressBytesAsync(tbytes).ConfigureAwait(false); + defl = await DecompressBytesAsync(tbytes, entry.GetUncompressedFileSize()).ConfigureAwait(false); } else { @@ -689,7 +689,12 @@ namespace CodeWalker.GameFiles return defl; } - public byte[] ExtractFileBinary(RpfBinaryFileEntry entry, BinaryReader br) + public ValueTask ExtractFileBinaryAsync(RpfBinaryFileEntry entry, BinaryReader br) + { + return ExtractFileBinaryAsync(entry, br.BaseStream); + } + + public byte[]? ExtractFileBinary(RpfBinaryFileEntry entry, BinaryReader br) { br.BaseStream.Position = StartPos + ((long)entry.FileOffset * 512); @@ -716,14 +721,14 @@ namespace CodeWalker.GameFiles } else //if (IsNGEncrypted) //assume the archive is set to NG encryption if not AES... (comment: fix for openIV modded files) { - GTACrypto.DecryptNG(tbytes.AsSpan(0, (int)totlen), entry.Name, entry.FileUncompressedSize); + GTACrypto.DecryptNG(tbytes.AsMemory(0, (int)totlen), entry.Name, entry.FileUncompressedSize); } } byte[] defl; if (entry.FileSize > 0) //apparently this means it's compressed { - defl = DecompressBytes(tbytes); + defl = DecompressBytes(tbytes, entry.GetUncompressedFileSize()); } else { @@ -736,9 +741,9 @@ namespace CodeWalker.GameFiles return defl; } - public async ValueTask ExtractFileResourceAsync(RpfResourceFileEntry entry, BinaryReader br) + public async ValueTask ExtractFileResourceAsync(RpfResourceFileEntry entry, Stream stream) { - br.BaseStream.Position = StartPos + ((long)entry.FileOffset * 512); + stream.Position = StartPos + ((long)entry.FileOffset * 512); if (entry.FileSize <= 0) { @@ -751,9 +756,9 @@ namespace CodeWalker.GameFiles byte[] tbytes = ArrayPool.Shared.Rent((int)totlen); - br.BaseStream.Position += offset; + stream.Position += offset; - await br.ReadAsync(tbytes, 0, (int)totlen); + await stream.ReadAsync(tbytes, 0, (int)totlen).ConfigureAwait(false); if (entry.IsEncrypted) { if (IsAESEncrypted) @@ -762,11 +767,11 @@ namespace CodeWalker.GameFiles } else //if (IsNGEncrypted) //assume the archive is set to NG encryption if not AES... (comment: fix for openIV modded files) { - GTACrypto.DecryptNG(tbytes.AsSpan(0, (int)totlen), entry.Name, entry.FileSize); + GTACrypto.DecryptNG(tbytes.AsMemory(0, (int)totlen), entry.Name, entry.FileSize); } } - byte[] deflated = await DecompressBytesAsync(tbytes); + byte[] deflated = await DecompressBytesAsync(tbytes, entry.GetUncompressedFileSize()); byte[] data; if (deflated != null) @@ -786,7 +791,12 @@ namespace CodeWalker.GameFiles return data; } - public byte[] ExtractFileResource(RpfResourceFileEntry entry, BinaryReader br) + public ValueTask ExtractFileResourceAsync(RpfResourceFileEntry entry, BinaryReader br) + { + return ExtractFileResourceAsync(entry, br.BaseStream); + } + + public byte[]? ExtractFileResource(RpfResourceFileEntry entry, BinaryReader br) { br.BaseStream.Position = StartPos + ((long)entry.FileOffset * 512); @@ -813,11 +823,11 @@ namespace CodeWalker.GameFiles } else //if (IsNGEncrypted) //assume the archive is set to NG encryption if not AES... (comment: fix for openIV modded files) { - GTACrypto.DecryptNG(tbytes.AsSpan(0, (int)totlen), entry.Name, entry.FileSize); + GTACrypto.DecryptNG(tbytes.AsMemory(0, (int)totlen), entry.Name, entry.FileSize); } } - byte[] deflated = DecompressBytes(tbytes); + byte[] deflated = DecompressBytes(tbytes, entry.GetUncompressedFileSize()); byte[] data; if (deflated != null) @@ -837,11 +847,11 @@ namespace CodeWalker.GameFiles return data; } - public static T GetFile(RpfEntry e) where T : class, PackedFile, new() + public static T? GetFile(RpfEntry e) where T : class, PackedFile, new() { - T file = null; - byte[] data = null; - RpfFileEntry entry = e as RpfFileEntry; + T? file = null; + byte[]? data = null; + RpfFileEntry? entry = e as RpfFileEntry; if (entry != null) { data = entry.File.ExtractFile(entry); @@ -855,27 +865,23 @@ namespace CodeWalker.GameFiles } public static T GetFile(RpfEntry e, byte[] data) where T : class, PackedFile, new() { - T file = null; - RpfFileEntry entry = e as RpfFileEntry; - if ((data != null)) + ArgumentNullException.ThrowIfNull(data, nameof(data)); + if (e is not RpfFileEntry entry) { - if (entry == null) - { - entry = CreateResourceFileEntry(ref data, 0); - } - file = new T(); - file.Load(data, entry); + entry = CreateResourceFileEntry(ref data, 0); } + var file = new T(); + file.Load(data, entry); return file; } public static T GetFile(RpfEntry e, Stream data) where T : class, PackedFileStream, new() { - T file = null; - RpfFileEntry entry = e as RpfFileEntry; - if ((data != null)) + ArgumentNullException.ThrowIfNull(data, nameof(data)); + T? file = null; + if (data is not null) { - if (entry == null) + if (e is not RpfFileEntry entry) { entry = CreateResourceFileEntry(data, 0); } @@ -887,11 +893,11 @@ namespace CodeWalker.GameFiles - public static T GetResourceFile(byte[] data) where T : class, PackedFile, new() + public static T? GetResourceFile(byte[] data) where T : class, PackedFile, new() { - T file = null; + T? file = null; RpfFileEntry entry = CreateResourceFileEntry(ref data, 0); - if ((data != null) && (entry != null)) + if (data != null && entry != null) { data = ResourceBuilder.Decompress(data); file = new T(); @@ -911,8 +917,7 @@ namespace CodeWalker.GameFiles { GameFile gfile = file as GameFile; - var oldresentry = gfile.RpfFileEntry as RpfResourceFileEntry; - if (oldresentry != null) //update the existing entry with the new one + if (gfile.RpfFileEntry is RpfResourceFileEntry oldresentry) //update the existing entry with the new one { oldresentry.SystemFlags = resentry.SystemFlags; oldresentry.GraphicsFlags = resentry.GraphicsFlags; @@ -935,12 +940,9 @@ namespace CodeWalker.GameFiles RpfResourceFileEntry resentry = CreateResourceFileEntry(ref data, ver); - if (file is GameFile) + if (file is GameFile gfile) { - GameFile gfile = file as GameFile; - - var oldresentry = gfile.RpfFileEntry as RpfResourceFileEntry; - if (oldresentry != null) //update the existing entry with the new one + if (gfile.RpfFileEntry is RpfResourceFileEntry oldresentry) //update the existing entry with the new one { oldresentry.SystemFlags = resentry.SystemFlags; oldresentry.GraphicsFlags = resentry.GraphicsFlags; @@ -955,7 +957,29 @@ namespace CodeWalker.GameFiles data = ResourceBuilder.Decompress(data); file.Load(data, resentry); + } + public static async Task LoadResourceFileAsync(T file, byte[] data, uint ver) where T : class, PackedFile + { + RpfResourceFileEntry resentry = CreateResourceFileEntry(ref data, ver); + + if (file is GameFile gfile) + { + if (gfile.RpfFileEntry is RpfResourceFileEntry oldresentry) //update the existing entry with the new one + { + oldresentry.SystemFlags = resentry.SystemFlags; + oldresentry.GraphicsFlags = resentry.GraphicsFlags; + resentry.Name = oldresentry.Name; + } + else + { + gfile.RpfFileEntry = resentry; //just stick it in there for later... + } + } + + data = await ResourceBuilder.DecompressAsync(data); + + file.Load(data, resentry); } public static RpfResourceFileEntry CreateResourceFileEntry(Stream stream, uint ver, uint? header = null) @@ -1049,51 +1073,58 @@ namespace CodeWalker.GameFiles LastException = null; if (!entry.IsExtension(".rpf")) //don't try to extract rpf's, they will be done separately.. { - if (entry is RpfBinaryFileEntry) + if (entry is RpfBinaryFileEntry binentry) { - RpfBinaryFileEntry binentry = entry as RpfBinaryFileEntry; - byte[] data = ExtractFileBinary(binentry, br); - if (data == null) + try { - if (binentry.FileSize == 0) + byte[]? data = ExtractFileBinary(binentry, br); + if (data is null) { - sb.AppendFormat("{0} : Binary FileSize is 0.", entry.Path); - sb.AppendLine(); + if (binentry.FileSize == 0) + { + sb.AppendLine($"{entry.Path} : Binary FileSize is 0."); + } + else + { + sb.AppendLine($"{entry.Path} : {LastError}"); + } } - else + else if (data.Length == 0) { - sb.AppendFormat("{0} : {1}", entry.Path, LastError); - sb.AppendLine(); + sb.AppendLine($"{entry.Path} : Decompressed output was empty."); } } - else if (data.Length == 0) + catch(Exception ex) { - sb.AppendFormat("{0} : Decompressed output was empty.", entry.Path); - sb.AppendLine(); + sb.AppendLine($"{entry.Path} : {ex}"); } } - else if (entry is RpfResourceFileEntry) + else if (entry is RpfResourceFileEntry resentry) { - RpfResourceFileEntry resentry = entry as RpfResourceFileEntry; - byte[] data = ExtractFileResource(resentry, br); - if (data == null) + try { - if (resentry.FileSize == 0) + byte[]? data = ExtractFileResource(resentry, br); + if (data == null) { - sb.AppendFormat("{0} : Resource FileSize is 0.", entry.Path); - sb.AppendLine(); + if (resentry.FileSize == 0) + { + sb.AppendLine($"{entry.Path} : Resource FileSize is 0."); + } + else + { + sb.AppendLine($"{entry.Path} : {LastError}"); + } } - else + else if (data.Length == 0) { - sb.AppendFormat("{0} : {1}", entry.Path, LastError); - sb.AppendLine(); + sb.AppendLine($"{entry.Path} : Decompressed output was empty."); } } - else if (data.Length == 0) + catch(Exception ex) { - sb.AppendFormat("{0} : Decompressed output was empty.", entry.Path); - sb.AppendLine(); + sb.AppendLine($"{entry.Path} : {ex}"); } + } } } @@ -1101,8 +1132,8 @@ namespace CodeWalker.GameFiles { LastError = ex.ToString(); LastException = ex; - sb.AppendFormat("{0} : {1}", entry.Path, ex.Message); - sb.AppendLine(); + Console.WriteLine(ex); + sb.AppendLine($"{entry.Path} : {ex.Message}"); } } } @@ -1111,8 +1142,8 @@ namespace CodeWalker.GameFiles { LastError = ex.ToString(); LastException = ex; - sb.AppendFormat("{0} : {1}", Path, ex.Message); - sb.AppendLine(); + Console.WriteLine(ex); + sb.AppendLine($"{Path} : {ex.Message}"); return null; } return sb.ToString(); @@ -1121,13 +1152,13 @@ namespace CodeWalker.GameFiles - public List GetFiles(string folder, bool recurse) + public IReadOnlyCollection GetFiles(string folder, bool recurse) { if (Root == null) { - return new List(); + return []; } - List result = new List(); + PooledList result = new PooledList(); //folder.AsSpan().Split RpfDirectoryEntry dir = Root; foreach(var part in folder.EnumerateSplit('\\')) @@ -1135,13 +1166,17 @@ namespace CodeWalker.GameFiles if (part.Length == 0) continue; dir = FindSubDirectory(dir, part); + //if (dir is null) + //{ + // return Array.Empty(); + //} } GetFiles(dir, result, recurse); return result; } - public void GetFiles(RpfDirectoryEntry dir, List result, bool recurse) + public void GetFiles(RpfDirectoryEntry dir, PooledList result, bool recurse) { if (dir.Files != null) { @@ -1151,30 +1186,15 @@ namespace CodeWalker.GameFiles { if (dir.Directories != null) { - for (int i = 0; i < dir.Directories.Count; i++) + foreach(var dirEntry in dir.Directories) { - GetFiles(dir.Directories[i], result, recurse); + GetFiles(dirEntry, result, recurse); } } } } - private RpfDirectoryEntry FindSubDirectory(RpfDirectoryEntry dir, string name) - { - if (dir == null) return null; - if (dir.Directories == null) return null; - for (int i = 0; i < dir.Directories.Count; i++) - { - var cdir = dir.Directories[i]; - if (cdir.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) - { - return cdir; - } - } - return null; - } - - private RpfDirectoryEntry FindSubDirectory(RpfDirectoryEntry dir, ReadOnlySpan name) + private RpfDirectoryEntry? FindSubDirectory(RpfDirectoryEntry dir, ReadOnlySpan name) { if (dir == null) return null; if (dir.Directories == null) return null; @@ -1192,18 +1212,32 @@ namespace CodeWalker.GameFiles } - private static readonly Stopwatch compression = new Stopwatch(); public static RecyclableMemoryStreamManager recyclableMemoryStreamManager = new RecyclableMemoryStreamManager(256 * 1024, 1024 * 1024, 128 * 1024 * 1024, false, 256 * 1024 * 100, 1024 * 1024 * 128 * 4); - public byte[] DecompressBytes(byte[] bytes) + public byte[] DecompressBytes(byte[] bytes, long requiredSize = -1) { try { + if (requiredSize == -1) + { + requiredSize = bytes.Length; + } using DeflateStream ds = new DeflateStream(new MemoryStream(bytes), CompressionMode.Decompress); - using var outstr = recyclableMemoryStreamManager.GetStream("DecompressBytes", bytes.Length); + using var outstr = new MemoryStream((int)requiredSize); ds.CopyTo(outstr, 524288); - byte[] outbuf = outstr.ToArray(); //need to copy to the right size buffer for output. + + byte[] outbuf = Array.Empty(); + try + { + outbuf = outstr.GetBuffer(); + } + catch (Exception ex) + { + // Failed to get buffer + Console.WriteLine(ex); + outbuf = outstr.ToArray(); + } if (outbuf.Length <= bytes.Length) { @@ -1211,6 +1245,18 @@ namespace CodeWalker.GameFiles //return null; //could still be OK for tiny things! } + if (outbuf.Length != requiredSize) + { + Console.WriteLine($"Buffer was resized for expectedSize: {requiredSize}; actualSize: {outbuf.Length}"); + } + + // Ensure array is correct size (this ensures everything works even is expectedSize is incorrect, but adds allocation overhead) + if (outbuf.Length != outstr.Length) + { + Console.WriteLine($"Calling to array on MemoryStream"); + outbuf = outbuf.ToArray(); + } + return outbuf; } catch (Exception ex) @@ -1221,15 +1267,28 @@ namespace CodeWalker.GameFiles } } - public async Task DecompressBytesAsync(byte[] bytes) + public async Task DecompressBytesAsync(byte[] bytes, long expectedSize = -1) { try { + if (expectedSize == -1) + { + expectedSize = bytes.Length; + } using DeflateStream ds = new DeflateStream(new MemoryStream(bytes), CompressionMode.Decompress); - using var outstr = recyclableMemoryStreamManager.GetStream("DecompressBytes", bytes.Length); + using var outstr = new MemoryStream((int)expectedSize); await ds.CopyToAsync(outstr, 524288).ConfigureAwait(false); - byte[] outbuf = outstr.ToArray(); //need to copy to the right size buffer for output. + byte[] outbuf = Array.Empty(); + try + { + outbuf = outstr.GetBuffer(); + } + catch(Exception ex) + { + Console.WriteLine(ex); + outbuf = outstr.ToArray(); + } if (outbuf.Length <= bytes.Length) { @@ -1237,6 +1296,18 @@ namespace CodeWalker.GameFiles //return null; //could still be OK for tiny things! } + if (outbuf.Length != expectedSize) + { + Console.WriteLine($"Buffer was resized for expectedSize: {expectedSize}; actualSize: {outbuf.Length}"); + } + + // Ensure array is correct size (this ensures everything works even is expectedSize is incorrect, but adds allocation overhead) + if (outbuf.Length != outstr.Length) + { + Console.WriteLine($"Calling to array on MemoryStream"); + outbuf = outbuf.ToArray(); + } + return outbuf; } catch (Exception ex) @@ -1249,9 +1320,9 @@ namespace CodeWalker.GameFiles public static byte[] CompressBytes(byte[] data) //TODO: refactor this with ResourceBuilder.Compress/Decompress { - using (MemoryStream ms = recyclableMemoryStreamManager.GetStream("CompressBytes", data.Length)) + using (MemoryStream ms = recyclableMemoryStreamManager.GetStream("CompressBytes")) { - using (var ds = new DeflateStream(ms, CompressionMode.Compress, true)) + using (var ds = new DeflateStream(ms, CompressionLevel.SmallestSize, true)) { ds.Write(data, 0, data.Length); ds.Close(); @@ -1291,6 +1362,7 @@ namespace CodeWalker.GameFiles { case RpfEncryption.NONE: //no encryption case RpfEncryption.OPEN: //OpenIV style RPF with unencrypted TOC + case RpfEncryption.CFXP: break; case RpfEncryption.AES: entriesdata = GTACrypto.EncryptAES(entriesdata); @@ -1331,13 +1403,13 @@ namespace CodeWalker.GameFiles } } - + [MemberNotNull(nameof(AllEntries))] private void EnsureAllEntries() { if (AllEntries == null) { //assume this is a new RPF, create the root directory entry - AllEntries = new List(); + AllEntries = new PooledList(); Root = new RpfDirectoryEntry(); Root.File = this; Root.Name = string.Empty; @@ -1345,14 +1417,18 @@ namespace CodeWalker.GameFiles } if (Children == null) { - Children = new List(); + Children = new PooledList(); } //re-build the AllEntries list from the root node. List temp = new List(); //for sorting + + //using var tempList = new PooledList(); + AllEntries.Clear(); + //tempList.Add(Root); AllEntries.Add(Root); Stack stack = new Stack(); stack.Push(Root); @@ -1371,15 +1447,17 @@ namespace CodeWalker.GameFiles foreach (var entry in temp) { + //tempList.Add(entry); AllEntries.Add(entry); - RpfDirectoryEntry dir = entry as RpfDirectoryEntry; - if (dir != null) + if (entry is RpfDirectoryEntry dir) { stack.Push(dir); } } } + //AllEntries.AddRange(tempRange); + EntryCount = (uint)AllEntries.Count; } @@ -1444,8 +1522,7 @@ namespace CodeWalker.GameFiles RpfFileEntry nextentry = null; foreach (var entry in AllEntries) { - RpfFileEntry fe = entry as RpfFileEntry; - if ((fe != null) && (fe.FileOffset > block)) + if ((entry is RpfFileEntry fe) && (fe.FileOffset > block)) { if ((nextentry == null) || (fe.FileOffset < nextentry.FileOffset)) { @@ -1466,8 +1543,7 @@ namespace CodeWalker.GameFiles List allfiles = new List(); foreach (var entry in AllEntries) { - RpfFileEntry rfe = entry as RpfFileEntry; - if (rfe != null) + if (entry is RpfFileEntry rfe) { allfiles.Add(rfe); } @@ -1509,8 +1585,7 @@ namespace CodeWalker.GameFiles uint endblock = 0; foreach (var entry in AllEntries) { - RpfFileEntry e = entry as RpfFileEntry; - if (e != null) + if (entry is RpfFileEntry e) { uint ecnt = GetBlockCount(e.GetFileSize()); uint eend = e.FileOffset + ecnt; @@ -1701,8 +1776,7 @@ namespace CodeWalker.GameFiles { file.Path = dir.Path + "\\" + file.Name; - RpfBinaryFileEntry binf = file as RpfBinaryFileEntry; - if ((binf != null) && file.IsExtension(".rpf")) + if ((file is RpfBinaryFileEntry binf) && file.IsExtension(".rpf")) { RpfFile childrpf = FindChildArchive(binf); if (childrpf != null) @@ -1748,8 +1822,7 @@ namespace CodeWalker.GameFiles foreach (var entry in AllEntries) { - var fentry = entry as RpfFileEntry; - if (fentry != null) + if (entry is RpfFileEntry fentry) { blockcount += GetBlockCount(fentry.GetFileSize()); } @@ -2079,7 +2152,7 @@ namespace CodeWalker.GameFiles using var fstream = File.OpenRead(fpath); using var br = new BinaryReader(fstream); fstream.Position = file.StartPos; - file.ScanStructure(br, null, null); + file.ScanStructure(br, null, null, out _); } return entry; @@ -2146,13 +2219,13 @@ namespace CodeWalker.GameFiles } RpfDirectoryEntry entryasdir = entry as RpfDirectoryEntry; - RpfFileEntry entryasfile = entry as RpfFileEntry;//it has to be one or the other... + //it has to be one or the other... if (entryasdir != null) { var deldirs = entryasdir.Directories.ToArray(); var delfiles = entryasdir.Files.ToArray(); - foreach(var deldir in deldirs) + foreach (var deldir in deldirs) { DeleteEntry(deldir); } @@ -2171,7 +2244,7 @@ namespace CodeWalker.GameFiles { entry.Parent.Directories.Remove(entryasdir); } - if (entryasfile != null) + if (entry is RpfFileEntry entryasfile) { entry.Parent.Files.Remove(entryasfile); @@ -2262,8 +2335,7 @@ namespace CodeWalker.GameFiles var allfiles = new List(); for (int i = 0; i < file.AllEntries.Count; i++) { - var entry = file.AllEntries[i] as RpfFileEntry; - if (entry != null) allfiles.Add(entry); + if (file.AllEntries[i] is RpfFileEntry entry) allfiles.Add(entry); } //make sure we process everything in the current order that they are in the archive allfiles.Sort((a, b) => { return a.FileOffset.CompareTo(b.FileOffset); }); @@ -2361,6 +2433,13 @@ namespace CodeWalker.GameFiles OPEN = 0x4E45504F, //1313165391 "OPEN", ie. "no encryption" AES = 0x0FFFFFF9, //268435449 NG = 0x0FEFFFFF, //267386879 + CFXP = 0x50584643, + } + + public enum FileHeader : uint + { + RSC7 = 0x37435352, + FXAP = 0x50415846, } @@ -2369,10 +2448,8 @@ namespace CodeWalker.GameFiles public RpfFile File { get; set; } public RpfDirectoryEntry Parent { get; set; } - public static int ExtensionHits = 0; - public static int ExtensionMisses = 0; - - public uint NameHash { get + public uint NameHash { + get { if (nameHash == 0 && !string.IsNullOrEmpty(Name)) { @@ -2385,9 +2462,10 @@ namespace CodeWalker.GameFiles nameHash = value; } } - public uint ShortNameHash { get + public uint ShortNameHash { + get { - if (shortNameHash == 0 && !string.IsNullOrEmpty(ShortName)) + if (shortNameHash == 0 && !ShortName.IsEmpty) { shortNameHash = JenkHash.GenHashLower(ShortName); } @@ -2399,8 +2477,15 @@ namespace CodeWalker.GameFiles } } - public uint NameOffset { get; set; } - public string Name { get => name; set + public virtual uint NameOffset + { + get => (uint)(Header & 0xFFFF); + set => Header = (Header & ~0xFFFFUL) | (value & 0xFFFF); + } + + public string Name { + get => name; + set { if (name == value) { @@ -2409,16 +2494,14 @@ namespace CodeWalker.GameFiles name = value; nameHash = 0; shortNameHash = 0; - shortName = null; - extension = null; + shortNameIndex = -1; } } - public string Extension - { + public ReadOnlySpan ShortName { get { - if (extension == null) + if (shortNameIndex == -1 && !string.IsNullOrEmpty(Name)) { int length = Name.Length; for (int i = length; --i >= 0;) @@ -2426,67 +2509,42 @@ namespace CodeWalker.GameFiles char ch = Name[i]; if (ch == '.') { - var result = Name.AsSpan(i, length - i); - Span lowered = stackalloc char[result.Length]; - result.ToLowerInvariant(lowered); - extension = lowered.ToString(); + shortNameIndex = i; + //shortName = Name.Substring(0, i); break; } if (ch == System.IO.Path.DirectorySeparatorChar || ch == System.IO.Path.AltDirectorySeparatorChar) { + shortNameIndex = Name.Length; break; } } - extension ??= string.Empty; } - return extension; - } - } - - public string ShortName { - get - { - if (string.IsNullOrEmpty(shortName) && !string.IsNullOrEmpty(Name)) + if (shortNameIndex == -1 || shortNameIndex == Name.Length) { - int length = Name.Length; - for (int i = length; --i >= 0;) - { - char ch = Name[i]; - if (ch == '.') - { - Interlocked.Increment(ref ExtensionHits); - shortName = Name.Substring(0, i); - break; - } - if (ch == System.IO.Path.DirectorySeparatorChar || ch == System.IO.Path.AltDirectorySeparatorChar) - { - Interlocked.Increment(ref ExtensionMisses); - shortName = Name; - break; - } - } + return Name; } - return shortName; - } - set - { - shortName = value; + return Name.AsSpan(0, shortNameIndex); } } public string Path { get; set; } - public uint H1; //first 2 header values from RPF table... - public uint H2; + //public uint H1; //first 2 header values from RPF table... + //public uint H2; + public ulong Header; private string name; private uint shortNameHash; private uint nameHash; - private string shortName; - private string extension; - public abstract void Read(DataReader reader); + private int shortNameIndex = -1; + + public abstract void Read(DataReader reader, BinaryReader br); + + public abstract void Read(ref SequenceReader reader, BinaryReader br); + public abstract void Write(DataWriter writer); public override string ToString() @@ -2496,7 +2554,7 @@ namespace CodeWalker.GameFiles public bool IsExtension(string ext) { - return Extension.Equals(ext, StringComparison.Ordinal); + return Name.EndsWith(ext, StringComparison.OrdinalIgnoreCase); } } @@ -2506,20 +2564,38 @@ namespace CodeWalker.GameFiles public uint EntriesIndex { get; set; } public uint EntriesCount { get; set; } - public List Directories = new List(); - public List Files = new List(); + public override uint NameOffset => (uint)(Header & 0xFFFFFFFF); - public override void Read(DataReader reader) + public uint Ident { - NameOffset = reader.ReadUInt32(); - uint ident = reader.ReadUInt32(); - if (ident != 0x7FFFFF00u) + get => (uint)((Header >> 32) & 0xFFFFFFFF); + set => Header = (Header & 0xFFFFFFFF) | (value << 32); + } + + public PooledList Directories = new PooledList(); + public PooledList Files = new PooledList(); + + + public override void Read(DataReader reader, BinaryReader _) + { + if (Ident != 0x7FFFFF00u) { throw new Exception("Error in RPF7 directory entry."); } EntriesIndex = reader.ReadUInt32(); EntriesCount = reader.ReadUInt32(); } + + public override void Read(ref SequenceReader reader, BinaryReader br) + { + if (Ident != 0x7FFFFF00u) + { + throw new Exception("Error in RPF7 directory entry."); + } + EntriesIndex = reader.ReadUInt32(); + EntriesCount = reader.ReadUInt32(); + } + public override void Write(DataWriter writer) { writer.Write(NameOffset); @@ -2527,35 +2603,75 @@ namespace CodeWalker.GameFiles writer.Write(EntriesIndex); writer.Write(EntriesCount); } + + public void Dispose() + { + Directories.Dispose(); + Files.Dispose(); + GC.SuppressFinalize(this); + } + + //[MemberNotNull(nameof(files), nameof(directories))] + //public void InitFilesAndDirectories() + //{ + // int starti = (int)EntriesIndex; + // int endi = (int)(EntriesIndex + EntriesCount); + + // var AllEntries = File.AllEntries; + + // files = new List(); + // directories = new List(); + + // for (int i = starti; i < endi; i++) + // { + // RpfEntry e = AllEntries[i]; + // e.Parent = this; + // if (e is RpfDirectoryEntry rde) + // { + // directories.Add(rde); + // } + // else if (e is RpfFileEntry rfe) + // { + // files.Add(rfe); + // } + // } + //} + public override string ToString() { - return "Directory: " + Path; + return $"Directory: {Path}"; } } [TypeConverter(typeof(ExpandableObjectConverter))] public abstract class RpfFileEntry : RpfEntry { - public uint FileOffset { get; set; } - public uint FileSize { get; set; } + public uint FileOffset { + get => (uint) ((Header >> 40) & 0x7FFFFFU); + set => Header = (Header & ~(0x7FFFFFUL << 40)) | (((value & 0x7FFFFFUL) | 0x800000UL) << 40); + } + public abstract uint FileSize { get; set; } public bool IsEncrypted { get; set; } + public abstract long GetUncompressedFileSize(); public abstract long GetFileSize(); public abstract void SetFileSize(uint s); } - [TypeConverter(typeof(ExpandableObjectConverter))] public class RpfBinaryFileEntry : RpfFileEntry + [TypeConverter(typeof(ExpandableObjectConverter))] + public class RpfBinaryFileEntry : RpfFileEntry { public uint FileUncompressedSize { get; set; } public uint EncryptionType { get; set; } - public override void Read(DataReader reader) + public override uint FileSize { - ulong buf = reader.ReadUInt64(); - NameOffset = (uint)buf & 0xFFFF; - FileSize = (uint)(buf >> 16) & 0xFFFFFF; - FileOffset = (uint)(buf >> 40) & 0xFFFFFF; + get => (uint)((Header >> 16) & 0xFFFFFF); + set => Header = (Header & ~0xFFFFFF0000UL) | ((value & 0xFFFFFFUL) << 16); + } + public override void Read(DataReader reader, BinaryReader _) + { FileUncompressedSize = reader.ReadUInt32(); EncryptionType = reader.ReadUInt32(); @@ -2569,6 +2685,23 @@ namespace CodeWalker.GameFiles } } + + public override void Read(ref SequenceReader reader, BinaryReader _) + { + FileUncompressedSize = reader.ReadUInt32(); + + EncryptionType = reader.ReadUInt32(); + + switch (EncryptionType) + { + case 0: IsEncrypted = false; break; + case 1: IsEncrypted = true; break; + default: + throw new Exception($"Error in RPF7 file entry. {EncryptionType}"); + } + + } + public override void Write(DataWriter writer) { writer.Write((ushort)NameOffset); @@ -2596,7 +2729,12 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return "Binary file: " + Path; + return $"Binary file: {Path}"; + } + + public override long GetUncompressedFileSize() + { + return FileUncompressedSize; } public override long GetFileSize() @@ -2619,16 +2757,16 @@ namespace CodeWalker.GameFiles public static int GetSizeFromFlags(uint flags) { //dexfx simplified version - var s0 = ((flags >> 27) & 0x1) << 0; // 1 bit - 27 (*1) - var s1 = ((flags >> 26) & 0x1) << 1; // 1 bit - 26 (*2) - var s2 = ((flags >> 25) & 0x1) << 2; // 1 bit - 25 (*4) - var s3 = ((flags >> 24) & 0x1) << 3; // 1 bit - 24 (*8) + var s0 = ((flags >> 27) & 0x1) << 0; // 1 bit - 27 (*1) + var s1 = ((flags >> 26) & 0x1) << 1; // 1 bit - 26 (*2) + var s2 = ((flags >> 25) & 0x1) << 2; // 1 bit - 25 (*4) + var s3 = ((flags >> 24) & 0x1) << 3; // 1 bit - 24 (*8) var s4 = ((flags >> 17) & 0x7F) << 4; // 7 bits - 17 - 23 (*16) (max 127 * 16) var s5 = ((flags >> 11) & 0x3F) << 5; // 6 bits - 11 - 16 (*32) (max 63 * 32) - var s6 = ((flags >> 7) & 0xF) << 6; // 4 bits - 7 - 10 (*64) (max 15 * 64) - var s7 = ((flags >> 5) & 0x3) << 7; // 2 bits - 5 - 6 (*128) (max 3 * 128) - var s8 = ((flags >> 4) & 0x1) << 8; // 1 bit - 4 (*256) - var ss = ((flags >> 0) & 0xF); // 4 bits - 0 - 3 + var s6 = ((flags >> 7) & 0xF) << 6; // 4 bits - 7 - 10 (*64) (max 15 * 64) + var s7 = ((flags >> 5) & 0x3) << 7; // 2 bits - 5 - 6 (*128) (max 3 * 128) + var s8 = ((flags >> 4) & 0x1) << 8; // 1 bit - 4 (*256) + var ss = ((flags >> 0) & 0xF); // 4 bits - 0 - 3 var baseSize = 0x200 << (int)ss; var size = baseSize * (s0 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8); return (int)size; @@ -2766,7 +2904,7 @@ namespace CodeWalker.GameFiles size = origsize; blocksize = blocksize << (int)ss; //adjust the block size to reduce the block count. remainder = size & blocksize; - if(remainder!=0) + if (remainder != 0) { size = (size - remainder) + blocksize; //readjust size with round-up } @@ -2797,7 +2935,7 @@ namespace CodeWalker.GameFiles f |= (s3 & 0x1) << 24; f |= (s4 & 0x7F) << 17; f |= (ss & 0xF); - + return f; @@ -2911,63 +3049,81 @@ namespace CodeWalker.GameFiles } - public int Version + public int Version => GetVersionFromFlags(SystemFlags, GraphicsFlags); + + public uint FileSizeHeader { + get => (uint) ((Header >> 16) & 0xFFFFFF); + set => Header = (Header & ~0xFFFFFF0000UL) | ((value & 0xFFFFFFUL) << 16); + } + + public uint fileSize; + public override uint FileSize { - get - { - return GetVersionFromFlags(SystemFlags, GraphicsFlags); + get => fileSize; + set { + + if (value > 0xFFFFFF) + { + FileSizeHeader = 0xFFFFFF; + } else + { + FileSizeHeader = value; + } + fileSize = value; } } + public int SystemSize => (int)SystemFlags.Size; + public int GraphicsSize => (int)GraphicsFlags.Size; - public int SystemSize + [SkipLocalsInit] + public override void Read(DataReader reader, BinaryReader cfr) { - get - { - return (int)SystemFlags.Size; - } - } - public int GraphicsSize - { - get - { - return (int)GraphicsFlags.Size; - } - } + fileSize = FileSizeHeader; - public override void Read(DataReader reader) - { - var buffer = ArrayPool.Shared.Rent(3); - NameOffset = reader.ReadUInt16(); - - reader.ReadBytes(3, buffer); - FileSize = (uint)buffer[0] + (uint)(buffer[1] << 8) + (uint)(buffer[2] << 16); - - reader.ReadBytes(3, buffer); - FileOffset = ((uint)buffer[0] + (uint)(buffer[1] << 8) + (uint)(buffer[2] << 16)) & 0x7FFFFF; - ArrayPool.Shared.Return(buffer); SystemFlags = reader.ReadUInt32(); GraphicsFlags = reader.ReadUInt32(); // there are sometimes resources with length=0xffffff which actually // means length>=0xffffff - if (FileSize == 0xFFFFFF) + if (fileSize == 0xFFFFFF) { - BinaryReader cfr = File.CurrentFileReader; long opos = cfr.BaseStream.Position; cfr.BaseStream.Position = File.StartPos + ((long)FileOffset * 512); //need to use the base offset!! - var buf = cfr.ReadBytes(16); - FileSize = ((uint)buf[7] << 0) | ((uint)buf[14] << 8) | ((uint)buf[5] << 16) | ((uint)buf[2] << 24); + Span buf = stackalloc byte[16]; + cfr.BaseStream.ReadAtLeast(buf, 16); + fileSize = ((uint)buf[7] << 0) | ((uint)buf[14] << 8) | ((uint)buf[5] << 16) | ((uint)buf[2] << 24); cfr.BaseStream.Position = opos; } - } + + [SkipLocalsInit] + public override void Read(ref SequenceReader reader, BinaryReader cfr) + { + fileSize = FileSizeHeader; + SystemFlags = reader.ReadUInt32(); + GraphicsFlags = reader.ReadUInt32(); + + // there are sometimes resources with length=0xffffff which actually + // means length>=0xffffff + if (fileSize == 0xFFFFFF) + { + long opos = cfr.BaseStream.Position; + cfr.BaseStream.Position = File.StartPos + ((long)FileOffset * 512); //need to use the base offset!! + Span buf = stackalloc byte[16]; + cfr.BaseStream.ReadAtLeast(buf, 16); + fileSize = ((uint)buf[7] << 0) | ((uint)buf[14] << 8) | ((uint)buf[5] << 16) | ((uint)buf[2] << 24); + cfr.BaseStream.Position = opos; + } + } + public override void Write(DataWriter writer) { writer.Write((ushort)NameOffset); var fs = FileSize; - if (fs > 0xFFFFFF) fs = 0xFFFFFF;//will also need to make sure the RSC header is updated... + if (fs > 0xFFFFFF) + fs = 0xFFFFFF;//will also need to make sure the RSC header is updated... var buf1 = new byte[] { (byte)((fs >> 0) & 0xFF), @@ -2988,20 +3144,27 @@ namespace CodeWalker.GameFiles } public override string ToString() { - return "Resource file: " + Path; + return $"Resource file: {Path}"; } public override long GetFileSize() { return (FileSize == 0) ? (long)(SystemSize + GraphicsSize) : FileSize; } + + public override long GetUncompressedFileSize() + { + return (long)(SystemSize + GraphicsSize); + } + public override void SetFileSize(uint s) { FileSize = s; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct RpfResourcePageFlags + [TypeConverter(typeof(ExpandableObjectConverter))] + public struct RpfResourcePageFlags { public uint Value { get; set; } @@ -3010,7 +3173,8 @@ namespace CodeWalker.GameFiles get { var count = Count; - if (count == 0) return null; + if (count == 0) + return null; var pages = new RpfResourcePage[count]; var counts = PageCounts; var sizes = BaseSizes; @@ -3022,7 +3186,7 @@ namespace CodeWalker.GameFiles var s = sizes[i]; for (int p = 0; p < c; p++) { - pages[n] = new RpfResourcePage() { Size = s, Offset = o }; + pages[n] = new RpfResourcePage(s, o); o += s; n++; } @@ -3031,9 +3195,9 @@ namespace CodeWalker.GameFiles } } - public readonly uint TypeVal { get { return (Value >> 28) & 0xF; } } - public readonly uint BaseShift { get { return (Value & 0xF); } } - public readonly uint BaseSize { get { return (0x200u << (int)BaseShift); } } + public readonly uint TypeVal => (Value >> 28) & 0xF; + public readonly uint BaseShift => (Value & 0xF); + public readonly uint BaseSize => (0x200u << (int)BaseShift); public readonly uint[] BaseSizes { get @@ -3095,8 +3259,9 @@ namespace CodeWalker.GameFiles { get { - var c = PageCounts; - return c[0] + c[1] + c[2] + c[3] + c[4] + c[5] + c[6] + c[7] + c[8]; + return Vector256.Sum(Vector256.Create(PageCounts.AsSpan())) + PageCounts[8]; + //var c = PageCounts; + //return c[0] + c[1] + c[2] + c[3] + c[4] + c[5] + c[6] + c[7] + c[8]; } } public readonly uint Size @@ -3153,18 +3318,19 @@ namespace CodeWalker.GameFiles public override readonly string ToString() { - return "Size: " + Size.ToString() + ", Pages: " + Count.ToString(); + return $"Size: {Size}, Pages: {Count}"; } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct RpfResourcePage + [TypeConverter(typeof(ExpandableObjectConverter))] + public readonly struct RpfResourcePage(uint size, uint offset) { - public uint Size { get; set; } - public uint Offset { get; set; } + public uint Size { get; init; } = size; + public uint Offset { get; init; } = offset; public override string ToString() { - return Size.ToString() + ": " + Offset.ToString(); + return $"{Size}: {Offset}"; } } diff --git a/CodeWalker.Core/GameFiles/RpfManager.cs b/CodeWalker.Core/GameFiles/RpfManager.cs index 231dbaf..773e7a0 100644 --- a/CodeWalker.Core/GameFiles/RpfManager.cs +++ b/CodeWalker.Core/GameFiles/RpfManager.cs @@ -1,12 +1,16 @@  using CodeWalker.Core.Utils; +using CodeWalker.World; +using CommunityToolkit.HighPerformance; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -49,7 +53,7 @@ namespace CodeWalker.GameFiles public void Init(string folder, Action updateStatus, Action errorLog, bool rootOnly = false, bool buildIndex = true) { - using var _ = new DisposableTimer("RpfManager.Init"); + using var timer = new DisposableTimer("RpfManager.Init"); UpdateStatus += updateStatus; ErrorLog += errorLog; @@ -89,7 +93,7 @@ namespace CodeWalker.GameFiles if (excl) return; //skip files in exclude paths. } - rf.ScanStructure(updateStatus, errorLog); + rf.ScanStructure(updateStatus, errorLog, out _); if (rf.LastException != null) //incase of corrupted rpf (or renamed NG encrypted RPF) { @@ -101,7 +105,8 @@ namespace CodeWalker.GameFiles } catch (Exception ex) { - errorLog(rpfpath + ": " + ex.ToString()); + Console.WriteLine(ex); + errorLog?.Invoke($"{rpfpath}: {ex}"); } }); @@ -180,7 +185,7 @@ namespace CodeWalker.GameFiles private void AddRpfFile(RpfFile file, bool isdlc, bool ismod) { - if (file.AllEntries == null && file.Children == null) + if (file.AllEntries is null && file.Children is null) return; isdlc = isdlc || (file.Name.EndsWith(".rpf", StringComparison.OrdinalIgnoreCase) && (file.Name.StartsWith("dlc", StringComparison.OrdinalIgnoreCase) || file.Name.Equals("update.rpf", StringComparison.OrdinalIgnoreCase))); @@ -246,7 +251,7 @@ namespace CodeWalker.GameFiles } } - if (file.Children != null) + if (file.Children is not null) { foreach (RpfFile cfile in file.Children) { @@ -256,13 +261,12 @@ namespace CodeWalker.GameFiles } - public RpfFile FindRpfFile(string path) => FindRpfFile(path, false); + public RpfFile? FindRpfFile(string path) => FindRpfFile(path, false); - public RpfFile FindRpfFile(string path, bool exactPathOnly) + public RpfFile? FindRpfFile(string path, bool exactPathOnly) { - RpfFile file; - if (EnableMods && ModRpfDict.TryGetValue(path, out file)) + if (EnableMods && ModRpfDict.TryGetValue(path, out RpfFile? file)) { return file; } @@ -288,15 +292,14 @@ namespace CodeWalker.GameFiles } - public RpfEntry GetEntry(string path) + public RpfEntry? GetEntry(string path) { - RpfEntry entry; - if (EnableMods && ModEntryDict.TryGetValue(path, out entry)) + if (EnableMods && ModEntryDict.TryGetValue(path, out RpfEntry? entry)) { return entry; } EntryDict.TryGetValue(path, out entry); - if (entry == null) + if (entry is null) { path = path.Replace("/", "\\"); path = path.Replace("common:", "common.rpf"); @@ -308,11 +311,10 @@ namespace CodeWalker.GameFiles } return entry; } - public byte[] GetFileData(string path) + public byte[]? GetFileData(string path) { - byte[] data = null; - RpfFileEntry entry = GetEntry(path) as RpfFileEntry; - if (entry != null) + byte[]? data = null; + if (GetEntry(path) is RpfFileEntry entry) { data = entry.File.ExtractFile(entry); } @@ -320,8 +322,17 @@ namespace CodeWalker.GameFiles } public string GetFileUTF8Text(string path) { - byte[] bytes = GetFileData(path); - return TextUtil.GetUTF8Text(bytes); + byte[]? bytes = GetFileData(path); + var text = TextUtil.GetUTF8Text(bytes); + + return text; + } + + public StreamReader GetFileUTF8TextStream(string path) + { + byte[]? bytes = GetFileData(path); + + return new StreamReader(bytes.AsMemory().AsStream(), new UTF8Encoding(false), true); ; } public XmlDocument GetFileXml(string path) @@ -336,50 +347,66 @@ namespace CodeWalker.GameFiles return doc; } - public T GetFile(string path) where T : class, PackedFile, new() + public XmlReader GetFileXmlReader(string path, XmlNameTable nameTable) { - T file = null; - byte[] data = null; - RpfFileEntry entry = GetEntry(path) as RpfFileEntry; - if (entry != null) - { - data = entry.File.ExtractFile(entry); - } - if (data != null) + var text = GetFileUTF8TextStream(path); + + var reader = XmlReader.Create(text, new XmlReaderSettings { NameTable = nameTable }); + + return reader; + } + + public XmlReader GetFileXmlReader(string path) + { + var text = GetFileUTF8TextStream(path); + + var reader = XmlReader.Create(text); + + return reader; + } + + public T? GetFile(string path) where T : class, PackedFile, new() + { + if (GetEntry(path) is not RpfFileEntry entry) + return null; + + return GetFile(entry); + } + public static T? GetFile(RpfEntry e) where T : class, PackedFile, new() + { + if (e is not RpfFileEntry entry) + return null; + + byte[]? data = entry.File.ExtractFile(entry); + T? file = null; + if (data is not null) { file = new T(); file.Load(data, entry); } return file; } - public T GetFile(RpfEntry e) where T : class, PackedFile, new() + + public ValueTask GetFileAsync(string path) where T : class, PackedFile, new() { - T file = null; - byte[] data = null; - RpfFileEntry entry = e as RpfFileEntry; - if (entry != null) - { - data = entry.File.ExtractFile(entry); - } - if (data != null) - { - file = new T(); - file.Load(data, entry); - } - return file; + RpfFileEntry? entry = GetEntry(path) as RpfFileEntry; + + if (entry is null) + return ValueTask.FromResult((T?)null); + + return GetFileAsync(entry); } - public async Task GetFileAsync(RpfEntry e) where T : class, PackedFile, new() + + public static async ValueTask GetFileAsync(RpfEntry e) where T : class, PackedFile, new() { + if (e is not RpfFileEntry entry) + return null; + try { - T file = null; - byte[] data = null; - RpfFileEntry entry = e as RpfFileEntry; - if (entry != null) - { - data = await entry.File.ExtractFileAsync(entry).ConfigureAwait(false); - } - if (data != null) + byte[]? data = await entry.File.ExtractFileAsync(entry); + T? file = null; + if (data is not null && data.Length > 0) { file = new T(); file.Load(data, entry); @@ -394,13 +421,14 @@ namespace CodeWalker.GameFiles } public bool LoadFile(T file, RpfEntry e) where T : class, PackedFile { - byte[] data = null; - RpfFileEntry entry = e as RpfFileEntry; - if (entry != null) + byte[]? data = null; + RpfFileEntry? entry = e as RpfFileEntry; + if (entry is not null) { data = entry.File.ExtractFile(entry); } - if (data != null) + + if (data is not null && data.Length > 0) { try { @@ -409,7 +437,7 @@ namespace CodeWalker.GameFiles } catch(Exception ex) { - Console.WriteLine($"Error occured while loading {entry.Name} at {entry.Path}:\n{ex}"); + Console.WriteLine($"Error occured while loading {e.Name} at {e.Path}:\n{ex}"); throw; } } @@ -418,13 +446,13 @@ namespace CodeWalker.GameFiles public async ValueTask LoadFileAsync(T file, RpfEntry e) where T : class, PackedFile { - byte[] data = null; - RpfFileEntry entry = e as RpfFileEntry; - if (entry != null) + byte[]? data = null; + RpfFileEntry? entry = e as RpfFileEntry; + if (entry is not null) { - data = await entry.File.ExtractFileAsync(entry).ConfigureAwait(false); + data = await entry.File.ExtractFileAsync(entry); } - if (data != null && data.Length > 0) + if (data is not null && data.Length > 0) { try { @@ -433,7 +461,7 @@ namespace CodeWalker.GameFiles } catch(Exception ex) { - Console.WriteLine($"Error occured while loading {entry.Name} at {entry.Path}:\n{ex}"); + Console.WriteLine($"Error occured while loading {e.Name} at {e.Path}:\n{ex}"); throw; } } @@ -441,6 +469,9 @@ namespace CodeWalker.GameFiles } private ConcurrentDictionary counts = new ConcurrentDictionary(); + private string[] stringLookup; + + [SkipLocalsInit] public void AddAllLods(string name) { var idx = name.LastIndexOf('_'); @@ -452,88 +483,120 @@ namespace CodeWalker.GameFiles { // Filter some peds and clothing models (ydd's) which don't have LOD hashes we're interested in. // This saves about 50% of the time it takes to do initial hashing - var str2 = str1.Slice(0, idx2 + 1); + var str2 = str1.Slice(0, idx2 + 1).ToString(); if (str2.Length <= 2) { return; } - switch(str2) + var ignore = str2 switch { - case "uppr_": - case "p_": - case "accs_": - case "decl_": - case "berd_": - case "hair_": - case "teef_": - case "lowr_": - case "jbib_": - case "hand_": - case "feet_": - case "task_": - case "head_": - case "s_m_y_": - case "s_m_": - case "s_m_m_": - case "s_f_y_": - case "a_m_y_": - case "ig_": - case "u_m_y_": - case "u_m_m_": - case "u_m_": - case "minimap_": - case "a_": - case "u_f_": - case "csb_": - case "g_m_y_": - case "a_f_m_": - case "a_m_m_": - case "g_m_m_": - case "mp_m_": - case "mp_f_": - case "hand_000_": - case "hand_001_": - case "hair_000_": - case "a_f_y_": - return; - default: - break; - } + "p_" => true, + "s_m_y_" => true, + "s_m_" => true, + "s_m_m_" => true, + "s_f_y_" => true, + "a_m_y_" => true, + "ig_" => true, + "u_m_y_" => true, + "u_m_m_" => true, + "u_m_" => true, + "minimap_" => true, + "a_" => true, + "u_f_" => true, + "csb_" => true, + "g_m_y_" => true, + "a_f_m_" => true, + "a_m_m_" => true, + "g_m_m_" => true, + "mp_m_" => true, + "mp_f_" => true, + "mp_" => true, + "a_f_y_" => true, + var str when str.StartsWith("accs_") => true, + var str when str.StartsWith("decl_") => true, + var str when str.StartsWith("berd_") => true, + var str when str.StartsWith("hair_") => true, + var str when str.StartsWith("teef_") => true, + var str when str.StartsWith("lowr_") => true, + var str when str.StartsWith("jbib_") => true, + var str when str.StartsWith("hand_") => true, + var str when str.StartsWith("feet_") => true, + var str when str.StartsWith("task_") => true, + var str when str.StartsWith("head_") => true, + var str when str.StartsWith("uppr_") => true, + _ => false, + }; + if (ignore) + return; + Span buff = stackalloc char[str2.Length + 2 + 4]; str2.CopyTo(buff.Slice(0, str2.Length)); - "lod".AsSpan().CopyTo(buff.Slice(str2.Length, 3)); + stackalloc char[] { 'l', 'o', 'd' }.CopyTo(buff.Slice(str2.Length, 3)); //Console.WriteLine(buff.Slice(0, str2.Length + 3).ToString()); JenkIndex.EnsureLower(buff.Slice(0, str2.Length + 3)); - var maxi = 99; + const int maxi = 99; + + stackalloc char[] { '0', '0', '_', 'l', 'o', 'd' }.CopyTo(buff.Slice(str2.Length, 6)); + + if (stringLookup is null) + { + stringLookup = new string[maxi + 1]; + for (int i = 0; i <= maxi; i++) + { + stringLookup[i] = i.ToString().PadLeft(2, '0'); + } + } - "00_lod".AsSpan().CopyTo(buff.Slice(str2.Length, 6)); for (int i = 1; i <= maxi; i++) { - if (i < 10) - { - i.ToString().AsSpan().CopyTo(buff.Slice(str2.Length + 1, 1)); - } - else - { - i.ToString().AsSpan().CopyTo(buff.Slice(str2.Length, 2)); - } + stringLookup[i].AsSpan().CopyTo(buff.Slice(str2.Length, 2)); + + var hash = JenkHash.GenHashLower(buff); //Console.WriteLine(buff.ToString()); //JenkIndex.Ensure(buff); - JenkIndex.EnsureLower(buff); + JenkIndex.Ensure(str2, hash); } } } } + [SkipLocalsInit] + private void parseAwc(string path) + { + var enumerator = path.ReverseEnumerateSplit('\\'); + if (enumerator.MoveNext()) + { + ReadOnlySpan fn = enumerator.Current; + if (enumerator.MoveNext()) + { + ReadOnlySpan fd = enumerator.Current; + + fn = fn.Slice(0, fn.Length - 4); + + if (fd.EndsWith(['.', 'r', 'p', 'f'], StringComparison.OrdinalIgnoreCase)) + { + fd = fd.Slice(0, fd.Length - 4); + } + + Span hpath = stackalloc char[fd.Length + fn.Length + 1]; + + fd.CopyTo(hpath); + hpath[fd.Length] = '/'; + fn.CopyTo(hpath.Slice(fd.Length + 1)); + JenkIndex.EnsureLower(hpath); + } + } + } + public void BuildBaseJenkIndex() { - using var _ = new DisposableTimer("BuildBaseJenkIndex"); - Parallel.ForEach(AllRpfs, (file) => + var yddFiles = new ConcurrentBag(); + using var timer = new DisposableTimer("BuildBaseJenkIndex"); + Parallel.ForEach(AllRpfs, new ParallelOptions { MaxDegreeOfParallelism = 4 }, [SkipLocalsInit] (file) => { try { - StringBuilder sb = new StringBuilder(); JenkIndex.Ensure(file.Name); foreach (RpfEntry entry in file.AllEntries) { @@ -555,10 +618,10 @@ namespace CodeWalker.GameFiles if (name.EndsWith(".ydr", StringComparison.OrdinalIgnoreCase))// || nlow.EndsWith(".yft")) //do yft's get lods? { var sname = entry.ShortName; - var nameLod = sname + "_lod"; + var nameLod = $"{sname}_lod"; JenkIndex.EnsureLower(nameLod); - JenkIndex.EnsureLower(nameLod + 'a'); - JenkIndex.EnsureLower(nameLod + 'b'); + JenkIndex.EnsureLower($"{nameLod}a"); + JenkIndex.EnsureLower($"{nameLod}b"); } else if (name.EndsWith(".ydd", StringComparison.OrdinalIgnoreCase)) { @@ -566,11 +629,13 @@ namespace CodeWalker.GameFiles { var strn = entry.Name.Substring(0, name.Length - 13); JenkIndex.EnsureLower(strn); - var nameChildrenLod = strn + "_lod"; + var nameChildrenLod = $"{strn}_lod"; JenkIndex.EnsureLower(nameChildrenLod); - JenkIndex.EnsureLower(nameChildrenLod + 'a'); - JenkIndex.EnsureLower(nameChildrenLod + 'b'); + JenkIndex.EnsureLower($"{nameChildrenLod}a"); + JenkIndex.EnsureLower($"{nameChildrenLod}b"); } + + yddFiles.Add(name); //var idx = name.LastIndexOf('_'); //if (idx > 0) //{ @@ -590,7 +655,7 @@ namespace CodeWalker.GameFiles // } // } //} - AddAllLods(name); + //AddAllLods(name); } else if(name.EndsWith(".sps", StringComparison.OrdinalIgnoreCase)) { @@ -598,56 +663,57 @@ namespace CodeWalker.GameFiles } else if(name.EndsWith(".awc", StringComparison.OrdinalIgnoreCase)) //create audio container path hashes... { - string[] parts = entry.Path.Split('\\'); - int pl = parts.Length; - if (pl > 2) - { - string fn = parts[pl - 1]; - string fd = parts[pl - 2]; - string hpath = fn.Substring(0, fn.Length - 4); - if (fd.EndsWith(".rpf", StringComparison.OrdinalIgnoreCase)) - { - fd = fd.Substring(0, fd.Length - 4); - } - hpath = fd + '/' + hpath; - - JenkIndex.EnsureLower(hpath); - } + parseAwc(entry.Path); } else if(name.EndsWith(".nametable", StringComparison.OrdinalIgnoreCase)) { if (entry is RpfBinaryFileEntry binfe) { - byte[] data = file.ExtractFile(binfe); - if (data != null) + byte[] rawData = file.ExtractFile(binfe); + if (rawData != null) { - sb.Clear(); - for (int i = 0; i < data.Length; i++) + foreach(var bytes in rawData.AsSpan().EnumerateSplit((byte)0)) { - byte c = data[i]; - if (c == 0) + string str = Encoding.ASCII.GetString(bytes); + if (!string.IsNullOrEmpty(str)) { - string str = sb.ToString(); - if (!string.IsNullOrEmpty(str)) - { - //JenkIndex.Ensure(str); - JenkIndex.EnsureLower(str); + //JenkIndex.Ensure(str); - ////DirMod_Sounds_ entries apparently can be used to infer SP audio strings - ////no luck here yet though - //if (strl.StartsWith("dirmod_sounds_") && (strl.Length > 14)) - //{ - // strl = strl.Substring(14); - // JenkIndex.Ensure(strl); - //} - } - sb.Clear(); - } - else - { - sb.Append((char)c); + JenkIndex.EnsureLower(str); + + ////DirMod_Sounds_ entries apparently can be used to infer SP audio strings + ////no luck here yet though + //if (strl.StartsWith("dirmod_sounds_") && (strl.Length > 14)) + //{ + // strl = strl.Substring(14); + // JenkIndex.Ensure(strl); + //} } } + //int startIndex = 0; + //for (int i = 0; i < rawData.Length; i++) + //{ + // byte c = rawData[i]; + // if (c == 0) + // { + // string str = Encoding.ASCII.GetString(rawData.AsSpan(startIndex, i - startIndex)); + // if (!string.IsNullOrEmpty(str)) + // { + // //JenkIndex.Ensure(str); + + // JenkIndex.EnsureLower(str); + + // ////DirMod_Sounds_ entries apparently can be used to infer SP audio strings + // ////no luck here yet though + // //if (strl.StartsWith("dirmod_sounds_") && (strl.Length > 14)) + // //{ + // // strl = strl.Substring(14); + // // JenkIndex.Ensure(strl); + // //} + // } + // startIndex = i + 1; + // } + //} } } } @@ -672,6 +738,14 @@ namespace CodeWalker.GameFiles JenkIndex.Ensure(i.ToString("00")); } + _ = Task.Run(() => { + using var timer2 = new DisposableTimer("BuildBaseJenkIndex -> AddAllLods"); + foreach (var name in yddFiles) + { + AddAllLods(name); + } + }); + //Task.Run(() => //{ // foreach (var count in counts.OrderBy(p => p.Value)) diff --git a/CodeWalker.Core/GameFiles/Utils/DDSIO.cs b/CodeWalker.Core/GameFiles/Utils/DDSIO.cs index b96e030..896ed91 100644 --- a/CodeWalker.Core/GameFiles/Utils/DDSIO.cs +++ b/CodeWalker.Core/GameFiles/Utils/DDSIO.cs @@ -141,11 +141,6 @@ namespace CodeWalker.Utils int ddsRowPitch, ddsSlicePitch; DXTex.ComputePitch(meta.format, i0.width, i0.height, out ddsRowPitch, out ddsSlicePitch, 0); - if (i0.slicePitch == ddsSlicePitch) - { } - else - { } - int w = i0.width; int h = i0.height; int imglen = i0.slicePitch;// h * i0.rowPitch; @@ -153,16 +148,19 @@ namespace CodeWalker.Utils byte[] px = null;// = new byte[w * h * 4]; if (i0.pixels + imglen > img.Data.Length) - { throw new Exception("Mipmap not in texture!"); } + { + throw new Exception("Mipmap not in texture!"); + } Buffer.BlockCopy(img.Data, i0.pixels, imgdata, 0, imglen); bool swaprb = true; - if (DirectXTexNet.TexHelper.Instance.IsCompressed((DirectXTexNet.DXGI_FORMAT)format)) + if (TexHelper.Instance.IsCompressed((DirectXTexNet.DXGI_FORMAT)format)) { px = Decompress(imgdata, w, h, format); - } else + } + else { switch (format) { @@ -530,51 +528,59 @@ namespace CodeWalker.Utils - private static TextureFormat GetTextureFormat(DXGI_FORMAT f) + public static TextureFormat GetTextureFormat(this DXGI_FORMAT f) { var format = (TextureFormat)0; switch (f) { // compressed - case DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM: format = TextureFormat.D3DFMT_DXT1; break; - case DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM: format = TextureFormat.D3DFMT_DXT3; break; - case DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM: format = TextureFormat.D3DFMT_DXT5; break; - case DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM: format = TextureFormat.D3DFMT_ATI1; break; - case DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM: format = TextureFormat.D3DFMT_ATI2; break; - case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM: format = TextureFormat.D3DFMT_BC7; break; + case DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM: return TextureFormat.D3DFMT_DXT1; + case DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM: return TextureFormat.D3DFMT_DXT3; + case DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM: return TextureFormat.D3DFMT_DXT5; + case DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM: return TextureFormat.D3DFMT_ATI1; + case DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM: return TextureFormat.D3DFMT_ATI2; + case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM: return TextureFormat.D3DFMT_BC7; // uncompressed - case DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM: format = TextureFormat.D3DFMT_A1R5G5B5; break; - case DXGI_FORMAT.DXGI_FORMAT_A8_UNORM: format = TextureFormat.D3DFMT_A8; break; - case DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM: format = TextureFormat.D3DFMT_A8B8G8R8; break; - case DXGI_FORMAT.DXGI_FORMAT_R8_UNORM: format = TextureFormat.D3DFMT_L8; break; - case DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM: format = TextureFormat.D3DFMT_A8R8G8B8; break; - case DXGI_FORMAT.DXGI_FORMAT_B8G8R8X8_UNORM: format = TextureFormat.D3DFMT_X8R8G8B8; break; + case DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM: return TextureFormat.D3DFMT_A1R5G5B5; + case DXGI_FORMAT.DXGI_FORMAT_A8_UNORM: return TextureFormat.D3DFMT_A8; + case DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM: return TextureFormat.D3DFMT_A8B8G8R8; + case DXGI_FORMAT.DXGI_FORMAT_R8_UNORM: return TextureFormat.D3DFMT_L8; + case DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM: return TextureFormat.D3DFMT_A8R8G8B8; + case DXGI_FORMAT.DXGI_FORMAT_B8G8R8X8_UNORM: return TextureFormat.D3DFMT_X8R8G8B8; + case DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_UNORM: return TextureFormat.D3DFMT_A16R16G16B16; } return format; } - private static DXGI_FORMAT GetDXGIFormat(TextureFormat f) + public static DXGI_FORMAT GetDXGIFormat(this TextureFormat f) { var format = DXGI_FORMAT.DXGI_FORMAT_UNKNOWN; switch (f) { // compressed - case TextureFormat.D3DFMT_DXT1: format = DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM; break; - case TextureFormat.D3DFMT_DXT3: format = DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM; break; - case TextureFormat.D3DFMT_DXT5: format = DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM; break; - case TextureFormat.D3DFMT_ATI1: format = DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM; break; - case TextureFormat.D3DFMT_ATI2: format = DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM; break; - case TextureFormat.D3DFMT_BC7: format = DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM; break; + case TextureFormat.D3DFMT_DXT1: return DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM; + case TextureFormat.D3DFMT_DXT3: return DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM; + case TextureFormat.D3DFMT_DXT5: return DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM; + case TextureFormat.D3DFMT_ATI1: return DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM; + case TextureFormat.D3DFMT_ATI2: return DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM; + case TextureFormat.D3DFMT_BC7: return DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM; // uncompressed - case TextureFormat.D3DFMT_A1R5G5B5: format = DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM; break; - case TextureFormat.D3DFMT_A8: format = DXGI_FORMAT.DXGI_FORMAT_A8_UNORM; break; - case TextureFormat.D3DFMT_A8B8G8R8: format = DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM; break; - case TextureFormat.D3DFMT_L8: format = DXGI_FORMAT.DXGI_FORMAT_R8_UNORM; break; - case TextureFormat.D3DFMT_A8R8G8B8: format = DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM; break; - case TextureFormat.D3DFMT_X8R8G8B8: format = DXGI_FORMAT.DXGI_FORMAT_B8G8R8X8_UNORM; break; + case TextureFormat.D3DFMT_A1R5G5B5: return DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM; + case TextureFormat.D3DFMT_A8: return DXGI_FORMAT.DXGI_FORMAT_A8_UNORM; + case TextureFormat.D3DFMT_A8B8G8R8: return DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM; + case TextureFormat.D3DFMT_L8: return DXGI_FORMAT.DXGI_FORMAT_R8_UNORM; + case TextureFormat.D3DFMT_A8R8G8B8: return DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM; + case TextureFormat.D3DFMT_X8R8G8B8: return DXGI_FORMAT.DXGI_FORMAT_B8G8R8X8_UNORM; + case TextureFormat.D3DFMT_A16R16G16B16: return DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_UNORM; } + + if (format == DXGI_FORMAT.DXGI_FORMAT_UNKNOWN) + { + Console.WriteLine($"Format: {f} ({(int)f}) is unknown!"); + } + return format; } @@ -830,7 +836,7 @@ namespace CodeWalker.Utils break; default: - assert(IsValid(fmt), $"{fmt} is not a valid texture format"); + assert(IsValid(fmt), $"{fmt} ({(int)fmt}) is not a valid texture format"); assert(!IsCompressed(fmt) && !IsPacked(fmt) && !IsPlanar(fmt)); { diff --git a/CodeWalker.Core/GameFiles/Utils/Data.cs b/CodeWalker.Core/GameFiles/Utils/Data.cs index 1dedf5b..625f5e4 100644 --- a/CodeWalker.Core/GameFiles/Utils/Data.cs +++ b/CodeWalker.Core/GameFiles/Utils/Data.cs @@ -37,6 +37,9 @@ using System.Buffers; using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Threading; +using SharpDX.Win32; +using CommunityToolkit.HighPerformance; +using System.Linq; namespace CodeWalker.GameFiles { @@ -60,6 +63,7 @@ namespace CodeWalker.GameFiles String = 9, } + [SkipLocalsInit] public class DataReader : IDisposable { private Stream baseStream; @@ -67,32 +71,20 @@ namespace CodeWalker.GameFiles /// /// Gets or sets the endianess of the underlying stream. /// - public Endianess Endianess { get; set; } = Endianess.LittleEndian; + public readonly Endianess Endianess = Endianess.LittleEndian; /// /// Gets the length of the underlying stream. /// - public virtual long Length - { - get - { - return baseStream.Length; - } - } + public virtual long Length => baseStream.Length; /// /// Gets or sets the position within the underlying stream. /// public virtual long Position { - get - { - return baseStream.Position; - } - set - { - baseStream.Position = value; - } + get => baseStream.Position; + set => baseStream.Position = value; } public DataReader(Stream stream) @@ -106,22 +98,25 @@ namespace CodeWalker.GameFiles /// /// Initializes a new data reader for the specified stream. /// - public DataReader(Stream stream, Endianess endianess) : this(stream) + public DataReader(Stream stream, Endianess endianess) + : this(stream) { this.Endianess = endianess; } - public virtual Stream GetStream() + public DataReader(byte[] data, Endianess endianess = Endianess.LittleEndian) + : this(new MemoryStream(data)) { - return baseStream; + this.Endianess = endianess; } + public virtual Stream GetStream() => baseStream; internal virtual void SetPositionAfterRead(Stream stream) { return; } - protected virtual void ReadFromStream(Span buffer, bool ignoreEndianess = false) + public virtual void ReadFromStream(Span buffer, bool ignoreEndianess = false) { var stream = GetStream(); @@ -134,7 +129,7 @@ namespace CodeWalker.GameFiles SetPositionAfterRead(stream); } - if (!ignoreEndianess && (Endianess == Endianess.BigEndian)) + if (Endianess == Endianess.BigEndian && !ignoreEndianess) { buffer.Reverse(); } @@ -144,10 +139,10 @@ namespace CodeWalker.GameFiles /// Reads data from the underlying stream. This is the only method that directly accesses /// the data in the underlying stream. /// - protected virtual byte[] ReadFromStream(int count, bool ignoreEndianess = false, byte[] buffer = null) + protected virtual byte[] ReadFromStream(int count, bool ignoreEndianess = false, byte[]? buffer = null) { var stream = GetStream(); - buffer ??= new byte[count]; + buffer ??= GC.AllocateUninitializedArray(count); try { @@ -159,7 +154,7 @@ namespace CodeWalker.GameFiles } // handle endianess - if (!ignoreEndianess && (Endianess == Endianess.BigEndian)) + if (Endianess == Endianess.BigEndian && !ignoreEndianess) { Array.Reverse(buffer, 0, count); } @@ -199,9 +194,15 @@ namespace CodeWalker.GameFiles return ReadFromStream(count, true, buffer); } + public void ReadBytes(Span buffer) + { + ReadFromStream(buffer, true); + } + /// /// Reads a signed 16-bit value. /// + [SkipLocalsInit] public short ReadInt16() { Span _buffer = stackalloc byte[sizeof(short)]; @@ -220,6 +221,7 @@ namespace CodeWalker.GameFiles /// /// Reads a signed 32-bit value. /// + [SkipLocalsInit] public int ReadInt32() { Span _buffer = stackalloc byte[sizeof(int)]; @@ -238,6 +240,7 @@ namespace CodeWalker.GameFiles /// /// Reads a signed 64-bit value. /// + [SkipLocalsInit] public long ReadInt64() { Span _buffer = stackalloc byte[sizeof(long)]; @@ -256,6 +259,7 @@ namespace CodeWalker.GameFiles /// /// Reads an unsigned 16-bit value. /// + [SkipLocalsInit] public ushort ReadUInt16() { Span _buffer = stackalloc byte[sizeof(ushort)]; @@ -274,6 +278,7 @@ namespace CodeWalker.GameFiles /// /// Reads an unsigned 32-bit value. /// + [SkipLocalsInit] public uint ReadUInt32() { Span _buffer = stackalloc byte[sizeof(uint)]; @@ -292,6 +297,7 @@ namespace CodeWalker.GameFiles /// /// Reads an unsigned 64-bit value. /// + [SkipLocalsInit] public ulong ReadUInt64() { Span _buffer = stackalloc byte[sizeof(ulong)]; @@ -311,6 +317,7 @@ namespace CodeWalker.GameFiles /// /// Reads a single precision floating point value. /// + [SkipLocalsInit] public float ReadSingle() { Span _buffer = stackalloc byte[sizeof(float)]; @@ -329,6 +336,7 @@ namespace CodeWalker.GameFiles /// /// Reads a double precision floating point value. /// + [SkipLocalsInit] public double ReadDouble() { Span _buffer = stackalloc byte[sizeof(double)]; @@ -354,13 +362,13 @@ namespace CodeWalker.GameFiles { return string.Empty; } - var bytes = stackalloc byte[length]; + Span bytes = stackalloc byte[length]; for (int i = 0; i < length; i++) { bytes[i] = ReadByte(); } - return new string((sbyte*)bytes, 0, length, Encoding.ASCII); + return Encoding.UTF8.GetString(bytes); //return Encoding.UTF8.GetString(bytes, Math.Min(charsRead, maxLength)); } @@ -371,7 +379,6 @@ namespace CodeWalker.GameFiles unsafe public string ReadString(int maxLength = 1024) { Span bytes = stackalloc byte[Math.Min(maxLength, 1024)]; - Span chars = stackalloc char[Math.Min(maxLength, 1024)]; var temp = ReadByte(); var bytesRead = 0; var length = Length; @@ -385,13 +392,11 @@ namespace CodeWalker.GameFiles bytesRead++; } - var charsRead = Encoding.UTF8.GetChars(bytes.Slice(0, bytesRead), chars); - - return chars.Slice(0, charsRead).ToString(); + return Encoding.UTF8.GetString(bytes.Slice(0, bytesRead)); //return Encoding.UTF8.GetString(bytes, Math.Min(charsRead, maxLength)); } - + [SkipLocalsInit] public Vector3 ReadVector3() { Vector3 v = new Vector3(); @@ -400,6 +405,8 @@ namespace CodeWalker.GameFiles v.Z = ReadSingle(); return v; } + + [SkipLocalsInit] public Vector4 ReadVector4() { Vector4 v = new Vector4(); @@ -410,6 +417,7 @@ namespace CodeWalker.GameFiles return v; } + [SkipLocalsInit] public Matrix ReadMatrix() { Matrix m = new Matrix(); @@ -470,7 +478,7 @@ namespace CodeWalker.GameFiles public Endianess Endianess { get; - set; + init; } /// @@ -519,6 +527,8 @@ namespace CodeWalker.GameFiles this.Endianess = endianess; } + protected bool ShouldReverse(bool ignoreEndianness) => !ignoreEndianness && Endianess == Endianess.BigEndian; + /// /// Writes data to the underlying stream. This is the only method that directly accesses /// the data in the underlying stream. @@ -530,7 +540,7 @@ namespace CodeWalker.GameFiles { count = value.Length; } - if (!ignoreEndianess && (Endianess == Endianess.BigEndian)) + if (ShouldReverse(ignoreEndianess)) { var buffer = ArrayPool.Shared.Rent(count); try @@ -551,13 +561,26 @@ namespace CodeWalker.GameFiles SetPositionAfterWrite(stream); } - protected virtual void WriteToStream(Span value, bool ignoreEndianess = false) + protected virtual void WriteToStream(ReadOnlySpan value, bool ignoreEndianess = false) { + if (!ShouldReverse(ignoreEndianess)) + { + var stream = GetStream(); + stream.Write(value); + SetPositionAfterWrite(stream); + return; + } + byte[] sharedBuffer = ArrayPool.Shared.Rent(value.Length); try { value.CopyTo(sharedBuffer); - WriteToStream(sharedBuffer, count: value.Length); + Array.Reverse(sharedBuffer, 0, value.Length); + var stream = GetStream(); + + stream.Write(sharedBuffer.AsSpan()); + + SetPositionAfterWrite(stream); } finally { @@ -565,23 +588,31 @@ namespace CodeWalker.GameFiles } } - protected virtual void WriteToStream(Memory buffer, bool ignoreEndianess = false) + protected virtual async ValueTask WriteToStreamAsync(ReadOnlyMemory buffer, bool ignoreEndianess = false) { - if (MemoryMarshal.TryGetArray(buffer, out ArraySegment array)) + if (!ShouldReverse(ignoreEndianess)) { - WriteToStream(array.Array!, offset: array.Offset, count: array.Count); + var stream = GetStream(); + await stream.WriteAsync(buffer); + SetPositionAfterWrite(stream); return; } - byte[] sharedBuffer = ArrayPool.Shared.Rent(buffer.Length); + var arr = ArrayPool.Shared.Rent(buffer.Length); try { - buffer.Span.CopyTo(sharedBuffer); - WriteToStream(sharedBuffer, count: buffer.Length); + buffer.CopyTo(arr); + Array.Reverse(arr, 0, buffer.Length); + + var stream = GetStream(); + + await stream.WriteAsync(arr.AsMemory(0, buffer.Length)); + + SetPositionAfterWrite(stream); } finally { - ArrayPool.Shared.Return(sharedBuffer); + ArrayPool.Shared.Return(arr); } } @@ -601,14 +632,14 @@ namespace CodeWalker.GameFiles WriteToStream(value, true); } - public void Write(Span value) + public void Write(ReadOnlySpan value) { WriteToStream(value, true); } - public void Write(Memory value) + public ValueTask WriteAsync(Memory value) { - WriteToStream(value, true); + return WriteToStreamAsync(value, true); } /// diff --git a/CodeWalker.Core/GameFiles/Utils/GTACrypto.cs b/CodeWalker.Core/GameFiles/Utils/GTACrypto.cs index 7c2f38f..e62509d 100644 --- a/CodeWalker.Core/GameFiles/Utils/GTACrypto.cs +++ b/CodeWalker.Core/GameFiles/Utils/GTACrypto.cs @@ -23,6 +23,7 @@ //shamelessly stolen +using CommunityToolkit.HighPerformance.Helpers; using System; using System.Buffers; using System.Collections.Generic; @@ -31,9 +32,11 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; +using static System.Runtime.InteropServices.JavaScript.JSType; namespace CodeWalker.GameFiles { @@ -108,7 +111,9 @@ namespace CodeWalker.GameFiles { var encryptor = rijndael.CreateEncryptor(); for (var roundIndex = 0; roundIndex < rounds; roundIndex++) + { encryptor.TransformBlock(buffer, 0, length, buffer, 0); + } } return buffer; @@ -130,11 +135,11 @@ namespace CodeWalker.GameFiles { var key = GetNGKey(name, fileSize); length ??= data.Length; - DecryptNG(data.AsSpan(offset, length.Value), key); + DecryptNG(data.AsMemory(offset, length.Value), key); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void DecryptNG(Span data, string name, uint fileSize) + public static void DecryptNG(Memory data, string name, uint fileSize) { var key = GetNGKey(name, fileSize); DecryptNG(data, key); @@ -144,16 +149,36 @@ namespace CodeWalker.GameFiles public unsafe static void DecryptNG(byte[] data, uint[][] key, int offset = 0, int? length = null) { length ??= data.Length; - DecryptNG(data.AsSpan(offset, length.Value), key); + DecryptNG(data.AsMemory(offset, length.Value), key); + } + + public readonly struct DecryptNGBLock : IAction + { + private readonly Memory arr; + private readonly uint[][] key; + + public DecryptNGBLock(Memory array, uint[][] key) + { + this.arr = array; + this.key = key; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Invoke(int blockIndex) + { + DecryptNGBlock(arr.Slice(16 * blockIndex, 16).Span, key); + } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void DecryptNG(Span data, uint[][] key) + public static void DecryptNG(in Memory data, uint[][] key) { - for (int blockIndex = 0; blockIndex < data.Length / 16; blockIndex++) - { - DecryptNGBlock(data.Slice(16 * blockIndex, 16), key); - } + var action = new DecryptNGBLock(data, key); + ParallelHelper.For(new Range(0, data.Length / 16), in action, 25); + //for (int blockIndex = 0; blockIndex < data.Length / 16; blockIndex++) + //{ + // DecryptNGBlock(data.Slice(16 * blockIndex, 16), key); + //} } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -161,8 +186,21 @@ namespace CodeWalker.GameFiles { DecryptNGRoundA(data, key[0], GTA5Keys.PC_NG_DECRYPT_TABLES[0]); DecryptNGRoundA(data, key[1], GTA5Keys.PC_NG_DECRYPT_TABLES[1]); - for (int k = 2; k <= 15; k++) - DecryptNGRoundB(data, key[k], GTA5Keys.PC_NG_DECRYPT_TABLES[k]); + //for (int k = 2; k <= 15; k++) + DecryptNGRoundB(data, key[2], GTA5Keys.PC_NG_DECRYPT_TABLES[2]); + DecryptNGRoundB(data, key[3], GTA5Keys.PC_NG_DECRYPT_TABLES[3]); + DecryptNGRoundB(data, key[4], GTA5Keys.PC_NG_DECRYPT_TABLES[4]); + DecryptNGRoundB(data, key[5], GTA5Keys.PC_NG_DECRYPT_TABLES[5]); + DecryptNGRoundB(data, key[6], GTA5Keys.PC_NG_DECRYPT_TABLES[6]); + DecryptNGRoundB(data, key[7], GTA5Keys.PC_NG_DECRYPT_TABLES[7]); + DecryptNGRoundB(data, key[8], GTA5Keys.PC_NG_DECRYPT_TABLES[8]); + DecryptNGRoundB(data, key[9], GTA5Keys.PC_NG_DECRYPT_TABLES[9]); + DecryptNGRoundB(data, key[10], GTA5Keys.PC_NG_DECRYPT_TABLES[10]); + DecryptNGRoundB(data, key[11], GTA5Keys.PC_NG_DECRYPT_TABLES[11]); + DecryptNGRoundB(data, key[12], GTA5Keys.PC_NG_DECRYPT_TABLES[12]); + DecryptNGRoundB(data, key[13], GTA5Keys.PC_NG_DECRYPT_TABLES[13]); + DecryptNGRoundB(data, key[14], GTA5Keys.PC_NG_DECRYPT_TABLES[14]); + DecryptNGRoundB(data, key[15], GTA5Keys.PC_NG_DECRYPT_TABLES[15]); DecryptNGRoundA(data, key[16], GTA5Keys.PC_NG_DECRYPT_TABLES[16]); } @@ -194,16 +232,19 @@ namespace CodeWalker.GameFiles table[15][data[15]] ^ key[3]; - MemoryMarshal.Write(data.Slice(0, 4), ref x1); - MemoryMarshal.Write(data.Slice(4, 4), ref x2); - MemoryMarshal.Write(data.Slice(8, 4), ref x3); - MemoryMarshal.Write(data.Slice(12, 4), ref x4); + Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data[..8]), x1 | (ulong)x2 << 32); + Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(8, 8)), x3 | (ulong)x4 << 32); + + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data[..4]), x1); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(4, 4)), x2); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(8, 4)), x3); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(12, 4)), x4); } // round 3-15 [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void DecryptNGRoundB(Span data, uint[] key, uint[][] table) + public unsafe static void DecryptNGRoundB(Span data, Span key, uint[][] table) { var x1 = table[0][data[0]] ^ @@ -230,10 +271,13 @@ namespace CodeWalker.GameFiles table[12][data[12]] ^ key[3]; - MemoryMarshal.Write(data.Slice(0, 4), ref x1); - MemoryMarshal.Write(data.Slice(4, 4), ref x2); - MemoryMarshal.Write(data.Slice(8, 4), ref x3); - MemoryMarshal.Write(data.Slice(12, 4), ref x4); + Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data[..8]), x1 | (ulong)x2 << 32); + Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(8, 8)), x3 | (ulong)x4 << 32); + + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data[..4]), x1); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(4, 4)), x2); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(8, 4)), x3); + //Unsafe.WriteUnaligned(ref MemoryMarshal.GetReference(data.Slice(12, 4)), x4); } diff --git a/CodeWalker.Core/GameFiles/Utils/GTAKeys.cs b/CodeWalker.Core/GameFiles/Utils/GTAKeys.cs index a3b4128..44f4f43 100644 --- a/CodeWalker.Core/GameFiles/Utils/GTAKeys.cs +++ b/CodeWalker.Core/GameFiles/Utils/GTAKeys.cs @@ -196,8 +196,10 @@ namespace CodeWalker.GameFiles var exeStr = new MemoryStream(exeData); updateStatus?.Invoke("Searching for AES key..."); + Console.WriteLine("Searching for AES key..."); PC_AES_KEY = HashSearch.SearchHash(exeStr, GTA5KeyHashes.PC_AES_KEY_HASH, 0x20); + Console.WriteLine("Complete."); updateStatus?.Invoke("Complete."); } @@ -290,9 +292,9 @@ namespace CodeWalker.GameFiles private static void UseMagicData(string path, string key) { - if (string.IsNullOrEmpty(key)) { + Console.WriteLine($"Reading keys from {path}\\gta5.exe"); byte[] exedata = File.ReadAllBytes(path + "\\gta5.exe"); GenerateV2(exedata, null); } @@ -302,6 +304,11 @@ namespace CodeWalker.GameFiles } //GenerateMagicData(); + if (PC_AES_KEY is null) + { + Console.WriteLine($"PC_AES_KEY is null!"); + } + Random rnd = new Random((int)JenkHash.GenHash(PC_AES_KEY)); byte[] m = Resources.magic; @@ -782,7 +789,7 @@ namespace CodeWalker.GameFiles public static class HashSearch { private const long BLOCK_LENGTH = 1048576; - private const long ALIGN_LENGTH = 16; + private const long ALIGN_LENGTH = 8; public static byte[] SearchHash(Stream stream, byte[] hash, int length = 32) { @@ -794,10 +801,12 @@ namespace CodeWalker.GameFiles stream = Stream.Synchronized(stream); var result = new byte[hashes.Count][]; - Parallel.For(0, (stream.Length / BLOCK_LENGTH), (long k) => { + Parallel.For(0, (stream.Length / BLOCK_LENGTH), [SkipLocalsInit] (long k) => { var hashProvider = new SHA1CryptoServiceProvider(); // TODO: Convert to stack alloc when length appropriate (1024 or lower probs) - var buffer = new byte[length]; + Span buffer = length < 1024 ? stackalloc byte[length] : new byte[length]; + Span hash = length < 1024 ? stackalloc byte[length] : new byte[length]; + //var buffer = new byte[length]; for (long i = 0; i < (BLOCK_LENGTH / ALIGN_LENGTH); i++) { var position = k * BLOCK_LENGTH + i * ALIGN_LENGTH; @@ -806,15 +815,18 @@ namespace CodeWalker.GameFiles stream.Position = position; - stream.Read(buffer, 0, length); + stream.Read(buffer); - var hash = hashProvider.ComputeHash(buffer); + hashProvider.TryComputeHash(buffer, hash, out var bytesWritten); + //var hash = hashProvider.ComputeHash(buffer); for (int j = 0; j < hashes.Count; j++) - if (hash.SequenceEqual(hashes[j])) - result[j] = (byte[])buffer.Clone(); + { + if (hash.Slice(0, bytesWritten).SequenceEqual(hashes[j])) + { + result[j] = buffer.ToArray(); + } + } } - - }); return result; @@ -867,6 +879,7 @@ namespace CodeWalker.GameFiles { private const int TEST_ITERATIONS = 100000; + [SkipLocalsInit] public static bool[] Solve( uint[][] tables, int inByte0, int inByte1, int inByte2, int inByte3, @@ -1510,9 +1523,8 @@ namespace CodeWalker.GameFiles uint result = 0; - for (int index = 0; index < text.Length; index++) - { - var temp = 1025 * (LUT[text[index]] + result); + foreach(var c in text) { + var temp = 1025 * (LUT[c] + result); result = (temp >> 6) ^ temp; } diff --git a/CodeWalker.Core/GameFiles/Utils/Jenk.cs b/CodeWalker.Core/GameFiles/Utils/Jenk.cs index 0530f3b..5ee6633 100644 --- a/CodeWalker.Core/GameFiles/Utils/Jenk.cs +++ b/CodeWalker.Core/GameFiles/Utils/Jenk.cs @@ -1,13 +1,19 @@ -using System; +using CommunityToolkit.HighPerformance; +using CommunityToolkit.HighPerformance.Buffers; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using System.Text; using System.Threading; using System.Threading.Tasks; +using static System.Net.Mime.MediaTypeNames; namespace CodeWalker.GameFiles { @@ -29,10 +35,19 @@ namespace CodeWalker.GameFiles HashHex = "0x" + HashUint.ToString("X"); } + private const int minInclusive = 'A'; + private const int maxInclusive = 'Z' - minInclusive; [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static char ToLower(char c) + public static byte ToLower(char c) { - return (c >= 'A' && c <= 'Z') ? (char)(c - 'A' + 'a') : c; + return ToLower((byte)c); + //return (c >= 'A' && c <= 'Z') ? (byte)(c - 'A' + 'a') : (byte)c; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ToLower(byte c) + { + return ('A' <= c && c <= 'Z') ? (byte)(c | 0x20) : c; } public static uint GenHash(string text, JenkHashInputEncoding encoding) @@ -54,105 +69,126 @@ namespace CodeWalker.GameFiles for (uint i = 0; i < chars.Length; i++) { h += chars[i]; - h += (h << 10); - h ^= (h >> 6); + h += h << 10; + h ^= h >> 6; } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); + h += h << 3; + h ^= h >> 11; + h += h << 15; return h; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GenHashLowerInline(string text) + { + return GenHashLower(text.AsSpan()); + } + public static uint GenHashLower(string text) { - if (text == null) return 0; - uint h = 0; - for (int i = 0; i < text.Length; i++) - { - h += (byte)ToLower(text[i]); - h += (h << 10); - h ^= (h >> 6); - } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); - - return h; - } - - public static uint GenHashLower(ReadOnlySpan text, ReadOnlySpan str2 = default) - { - if (text == null) return 0; - uint h = 0; - for (int i = 0; i < text.Length; i++) - { - h += (byte)ToLower(text[i]); - h += (h << 10); - h ^= (h >> 6); - } - for (int i = 0; i < str2.Length; i++) - { - h += (byte)ToLower(str2[i]); - h += (h << 10); - h ^= (h >> 6); - } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); - - return h; + return GenHashLower(text.AsSpan()); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint GenHash(ReadOnlySpan text) { - if (text == null) return 0; uint h = 0; - for (int i = 0; i < text.Length; i++) + foreach(var c in text) { - h += (byte)text[i]; - h += (h << 10); - h ^= (h >> 6); + h += (byte)c; + h += h << 10; + h ^= h >> 6; } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); + h += h << 3; + h ^= h >> 11; + h += h << 15; return h; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GenHashInline(string text) + { + return GenHash(text.AsSpan()); + } + public static uint GenHash(string text) { - if (text == null) return 0; + return GenHash(text.AsSpan()); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GenHashLower(ReadOnlySpan data) + { + uint h = 0; + foreach(var b in data) + { + h += ToLower(b); + h += h << 10; + h ^= h >> 6; + } + h += h << 3; + h ^= h >> 11; + h += h << 15; + + return h; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GenHashLower(ReadOnlySpan text) + { + uint h = 0; + foreach(var c in text) + { + h += ToLower(c); + h += h << 10; + h ^= h >> 6; + } + h += h << 3; + h ^= h >> 11; + h += h << 15; + + return h; + } + + public static uint GenHashLower(ReadOnlySpan text, ReadOnlySpan str2) + { uint h = 0; for (int i = 0; i < text.Length; i++) { - h += (byte)text[i]; - h += (h << 10); - h ^= (h >> 6); + h += ToLower(text[i]); + h += h << 10; + h ^= h >> 6; } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); + for (int i = 0; i < str2.Length; i++) + { + h += ToLower(str2[i]); + h += h << 10; + h ^= h >> 6; + } + h += h << 3; + h ^= h >> 11; + h += h << 15; return h; } - public static uint GenHash(byte[] data) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GenHash(ReadOnlySpan data) { uint h = 0; - for (uint i = 0; i < data.Length; i++) + foreach(var c in data) { - h += data[i]; - h += (h << 10); - h ^= (h >> 6); + h += c; + h += h << 10; + h ^= h >> 6; } - h += (h << 3); - h ^= (h >> 11); - h += (h << 15); + h += h << 3; + h ^= h >> 11; + h += h << 15; return h; } - } public enum JenkHashInputEncoding @@ -256,68 +292,65 @@ namespace CodeWalker.GameFiles } } - - - public static class DictionaryExtension - { - public static bool TryAdd(this Dictionary dict, TKey key, TValue value) - { - if (dict.ContainsKey(key)) - { - return false; - } - - dict[key] = value; - return true; - } - } - - - public static class JenkIndex { //public static ConcurrentDictionary Index = new ConcurrentDictionary(Environment.ProcessorCount * 2, 2000000); - public static Dictionary Index = new Dictionary(2000000); + public static ConcurrentDictionary Index = new ConcurrentDictionary(Environment.ProcessorCount, 2097152); public static void Ensure(string str) { - uint hash = JenkHash.GenHash(str); - Ensure(str, hash); + uint hash = JenkHash.GenHashInline(str); + + addString(str, hash); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void addString(string str, uint hash) + { + //lock(Index) + //{ + Index.TryAdd(hash, str); + //} } public static void Ensure(string str, uint hash) { - if (hash == 0) return; - - if (Index.ContainsKey(hash)) - { + if (hash == 0) return; - } - lock(Index) - { - Index[hash] = str; - } + addString(str, hash); } - public static void Ensure(ReadOnlySpan str, uint hash) + public static void Ensure(ReadOnlySpan span, uint hash) { - if (hash == 0) return; + if (hash == 0) + return; if (Index.ContainsKey(hash)) { return; } - lock(Index) + var str = StringPool.Shared.GetOrAdd(span); + addString(str, hash); + } + + public static void Ensure(ReadOnlySpan str, uint hash) + { + if (hash == 0) + return; + + if (Index.ContainsKey(hash)) { - Index[hash] = str.ToString(); + return; } + + addString(Encoding.ASCII.GetString(str), hash); } public static void EnsureLower(string str) { - uint hash = JenkHash.GenHashLower(str); + uint hash = JenkHash.GenHashLowerInline(str); Ensure(str, hash); } @@ -329,8 +362,8 @@ namespace CodeWalker.GameFiles public static void EnsureBoth(string str) { - uint hash = JenkHash.GenHash(str); - uint hashLower = JenkHash.GenHashLower(str); + uint hash = JenkHash.GenHashInline(str); + uint hashLower = JenkHash.GenHashLowerInline(str); Ensure(str, hash); if (hash != hashLower) { @@ -338,14 +371,23 @@ namespace CodeWalker.GameFiles } } - public static void EnsureBoth(ReadOnlySpan str) + public static void EnsureBoth(ReadOnlySpan strSpan) { - uint hash = JenkHash.GenHash(str); - uint hashLower = JenkHash.GenHashLower(str); - Ensure(str, hash); + uint hash = JenkHash.GenHash(strSpan); + uint hashLower = JenkHash.GenHashLower(strSpan); + + var contains = Index.ContainsKey(hash); + var containsLower = Index.ContainsKey(hashLower); + if (contains && containsLower) + { + return; + } + + var str = StringPool.Shared.GetOrAdd(strSpan); + addString(str, hash); if (hash != hashLower) { - Ensure(str, hashLower); + addString(str, hashLower); } } @@ -368,6 +410,8 @@ namespace CodeWalker.GameFiles return res; } + public static bool TryGetString(uint hash, [MaybeNullWhen(false)] out string res) => Index.TryGetValue(hash, out res); + public static ICollection GetAllStrings() { var res = Index.Values; diff --git a/CodeWalker.Core/GlobalSuppressions.cs b/CodeWalker.Core/GlobalSuppressions.cs new file mode 100644 index 0000000..db5375e --- /dev/null +++ b/CodeWalker.Core/GlobalSuppressions.cs @@ -0,0 +1,8 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Style", "IDE0305:Simplify collection initialization", Justification = "", Scope = "member", Target = "~M:CodeWalker.GameFiles.YmapFile.EnsureEntities(CodeWalker.GameFiles.Meta)")] diff --git a/CodeWalker.Core/Properties/PublishProfiles/FolderProfile.pubxml b/CodeWalker.Core/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..0da6487 --- /dev/null +++ b/CodeWalker.Core/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,15 @@ + + + + + Release + Any CPU + ..\publish\ + FileSystem + <_TargetId>Folder + net8.0 + false + + \ No newline at end of file diff --git a/CodeWalker.Core/Tests/GameFileCache.cs b/CodeWalker.Core/Tests/GameFileCache.cs index 35e6ffb..de9d8b9 100644 --- a/CodeWalker.Core/Tests/GameFileCache.cs +++ b/CodeWalker.Core/Tests/GameFileCache.cs @@ -22,10 +22,10 @@ namespace CodeWalker.GameFiles if (entry.Name.EndsWith("cache_y.dat", StringComparison.OrdinalIgnoreCase))// || entry.NameLower.EndsWith("cache_y_bank.dat")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - var cdfile = RpfMan.GetFile(entry); - if (cdfile != null) + var cdfile = RpfManager.GetFile(entry); + if (cdfile is not null) { - var odata = entry.File.ExtractFile(entry as RpfFileEntry); + var odata = entry.File.ExtractFile((RpfFileEntry)entry); //var ndata = cdfile.Save(); var xml = CacheDatXml.GetXml(cdfile); @@ -67,7 +67,7 @@ namespace CodeWalker.GameFiles { UpdateStatus?.Invoke(string.Format(entry.Path)); HeightmapFile hmf = null; - hmf = RpfMan.GetFile(entry); + hmf = RpfManager.GetFile(entry); var d1 = hmf.RawFileData; //var d2 = hmf.Save(); var xml = HmapXml.GetXml(hmf); @@ -104,7 +104,7 @@ namespace CodeWalker.GameFiles { UpdateStatus?.Invoke(string.Format(entry.Path)); WatermapFile wmf = null; - wmf = RpfMan.GetFile(entry); + wmf = RpfManager.GetFile(entry); //var d1 = wmf.RawFileData; //var d2 = wmf.Save(); //var xml = WatermapXml.GetXml(wmf); @@ -144,8 +144,7 @@ namespace CodeWalker.GameFiles foreach (RpfEntry entry in rpf.AllEntries) { var rfe = entry as RpfFileEntry; - var rbfe = rfe as RpfBinaryFileEntry; - if ((rfe == null) || (rbfe == null)) continue; + if ((rfe == null) || (rfe is not RpfBinaryFileEntry rbfe)) continue; if (rfe.IsExtension(".rel")) { @@ -162,7 +161,7 @@ namespace CodeWalker.GameFiles { data = rel.Save(); - if (data != null) + if (data.Length > 0) { if (data.Length != rbfe.FileUncompressedSize) { } @@ -172,22 +171,15 @@ namespace CodeWalker.GameFiles { for (int i = 0; i < data.Length; i++) //raw file test if (data[i] != rel.RawFileData[i]) - { break; } + { + break; + } } RelFile rel2 = new RelFile(); rel2.Load(data, rfe);//roundtrip test - - if (rel2.IndexCount != rel.IndexCount) - { } - if (rel2.RelDatas == null) - { } - } - else - { } - } if (xmltest) @@ -210,7 +202,9 @@ namespace CodeWalker.GameFiles { for (int i = 0; i < data.Length; i++) //raw file test if (data[i] != rel.RawFileData[i]) - { break; } + { + break; + } } var relxml2 = RelXml.GetXml(rel4); //full insanity @@ -336,7 +330,7 @@ namespace CodeWalker.GameFiles uint s2 = (un / 80000); float f1 = s1 / 5000.0f; float f2 = s2 / 5000.0f; - sb.AppendFormat("{0}, {1}, 0, {2}\r\n", f1, f2, sn); + sb.AppendFormat("{0}, {1}, 0, {2}\r\n", f1, f2, sn.ToString()); } } @@ -386,7 +380,7 @@ namespace CodeWalker.GameFiles if (entry.IsExtension(".awc")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - var awcfile = RpfMan.GetFile(entry); + var awcfile = RpfManager.GetFile(entry); if (awcfile != null) { } } @@ -443,8 +437,7 @@ namespace CodeWalker.GameFiles if (n.EndsWith(".ymap", StringComparison.OrdinalIgnoreCase) || n.EndsWith(".ytyp", StringComparison.OrdinalIgnoreCase) || n.EndsWith(".ymt", StringComparison.OrdinalIgnoreCase)) { - var rfe = entry as RpfResourceFileEntry; - if (rfe == null) continue; + if (entry is not RpfResourceFileEntry rfe) continue; UpdateStatus?.Invoke(string.Format(entry.Path)); @@ -603,55 +596,52 @@ namespace CodeWalker.GameFiles var data = entry.File.ExtractFile(fentry); if (data != null) { - using (MemoryStream ms = new MemoryStream(data)) + if (RbfFile.IsRBF(data)) { - if (RbfFile.IsRBF(ms)) + UpdateStatus?.Invoke(string.Format(entry.Path)); + + var rbf = new RbfFile(); + _ = rbf.Load(data); + + allrbfs.Add(fentry.Path); + + var xml = RbfXml.GetXml(rbf); + if (!string.IsNullOrEmpty(xml)) + { } + + var xdoc = new XmlDocument(); + xdoc.LoadXml(xml); + var rbf2 = XmlRbf.GetRbf(xdoc); + var rbf2b = rbf2.Save(); + + var rbf3 = new RbfFile(); + rbf3.Load(rbf2b); + var xml3 = RbfXml.GetXml(rbf3); + + if (xml.Length != xml3.Length) + { } + if (xml != xml3) { - UpdateStatus?.Invoke(string.Format(entry.Path)); + diffrbfs.Add(fentry.Path); + } - var rbf = new RbfFile(); - rbf.Load(ms); - - allrbfs.Add(fentry.Path); - - var xml = RbfXml.GetXml(rbf); - if (!string.IsNullOrEmpty(xml)) - { } - - var xdoc = new XmlDocument(); - xdoc.LoadXml(xml); - var rbf2 = XmlRbf.GetRbf(xdoc); - var rbf2b = rbf2.Save(); - - var rbf3 = new RbfFile(); - rbf3.Load(rbf2b); - var xml3 = RbfXml.GetXml(rbf3); - - if (xml.Length != xml3.Length) - { } - if (xml != xml3) + if (data.Length != rbf2b.Length) + { + //File.WriteAllBytes("C:\\GitHub\\CodeWalkerResearch\\RBF\\" + fentry.Name + ".dat0", data); + //File.WriteAllBytes("C:\\GitHub\\CodeWalkerResearch\\RBF\\" + fentry.Name + ".dat1", rbf2b); + } + else + { + for (int i = 0; i < data.Length; i++) { - diffrbfs.Add(fentry.Path); - } - - if (data.Length != rbf2b.Length) - { - //File.WriteAllBytes("C:\\GitHub\\CodeWalkerResearch\\RBF\\" + fentry.Name + ".dat0", data); - //File.WriteAllBytes("C:\\GitHub\\CodeWalkerResearch\\RBF\\" + fentry.Name + ".dat1", rbf2b); - } - else - { - for (int i = 0; i < data.Length; i++) + if (data[i] != rbf2b[i]) { - if (data[i] != rbf2b[i]) - { - diffrbfs.Add(fentry.Path); - break; - } + diffrbfs.Add(fentry.Path); + break; } } - } + } } @@ -677,8 +667,7 @@ namespace CodeWalker.GameFiles try #endif { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; if (rfe.IsExtension(".cut")) { @@ -720,8 +709,7 @@ namespace CodeWalker.GameFiles try #endif { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; if (rfe.IsExtension(".yld")) { @@ -760,8 +748,7 @@ namespace CodeWalker.GameFiles try #endif { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; if (rfe.IsExtension(".yed")) { @@ -810,7 +797,7 @@ namespace CodeWalker.GameFiles if (entry.IsExtension(".ycd")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - YcdFile ycd1 = RpfMan.GetFile(entry); + YcdFile ycd1 = RpfManager.GetFile(entry); if (ycd1 == null) { errorentries.Add(entry); @@ -1084,7 +1071,7 @@ namespace CodeWalker.GameFiles YtdFile ytdfile = null; try { - ytdfile = RpfMan.GetFile(entry); + ytdfile = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1110,8 +1097,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ytdfile != null) && (ytdfile.TextureDict != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = ytdfile.Save(); @@ -1181,7 +1167,7 @@ namespace CodeWalker.GameFiles YbnFile ybn = null; try { - ybn = RpfMan.GetFile(entry); + ybn = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1198,8 +1184,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ybn != null) && (ybn.Bounds != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = ybn.Save(); @@ -1225,32 +1210,28 @@ namespace CodeWalker.GameFiles case BoundsType.Sphere: { var a = ybn.Bounds as BoundSphere; - var b = ybn2.Bounds as BoundSphere; - if (b == null) + if (ybn2.Bounds is not BoundSphere b) { continue; } break; } case BoundsType.Capsule: { var a = ybn.Bounds as BoundCapsule; - var b = ybn2.Bounds as BoundCapsule; - if (b == null) + if (ybn2.Bounds is not BoundCapsule b) { continue; } break; } case BoundsType.Box: { var a = ybn.Bounds as BoundBox; - var b = ybn2.Bounds as BoundBox; - if (b == null) + if (ybn2.Bounds is not BoundBox b) { continue; } break; } case BoundsType.Geometry: { var a = ybn.Bounds as BoundGeometry; - var b = ybn2.Bounds as BoundGeometry; - if (b == null) + if (ybn2.Bounds is not BoundGeometry b) { continue; } if (a.Polygons?.Length != b.Polygons?.Length) { continue; } @@ -1266,8 +1247,7 @@ namespace CodeWalker.GameFiles case BoundsType.GeometryBVH: { var a = ybn.Bounds as BoundBVH; - var b = ybn2.Bounds as BoundBVH; - if (b == null) + if (ybn2.Bounds is not BoundBVH b) { continue; } if (a.BVH?.Nodes?.data_items?.Length != b.BVH?.Nodes?.data_items?.Length) { } @@ -1285,8 +1265,7 @@ namespace CodeWalker.GameFiles case BoundsType.Composite: { var a = ybn.Bounds as BoundComposite; - var b = ybn2.Bounds as BoundComposite; - if (b == null) + if (ybn2.Bounds is not BoundComposite b) { continue; } if (a.Children?.data_items?.Length != b.Children?.data_items?.Length) { } @@ -1295,24 +1274,21 @@ namespace CodeWalker.GameFiles case BoundsType.Disc: { var a = ybn.Bounds as BoundDisc; - var b = ybn2.Bounds as BoundDisc; - if (b == null) + if (ybn2.Bounds is not BoundDisc b) { continue; } break; } case BoundsType.Cylinder: { var a = ybn.Bounds as BoundCylinder; - var b = ybn2.Bounds as BoundCylinder; - if (b == null) + if (ybn2.Bounds is not BoundCylinder b) { continue; } break; } case BoundsType.Cloth: { var a = ybn.Bounds as BoundCloth; - var b = ybn2.Bounds as BoundCloth; - if (b == null) + if (ybn2.Bounds is not BoundCloth b) { continue; } break; } @@ -1353,7 +1329,7 @@ namespace CodeWalker.GameFiles YdrFile ydr = null; try { - ydr = RpfMan.GetFile(entry); + ydr = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1362,8 +1338,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ydr != null) && (ydr.Drawable != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen if (boundsonly && (ydr.Drawable.Bound == null)) @@ -1412,7 +1387,7 @@ namespace CodeWalker.GameFiles YddFile ydd = null; try { - ydd = RpfMan.GetFile(entry); + ydd = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1421,8 +1396,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ydd != null) && (ydd.DrawableDict != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = ydd.Save(); @@ -1481,7 +1455,7 @@ namespace CodeWalker.GameFiles YftFile yft = null; try { - yft = RpfMan.GetFile(entry); + yft = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1490,8 +1464,7 @@ namespace CodeWalker.GameFiles } if (savetest && (yft != null) && (yft.Fragment != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = yft.Save(); @@ -1558,7 +1531,7 @@ namespace CodeWalker.GameFiles YptFile ypt = null; try { - ypt = RpfMan.GetFile(entry); + ypt = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1567,8 +1540,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ypt != null) && (ypt.PtfxList != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = ypt.Save(); @@ -1616,7 +1588,7 @@ namespace CodeWalker.GameFiles YnvFile ynv = null; try { - ynv = RpfMan.GetFile(entry); + ynv = RpfManager.GetFile(entry); } catch (Exception ex) { @@ -1646,8 +1618,7 @@ namespace CodeWalker.GameFiles } if (savetest && (ynv != null) && (ynv.Nav != null)) { - var fentry = entry as RpfFileEntry; - if (fentry == null) + if (entry is not RpfFileEntry fentry) { continue; } //shouldn't happen var bytes = ynv.Save(); @@ -1688,8 +1659,7 @@ namespace CodeWalker.GameFiles try #endif { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; if (rfe.IsExtension(".yvr")) { @@ -1785,7 +1755,7 @@ namespace CodeWalker.GameFiles if (entry.IsExtension(".ymap")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - YmapFile ymapfile = RpfMan.GetFile(entry); + YmapFile ymapfile = RpfManager.GetFile(entry); if ((ymapfile != null))// && (ymapfile.Meta != null)) { } } @@ -1805,15 +1775,14 @@ namespace CodeWalker.GameFiles { foreach (RpfEntry entry in file.AllEntries) { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; try { if (rfe.IsExtension(".ypdb")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - YpdbFile ypdb = RpfMan.GetFile(entry); + YpdbFile ypdb = RpfManager.GetFile(entry); if (ypdb != null) { var odata = entry.File.ExtractFile(entry as RpfFileEntry); @@ -1854,15 +1823,14 @@ namespace CodeWalker.GameFiles { foreach (RpfEntry entry in file.AllEntries) { - var rfe = entry as RpfFileEntry; - if (rfe == null) continue; + if (entry is not RpfFileEntry rfe) continue; try { if (rfe.IsExtension(".yfd")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - YfdFile yfd = RpfMan.GetFile(entry); + YfdFile yfd = RpfManager.GetFile(entry); if (yfd != null) { if (yfd.FrameFilterDictionary != null) @@ -1909,7 +1877,7 @@ namespace CodeWalker.GameFiles if (entry.IsExtension(".mrf")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - MrfFile mrffile = RpfMan.GetFile(entry); + MrfFile mrffile = RpfManager.GetFile(entry); if (mrffile != null) { var odata = entry.File.ExtractFile(entry as RpfFileEntry); @@ -2079,10 +2047,10 @@ namespace CodeWalker.GameFiles if (entry.IsExtension(".fxc")) { UpdateStatus?.Invoke(string.Format(entry.Path)); - var fxcfile = RpfMan.GetFile(entry); - if (fxcfile != null) + var fxcfile = RpfManager.GetFile(entry); + if (fxcfile is not null) { - var odata = entry.File.ExtractFile(entry as RpfFileEntry); + var odata = entry.File.ExtractFile((RpfFileEntry)entry); var ndata = fxcfile.Save(); if (ndata.Length == odata.Length) { @@ -2294,7 +2262,7 @@ namespace CodeWalker.GameFiles if (doydr && entry.IsExtension(".ydr")) { UpdateStatus?.Invoke(entry.Path); - YdrFile ydr = RpfMan.GetFile(entry); + YdrFile ydr = RpfManager.GetFile(entry); if (ydr == null) { @@ -2323,7 +2291,7 @@ namespace CodeWalker.GameFiles else if (doydd & entry.IsExtension(".ydd")) { UpdateStatus?.Invoke(entry.Path); - YddFile ydd = RpfMan.GetFile(entry); + YddFile ydd = RpfManager.GetFile(entry); if (ydd == null) { @@ -2355,7 +2323,7 @@ namespace CodeWalker.GameFiles else if (doyft && entry.IsExtension(".yft")) { UpdateStatus?.Invoke(entry.Path); - YftFile yft = RpfMan.GetFile(entry); + YftFile yft = RpfManager.GetFile(entry); if (yft == null) { diff --git a/CodeWalker.Core/Utils/BoundingBoxes.cs b/CodeWalker.Core/Utils/BoundingBoxes.cs index d602c8f..60cd4ae 100644 --- a/CodeWalker.Core/Utils/BoundingBoxes.cs +++ b/CodeWalker.Core/Utils/BoundingBoxes.cs @@ -5,7 +5,7 @@ namespace CodeWalker.Core.Utils { public static class BoundingBoxExtensions { - public static Vector3 Size(this BoundingBox bounds) + public static Vector3 Size(in this BoundingBox bounds) { return new Vector3( Math.Abs(bounds.Maximum.X - bounds.Minimum.X), @@ -13,25 +13,25 @@ namespace CodeWalker.Core.Utils Math.Abs(bounds.Maximum.Z - bounds.Minimum.Z)); } - public static Vector3 Center(this BoundingBox bounds) + public static Vector3 Center(in this BoundingBox bounds) { return (bounds.Minimum + bounds.Maximum) * 0.5F; } - public static BoundingBox Encapsulate(this BoundingBox box, BoundingBox bounds) + public static BoundingBox Encapsulate(ref this BoundingBox box, ref BoundingBox bounds) { - box.Minimum = Vector3.Min(box.Minimum, bounds.Minimum); - box.Maximum = Vector3.Max(box.Maximum, bounds.Maximum); + Vector3.Min(ref box.Minimum, ref bounds.Minimum, out box.Minimum); + Vector3.Max(ref box.Maximum, ref bounds.Maximum, out box.Maximum); return box; } - public static float Radius(this BoundingBox box) + public static float Radius(in this BoundingBox box) { var extents = (box.Maximum - box.Minimum) * 0.5F; return extents.Length(); } - public static BoundingBox Expand(this BoundingBox b, float amount) + public static BoundingBox Expand(in this BoundingBox b, float amount) { return new BoundingBox(b.Minimum - Vector3.One * amount, b.Maximum + Vector3.One * amount); } diff --git a/CodeWalker.Core/Utils/Cache.cs b/CodeWalker.Core/Utils/Cache.cs index 7329c7c..0a16bb8 100644 --- a/CodeWalker.Core/Utils/Cache.cs +++ b/CodeWalker.Core/Utils/Cache.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace CodeWalker { - public class Cache where TVal : Cacheable + public class Cache where TVal : Cacheable where TKey : notnull { public long MaxMemoryUsage = 536870912; //512mb public long CurrentMemoryUsage = 0; @@ -21,13 +21,7 @@ namespace CodeWalker private object loadedListLock = new object(); private ConcurrentDictionary> loadedListDict = new ConcurrentDictionary>(); - public int Count - { - get - { - return loadedList.Count; - } - } + public int Count => loadedList.Count; public Cache() { @@ -40,11 +34,16 @@ namespace CodeWalker public void BeginFrame() { + var now = DateTime.Now; + if (now - CurrentTime < TimeSpan.FromSeconds(0.05)) + { + return; + } CurrentTime = DateTime.Now; Compact(); } - public TVal TryGet(TKey key) + public TVal? TryGet(in TKey key) { lock (loadedListLock) { @@ -55,7 +54,7 @@ namespace CodeWalker lln.Value.LastUseTime = CurrentTime; } - return (lln != null) ? lln.Value : null; + return lln?.Value; } } public bool TryAdd(TKey key, TVal item) @@ -80,9 +79,9 @@ namespace CodeWalker var oldlln = loadedList.First; var cachetime = LoadingCacheTime; int iter = 0, maxiter = 2; - while (!CanAdd() && (iter cachetime)) + while (!CanAdd() && oldlln is not null && (CurrentTime - oldlln.Value.LastUseTime).TotalSeconds > cachetime) { Interlocked.Add(ref CurrentMemoryUsage, -oldlln.Value.MemoryUsage); lock (loadedListLock) @@ -92,8 +91,11 @@ namespace CodeWalker loadedListDict.TryRemove(oldlln.Value.Key, out _); - oldlln.Value = null; - oldlln = null; + if (oldlln.Value is IDisposable disposable) + { + disposable.Dispose(); + } + //GC.Collect(); oldlln = loadedList.First; } @@ -119,10 +121,7 @@ namespace CodeWalker return false; } - public bool CanAdd() - { - return Interlocked.Read(ref CurrentMemoryUsage) < MaxMemoryUsage; - } + public bool CanAdd() => CurrentMemoryUsage < MaxMemoryUsage; public void Clear() @@ -135,7 +134,7 @@ namespace CodeWalker Interlocked.Exchange(ref CurrentMemoryUsage, 0); } - public void Remove(TKey key) + public void Remove(in TKey key) { if (!loadedListDict.ContainsKey(key)) { @@ -148,6 +147,10 @@ namespace CodeWalker { loadedList.Remove(n); } + if (n is IDisposable disposable) + { + disposable.Dispose(); + } Interlocked.Add(ref CurrentMemoryUsage, -n.Value.MemoryUsage); } } @@ -158,15 +161,19 @@ namespace CodeWalker lock(loadedListLock) { var oldlln = loadedList.First; - while (oldlln != null) + while (oldlln is not null) { - if ((CurrentTime - oldlln.Value.LastUseTime).TotalSeconds < CacheTime) break; + if ((CurrentTime - oldlln.Value.LastUseTime).TotalSeconds < CacheTime) + break; var nextln = oldlln.Next; Interlocked.Add(ref CurrentMemoryUsage, -oldlln.Value.MemoryUsage); - loadedListDict.TryRemove(oldlln.Value.Key, out _); + loadedListDict.TryRemove(oldlln.Value.Key, out var n); + if (n is IDisposable disposable) + { + disposable.Dispose(); + } loadedList.Remove(oldlln); //gc should free up memory later.. - oldlln.Value = null; oldlln = nextln; } } @@ -175,7 +182,7 @@ namespace CodeWalker } - public abstract class Cacheable + public abstract class Cacheable where TKey : notnull { public TKey Key; public DateTime LastUseTime; diff --git a/CodeWalker.Core/Utils/ETWEvents.cs b/CodeWalker.Core/Utils/ETWEvents.cs index 5181f8a..2a9e9fd 100644 --- a/CodeWalker.Core/Utils/ETWEvents.cs +++ b/CodeWalker.Core/Utils/ETWEvents.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace CodeWalker.Core.Utils; -[EventSource(Name = "CodeWalker-Diagnostics")] +[EventSource(Name = "CodeWalker-Diagnostics", Guid = "911cf260-f98c-5a05-7f16-f11db360be50")] public class ETWEvents : EventSource { public static class Keywords @@ -25,7 +25,7 @@ public class ETWEvents : EventSource } - public ETWEvents(bool throwOnEventWriteErrors) : base(throwOnEventWriteErrors) + private ETWEvents(bool throwOnEventWriteErrors) : base(throwOnEventWriteErrors) { } [Event(1, Message = "Starting up.", Keywords = Keywords.Performance, Level = EventLevel.Informational)] @@ -33,11 +33,32 @@ public class ETWEvents : EventSource WriteEvent(1); } - [Event(2, Message = "Creating form {0}", Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] - public void CreatingForm(string form) { WriteEvent(2, form); } + [Event(2, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void CreatingFormStart(string form) { WriteEvent(2, form); } + [Event(3, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void CreatingFormStop() { WriteEvent(3); } + + [Event(4, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void LoadingForm(string form) { WriteEvent(4, form); } + + [Event(5, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void RefreshingMainTreeViewStart(string path) { WriteEvent(5, path); } + [Event(6, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void RefreshingMainTreeViewStop() { WriteEvent(6); } + + [Event(7, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void RefreshMainTreeViewStart() { WriteEvent(7); } + [Event(8, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void RefreshMainTreeViewStop() { WriteEvent(8); } + + [Event(9, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void InitFileCacheStart() { + WriteEvent(9); + } + [Event(10, Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] + public void InitFileCacheStop() { WriteEvent(10); } + - [Event(3, Message = "Loading form {0}", Keywords = Keywords.Performance | Keywords.StateChanges, Level = EventLevel.Verbose)] - public void LoadingForm(string form) { WriteEvent(3, form); } public static readonly ETWEvents Log = new ETWEvents(true); } diff --git a/CodeWalker.Core/Utils/Fbx.cs b/CodeWalker.Core/Utils/Fbx.cs index 75bacb4..7cab301 100644 --- a/CodeWalker.Core/Utils/Fbx.cs +++ b/CodeWalker.Core/Utils/Fbx.cs @@ -239,8 +239,7 @@ namespace CodeWalker public override bool Equals(object obj) { - var id = obj as Identifier; - if (id != null) + if (obj is Identifier id) return String == id.String; return false; } @@ -383,8 +382,7 @@ namespace CodeWalker { ret = ReadTokenSingle(); } while (ret == null); - var id = ret as Identifier; - if (id != null) + if (ret is Identifier id) { object colon; do @@ -553,8 +551,7 @@ namespace CodeWalker public FbxNode ReadNode() { var first = ReadToken(); - var id = first as Identifier; - if (id == null) + if (first is not Identifier id) { if (first is EndOfStream) return null; @@ -1311,7 +1308,7 @@ namespace CodeWalker private delegate void PropertyWriter(BinaryWriter sw, object obj); - struct WriterInfo + readonly struct WriterInfo { public readonly char id; public readonly PropertyWriter writer; diff --git a/CodeWalker.Core/Utils/FbxConverter.cs b/CodeWalker.Core/Utils/FbxConverter.cs index d62fb67..8e40a91 100644 --- a/CodeWalker.Core/Utils/FbxConverter.cs +++ b/CodeWalker.Core/Utils/FbxConverter.cs @@ -110,7 +110,7 @@ namespace CodeWalker var vc = g.VertexData.VertexCount; for (int i = 0; i < vc; i++) { - var vp = MetaTypes.ConvertData(vb, i * vs);//position offset should always be 0! + MetaTypes.TryConvertData(vb, i * vs, out var vp); allVerts.Add(vp); bbMin = Vector3.Min(bbMin, vp); bbMax = Vector3.Max(bbMax, vp); @@ -228,7 +228,6 @@ namespace CodeWalker private FbxModel TryConvertModel(FbxNode mnode) { - FbxNode geonode = null; var matnodes = new List(); foreach (var cnode in mnode.Connections) @@ -250,10 +249,8 @@ namespace CodeWalker return null; //need atleast one material... var fnEdges = geonode["Edges"]?.Value as int[];//do we need this? maybe for collision/navmesh - var fnVerts = geonode["Vertices"]?.Value as double[]; - var fnIndices = geonode["PolygonVertexIndex"]?.Value as int[]; - if ((fnVerts == null) || (fnIndices == null)) + if ((geonode["Vertices"]?.Value is not double[] fnVerts) || (geonode["PolygonVertexIndex"]?.Value is not int[] fnIndices)) { return null; } //no mesh data.. abort! var fnNormals = new List(); @@ -476,12 +473,18 @@ namespace CodeWalker if (dGeomAABBs.Count > 1)//need to include whole model AABB first, if more than one geometry.. { var dGeomAABBs2 = new List(); - dModelAABB.Min = new Vector4(float.MaxValue); - dModelAABB.Max = new Vector4(float.MinValue); + dModelAABB = new AABB_s + { + Min = new Vector4(float.MaxValue), + Max = new Vector4(float.MinValue), + }; foreach (var aabb in dGeomAABBs) { - dModelAABB.Min = Vector4.Min(dModelAABB.Min, aabb.Min); - dModelAABB.Max = Vector4.Max(dModelAABB.Max, aabb.Max); + dModelAABB = new AABB_s + { + Min = Vector4.Min(dModelAABB.Min, aabb.Min), + Max = Vector4.Max(dModelAABB.Max, aabb.Max) + }; } dGeomAABBs2.Add(dModelAABB); dGeomAABBs2.AddRange(dGeomAABBs); @@ -577,13 +580,20 @@ namespace CodeWalker if (vList.Count > 0) { - aabb.Min = new Vector4(float.MaxValue); - aabb.Max = new Vector4(float.MinValue); + aabb = new AABB_s + { + Min = new Vector4(float.MaxValue), + Max = new Vector4(float.MinValue), + }; foreach (var vert in vList) { var v = new Vector4(vert.Position, vert.Position.X); - aabb.Min = Vector4.Min(aabb.Min, v); - aabb.Max = Vector4.Max(aabb.Max, v); + + aabb = new AABB_s + { + Min = Vector4.Min(aabb.Min, v), + Max = Vector4.Max(aabb.Max, v) + }; } } @@ -664,15 +674,9 @@ namespace CodeWalker { texConns.Add(conn); var texName = GetStringFromObjectList(conn.Properties, 1)?.Replace("Texture::", ""); - var ftexName = conn["FileName"]?.Value as string; - if (ftexName != null) + if (conn["FileName"]?.Value is string ftexName) { - try - { - texName = Path.GetFileNameWithoutExtension(ftexName); - } - catch - { } + texName = Path.GetFileNameWithoutExtension(ftexName); } texNames.Add(texName); } @@ -959,7 +963,7 @@ namespace CodeWalker } private void WriteBytes(T val, int offset) where T : struct { - var data = MetaTypes.ConvertToBytes(val); + var data = MetaTypes.ConvertToBytes(in val); for (int i = 0; i < data.Length; i++) { Bytes[offset + i] = data[i]; diff --git a/CodeWalker.Core/Utils/FileUtils.cs b/CodeWalker.Core/Utils/FileUtils.cs new file mode 100644 index 0000000..015c39f --- /dev/null +++ b/CodeWalker.Core/Utils/FileUtils.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Core.Utils +{ + public static class FileUtils + { + public static bool TryFindFolder(string dirToFind, out string folder) + { + return TryFindFolder(dirToFind, null, out folder); + } + + public static bool TryFindFolder(string dirToFind, string? basePath, [NotNullWhen(true)]out string folder) + { + basePath ??= Assembly.GetExecutingAssembly().Location; + // Search up directory tree starting at assembly path looking for 'Images' dir. + var searchPath = Path.GetDirectoryName(basePath); + + ArgumentNullException.ThrowIfNullOrEmpty(basePath, nameof(basePath)); + while (true) + { + var testPath = Path.Combine(searchPath, dirToFind); + if (Directory.Exists(testPath)) + { + // Found it! + folder = testPath; + return true; + } + + // Move up one directory. + var newSearchPath = Path.GetFullPath(Path.Combine(searchPath, "..")); + if (newSearchPath == searchPath) + { + // Didn't move up, so we're at the root. + folder = null; + return false; + } + searchPath = newSearchPath; + } + } + } +} diff --git a/CodeWalker.Core/Utils/Matrices.cs b/CodeWalker.Core/Utils/Matrices.cs index 15441c8..99201f8 100644 --- a/CodeWalker.Core/Utils/Matrices.cs +++ b/CodeWalker.Core/Utils/Matrices.cs @@ -5,12 +5,14 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using MatrixSystem = System.Numerics.Matrix4x4; + namespace CodeWalker { public static class MatrixExtensions { - public static Vector3 MultiplyW(this Matrix m, Vector3 v) + public static Vector3 MultiplyW(in this Matrix m, Vector3 v) { float x = (((m.M11 * v.X) + (m.M21 * v.Y)) + (m.M31 * v.Z)) + m.M41; float y = (((m.M12 * v.X) + (m.M22 * v.Y)) + (m.M32 * v.Z)) + m.M42; @@ -19,7 +21,18 @@ namespace CodeWalker float iw = 1.0f / Math.Abs(w); return new Vector3(x * iw, y * iw, z * iw); } - public static Vector3 Multiply(this Matrix m, Vector3 v) + + public static Vector3 MultiplyW(in this Matrix m, in Vector3 v) + { + float x = (((m.M11 * v.X) + (m.M21 * v.Y)) + (m.M31 * v.Z)) + m.M41; + float y = (((m.M12 * v.X) + (m.M22 * v.Y)) + (m.M32 * v.Z)) + m.M42; + float z = (((m.M13 * v.X) + (m.M23 * v.Y)) + (m.M33 * v.Z)) + m.M43; + float w = (((m.M14 * v.X) + (m.M24 * v.Y)) + (m.M34 * v.Z)) + m.M44; + float iw = 1.0f / Math.Abs(w); + return new Vector3(x * iw, y * iw, z * iw); + } + + public static Vector3 Multiply(in this Matrix m, Vector3 v) { float x = (((m.M11 * v.X) + (m.M21 * v.Y)) + (m.M31 * v.Z)) + m.M41; float y = (((m.M12 * v.X) + (m.M22 * v.Y)) + (m.M32 * v.Z)) + m.M42; @@ -27,7 +40,7 @@ namespace CodeWalker return new Vector3(x, y, z); //this quick mul ignores W... } - public static Vector3 MultiplyRot(this Matrix m, Vector3 v) + public static Vector3 MultiplyRot(in this Matrix m, Vector3 v) { float x = (((m.M11 * v.X) + (m.M21 * v.Y)) + (m.M31 * v.Z));// + m.M41; float y = (((m.M12 * v.X) + (m.M22 * v.Y)) + (m.M32 * v.Z));// + m.M42; @@ -36,7 +49,7 @@ namespace CodeWalker //this quick mul ignores W and translation... } - public static Vector4 Multiply(this Matrix m, Vector4 v) + public static Vector4 Multiply(in this Matrix m, Vector4 v) { float x = (((m.M11 * v.X) + (m.M21 * v.Y)) + (m.M31 * v.Z)) + m.M41; float y = (((m.M12 * v.X) + (m.M22 * v.Y)) + (m.M32 * v.Z)) + m.M42; @@ -45,11 +58,12 @@ namespace CodeWalker return new Vector4(x, y, z, w); } - public static Quaternion ToQuaternion(this Matrix m) + public static Quaternion ToQuaternion(in this Matrix m) { var rmat = m; rmat.TranslationVector = Vector3.Zero; - return Quaternion.RotationMatrix(rmat); + Quaternion.RotationMatrix(ref rmat, out var result); + return result; } } diff --git a/CodeWalker.Core/Utils/Quaternions.cs b/CodeWalker.Core/Utils/Quaternions.cs index 3d99dc7..0021834 100644 --- a/CodeWalker.Core/Utils/Quaternions.cs +++ b/CodeWalker.Core/Utils/Quaternions.cs @@ -12,7 +12,7 @@ namespace CodeWalker public static class QuaternionExtension { - public static Vector3 Multiply(this Quaternion a, Vector3 b) + public static Vector3 Multiply(in this Quaternion a, in Vector3 b) { float axx = a.X * 2.0f; float ayy = a.Y * 2.0f; @@ -31,7 +31,7 @@ namespace CodeWalker ((b.X * (axzz - awyy)) + (b.Y * (ayzz + awxx))) + (b.Z * ((1.0f - axxx) - ayyy))); } - public static Matrix ToMatrix(this Quaternion q) + public static Matrix ToMatrix(in this Quaternion q) { float xx = q.X * q.X; float yy = q.Y * q.Y; @@ -62,12 +62,12 @@ namespace CodeWalker return result; } - public static Vector4 ToVector4(this Quaternion q) + public static Vector4 ToVector4(in this Quaternion q) { return new Vector4(q.X, q.Y, q.Z, q.W); } - public static Quaternion FastLerp(Quaternion a, Quaternion b, float v) + public static Quaternion FastLerp(in Quaternion a, in Quaternion b, float v) { var r = new Quaternion(); var vi = 1.0f - v; diff --git a/CodeWalker.Core/Utils/SharedObjectPool.cs b/CodeWalker.Core/Utils/SharedObjectPool.cs new file mode 100644 index 0000000..f3f8b74 --- /dev/null +++ b/CodeWalker.Core/Utils/SharedObjectPool.cs @@ -0,0 +1,59 @@ +using Collections.Pooled; +using CommunityToolkit.HighPerformance.Buffers; +using Microsoft.Extensions.ObjectPool; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Core.Utils +{ + public class SharedObjectPool where T : class, new() + { + private static readonly ObjectPool s_shared = ObjectPool.Create(); + + public static ObjectPool Shared => s_shared; + } + + public class PooledListObjectPolicy : PooledObjectPolicy> + { + public PooledList Get() + { + return new PooledList(); + } + + public override PooledList Create() + { + return new PooledList(); + } + + public override bool Return(PooledList list) + { + foreach (var entry in list.Span) + { + if (entry is IDisposable disposable) + disposable.Dispose(); + if (entry is IResettable resettable) + resettable.TryReset(); + } + + list.Clear(); + return true; + } + } + + public static class StringPoolExtension + { + [SkipLocalsInit] + public static string GetStringPooled(this Encoding encoding, ReadOnlySpan bytes) + { + Span buffer = stackalloc char[bytes.Length]; + + var charsWritten = encoding.GetChars(bytes, buffer); + + return StringPool.Shared.GetOrAdd(buffer.Slice(0, charsWritten)); + } + } +} diff --git a/CodeWalker.Core/Utils/SplitEnumerator.cs b/CodeWalker.Core/Utils/SplitEnumerator.cs index 7571320..660a622 100644 --- a/CodeWalker.Core/Utils/SplitEnumerator.cs +++ b/CodeWalker.Core/Utils/SplitEnumerator.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,14 +13,15 @@ namespace CodeWalker.Core.Utils /// /// To get an instance of this type, use . /// - public ref struct SpanSplitEnumerator + public ref struct SpanSplitEnumerator where T : IEquatable? { - private ReadOnlySpan _remaining; - private ReadOnlySpan _current; + private ReadOnlySpan _remaining; + private ReadOnlySpan _current; private bool _isEnumeratorActive; - private char _splitBy; + private readonly T _splitBy; + private readonly ReadOnlySpan _splitBySpan; - internal SpanSplitEnumerator(ReadOnlySpan buffer, char splitBy) + internal SpanSplitEnumerator(ReadOnlySpan buffer, T splitBy) { _remaining = buffer; _current = default; @@ -30,12 +32,12 @@ namespace CodeWalker.Core.Utils /// /// Gets the line at the current position of the enumerator. /// - public ReadOnlySpan Current => _current; + public ReadOnlySpan Current => _current; /// /// Returns this instance as an enumerator. /// - public SpanSplitEnumerator GetEnumerator() => this; + public readonly SpanSplitEnumerator GetEnumerator() => this; /// /// Advances the enumerator to the next line of the span. @@ -51,7 +53,7 @@ namespace CodeWalker.Core.Utils return false; // EOF previously reached or enumerator was never initialized } - ReadOnlySpan remaining = _remaining; + ReadOnlySpan remaining = _remaining; int idx = remaining.IndexOf(_splitBy); @@ -74,21 +76,175 @@ namespace CodeWalker.Core.Utils } } + public ref struct SpanSplitEnumeratorAny where T : IEquatable? + { + private ReadOnlySpan _remaining; + private ReadOnlySpan _current; + private bool _isEnumeratorActive; + private readonly ReadOnlySpan _splitBy; + + internal SpanSplitEnumeratorAny(ReadOnlySpan buffer, ReadOnlySpan splitBy) + { + _remaining = buffer; + _current = default; + _isEnumeratorActive = true; + _splitBy = splitBy; + } + + /// + /// Gets the line at the current position of the enumerator. + /// + public readonly ReadOnlySpan Current => _current; + + /// + /// Returns this instance as an enumerator. + /// + public readonly SpanSplitEnumeratorAny GetEnumerator() => this; + + /// + /// Advances the enumerator to the next line of the span. + /// + /// + /// True if the enumerator successfully advanced to the next line; false if + /// the enumerator has advanced past the end of the span. + /// + public bool MoveNext() + { + if (!_isEnumeratorActive) + { + return false; // EOF previously reached or enumerator was never initialized + } + + ReadOnlySpan remaining = _remaining; + + int idx = remaining.IndexOfAny(_splitBy); + + if ((uint)idx < (uint)remaining.Length) + { + _current = remaining.Slice(0, idx); + _remaining = remaining.Slice(idx + 1); + } + else + { + // We've reached EOF, but we still need to return 'true' for this final + // iteration so that the caller can query the Current property once more. + + _current = remaining; + _remaining = default; + _isEnumeratorActive = false; + } + + return true; + } + } + public static class EnumerateSplitExtensions { - public static SpanSplitEnumerator EnumerateSplit(this ReadOnlySpan span, char splitBy) + public static SpanSplitEnumerator EnumerateSplit(this ReadOnlySpan span, T splitBy) where T : IEquatable { - return new SpanSplitEnumerator(span, splitBy); + return new SpanSplitEnumerator(span, splitBy); } - public static SpanSplitEnumerator EnumerateSplit(this Span span, char splitBy) + public static SpanSplitEnumeratorAny EnumerateSplitAny(this ReadOnlySpan span, ReadOnlySpan splitBy) where T : IEquatable { - return new SpanSplitEnumerator(span, splitBy); + return new SpanSplitEnumeratorAny(span, splitBy); } - public static SpanSplitEnumerator EnumerateSplit(this string str, char splitBy) + public static SpanSplitEnumerator EnumerateSplit(this Span span, T splitBy) where T : IEquatable { - return new SpanSplitEnumerator(str.AsSpan(), splitBy); + return new SpanSplitEnumerator(span, splitBy); + } + + public static SpanSplitEnumeratorAny EnumerateSplitAny(this Span span, ReadOnlySpan splitBy) where T : IEquatable + { + return new SpanSplitEnumeratorAny(span, splitBy); + } + + public static SpanSplitEnumerator EnumerateSplit(this string str, char splitBy) + { + return EnumerateSplit(str.AsSpan(), splitBy); + } + + public static SpanSplitEnumeratorAny EnumerateSplitAny(this string str, ReadOnlySpan splitBy) + { + return EnumerateSplitAny(str.AsSpan(), splitBy); + } + + public static ReverseSpanSplitEnumerator ReverseEnumerateSplit(this ReadOnlySpan span, T splitBy) where T : IEquatable + { + return new ReverseSpanSplitEnumerator(span, splitBy); + } + + public static ReverseSpanSplitEnumerator ReverseEnumerateSplit(this Span span, T splitBy) where T : IEquatable + { + return new ReverseSpanSplitEnumerator(span, splitBy); + } + + public static ReverseSpanSplitEnumerator ReverseEnumerateSplit(this string str, char splitBy) + { + return ReverseEnumerateSplit(str.AsSpan(), splitBy); + } + } + + public ref struct ReverseSpanSplitEnumerator where T : IEquatable? + { + private ReadOnlySpan _remaining; + private ReadOnlySpan _current; + private bool _isEnumeratorActive; + private T _splitBy; + + internal ReverseSpanSplitEnumerator(ReadOnlySpan buffer, T splitBy) + { + _remaining = buffer; + _current = default; + _isEnumeratorActive = true; + _splitBy = splitBy; + } + + /// + /// Gets the line at the current position of the enumerator. + /// + public readonly ReadOnlySpan Current => _current; + + /// + /// Returns this instance as an enumerator. + /// + public readonly ReverseSpanSplitEnumerator GetEnumerator() => this; + + /// + /// Advances the enumerator to the next line of the span. + /// + /// + /// True if the enumerator successfully advanced to the next line; false if + /// the enumerator has advanced past the end of the span. + /// + public bool MoveNext() + { + if (!_isEnumeratorActive) + { + return false; // EOF previously reached or enumerator was never initialized + } + + ReadOnlySpan remaining = _remaining; + + int idx = remaining.LastIndexOf(_splitBy); + + if ((uint)idx < (uint)remaining.Length) + { + _current = remaining.Slice(idx + 1); + _remaining = remaining.Slice(0, idx); + } + else + { + // We've reached EOF, but we still need to return 'true' for this final + // iteration so that the caller can query the Current property once more. + + _current = remaining; + _remaining = default; + _isEnumeratorActive = false; + } + + return true; } } } diff --git a/CodeWalker.Core/Utils/StreamingExtensions.cs b/CodeWalker.Core/Utils/StreamingExtensions.cs index f6621f2..94a159f 100644 --- a/CodeWalker.Core/Utils/StreamingExtensions.cs +++ b/CodeWalker.Core/Utils/StreamingExtensions.cs @@ -1,9 +1,16 @@ -using System; +using CodeWalker.GameFiles; +using CommunityToolkit.Diagnostics; +using CommunityToolkit.HighPerformance; +using SharpDX; +using System; using System.Buffers; using System.Buffers.Binary; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.Contracts; using System.IO; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Threading; @@ -19,6 +26,436 @@ namespace CodeWalker.Core.Utils } } + public static class SequenceReaderExtensions + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryReadLittleEndian(ref this SequenceReader reader, out uint value) + { + reader.TryReadLittleEndian(out int _value); + value = (uint) _value; + return true; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryReadLittleEndian(ref this SequenceReader reader, out ushort value) + { + reader.TryReadLittleEndian(out short _value); + value = (ushort)_value; + return true; + } + + public static long ReadInt64(ref this SequenceReader reader) + { + reader.TryRead(out long value); + return value; + } + + public static long ReadInt64BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out long value); + return value; + } + + public static ulong ReadUInt64(ref this SequenceReader reader) + { + reader.TryRead(out ulong value); + return value; + } + + public static ulong ReadUInt64BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out long value); + return (ulong)value; + } + + public static uint ReadUInt32(ref this SequenceReader reader) + { + reader.TryRead(out uint value); + return value; + } + + public static uint ReadUInt32BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out int value); + return (uint)value; + } + + public static int ReadInt32(ref this SequenceReader reader) + { + reader.TryReadLittleEndian(out int value); + return value; + } + + public static int ReadInt32BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out int value); + return value; + } + + public static short ReadInt16(ref this SequenceReader reader) + { + reader.TryReadLittleEndian(out short value); + return value; + } + + public static short ReadInt16BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out short value); + return value; + } + + public static ushort ReadUInt16(ref this SequenceReader reader) + { + reader.TryReadLittleEndian(out ushort value); + return value; + } + + public static ushort ReadUInt16BigEndian(ref this SequenceReader reader) + { + reader.TryReadBigEndian(out short value); + return (ushort)value; + } + + public static byte ReadByte(ref this SequenceReader reader) + { + reader.TryRead(out byte value); + return value; + } + + public static float ReadSingle(ref this SequenceReader reader) + { + reader.TryRead(out float value); + return value; + } + + public static double ReadDouble(ref this SequenceReader reader) + { + reader.TryRead(out double value); + return value; + } + + public static float ReadSingleBigEndian(ref this SequenceReader reader) + { + reader.TryRead(out int value); + + return BitConverter.Int32BitsToSingle(BinaryPrimitives.ReverseEndianness(value)); + } + + public static double ReadDoubleBigEndian(ref this SequenceReader reader) + { + reader.TryRead(out long value); + + return BitConverter.Int64BitsToDouble(BinaryPrimitives.ReverseEndianness(value)); + } + + public static Vector3 ReadVector3(ref this SequenceReader reader) + { + Vector3 v = new Vector3 { + X = ReadSingle(ref reader), + Y = ReadSingle(ref reader), + Z = ReadSingle(ref reader), + }; + return v; + } + public static Vector4 ReadVector4(ref this SequenceReader reader) + { + Vector4 v = new Vector4 + { + X = ReadSingle(ref reader), + Y = ReadSingle(ref reader), + Z = ReadSingle(ref reader), + W = ReadSingle(ref reader) + }; + return v; + } + + public static Matrix ReadMatrix(ref this SequenceReader reader) + { + Matrix m = new Matrix + { + M11 = ReadSingle(ref reader), + M21 = ReadSingle(ref reader), + M31 = ReadSingle(ref reader), + M41 = ReadSingle(ref reader), + M12 = ReadSingle(ref reader), + M22 = ReadSingle(ref reader), + M32 = ReadSingle(ref reader), + M42 = ReadSingle(ref reader), + M13 = ReadSingle(ref reader), + M23 = ReadSingle(ref reader), + M33 = ReadSingle(ref reader), + M43 = ReadSingle(ref reader), + M14 = ReadSingle(ref reader), + M24 = ReadSingle(ref reader), + M34 = ReadSingle(ref reader), + M44 = ReadSingle(ref reader) + }; + return m; + } + + public static ReadOnlySpan ReadUlongsAt(ref this SequenceReader reader, ulong position, uint count, bool cache = true) + { + if ((position <= 0) || (count == 0)) + return ReadOnlySpan.Empty; + + var length = count * sizeof(ulong); + + var data = reader.ReadBytesAt(position, length, false); + if (data.IsEmpty) + { + return ReadOnlySpan.Empty; + } + var result = MemoryMarshal.Cast(data); + + return result; + } + + public static ReadOnlySpan ReadBytes(ref this SequenceReader reader, int count) + { + var unread = reader.UnreadSpan; + if (unread.Length > count) + { + var resultSpan = unread.Slice(0, count); + reader.Advance(count); + return resultSpan; + } + + var result = reader.UnreadSequence.Slice(0, count).ToArray(); + reader.Advance(count); + return result; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ReadOnlySpan ReadBytesAt(ref this SequenceReader reader, ulong position, uint count, bool cache = true) + { + return reader.ReadBytesAt(position, (int)count, cache); + } + + public static ReadOnlySpan ReadBytesAt(ref this SequenceReader reader, ulong position, int count, bool cache = true) + { + var positionBackup = reader.Consumed; + + reader.SetPosition((long)position); + var result = reader.ReadBytes(count); + reader.SetPosition((long)positionBackup); + + return result; + } + + public static ReadOnlySequence ReadSubSequence(ref this SequenceReader reader, int count) + { + var result = reader.UnreadSequence.Slice(0, count); + reader.Advance(count); + return result; + } + + [SkipLocalsInit] + public static string ReadStringLength(ref this SequenceReader reader, int length, bool ignoreNullTerminator = true) + { + if (length == 0) + { + return string.Empty; + } + + var bytes = reader.ReadBytes(length); + + if (!ignoreNullTerminator) + { + var nullTerminatorIndex = bytes.IndexOf((byte)0); + + if (nullTerminatorIndex != -1) + { + bytes.Slice(0, nullTerminatorIndex); + } + } + + return Encoding.UTF8.GetString(bytes); + //return Encoding.UTF8.GetString(bytes, Math.Min(charsRead, maxLength)); + } + + public static string ReadString(ref this SequenceReader reader, int maxLength) + { + reader.TryReadTo(out ReadOnlySpan span, 0); + + if (span.Length > maxLength) + { + reader.Rewind(span.Length - maxLength); + return Encoding.UTF8.GetString(span.Slice(0, maxLength)); + } + + return Encoding.UTF8.GetString(span); + //return Encoding.UTF8.GetString(bytes, Math.Min(charsRead, maxLength)); + } + + public static string ReadString(ref this SequenceReader reader) + { + reader.TryReadTo(out ReadOnlySpan span, 0); + + return Encoding.UTF8.GetString(span); + //return Encoding.UTF8.GetString(bytes, Math.Min(charsRead, maxLength)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool TryRead(ref this SequenceReader reader, out T value) where T : unmanaged + { + ReadOnlySpan span = reader.UnreadSpan; + if (span.Length < sizeof(T)) + return TryReadMultisegment(ref reader, out value); + + value = Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(span)); + reader.Advance(Marshal.SizeOf()); + return true; + } + + private static unsafe bool TryReadMultisegment(ref SequenceReader reader, out T value) where T : unmanaged + { + Debug.Assert(reader.UnreadSpan.Length < sizeof(T)); + + // Not enough data in the current segment, try to peek for the data we need. + T buffer = default; + Span tempSpan = new Span(&buffer, sizeof(T)); + + if (!reader.TryCopyTo(tempSpan)) + { + value = default; + return false; + } + + value = Unsafe.ReadUnaligned(ref MemoryMarshal.GetReference(tempSpan)); + reader.Advance(sizeof(T)); + return true; + } + + private static bool TryReadReverseEndianness(ref SequenceReader reader, out short value) + { + if (reader.TryRead(out value)) + { + value = BinaryPrimitives.ReverseEndianness(value); + return true; + } + + return false; + } + + private static ConcurrentDictionary cacheableTypes = new ConcurrentDictionary(); + private static bool fetchUsePool(Type type) + { + return !typeof(IResourceNoCacheBlock).IsAssignableFrom(type); + } + private static bool usePool() where T : IResourceBlock, new() + { + return cacheableTypes.GetOrAdd(typeof(T), fetchUsePool); + } + + public static T validate(Func instantiator) + where T : IResourceBlock + { + return instantiator(); + } + + /// + /// Reads a block. + /// + public static T ReadBlock(this ref SequenceReader reader, params object[] parameters) where T : IResourceBlockSpan, IResourceBlock, new() + { + var result = validate(() => new T()); + + + // replace with correct type... + if (result is IResourceXXSytemBlockSpan block) + { + result = (T)block.GetType(ref reader, parameters); + } + + result.Read(ref reader, parameters); + + return result; + } + + public static void SetPosition(this ref SequenceReader reader, long position) + { + var consumed = reader.Consumed; + if (position == consumed) + { + return; + } + + if (consumed > position) + { + reader.Rewind(consumed - position); + } + else + { + reader.Advance(position - consumed); + } + } + + /// + /// Reads a block at a specified position. + /// + public static T ReadBlockAt(this ref SequenceReader reader, ulong position, params object[] parameters) where T : IResourceBlock, IResourceBlockSpan, new() + { + if (position != 0) + { + var positionBackup = reader.Consumed; + + reader.SetPosition((long)position); + var result = reader.ReadBlock(parameters); + reader.SetPosition((long)positionBackup); + + return result; + } + else + { + return default(T); + } + } + + public static ReadOnlySpan ReadStructsAt(this ref SequenceReader reader, ulong position, uint count, bool cache = true) where T : struct + { + return reader.ReadStructsAt(position, (int)count, cache); + } + + public static ReadOnlySpan ReadStructsAt(this ref SequenceReader reader, ulong position, int count, bool cache = true) where T : struct + { + if ((position <= 0) || (count == 0)) + return null; + + var structsize = Marshal.SizeOf(typeof(T)); + var length = (int)(count * structsize); + var data = reader.ReadBytesAt(position, length, false); + + var resultSpan = MemoryMarshal.Cast(data); + + return resultSpan; + } + } + + public static class SpanExtension + { + public static ReadOnlySpan ReadTill(this ReadOnlySpan span, T searchFor) where T : IEquatable? + { + var index = span.IndexOf(searchFor); + if (index < 0) + { + return span; + } + + return span.Slice(index); + } + + public static Span ReadTill(this Span span, T searchFor) where T : IEquatable? + { + var index = span.IndexOf(searchFor); + if (index < 0) + { + return span; + } + + return span.Slice(0, index); + } + } + public ref struct SpanStream { public Span Buffer { get; private set; } @@ -38,7 +475,8 @@ namespace CodeWalker.Core.Utils if ((uint)newPos > (uint)Buffer.Length) { _position = Buffer.Length; - ThrowHelper.ThrowEndOfFileException(); + throw new EndOfStreamException(); + return default; } var span = Buffer.Slice(origPos, count); @@ -54,7 +492,7 @@ namespace CodeWalker.Core.Utils public uint ReadUInt32() => BinaryPrimitives.ReadUInt32LittleEndian(InternalRead(sizeof(uint))); public long ReadInt64() => BinaryPrimitives.ReadInt64LittleEndian(InternalRead(sizeof(long))); public ulong ReadUInt64() => BinaryPrimitives.ReadUInt64LittleEndian(InternalRead(sizeof(ulong))); - public unsafe Half ReadHalf() => BinaryPrimitives.ReadHalfLittleEndian(InternalRead(sizeof(Half))); + public unsafe System.Half ReadHalf() => BinaryPrimitives.ReadHalfLittleEndian(InternalRead(sizeof(System.Half))); public unsafe float ReadSingle() => BinaryPrimitives.ReadSingleLittleEndian(InternalRead(sizeof(float))); public unsafe double ReadDouble() => BinaryPrimitives.ReadDoubleLittleEndian(InternalRead(sizeof(double))); } diff --git a/CodeWalker.Core/Utils/ThrowHelper.cs b/CodeWalker.Core/Utils/ThrowHelper.cs index 9afc41c..cc31a68 100644 --- a/CodeWalker.Core/Utils/ThrowHelper.cs +++ b/CodeWalker.Core/Utils/ThrowHelper.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +//using System; +//using System.Collections.Generic; +//using System.Diagnostics.CodeAnalysis; +//using System.IO; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; -namespace CodeWalker.Core.Utils -{ - internal class ThrowHelper - { - internal static Exception CreateEndOfFileException() => - new EndOfStreamException("Tried to read stream beyond end"); +//namespace CodeWalker.Core.Utils +//{ +// internal class ThrowHelper +// { +// internal static Exception CreateEndOfFileException() => +// new EndOfStreamException("Tried to read stream beyond end"); - [DoesNotReturn] - internal static void ThrowEndOfFileException() - { - throw CreateEndOfFileException(); - } - } -} +// [DoesNotReturn] +// internal static void ThrowEndOfFileException() +// { +// throw CreateEndOfFileException(); +// } +// } +//} diff --git a/CodeWalker.Core/Utils/Timer.cs b/CodeWalker.Core/Utils/Timer.cs index 3bc52cd..72a34c1 100644 --- a/CodeWalker.Core/Utils/Timer.cs +++ b/CodeWalker.Core/Utils/Timer.cs @@ -8,7 +8,7 @@ namespace CodeWalker.Core.Utils public class DisposableTimer : IDisposable { public static event Action TimerStopped; - public readonly Stopwatch _stopwatch; + public Stopwatch Stopwatch { get; init; } static DisposableTimer() { @@ -22,14 +22,25 @@ namespace CodeWalker.Core.Utils public DisposableTimer(string name) { - _stopwatch = Stopwatch.StartNew(); + Stopwatch = Stopwatch.StartNew(); Name = name; } + public DisposableTimer(string name, bool start) + { + Name = name; + if (start) + { + Stopwatch = Stopwatch.StartNew(); + } else + { + Stopwatch = new Stopwatch(); + } + } public void Dispose() { - _stopwatch.Stop(); - TimerStopped?.Invoke(_stopwatch.Elapsed, Name ?? string.Empty); + Stopwatch.Stop(); + TimerStopped?.Invoke(Stopwatch.Elapsed, Name ?? string.Empty); } } } diff --git a/CodeWalker.Core/Utils/TriangleBVH.cs b/CodeWalker.Core/Utils/TriangleBVH.cs index ef80a19..449e730 100644 --- a/CodeWalker.Core/Utils/TriangleBVH.cs +++ b/CodeWalker.Core/Utils/TriangleBVH.cs @@ -1,4 +1,5 @@ -using SharpDX; +using Collections.Pooled; +using SharpDX; using System; using System.Collections.Generic; using System.Text; @@ -10,17 +11,18 @@ namespace CodeWalker public TriangleBVH(TriangleBVHItem[] tris, int depth = 8) { - if (tris == null) return; + if (tris is null || tris.Length == 0) + return; var min = new Vector3(float.MaxValue); var max = new Vector3(float.MinValue); for (int i = 0; i < tris.Length; i++) { var tri = tris[i]; tri.UpdateBox(); - min = Vector3.Min(min, tri.Box.Minimum); - max = Vector3.Max(max, tri.Box.Maximum); + Vector3.Min(ref min, ref tri.Box.Minimum, out min); + Vector3.Max(ref max, ref tri.Box.Maximum, out max); } - Box = new BoundingBox(min, max); + _Box = new BoundingBox(min, max); Build(tris, depth); @@ -30,9 +32,11 @@ namespace CodeWalker public class TriangleBVHNode { public TriangleBVHItem[] Triangles { get; set; } - public TriangleBVHNode Node1 { get; set; } - public TriangleBVHNode Node2 { get; set; } - public BoundingBox Box { get; set; } + public TriangleBVHNode? Node1 { get; set; } + public TriangleBVHNode? Node2 { get; set; } + + public BoundingBox _Box; + public BoundingBox Box => _Box; public void Build(TriangleBVHItem[] tris, int depth) { @@ -45,10 +49,10 @@ namespace CodeWalker } else { - var min = Box.Minimum; - var max = Box.Maximum; - var cen = Box.Center; - var siz = Box.Size; + var min = _Box.Minimum; + var max = _Box.Maximum; + var cen = _Box.Center; + var siz = _Box.Size; BoundingBox b1, b2; if ((siz.X >= siz.Y) && (siz.X >= siz.Z)) { @@ -65,16 +69,16 @@ namespace CodeWalker b1 = new BoundingBox(min, new Vector3(max.X, max.Y, cen.Z)); b2 = new BoundingBox(new Vector3(min.X, min.Y, cen.Z), max); } - var l1 = new List(); - var l2 = new List(); + using var l1 = new PooledList(); + using var l2 = new PooledList(); for (int i = 0; i < tris.Length; i++) { var tri = tris[i]; - if (tri.Box.Contains(b1) != ContainmentType.Disjoint)// (tri.Box.Intersects(b1)) + if (tri.Box.Contains(ref b1) != ContainmentType.Disjoint)// (tri.Box.Intersects(b1)) { l1.Add(tri); } - if (tri.Box.Contains(b2) != ContainmentType.Disjoint)// (tri.Box.Intersects(b2)) + if (tri.Box.Contains(ref b2) != ContainmentType.Disjoint)// (tri.Box.Intersects(b2)) { l2.Add(tri); } @@ -82,54 +86,51 @@ namespace CodeWalker if (l1.Count > 0) { Node1 = new TriangleBVHNode(); - Node1.Box = b1; + Node1._Box = b1; Node1.Build(l1.ToArray(), depth - 1); } if (l2.Count > 0) { Node2 = new TriangleBVHNode(); - Node2.Box = b2; + Node2._Box = b2; Node2.Build(l2.ToArray(), depth - 1); } } } - public TriangleBVHItem RayIntersect(ref Ray ray, ref float hitdist) + public TriangleBVHItem? RayIntersect(ref Ray ray, ref float hitdist) { - if (ray.Intersects(Box) == false) return null; + if (!ray.Intersects(ref _Box)) + return null; - TriangleBVHItem hit = null; - if (Triangles != null) + TriangleBVHItem? hit = null; + if (Triangles is not null) { - for (int i = 0; i < Triangles.Length; i++) + foreach(var tri in Triangles) { - var tri = Triangles[i]; - var v1 = tri.Corner1; - var v2 = tri.Corner2; - var v3 = tri.Corner3; - if (ray.Intersects(ref v1, ref v2, ref v3, out float d) && (d < hitdist) && (d > 0)) + if (ray.Intersects(ref tri.Corner1, ref tri.Corner2, ref tri.Corner3, out float d) && d < hitdist && d > 0) { hitdist = d; hit = tri; } } } - if (Node1 != null) + if (Node1 is not null) { var hd = hitdist; var h = Node1.RayIntersect(ref ray, ref hd); - if ((h != null) && (hd < hitdist)) + if (h != null && hd < hitdist) { hitdist = hd; hit = h; } } - if (Node2 != null) + if (Node2 is not null) { var hd = hitdist; var h = Node2.RayIntersect(ref ray, ref hd); - if ((h != null) && (hd < hitdist)) + if (h != null && hd < hitdist) { hitdist = hd; hit = h; @@ -143,17 +144,14 @@ namespace CodeWalker public abstract class TriangleBVHItem { - public Vector3 Corner1 { get; set; } - public Vector3 Corner2 { get; set; } - public Vector3 Corner3 { get; set; } - public BoundingBox Box { get; set; } + public Vector3 Corner1; + public Vector3 Corner2; + public Vector3 Corner3; + public BoundingBox Box; public Vector3 Center { - get - { - return (Corner1 + Corner2 + Corner3) * 0.3333333f; - } + get => (Corner1 + Corner2 + Corner3) * 0.3333333f; set { var delta = value - Center; @@ -164,13 +162,10 @@ namespace CodeWalker } public Quaternion Orientation { - get - { - return _Orientation; - } + get => _Orientation; set { - var inv = Quaternion.Invert(_Orientation); + Quaternion.Invert(ref _Orientation, out var inv); var delta = value * inv; var cen = Center; Corner1 = cen + delta.Multiply(Corner1 - cen); @@ -182,13 +177,10 @@ namespace CodeWalker private Quaternion _Orientation = Quaternion.Identity; public Vector3 Scale { - get - { - return _Scale; - } + get => _Scale; set { - var inv = Quaternion.Invert(_Orientation); + Quaternion.Invert(ref _Orientation, out var inv); var delta = value / _Scale; var cen = Center; Corner1 = cen + _Orientation.Multiply(inv.Multiply(Corner1 - cen) * delta); @@ -203,12 +195,12 @@ namespace CodeWalker { var min = new Vector3(float.MaxValue); var max = new Vector3(float.MinValue); - min = Vector3.Min(min, Corner1); - min = Vector3.Min(min, Corner2); - min = Vector3.Min(min, Corner3); - max = Vector3.Max(max, Corner1); - max = Vector3.Max(max, Corner2); - max = Vector3.Max(max, Corner3); + Vector3.Min(ref min, ref Corner1, out min); + Vector3.Min(ref min, ref Corner2, out min); + Vector3.Min(ref min, ref Corner3, out min); + Vector3.Max(ref max, ref Corner1, out max); + Vector3.Max(ref max, ref Corner2, out max); + Vector3.Max(ref max, ref Corner3, out max); Box = new BoundingBox(min, max); } diff --git a/CodeWalker.Core/Utils/Utils.cs b/CodeWalker.Core/Utils/Utils.cs index f291e45..590b962 100644 --- a/CodeWalker.Core/Utils/Utils.cs +++ b/CodeWalker.Core/Utils/Utils.cs @@ -5,9 +5,12 @@ using System.Drawing; using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; +using CodeWalker.Core.Utils; using SharpDX; using Color = SharpDX.Color; using Half = SharpDX.Half; @@ -26,7 +29,7 @@ namespace CodeWalker // Returns the human-readable file size for an arbitrary, 64-bit file size // The default format is "0.### XB", e.g. "4.2 KB" or "1.434 GB" // Get absolute value - long absolute_i = (i < 0 ? -i : i); + long absolute_i = Math.Abs(i); // Determine the suffix and readable value string suffix; double readable; @@ -82,7 +85,7 @@ namespace CodeWalker } // Return formatted number with suffix - return readable.ToString(fmt) + suffix; + return $"{readable.ToString(fmt)}{suffix}"; } @@ -139,130 +142,148 @@ namespace CodeWalker public static class FloatUtil { - public static bool TryParse(string s, out float f) + //public static bool TryParse(string? s, out float f) + //{ + // return float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out f); + //} + + public static bool TryParse(ReadOnlySpan s, out float f) { - if (float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out f)) - { - return true; - } - return false; + return float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out f); } - public static float Parse(string s) + + public static float Parse(ReadOnlySpan s) { TryParse(s, out float f); return f; } - public static string ToString(float f) + public static string ToString(float value) { - var c = CultureInfo.InvariantCulture; - var s = f.ToString(c); - var t = Parse(s); - if (t == f) return s; - return f.ToString("G9", c); + return value.ToString(CultureInfo.InvariantCulture); } public static string GetVector2String(Vector2 v, string d = ", ") { - return ToString(v.X) + d + ToString(v.Y); + return $"{ToString(v.X)}{d}{ToString(v.Y)}"; } public static string GetVector2XmlString(Vector2 v) { - return string.Format("x=\"{0}\" y=\"{1}\"", ToString(v.X), ToString(v.Y)); + return $"x=\"{ToString(v.X)}\" y=\"{ToString(v.Y)}\""; } - public static string GetVector3String(Vector3 v, string d = ", ") + public static string GetVector3String(in Vector3 v, string d = ", ") { - return ToString(v.X) + d + ToString(v.Y) + d + ToString(v.Z); + return $"{ToString(v.X)}{d}{ToString(v.Y)}{d}{ToString(v.Z)}"; } - public static string GetVector3StringFormat(Vector3 v, string format) + public static string GetVector3StringFormat(in Vector3 v, string format) { var c = CultureInfo.InvariantCulture; - return v.X.ToString(format, c) + ", " + v.Y.ToString(format, c) + ", " + v.Z.ToString(format, c); + return $"{v.X.ToString(format, c)}, {v.Y.ToString(format, c)}, {v.Z.ToString(format, c)}"; } - public static string GetVector3XmlString(Vector3 v) + public static string GetVector3XmlString(in Vector3 v) { - return string.Format("x=\"{0}\" y=\"{1}\" z=\"{2}\"", ToString(v.X), ToString(v.Y), ToString(v.Z)); + return $"x=\"{ToString(v.X)}\" y=\"{ToString(v.Y)}\" z=\"{ToString(v.Z)}\""; } - public static string GetVector4String(Vector4 v, string d = ", ") + + public static string GetVector4String(in Vector4 v) { - return ToString(v.X) + d + ToString(v.Y) + d + ToString(v.Z) + d + ToString(v.W); + return GetVector4String(in v, ", "); } - public static string GetVector4XmlString(Vector4 v) + public static string GetVector4String(in Vector4 v, string d) { - return string.Format("x=\"{0}\" y=\"{1}\" z=\"{2}\" w=\"{3}\"", ToString(v.X), ToString(v.Y), ToString(v.Z), ToString(v.W)); + return $"{ToString(v.X)}{d}{ToString(v.Y)}{d}{ToString(v.Z)}{d}{ToString(v.W)}"; } - public static string GetQuaternionXmlString(Quaternion q) + public static string GetVector4XmlString(in Vector4 v) { - return string.Format("x=\"{0}\" y=\"{1}\" z=\"{2}\" w=\"{3}\"", ToString(q.X), ToString(q.Y), ToString(q.Z), ToString(q.W)); + return $"x=\"{ToString(v.X)}\" y=\"{ToString(v.Y)}\" z=\"{ToString(v.Z)}\" w=\"{ToString(v.W)}\""; } + public static string GetQuaternionXmlString(in Quaternion q) + { + return $"x=\"{ToString(q.X)}\" y=\"{ToString(q.Y)}\" z=\"{ToString(q.Z)}\" w=\"{ToString(q.W)}\""; + } + + public static Span ConvertToFloat(Span values) + { + Span array = new float[values.Length]; + for (int i = 0; i < array.Length; i++) + { + array[i] = values[i]; + } + + return array; + } + public static string GetHalf2String(Half2 v, string d = ", ") { - var f = Half.ConvertToFloat(new[] { v.X, v.Y }); - return ToString(f[0]) + d + ToString(f[1]); + var f = ConvertToFloat([v.X, v.Y]); + return $"{ToString(f[0])}{d}{ToString(f[1])}"; } public static string GetHalf4String(Half4 v, string d = ", ") { - var f = Half.ConvertToFloat(new[] { v.X, v.Y, v.Z, v.W }); - return ToString(f[0]) + d + ToString(f[1]) + d + ToString(f[2]) + d + ToString(f[3]); + var f = ConvertToFloat([v.X, v.Y, v.Z, v.W]); + return $"{ToString(f[0])}{d}{ToString(f[1])}{d}{ToString(f[2])}{d}{ToString(f[3])}"; } public static string GetColourString(Color v, string d = ", ") { var c = CultureInfo.InvariantCulture; - return v.R.ToString(c) + d + v.G.ToString(c) + d + v.B.ToString(c) + d + v.A.ToString(c); + return $"{v.R.ToString(c)}{d}{v.G.ToString(c)}{d}{v.B.ToString(c)}{d}{v.A.ToString(c)}"; } public static Vector2 ParseVector2String(string s) { Vector2 p = new Vector2(0.0f); - string[] ss = s.Split(','); - if (ss.Length > 0) + + var enumerator = s.EnumerateSplit(','); + if (enumerator.MoveNext()) { - TryParse(ss[0].Trim(), out p.X); + _ = TryParse(enumerator.Current.Trim(), out p.X); } - if (ss.Length > 1) + if (enumerator.MoveNext()) { - TryParse(ss[1].Trim(), out p.Y); + _ = TryParse(enumerator.Current.Trim(), out p.Y); } return p; } public static Vector3 ParseVector3String(string s) { Vector3 p = new Vector3(0.0f); - string[] ss = s.Split(','); - if (ss.Length > 0) + + var enumerator = s.EnumerateSplit(','); + + if (enumerator.MoveNext()) { - TryParse(ss[0].Trim(), out p.X); + _ = TryParse(enumerator.Current.Trim(), out p.X); } - if (ss.Length > 1) + if (enumerator.MoveNext()) { - TryParse(ss[1].Trim(), out p.Y); + _ = TryParse(enumerator.Current.Trim(), out p.Y); } - if (ss.Length > 2) + if (enumerator.MoveNext()) { - TryParse(ss[2].Trim(), out p.Z); + _ = TryParse(enumerator.Current.Trim(), out p.Z); } return p; } public static Vector4 ParseVector4String(string s) { Vector4 p = new Vector4(0.0f); - string[] ss = s.Split(','); - if (ss.Length > 0) + var enumerator = s.EnumerateSplit(','); + if (enumerator.MoveNext()) { - TryParse(ss[0].Trim(), out p.X); + _ = TryParse(enumerator.Current.Trim(), out p.X); } - if (ss.Length > 1) + if (enumerator.MoveNext()) { - TryParse(ss[1].Trim(), out p.Y); + TryParse(enumerator.Current.Trim(), out p.Y); } - if (ss.Length > 2) + if (enumerator.MoveNext()) { - TryParse(ss[2].Trim(), out p.Z); + _ = TryParse(enumerator.Current.Trim(), out p.Z); } - if (ss.Length > 3) + if (enumerator.MoveNext()) { - TryParse(ss[3].Trim(), out p.W); + _ = TryParse(enumerator.Current.Trim(), out p.W); } return p; } @@ -308,4 +329,67 @@ namespace CodeWalker return (value >> count) | (value << (32 - count)); } } + + public static class SemaphoreSlimExtension + { + public struct SemaphoreLock : IDisposable + { + private bool _isDisposed = false; + private readonly SemaphoreSlim? _semaphore; + private readonly string _callerName; + private readonly string _callerFilePath; + public readonly bool LockTaken => _semaphore is not null; + + public SemaphoreLock(SemaphoreSlim? semaphore, string callerName = "", string callerFilePath = "") + { + _callerFilePath = callerFilePath; + _callerName = callerName; + _semaphore = semaphore; + + Console.WriteLine($"Lock taken from {callerFilePath} -> {callerName}"); + } + + public void Dispose() + { + if (_isDisposed) + return; + + Console.WriteLine($"Lock for {_callerFilePath} -> {_callerName} released"); + _semaphore?.Release(); + _isDisposed = true; + } + } + + public static async ValueTask WaitAsyncDisposable(this SemaphoreSlim semaphore) + { + await semaphore.WaitAsync(); + return new SemaphoreLock(semaphore); + } + + public static SemaphoreLock WaitDisposable(this SemaphoreSlim semaphore, [CallerMemberName] string callerName = "", [CallerFilePath] string callerFilePath = "") + { + semaphore.Wait(); + return new SemaphoreLock(semaphore, callerName, callerFilePath); + } + + public static SemaphoreLock WaitDisposable(this SemaphoreSlim semaphore, TimeSpan timeout, CancellationToken cancellationToken, [CallerMemberName] string callerName = "", [CallerFilePath] string callerFilePath = "") + { + if (semaphore.Wait(timeout, cancellationToken)) + { + return new SemaphoreLock(semaphore, callerName, callerFilePath); + } + + return new SemaphoreLock(null); + } + + public static SemaphoreLock WaitDisposable(this SemaphoreSlim semaphore, int timeout, [CallerMemberName] string callerName = "", [CallerFilePath] string callerFilePath = "") + { + if (semaphore.Wait(timeout)) + { + return new SemaphoreLock(semaphore, callerName, callerFilePath); + } + + return new SemaphoreLock(null); + } + } } diff --git a/CodeWalker.Core/Utils/Vectors.cs b/CodeWalker.Core/Utils/Vectors.cs index 1c9ab3d..cac4a6e 100644 --- a/CodeWalker.Core/Utils/Vectors.cs +++ b/CodeWalker.Core/Utils/Vectors.cs @@ -10,17 +10,124 @@ namespace CodeWalker { public static class Vectors { - public static Vector3 XYZ(this Vector4 v) + public static Vector3 XYZ(in this Vector4 v) { return new Vector3(v.X, v.Y, v.Z); } - public static Vector3 Round(this Vector3 v) + public static Vector3 Round(in this Vector3 v) { return new Vector3((float)Math.Round(v.X), (float)Math.Round(v.Y), (float)Math.Round(v.Z)); } - public static Vector3 GetPerpVec(this Vector3 n) + public static void Cross(in this Vector3 left, in Vector3 right, out Vector3 result) + { + result = new Vector3(left.Y * right.Z - left.Z * right.Y, left.Z * right.X - left.X * right.Z, left.X * right.Y - left.Y * right.X); + } + + public static Vector3 Cross(in this Vector3 left, in Vector3 right) + { + return new Vector3(left.Y * right.Z - left.Z * right.Y, left.Z * right.X - left.X * right.Z, left.X * right.Y - left.Y * right.X); + } + + public static void Add(in this Vector3 left, in Vector3 right, out Vector3 result) + { + result = new Vector3(left.X + right.X, left.Y + right.Y, left.Z + right.Z); + } + + public static Vector3 Add(in this Vector3 left, in Vector3 right) + { + return new Vector3(left.X + right.X, left.Y + right.Y, left.Z + right.Z); + } + + public static void Min(in this Vector3 left, in MetaVECTOR3 right, out Vector3 result) + { + result.X = ((left.X < right.X) ? left.X : right.X); + result.Y = ((left.Y < right.Y) ? left.Y : right.Y); + result.Z = ((left.Z < right.Z) ? left.Z : right.Z); + } + public static void Min(in this MetaVECTOR3 left, in MetaVECTOR3 right, out Vector3 result) + { + result.X = ((left.X < right.X) ? left.X : right.X); + result.Y = ((left.Y < right.Y) ? left.Y : right.Y); + result.Z = ((left.Z < right.Z) ? left.Z : right.Z); + } + + public static void Min(in this MetaVECTOR3 left, in Vector3 right, out Vector3 result) + { + result.X = ((left.X < right.X) ? left.X : right.X); + result.Y = ((left.Y < right.Y) ? left.Y : right.Y); + result.Z = ((left.Z < right.Z) ? left.Z : right.Z); + } + + public static void Min(in this Vector3 left, in Vector3 right, out Vector3 result) + { + result.X = ((left.X < right.X) ? left.X : right.X); + result.Y = ((left.Y < right.Y) ? left.Y : right.Y); + result.Z = ((left.Z < right.Z) ? left.Z : right.Z); + } + + public static Vector3 Min(in this Vector3 left, in Vector3 right) + { + Min(in left, in right, out var result); + return result; + } + + public static Vector4 Min(in this Vector4 left, in Vector4 right) + { + Min(in left, in right, out var result); + return result; + } + + public static void Min(in this Vector4 left, in Vector4 right, out Vector4 result) + { + result.X = ((left.X < right.X) ? left.X : right.X); + result.Y = ((left.Y < right.Y) ? left.Y : right.Y); + result.Z = ((left.Z < right.Z) ? left.Z : right.Z); + result.W = ((left.W < right.W) ? left.W : right.W); + } + + public static void Max(in this Vector3 left, in MetaVECTOR3 right, out Vector3 result) + { + result.X = ((left.X > right.X) ? left.X : right.X); + result.Y = ((left.Y > right.Y) ? left.Y : right.Y); + result.Z = ((left.Z > right.Z) ? left.Z : right.Z); + } + + public static void Max(in this MetaVECTOR3 left, in Vector3 right, out Vector3 result) + { + result.X = ((left.X > right.X) ? left.X : right.X); + result.Y = ((left.Y > right.Y) ? left.Y : right.Y); + result.Z = ((left.Z > right.Z) ? left.Z : right.Z); + } + + public static void Max(in this MetaVECTOR3 left, in MetaVECTOR3 right, out Vector3 result) + { + result.X = ((left.X > right.X) ? left.X : right.X); + result.Y = ((left.Y > right.Y) ? left.Y : right.Y); + result.Z = ((left.Z > right.Z) ? left.Z : right.Z); + } + + public static void Max(in this Vector3 left, in Vector3 right, out Vector3 result) + { + result.X = ((left.X > right.X) ? left.X : right.X); + result.Y = ((left.Y > right.Y) ? left.Y : right.Y); + result.Z = ((left.Z > right.Z) ? left.Z : right.Z); + } + + public static Vector3 Max(in this Vector3 left, in Vector3 right) + { + Max(in left, in right, out var result); + return result; + } + + public static Vector3 GetPerpVec(in this Vector3 n) + { + n.GetPerpVec(out var result); + return result; + } + + public static void GetPerpVec(in this Vector3 n, out Vector3 result) { //make a vector perpendicular to the given one float nx = Math.Abs(n.X); @@ -28,33 +135,36 @@ namespace CodeWalker float nz = Math.Abs(n.Z); if ((nx < ny) && (nx < nz)) { - return Vector3.Cross(n, Vector3.Right); + n.Cross(in Vector3.Right, out result); + return; } else if (ny < nz) { - return Vector3.Cross(n, Vector3.Up); + n.Cross(in Vector3.Up, out result); + return; } else { - return Vector3.Cross(n, Vector3.ForwardLH); + n.Cross(in Vector3.ForwardLH, out result); + return; } } - public static Vector3 Floor(this Vector3 v) + public static Vector3 Floor(in this Vector3 v) { return new Vector3((float)Math.Floor(v.X), (float)Math.Floor(v.Y), (float)Math.Floor(v.Z)); } - public static Vector3 Ceiling(this Vector3 v) + public static Vector3 Ceiling(in this Vector3 v) { return new Vector3((float)Math.Ceiling(v.X), (float)Math.Ceiling(v.Y), (float)Math.Ceiling(v.Z)); } - public static Vector3 Abs(this Vector3 v) + public static Vector3 Abs(in this Vector3 v) { return new Vector3(Math.Abs(v.X), Math.Abs(v.Y), Math.Abs(v.Z)); } - public static int CompareTo(this Vector3 a, Vector3 b) + public static int CompareTo(in this Vector3 a, in Vector3 b) { int c; c = a.X.CompareTo(b.X); if (c != 0) return c; @@ -64,24 +174,35 @@ namespace CodeWalker } - public static Vector4 Floor(this Vector4 v) + public static Vector4 Floor(in this Vector4 v) { return new Vector4((float)Math.Floor(v.X), (float)Math.Floor(v.Y), (float)Math.Floor(v.Z), (float)Math.Floor(v.W)); } - public static Vector4 Ceiling(this Vector4 v) + public static Vector4 Ceiling(in this Vector4 v) { return new Vector4((float)Math.Ceiling(v.X), (float)Math.Ceiling(v.Y), (float)Math.Ceiling(v.Z), (float)Math.Ceiling(v.W)); } - public static Vector4 Abs(this Vector4 v) + public static Vector4 Abs(in this Vector4 v) { return new Vector4(Math.Abs(v.X), Math.Abs(v.Y), Math.Abs(v.Z), Math.Abs(v.W)); } - public static Quaternion ToQuaternion(this Vector4 v) + public static Quaternion ToQuaternion(in this Vector4 v) { return new Quaternion(v); } + + public static Quaternion RotationAxis(in this Vector3 axis, float angle) + { + var result2 = axis; + result2.Normalize(); + float num = angle * 0.5f; + float num2 = (float)Math.Sin(num); + float w = (float)Math.Cos(num); + + return new Quaternion(result2.X * num2, result2.Y * num2, result2.Z * num2, w); + } } @@ -103,7 +224,7 @@ namespace CodeWalker public override string ToString() { - return X.ToString() + ", " + Y.ToString(); + return $"{X}, {Y}"; } @@ -142,19 +263,19 @@ namespace CodeWalker public static class BoundingBoxMath { - public static BoundingBox Transform(this BoundingBox b, Vector3 position, Quaternion orientation, Vector3 scale) + public static BoundingBox Transform(this BoundingBox b, in Vector3 position, in Quaternion orientation, in Vector3 scale) { var mat = Matrix.Transformation(Vector3.Zero, Quaternion.Identity, scale, Vector3.Zero, orientation, position); - return b.Transform(mat); + return b.Transform(in mat); } - public static BoundingBox Transform(this BoundingBox b, Matrix mat) + public static BoundingBox Transform(this BoundingBox b, in Matrix mat) { var matabs = mat; - matabs.Column1 = mat.Column1.Abs(); - matabs.Column2 = mat.Column2.Abs(); - matabs.Column3 = mat.Column3.Abs(); - matabs.Column4 = mat.Column4.Abs(); + matabs.Column1 = matabs.Column1.Abs(); + matabs.Column2 = matabs.Column2.Abs(); + matabs.Column3 = matabs.Column3.Abs(); + matabs.Column4 = matabs.Column4.Abs(); var bbcenter = (b.Maximum + b.Minimum) * 0.5f; var bbextent = (b.Maximum - b.Minimum) * 0.5f; var ncenter = Vector3.TransformCoordinate(bbcenter, mat); @@ -176,7 +297,7 @@ namespace CodeWalker public static class BoundingCapsuleMath { - public static bool Intersects(this Ray r, ref BoundingCapsule capsule, out float dist) + public static bool Intersects(in this Ray r, in BoundingCapsule capsule, out float dist) { // intersect capsule : http://www.iquilezles.org/www/articles/intersectors/intersectors.htm Vector3 ba = capsule.PointB - capsule.PointA; @@ -220,7 +341,7 @@ namespace CodeWalker dist = -1.0f; return false; } - public static Vector3 Normal(this BoundingCapsule c, ref Vector3 position) + public static Vector3 Normal(this BoundingCapsule c, in Vector3 position) { Vector3 ba = c.PointB - c.PointA; Vector3 pa = position - c.PointA; @@ -228,14 +349,27 @@ namespace CodeWalker return Vector3.Normalize((pa - h * ba) / c.Radius); } - - public static bool Intersects(this BoundingSphere sph, ref BoundingCapsule capsule, out Vector3 norm) + public static void Normalize(in this Vector3 value, out Vector3 result) { - var dist = LineMath.PointSegmentDistance(ref sph.Center, ref capsule.PointA, ref capsule.PointB); + result = value; + result.Normalize(); + } + + public static Vector3 Normalize(in this Vector3 value) + { + var result = value; + result.Normalize(); + return result; + } + + + public static bool Intersects(in this BoundingSphere sph, in BoundingCapsule capsule, out Vector3 norm) + { + var dist = LineMath.PointSegmentDistance(in sph.Center, in capsule.PointA, in capsule.PointB); var rads = sph.Radius + capsule.Radius; if (dist <= rads) { - norm = LineMath.PointSegmentNormal(ref sph.Center, ref capsule.PointA, ref capsule.PointB); + norm = LineMath.PointSegmentNormal(in sph.Center, in capsule.PointA, in capsule.PointB); return true; } else @@ -258,7 +392,7 @@ namespace CodeWalker public static class BoundingCylinderMath { - public static bool Intersects(this Ray r, ref BoundingCylinder cylinder, out float dist, out Vector3 norm) + public static bool Intersects(in this Ray r, in BoundingCylinder cylinder, out float dist, out Vector3 norm) { // intersect cylinder : https://www.shadertoy.com/view/4lcSRn Vector3 ba = cylinder.PointB - cylinder.PointA; @@ -313,7 +447,7 @@ namespace CodeWalker { - public static float PointSegmentDistance(ref Vector3 v, ref Vector3 a, ref Vector3 b) + public static float PointSegmentDistance(in Vector3 v, in Vector3 a, in Vector3 b) { //https://stackoverflow.com/questions/4858264/find-the-distance-from-a-3d-point-to-a-line-segment Vector3 ab = b - a; @@ -333,7 +467,7 @@ namespace CodeWalker return Vector3.Cross(ab, av).Length() / ab.Length();// Perpendicular distance of point to segment. } - public static Vector3 PointSegmentNormal(ref Vector3 v, ref Vector3 a, ref Vector3 b) + public static Vector3 PointSegmentNormal(in Vector3 v, in Vector3 a, in Vector3 b) { Vector3 ab = b - a; Vector3 av = v - a; @@ -352,7 +486,7 @@ namespace CodeWalker return Vector3.Normalize(Vector3.Cross(Vector3.Cross(ab, av), ab)); } - public static float PointRayDist(ref Vector3 p, ref Vector3 ro, ref Vector3 rd) + public static float PointRayDist(in Vector3 p, in Vector3 ro, in Vector3 rd) { return Vector3.Cross(rd, p - ro).Length(); } @@ -363,7 +497,7 @@ namespace CodeWalker public static class TriangleMath { - public static float AreaPart(ref Vector3 v1, ref Vector3 v2, ref Vector3 v3, out float angle) + public static float AreaPart(in Vector3 v1, in Vector3 v2, in Vector3 v3, out float angle) { var va = v2 - v1; var vb = v3 - v1; @@ -377,11 +511,11 @@ namespace CodeWalker return area; } - public static float Area(ref Vector3 v1, ref Vector3 v2, ref Vector3 v3) + public static float Area(in Vector3 v1, in Vector3 v2, in Vector3 v3) { - var a1 = AreaPart(ref v1, ref v2, ref v3, out float t1); - var a2 = AreaPart(ref v2, ref v3, ref v1, out float t2); - var a3 = AreaPart(ref v3, ref v1, ref v2, out float t3); + var a1 = AreaPart(in v1, in v2, in v3, out float t1); + var a2 = AreaPart(in v2, in v3, in v1, out float t2); + var a3 = AreaPart(in v3, in v1, in v2, out float t3); var fp = (float)Math.PI; var d1 = Math.Min(t1, Math.Abs(t1 - fp)); var d2 = Math.Min(t2, Math.Abs(t2 - fp)); diff --git a/CodeWalker.Core/Utils/Xml.cs b/CodeWalker.Core/Utils/Xml.cs index 96e643a..a2fa702 100644 --- a/CodeWalker.Core/Utils/Xml.cs +++ b/CodeWalker.Core/Utils/Xml.cs @@ -1,8 +1,13 @@ using CodeWalker.GameFiles; +using Collections.Pooled; +using CommunityToolkit.HighPerformance.Buffers; using SharpDX; using System; +using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Runtime.Intrinsics.Arm; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -15,7 +20,7 @@ namespace CodeWalker { public static void ValidateReaderState(XmlReader reader, string element) { - if (reader == null) + if (reader is null) { throw new ArgumentNullException(nameof(reader)); } @@ -29,61 +34,84 @@ namespace CodeWalker } } - public static string GetStringAttribute(XmlNode node, string attribute) + public static bool TryGetAttribute(this XElement element, string attribute, [NotNullWhen(true)] out XAttribute? attr) { - if (node == null) return null; + attr = element.Attribute(attribute); + if (attr is null) + return false; + + return true; + } + + public static string? GetStringAttribute(this XmlNode? node, string attribute) + { + if (node is null || node.Attributes is null) + return null; return node.Attributes[attribute]?.InnerText; } - public static bool GetBoolAttribute(XmlNode node, string attribute) + public static bool GetBoolAttribute(this XElement element, string attribute = "value") { - if (node == null) return false; - string val = node.Attributes[attribute]?.InnerText; - bool b; - bool.TryParse(val, out b); + ArgumentNullException.ThrowIfNull(element, nameof(element)); + + var val = element.Attribute(attribute); + if (val is null) return false; + + bool.TryParse(val.Value, out var b); return b; } - public static int GetIntAttribute(XmlNode node, string attribute) + + public static bool GetBoolAttribute(this XmlNode? node, string attribute) { - if (node == null) return 0; - string val = node.Attributes[attribute]?.InnerText; - int i; - int.TryParse(val, out i); + if (node is null) + return false; + string? val = node.Attributes?[attribute]?.InnerText; + _ = bool.TryParse(val, out var b); + return b; + } + public static int GetIntAttribute(this XmlNode? node, string attribute) + { + if (node is null) + return 0; + string? val = node.Attributes?[attribute]?.InnerText; + _ = int.TryParse(val, out var i); return i; } - public static uint GetUIntAttribute(XmlNode node, string attribute) + public static uint GetUIntAttribute(this XmlNode? node, string attribute) { - if (node == null) return 0; - string val = node.Attributes[attribute]?.InnerText; - uint i; - uint.TryParse(val, out i); + if (node is null) + return 0; + string? val = node.Attributes?[attribute]?.InnerText; + _ = uint.TryParse(val, out var i); return i; } - public static ulong GetULongAttribute(XmlNode node, string attribute) + public static ulong GetULongAttribute(this XmlNode? node, string attribute) { - if (node == null) return 0; - string val = node.Attributes[attribute]?.InnerText; - ulong i; - ulong.TryParse(val, out i); + if (node is null) + return 0; + string? val = node.Attributes?[attribute]?.InnerText; + _ = ulong.TryParse(val, out var i); return i; } - public static float GetFloatAttribute(XmlNode node, string attribute) + public static float GetFloatAttribute(this XmlNode? node, string attribute) { - if (node == null) return 0; - string val = node.Attributes[attribute]?.InnerText; - float f; - FloatUtil.TryParse(val, out f); + if (node is null) + return 0; + string? val = node.Attributes?[attribute]?.InnerText; + _ = FloatUtil.TryParse(val, out var f); return f; } - public static string GetChildInnerText(XmlNode node, string name) + public static string? GetChildInnerText(this XmlNode? node, string name) { - if (node == null) return null; + if (node is null) + return null; return node.SelectSingleNode(name)?.InnerText; } - public static string GetChildInnerText(XElement node, string name) { - if (node == null) return null; - return node.Element(name).Value; + public static string? GetChildInnerText(this XElement? node, string name) { + if (node is null) + return null; + return node.Element(name)?.Value; } public static string GetChildInnerText(XmlReader reader, string name) @@ -94,7 +122,7 @@ namespace CodeWalker if (reader.IsEmptyElement) { reader.ReadStartElement(); - return ""; + return string.Empty; } return reader.ReadElementContentAsString(); } @@ -104,13 +132,15 @@ namespace CodeWalker } } - public static bool GetChildBoolInnerText(XElement node, string name) + public static bool GetChildBoolInnerText(this XElement? node, string name) { - if (node == null) return false; - string val = node.Element(name).Value; + if (node is null) + return false; + string? val = node.Element(name)?.Value; + if (string.IsNullOrEmpty(val)) + return false; - bool b; - bool.TryParse(val, out b); + _ = bool.TryParse(val, out var b); return b; } @@ -129,28 +159,28 @@ namespace CodeWalker } - public static bool GetChildBoolInnerText(XmlNode node, string name) + public static bool GetChildBoolInnerText(this XmlNode? node, string name) { - if (node == null) return false; - string val = node.SelectSingleNode(name)?.InnerText; - bool b; - bool.TryParse(val, out b); + if (node is null) + return false; + string? val = node.SelectSingleNode(name)?.InnerText; + _ = bool.TryParse(val, out var b); return b; } - public static int GetChildIntInnerText(XmlNode node, string name) + public static int GetChildIntInnerText(this XmlNode? node, string name) { - if (node == null) return 0; - string val = node.SelectSingleNode(name)?.InnerText; - int i; - int.TryParse(val, out i); + if (node is null) + return 0; + string? val = node.SelectSingleNode(name)?.InnerText; + _ = int.TryParse(val, out var i); return i; } - public static float GetChildFloatInnerText(XmlNode node, string name) + public static float GetChildFloatInnerText(this XmlNode? node, string name) { - if (node == null) return 0; - string val = node.SelectSingleNode(name)?.InnerText; - float f; - FloatUtil.TryParse(val, out f); + if (node is null) + return 0; + string? val = node.SelectSingleNode(name)?.InnerText; + _ = FloatUtil.TryParse(val, out var f); return f; } @@ -163,22 +193,25 @@ namespace CodeWalker public static T GetChildEnumInnerText(XmlNode node, string name) where T : struct { - if (node == null) return new T(); - string val = node.SelectSingleNode(name)?.InnerText; + if (node is null) + return new T(); + + string? val = node.SelectSingleNode(name)?.InnerText; return GetEnumValue(val); } - public static T GetEnumValue(string val) where T : struct + public static T GetEnumValue(string? val) where T : struct { if (string.IsNullOrEmpty(val)) { - return default(T); + return default; } if (val.StartsWith("hash_", StringComparison.OrdinalIgnoreCase)) { //convert hash_12ABC to Unk_12345 - var substr = val.Substring(5); - var uval = Convert.ToUInt32(substr, 16); - val = "Unk_" + uval.ToString(); + //var substr = val.Substring(5); + //var uval = Convert.ToUInt32(substr, 16); + _ = int.TryParse(val.AsSpan(5), System.Globalization.NumberStyles.HexNumber, null, out var result); + val = $"Unk_{result}"; } T enumval; Enum.TryParse(val, out enumval); @@ -236,12 +269,13 @@ namespace CodeWalker string val = reader.GetAttribute(attribute); if (val?.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ?? false) { - var subs = val.Substring(2); - i = Convert.ToUInt32(subs, 16); + //var subs = val.Substring(2); + //i = Convert.ToUInt32(subs, 16); + _ = uint.TryParse(val.AsSpan(2), System.Globalization.NumberStyles.HexNumber, null, out i); } else { - uint.TryParse(val, out i); + _ = uint.TryParse(val, out i); } return i; } @@ -253,12 +287,13 @@ namespace CodeWalker uint i; if (val?.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ?? false) { - var subs = val.Substring(2); - i = Convert.ToUInt32(subs, 16); + //var subs = val.Substring(2); + //i = Convert.ToUInt32(subs, 16); + _ = uint.TryParse(val.AsSpan(2), System.Globalization.NumberStyles.HexNumber, null, out i); } else { - uint.TryParse(val, out i); + _ = uint.TryParse(val, out i); } return i; } @@ -269,12 +304,13 @@ namespace CodeWalker ulong i; if (val?.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ?? false) { - var subs = val.Substring(2); - i = Convert.ToUInt64(subs, 16); + //var subs = val.Substring(2); + //i = Convert.ToUInt64(subs, 16); + _ = ulong.TryParse(val.AsSpan(2), System.Globalization.NumberStyles.HexNumber, null, out i); } else { - ulong.TryParse(val, out i); + _ = ulong.TryParse(val, out i); } return i; } @@ -298,22 +334,23 @@ namespace CodeWalker return f; } - public static float GetChildFloatAttribute(XmlNode node, string name, string attribute = "value") + public static float GetChildFloatAttribute(XmlNode? node, string name, string attribute = "value") { - if (node == null) return 0; - string val = node.SelectSingleNode(name)?.Attributes[attribute]?.InnerText; + if (node is null) + return 0; + string? val = node.SelectSingleNode(name)?.Attributes?[attribute]?.InnerText; float f; FloatUtil.TryParse(val, out f); return f; } - public static string GetChildStringAttribute(XmlNode node, string name, string attribute = "value") + public static string? GetChildStringAttribute(XmlNode node, string name, string attribute = "value") { - if (node == null) return string.Empty; - string val = node.SelectSingleNode(name)?.Attributes[attribute]?.InnerText; + if (node is null) return string.Empty; + string? val = node.SelectSingleNode(name)?.Attributes?[attribute]?.InnerText; return val; } - public static string GetChildStringAttribute(XmlReader reader, string name, string attribute = "value") + public static string? GetChildStringAttribute(XmlReader reader, string name, string attribute = "value") { ValidateReaderState(reader, name); @@ -381,7 +418,19 @@ namespace CodeWalker return false; } - public static IEnumerable IterateItems(XmlReader reader, string parentElementName) + public static void MoveToStartElement(this XmlReader reader, string name) + { + var startDepth = reader.Depth; + while (reader.Read() && startDepth <= reader.Depth) + { + if (reader.IsStartElement() && reader.Name == name) + { + break; + } + } + } + + public static IEnumerable IterateItems(this XmlReader reader, string parentElementName) { ValidateReaderState(reader, parentElementName); reader.MoveToContent(); @@ -391,8 +440,9 @@ namespace CodeWalker reader.ReadStartElement(parentElementName); yield break; } + var startDepth = reader.Depth; reader.ReadStartElement(parentElementName); - while(reader.IsItemElement()) + while(reader.IsItemElement() && startDepth < reader.Depth) { if (XNode.ReadFrom(reader) is XElement el) { @@ -417,10 +467,11 @@ namespace CodeWalker - public static byte[] GetRawByteArray(XmlNode node, int fromBase = 16) + public static byte[] GetRawByteArray(XmlNode? node, int fromBase = 16) { - if (node == null) return new byte[0]; - var data = new List(); + if (node == null) + return []; + using var data = new PooledList(); var split = Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -439,17 +490,18 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawByteArray(cnode, fromBase); } - public static byte[] GetChildRawByteArrayNullable(XmlNode node, string name, int fromBase = 16) + public static byte[]? GetChildRawByteArrayNullable(XmlNode node, string name, int fromBase = 16) { var cnode = node.SelectSingleNode(name); var arr = GetRawByteArray(cnode, fromBase); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static ushort[] GetRawUshortArray(XmlNode node) + public static ushort[] GetRawUshortArray(XmlNode? node) { - if (node == null) return new ushort[0]; - var data = new List(); + if (node is null) + return []; + using var data = new PooledList(); var split = Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -469,17 +521,18 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawUshortArray(cnode); } - public static ushort[] GetChildRawUshortArrayNullable(XmlNode node, string name) + public static ushort[]? GetChildRawUshortArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawUshortArray(cnode); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static uint[] GetRawUintArray(XmlNode node) + public static uint[] GetRawUintArray(XmlNode? node) { - if (node == null) return new uint[0]; - var data = new List(); + if (node == null) + return []; + using var data = new PooledList(); var split = Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -499,17 +552,18 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawUintArray(cnode); } - public static uint[] GetChildRawUintArrayNullable(XmlNode node, string name) + public static uint[]? GetChildRawUintArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawUintArray(cnode); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static int[] GetRawIntArray(XmlNode node) + public static int[] GetRawIntArray(XmlNode? node) { - if (node == null) return new int[0]; - var data = new List(); + if (node is null) + return []; + using var data = new PooledList(); var split = Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -529,17 +583,18 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawIntArray(cnode); } - public static int[] GetChildRawIntArrayNullable(XmlNode node, string name) + public static int[]? GetChildRawIntArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawIntArray(cnode); return ((arr != null) && (arr.Length > 0)) ? arr : null; } - public static float[] GetRawFloatArray(XmlNode node) + public static float[] GetRawFloatArray(XmlNode? node) { - if (node == null) return new float[0]; - var items = new List(); + if (node is null) + return []; + using var items = new PooledList(); var split = Regex.Split(node.InnerText, @"[\s\r\n\t]");//node.InnerText.Split('\n');// for (int i = 0; i < split.Length; i++) { @@ -555,19 +610,20 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawFloatArray(cnode); } - public static float[] GetChildRawFloatArrayNullable(XmlNode node, string name) + public static float[]? GetChildRawFloatArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawFloatArray(cnode); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static Vector2[] GetRawVector2Array(XmlNode node) + public static Vector2[] GetRawVector2Array(XmlNode? node) { - if (node == null) return new Vector2[0]; + if (node is null) + return []; float x = 0f; float y = 0f; - var items = new List(); + using var items = new PooledList(); var split = node.InnerText.Split('\n');// Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -604,13 +660,14 @@ namespace CodeWalker return GetRawVector2Array(cnode); } - public static Vector3[] GetRawVector3Array(XmlNode node) + public static Vector3[] GetRawVector3Array(XmlNode? node) { - if (node == null) return new Vector3[0]; + if (node is null) + return []; float x = 0f; float y = 0f; float z = 0f; - var items = new List(); + using var items = new PooledList(); var split = node.InnerText.Split('\n');// Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -646,21 +703,20 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawVector3Array(cnode); } - public static Vector3[] GetChildRawVector3ArrayNullable(XmlNode node, string name) + public static Vector3[]? GetChildRawVector3ArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawVector3Array(cnode); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static Vector4[] GetRawVector4Array(XmlNode node) + public static Vector4[] GetRawVector4Array(XmlNode? node) { - if (node == null) return new Vector4[0]; - float x = 0f; - float y = 0f; + if (node is null) + return []; float z = 0f; float w = 0f; - var items = new List(); + using var items = new PooledList(); var split = node.InnerText.Split('\n');// Regex.Split(node.InnerText, @"[\s\r\n\t]"); for (int i = 0; i < split.Length; i++) { @@ -668,11 +724,13 @@ namespace CodeWalker if (string.IsNullOrEmpty(s)) continue; var split2 = s.Split(',');// Regex.Split(s, @"[\s\t]"); int c = 0; - x = 0f; y = 0f; + float x = 0f; + float y = 0f; for (int n = 0; n < split2.Length; n++) { var ts = split2[n]?.Trim(); - if (string.IsNullOrEmpty(ts)) continue; + if (string.IsNullOrEmpty(ts)) + continue; var f = FloatUtil.Parse(ts); switch (c) { @@ -697,18 +755,21 @@ namespace CodeWalker var cnode = node.SelectSingleNode(name); return GetRawVector4Array(cnode); } - public static Vector4[] GetChildRawVector4ArrayNullable(XmlNode node, string name) + public static Vector4[]? GetChildRawVector4ArrayNullable(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); var arr = GetRawVector4Array(cnode); - return ((arr != null) && (arr.Length > 0)) ? arr : null; + return arr.Length > 0 ? arr : null; } - public static Matrix GetMatrix(XmlNode node) + public static Matrix GetMatrix(XmlNode? node) { - if (node == null) return Matrix.Identity; + if (node is null) + return Matrix.Identity; var arr = GetRawFloatArray(node); - if ((arr == null) || (arr.Length != 16)) return Matrix.Identity; + if (arr.Length != 16) + return Matrix.Identity; + return new Matrix(arr); } public static Matrix GetChildMatrix(XmlNode node, string name) @@ -718,4 +779,45 @@ namespace CodeWalker } } + + public class XmlNameTableThreadSafe : NameTable + { + //private object _locker = new object(); + + public StringPool StringPool; + public XmlNameTableThreadSafe() + : this(256) + { } + + public XmlNameTableThreadSafe(int stringPoolSize) + : base() + { + StringPool = new StringPool(stringPoolSize); + } + + + + public override string Add(string key) + { + return StringPool.GetOrAdd(key); + } + + public override string Add(char[] key, int start, int len) + { + return StringPool.GetOrAdd(key.AsSpan(start, len)); + } + + public override string? Get(char[] key, int start, int len) + { + StringPool.TryGet(key.AsSpan(start, len), out var value); + return value; + //return stringPool.Get(key.AsSpan(start, len)); + } + + public override string? Get(string value) + { + StringPool.TryGet(value, out var result); + return result; + } + } } diff --git a/CodeWalker.Core/World/AudioZones.cs b/CodeWalker.Core/World/AudioZones.cs index 7fea6e0..b723874 100644 --- a/CodeWalker.Core/World/AudioZones.cs +++ b/CodeWalker.Core/World/AudioZones.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -22,6 +23,7 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("AudioZones Init"); Inited = false; GameFileCache = gameFileCache; @@ -30,14 +32,13 @@ namespace CodeWalker.World Emitters.Clear(); AllItems.Clear(); - - List placements = new List(); - - if (GameFileCache.AudioDatRelFiles != null) + if (GameFileCache.AudioDatRelFiles is not null && GameFileCache.AudioDatRelFiles.Count > 0) { + List placements = new List(); foreach (var relfile in GameFileCache.AudioDatRelFiles) { - if (relfile == null) continue; + if (relfile is null) + continue; placements.Clear(); @@ -58,18 +59,20 @@ namespace CodeWalker.World { foreach (var reldata in relfile.RelDatas) { - AudioPlacement placement = null; - if (reldata is Dat151AmbientZone) + AudioPlacement? placement = null; + if (reldata is Dat151AmbientZone dat151AmbientZone) { - placement = new AudioPlacement(relfile, reldata as Dat151AmbientZone); - if (addtoLists) Zones.Add(placement); + placement = new AudioPlacement(relfile, dat151AmbientZone); + if (addtoLists) + Zones.Add(placement); } - else if (reldata is Dat151AmbientRule) + else if (reldata is Dat151AmbientRule dat151AmbientRule) { - placement = new AudioPlacement(relfile, reldata as Dat151AmbientRule); - if (addtoLists) Emitters.Add(placement); + placement = new AudioPlacement(relfile, dat151AmbientRule); + if (addtoLists) + Emitters.Add(placement); } - if (placement != null) + if (placement is not null) { placements.Add(placement); } @@ -82,7 +85,7 @@ namespace CodeWalker.World foreach (var relfile in relfiles) { - AudioPlacement[] fileplacements = null; + AudioPlacement[]? fileplacements = null; if (!PlacementsDict.TryGetValue(relfile, out fileplacements)) { List newplacements = new List(); @@ -90,7 +93,7 @@ namespace CodeWalker.World fileplacements = newplacements.ToArray(); PlacementsDict[relfile] = fileplacements; } - if (fileplacements != null) + if (fileplacements is not null) { placements.AddRange(fileplacements); } @@ -153,7 +156,8 @@ namespace CodeWalker.World public void UpdateFromZone() { - if (AudioZone == null) return; + if (AudioZone is null) + return; var zone = AudioZone; Name = zone.Name; @@ -207,7 +211,8 @@ namespace CodeWalker.World public void UpdateFromEmitter() { - if (AudioEmitter == null) return; + if (AudioEmitter is null) + return; var emitter = AudioEmitter; Name = emitter.Name; @@ -240,12 +245,12 @@ namespace CodeWalker.World OuterPos += delta; Position = useouter ? OuterPos : InnerPos; - if (AudioZone != null) + if (AudioZone is not null) { AudioZone.PlaybackZonePosition = InnerPos; AudioZone.ActivationZonePosition = OuterPos; } - if (AudioEmitter != null) + if (AudioEmitter is not null) { AudioEmitter.Position = InnerPos; } @@ -255,7 +260,7 @@ namespace CodeWalker.World Orientation = ori; OrientationInv = Quaternion.Invert(ori); - Vector3 t = ori.Multiply(Vector3.UnitX); + Vector3 t = ori.Multiply(in Vector3.UnitX); float angl = (float)Math.Atan2(t.Y, t.X); while (angl < 0) angl += ((float)Math.PI * 2.0f); float rad2deg = (float)(180.0 / Math.PI); diff --git a/CodeWalker.Core/World/Camera.cs b/CodeWalker.Core/World/Camera.cs index efa716d..47e6bec 100644 --- a/CodeWalker.Core/World/Camera.cs +++ b/CodeWalker.Core/World/Camera.cs @@ -153,9 +153,9 @@ namespace CodeWalker.World Vector3 cpos = new Vector3(); if (FollowEntity != null) { - up = FollowEntity.Orientation.Multiply(up); - lookat = FollowEntity.Orientation.Multiply(lookat); - rdir = FollowEntity.Orientation.Multiply(rdir); + up = FollowEntity.Orientation.Multiply(in up); + lookat = FollowEntity.Orientation.Multiply(in lookat); + rdir = FollowEntity.Orientation.Multiply(in rdir); cpos = FollowEntity.Position; } LocalLookAt = (rdir * CurrentDistance) + lookat; diff --git a/CodeWalker.Core/World/Clouds.cs b/CodeWalker.Core/World/Clouds.cs index 60c15b4..b4a00d3 100644 --- a/CodeWalker.Core/World/Clouds.cs +++ b/CodeWalker.Core/World/Clouds.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -73,6 +74,7 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus, Weather weather) { + using var _ = new DisposableTimer("Clouds Init"); Weather = weather; Timecycle = weather.Timecycle; var rpfman = gameFileCache.RpfMan; @@ -121,8 +123,7 @@ namespace CodeWalker.World XmlNodeList frags = xml.SelectNodes("mCloudHatFrags/Item"); foreach (XmlNode node in frags) { - XmlElement fragel = node as XmlElement; - if (fragel != null) + if (node is XmlElement fragel) { CloudHatFrag frag = new CloudHatFrag(); frag.Init(fragel); @@ -136,7 +137,7 @@ namespace CodeWalker.World AltitudeScrollScaler = Xml.GetChildFloatAttribute(xml, "mAltitudeScrollScaler", "value"); } - public CloudHatFrag FindFrag(string name) + public CloudHatFrag? FindFrag(string name) { for (int i = 0; i < CloudHatFrags.Length; i++) { @@ -179,8 +180,7 @@ namespace CodeWalker.World XmlNodeList layersxml = xml.SelectNodes("mLayers/Item"); foreach (XmlNode node in layersxml) { - XmlElement layerel = node as XmlElement; - if (layerel != null) + if (node is XmlElement layerel) { CloudHatFragLayer layer = new CloudHatFragLayer(); layer.Init(layerel); @@ -298,8 +298,7 @@ namespace CodeWalker.World XmlNodeList mapxml = xml.SelectNodes("SettingsMap/Item"); foreach (XmlNode node in mapxml) { - XmlElement itemel = node as XmlElement; - if (itemel != null) + if (node is XmlElement itemel) { CloudSettingsMapItem item = new CloudSettingsMapItem(); item.Init(itemel); diff --git a/CodeWalker.Core/World/Entity.cs b/CodeWalker.Core/World/Entity.cs index 1792752..36d5969 100644 --- a/CodeWalker.Core/World/Entity.cs +++ b/CodeWalker.Core/World/Entity.cs @@ -108,7 +108,7 @@ namespace CodeWalker.World Vector3 raydir = new Vector3(0.0f, 0.0f, -1.0f); Vector3 rayoff = new Vector3(0.0f, 0.0f, 0.0f); Ray ray = new Ray(targetpos + Center + rayoff, raydir); - var rayhit = Space.RayIntersect(ray, 1.0f); + var rayhit = Space.RayIntersect(ref ray, 1.0f); if (rayhit.Hit) { if (rayhit.HitDist > 0) @@ -164,12 +164,12 @@ namespace CodeWalker.World var raydir = new Vector3(0.0f, 0.0f, -1.0f); var ray = new Ray(Position, raydir); - var rayhit = Space.RayIntersect(ray, float.MaxValue); + var rayhit = Space.RayIntersect(ref ray, float.MaxValue); if (!rayhit.Hit && rayhit.TestComplete) { //must be under the map? try to find the ground... ray.Position = Position + new Vector3(0.0f, 0.0f, 1000.0f); - rayhit = Space.RayIntersect(ray, float.MaxValue); + rayhit = Space.RayIntersect(ref ray, float.MaxValue); if (rayhit.Hit) { Position = rayhit.Position + new Vector3(0.0f, 0.0f, Radius) - Center; diff --git a/CodeWalker.Core/World/Heightmaps.cs b/CodeWalker.Core/World/Heightmaps.cs index e5f614d..d7e8474 100644 --- a/CodeWalker.Core/World/Heightmaps.cs +++ b/CodeWalker.Core/World/Heightmaps.cs @@ -1,4 +1,6 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; @@ -18,21 +20,18 @@ namespace CodeWalker.World { return NodePositions; } - public EditorVertex[] GetPathVertices() - { - return null; - } public EditorVertex[] GetTriangleVertices() { return TriangleVerts; } - public Vector4[] NodePositions; - public EditorVertex[] TriangleVerts; + public Vector4[] NodePositions = []; + public EditorVertex[] TriangleVerts = []; public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("Heightmaps Init"); Inited = false; GameFileCache = gameFileCache; @@ -68,8 +67,8 @@ namespace CodeWalker.World public void BuildVertices() { - var vlist = new List(); - var nlist = new List(); + using var vlist = new PooledList(); + using var nlist = new PooledList(); foreach (var hmf in HeightmapFiles) { @@ -82,7 +81,7 @@ namespace CodeWalker.World } else { - TriangleVerts = null; + TriangleVerts = []; } if (nlist.Count > 0) { @@ -90,16 +89,16 @@ namespace CodeWalker.World } else { - NodePositions = null; + NodePositions = []; } } - private void BuildHeightmapVertices(HeightmapFile hmf, List vl, List nl) + private void BuildHeightmapVertices(HeightmapFile hmf, PooledList vl, PooledList nl) { - var v1 = new EditorVertex(); - var v2 = new EditorVertex(); - var v3 = new EditorVertex(); - var v4 = new EditorVertex(); + EditorVertex v1; + EditorVertex v2; + EditorVertex v3; + EditorVertex v4; uint cgrn = (uint)new Color(0, 128, 0, 60).ToRgba(); uint cyel = (uint)new Color(128, 128, 0, 200).ToRgba(); @@ -113,7 +112,6 @@ namespace CodeWalker.World var siz = max - min; var step = siz / new Vector3(w - 1, h - 1, 255); - v1.Colour = v2.Colour = v3.Colour = v4.Colour = cyel; for (int yi = 1; yi < h; yi++) { var yo = yi - 1; @@ -124,15 +122,15 @@ namespace CodeWalker.World var o2 = yo * w + xi; var o3 = yi * w + xo; var o4 = yi * w + xi; - v1.Position = min + step * new Vector3(xo, yo, hmin[o1]); - v2.Position = min + step * new Vector3(xi, yo, hmin[o2]); - v3.Position = min + step * new Vector3(xo, yi, hmin[o3]); - v4.Position = min + step * new Vector3(xi, yi, hmin[o4]); + v1 = new EditorVertex(min + step * new Vector3(xo, yo, hmin[o1]), cyel); + v2 = new EditorVertex(min + step * new Vector3(xi, yo, hmin[o2]), cyel); + v3 = new EditorVertex(min + step * new Vector3(xo, yi, hmin[o3]), cyel); + v4 = new EditorVertex(min + step * new Vector3(xi, yi, hmin[o4]), cyel); vl.Add(v1); vl.Add(v2); vl.Add(v3); vl.Add(v3); vl.Add(v2); vl.Add(v4); } } - v1.Colour = v2.Colour = v3.Colour = v4.Colour = cgrn; + for (int yi = 1; yi < h; yi++) { var yo = yi - 1; @@ -143,10 +141,10 @@ namespace CodeWalker.World var o2 = yo * w + xi; var o3 = yi * w + xo; var o4 = yi * w + xi; - v1.Position = min + step * new Vector3(xo, yo, hmax[o1]); - v2.Position = min + step * new Vector3(xi, yo, hmax[o2]); - v3.Position = min + step * new Vector3(xo, yi, hmax[o3]); - v4.Position = min + step * new Vector3(xi, yi, hmax[o4]); + v1 = new EditorVertex(min + step * new Vector3(xo, yo, hmax[o1]), cgrn); + v2 = new EditorVertex(min + step * new Vector3(xi, yo, hmax[o2]), cgrn); + v3 = new EditorVertex(min + step * new Vector3(xo, yi, hmax[o3]), cgrn); + v4 = new EditorVertex(min + step * new Vector3(xi, yi, hmax[o4]), cgrn); vl.Add(v1); vl.Add(v2); vl.Add(v3); vl.Add(v3); vl.Add(v2); vl.Add(v4); } diff --git a/CodeWalker.Core/World/Ped.cs b/CodeWalker.Core/World/Ped.cs index 6c6ab32..a33340a 100644 --- a/CodeWalker.Core/World/Ped.cs +++ b/CodeWalker.Core/World/Ped.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.GameFiles.Resources; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -10,33 +11,40 @@ using System.Threading.Tasks; namespace CodeWalker.World { - [TypeConverter(typeof(ExpandableObjectConverter))] public class Ped + [TypeConverter(typeof(ExpandableObjectConverter))] + public class Ped { public string Name { get; set; } = string.Empty; public MetaHash NameHash { get; set; } = 0;//ped name hash - public CPedModelInfo__InitData InitData { get; set; } = null; //ped init data - public YddFile Ydd { get; set; } = null; //ped drawables - public YtdFile Ytd { get; set; } = null; //ped textures - public YldFile Yld { get; set; } = null; //ped clothes - public YcdFile Ycd { get; set; } = null; //ped animations - public YedFile Yed { get; set; } = null; //ped expressions - public YftFile Yft { get; set; } = null; //ped skeleton YFT - public PedFile Ymt { get; set; } = null; //ped variation info - public Dictionary DrawableFilesDict { get; set; } = null; - public Dictionary TextureFilesDict { get; set; } = null; - public Dictionary ClothFilesDict { get; set; } = null; - public RpfFileEntry[] DrawableFiles { get; set; } = null; - public RpfFileEntry[] TextureFiles { get; set; } = null; - public RpfFileEntry[] ClothFiles { get; set; } = null; - public ClipMapEntry AnimClip { get; set; } = null; - public Expression Expression { get; set; } = null; + public CPedModelInfo__InitData? InitData { get; set; } = null; //ped init data + public YddFile? Ydd { get; set; } = null; //ped drawables + public YtdFile? Ytd { get; set; } = null; //ped textures + public YldFile? Yld { get; set; } = null; //ped clothes + public YcdFile? Ycd { get; set; } = null; //ped animations + public YedFile? Yed { get; set; } = null; //ped expressions + public YftFile? Yft { get; set; } = null; //ped skeleton YFT + public PedFile? Ymt { get; set; } = null; //ped variation info + [Browsable(true)] + [EditorBrowsable(EditorBrowsableState.Always)] + public PedsFiles PedsFiles { get; set; } + public ICollection Ymts { get; set; } = new List(); + public ICollection Dlcs { get; set; } = new List(); + public PedsDlcFiles? PedsDlcFiles { get; set; } = null; + public IDictionary? DrawableFilesDict { get; set; } = null; + public IDictionary? TextureFilesDict { get; set; } = null; + public IDictionary? ClothFilesDict { get; set; } = null; + public RpfFileEntry[]? DrawableFiles { get; set; } = null; + public RpfFileEntry[]? TextureFiles { get; set; } = null; + public RpfFileEntry[]? ClothFiles { get; set; } = null; + public ClipMapEntry? AnimClip { get; set; } = null; + public Expression? Expression { get; set; } = null; public string[] DrawableNames { get; set; } = new string[12]; public Drawable[] Drawables { get; set; } = new Drawable[12]; public Texture[] Textures { get; set; } = new Texture[12]; public Expression[] Expressions { get; set; } = new Expression[12]; public ClothInstance[] Clothes { get; set; } = new ClothInstance[12]; public bool EnableRootMotion { get; set; } = false; //used to toggle whether or not to include root motion when playing animations - public Skeleton Skeleton { get; set; } = null; + public Skeleton? Skeleton { get; set; } = null; public Vector3 Position { get; set; } = Vector3.Zero; public Quaternion Rotation { get; set; } = Quaternion.Identity; @@ -44,13 +52,13 @@ namespace CodeWalker.World public YmapEntityDef RenderEntity = new YmapEntityDef(); //placeholder entity object for rendering - public async ValueTask InitAsync(string name, GameFileCache gfc) + public async ValueTask InitAsync(string name, GameFileCache gfc, MetaHash? selectedDlc = null) { - var hash = JenkHash.GenHash(name.ToLowerInvariant()); - await InitAsync(hash, gfc); + var hash = JenkHash.GenHashLower(name); + await InitAsync(hash, gfc, selectedDlc); Name = name; } - public async ValueTask InitAsync(MetaHash pedhash, GameFileCache gfc) + public async ValueTask InitAsync(MetaHash pedhash, GameFileCache gfc, MetaHash? selectedDlc = null) { Name = string.Empty; @@ -71,12 +79,22 @@ namespace CodeWalker.World Expressions[i] = null; } + Console.WriteLine($"{selectedDlc} selected"); - CPedModelInfo__InitData initdata = null; - if (!gfc.PedsInitDict.TryGetValue(pedhash, out initdata)) return; + if (!gfc.PedsFiles.TryGetValue(pedhash, out var pedsFiles)) + { + Console.WriteLine("PedsFile not found"); + } else + { + PedsFiles = pedsFiles; + } + if (!gfc.PedsInitDict.TryGetValue(pedhash, out CPedModelInfo__InitData initdata)) + { + return; + } - var ycdhash = JenkHash.GenHash(initdata.ClipDictionaryName.ToLowerInvariant()); - var yedhash = JenkHash.GenHash(initdata.ExpressionDictionaryName.ToLowerInvariant()); + var ycdhash = JenkHash.GenHashLower(initdata.ClipDictionaryName); + var yedhash = JenkHash.GenHashLower(initdata.ExpressionDictionaryName); //bool pedchange = NameHash != pedhash; //Name = pedname; @@ -88,20 +106,60 @@ namespace CodeWalker.World Yed = gfc.GetYed(yedhash); Yft = gfc.GetYft(pedhash); - PedFile pedFile = null; - gfc.PedVariationsDict?.TryGetValue(pedhash, out pedFile); - Ymt = pedFile; + if (selectedDlc is not null) + { + Ymt = PedsFiles.Dlcs[selectedDlc.Value].PedFile; + } else + { + Ymt = PedsFiles.Dlcs.Values.First().PedFile; + } + + + var dlcsOrdered = pedsFiles.Dlcs.Where(p => + { + if (GameFileCache.Instance.DlcNameLookup.TryGetValue(p.Key, out var dlcName)) + { + if (dlcName.Contains("g9", StringComparison.OrdinalIgnoreCase)) + { + return false; + } + } + return true; + }).OrderBy(p => p.Value.Index).ToList(); + Ymts = dlcsOrdered.Select(p => p.Value.PedFile).ToList(); + Dlcs = dlcsOrdered.Select(p => p.Key).ToList(); + + //if (gfc.PedVariationsDict?.TryGetValue(pedhash, out var pedFiles) ?? false) + //{ + // Ymt = pedFiles.First(); + // Ymts = pedsFiles.Dlcs.Values.Select(p => p.PedFile).ToList(); + //} + + //Ymt = selectedFile ?? Ymt; Dictionary peddict = null; - gfc.PedDrawableDicts.TryGetValue(NameHash, out peddict); - DrawableFilesDict = peddict; - DrawableFiles = DrawableFilesDict?.Values.ToArray(); - gfc.PedTextureDicts.TryGetValue(NameHash, out peddict); - TextureFilesDict = peddict; - TextureFiles = TextureFilesDict?.Values.ToArray(); - gfc.PedClothDicts.TryGetValue(NameHash, out peddict); - ClothFilesDict = peddict; - ClothFiles = ClothFilesDict?.Values.ToArray(); + if (PedsFiles.TryGetPedsDlcFiles(Ymt, out var pedsDlcFiles)) + { + Console.WriteLine($"Found {Ymt.RpfFileEntry.Path} in pedsDlclist"); + PedsDlcFiles = pedsDlcFiles; + DrawableFilesDict = PedsDlcFiles.Drawables; + TextureFilesDict = PedsDlcFiles.TextureDicts; + ClothFilesDict = PedsDlcFiles.ClothDicts; + } + else + { + Console.WriteLine($"{Ymt.RpfFileEntry.Path} not found in pedsDlclist"); + gfc.PedDrawableDicts.TryGetValue(NameHash, out peddict); + DrawableFilesDict = peddict; + gfc.PedTextureDicts.TryGetValue(NameHash, out peddict); + TextureFilesDict = peddict; + gfc.PedClothDicts.TryGetValue(NameHash, out peddict); + ClothFilesDict = peddict; + } + + DrawableFiles = DrawableFilesDict.Values.ToArray(); + TextureFiles = TextureFilesDict.Values.ToArray(); + ClothFiles = ClothFilesDict?.Values?.ToArray() ?? Array.Empty(); RpfFileEntry clothFile = null; if (ClothFilesDict?.TryGetValue(pedhash, out clothFile) ?? false) @@ -115,31 +173,30 @@ namespace CodeWalker.World } - while ((Ydd != null) && (!Ydd.Loaded)) { await Task.Delay(1);//kinda hacky - Ydd = gfc.GetYdd(pedhash); + await gfc.TryLoadEnqueue(Ydd); } while ((Ytd != null) && (!Ytd.Loaded)) { await Task.Delay(1);//kinda hacky - Ytd = gfc.GetYtd(pedhash); + await gfc.TryLoadEnqueue(Ytd); } while ((Ycd != null) && (!Ycd.Loaded)) { await Task.Delay(1);//kinda hacky - Ycd = gfc.GetYcd(ycdhash); + await gfc.TryLoadEnqueue(Ycd); } while ((Yed != null) && (!Yed.Loaded)) { await Task.Delay(1);//kinda hacky - Yed = gfc.GetYed(yedhash); + await gfc.TryLoadEnqueue(Yed); } while ((Yft != null) && (!Yft.Loaded)) { await Task.Delay(1);//kinda hacky - Yft = gfc.GetYft(pedhash); + await gfc.TryLoadEnqueue(Yft); } @@ -163,7 +220,7 @@ namespace CodeWalker.World - public async ValueTask SetComponentDrawableAsync(int index, string name, string tex, GameFileCache gfc) + public async ValueTask SetComponentDrawableAsync(int index, string name, string tex, MetaHash dlc, GameFileCache gfc) { if (string.IsNullOrEmpty(name)) { @@ -174,16 +231,33 @@ namespace CodeWalker.World return; } + Console.WriteLine($"{index}: {name} - {tex} - {dlc}"); MetaHash namehash = JenkHash.GenHashLower(name); + PedsDlcFiles pedsDlcFiles; Drawable d = null; if (Ydd?.Dict != null) { Ydd.Dict.TryGetValue(namehash, out d); } + if (PedsFiles.TryGetPedsDlcFiles(dlc, out pedsDlcFiles)) + { + if (pedsDlcFiles.Drawables.TryGetValue(namehash, out var file)) + { + var ydd = await gfc.GetFileUncachedAsync(file); + while ((ydd != null) && (!ydd.Loaded)) + { + await Task.Delay(1);//kinda hacky + await gfc.TryLoadEnqueue(ydd); + } + if (ydd?.Drawables?.Length > 0) + { + d = ydd.Drawables[0];//should only be one in this dict + } + } + } if ((d == null) && (DrawableFilesDict != null)) { - RpfFileEntry file = null; - if (DrawableFilesDict.TryGetValue(namehash, out file)) + if (DrawableFilesDict.TryGetValue(namehash, out var file)) { var ydd = await gfc.GetFileUncachedAsync(file); while ((ydd != null) && (!ydd.Loaded)) @@ -198,12 +272,35 @@ namespace CodeWalker.World } } - MetaHash texhash = JenkHash.GenHash(tex.ToLowerInvariant()); - Texture t = null; - if (Ytd?.TextureDict?.Dict != null) + MetaHash texhash = JenkHash.GenHashLower(tex); + Texture? t = null; + + if (t is null && PedsFiles.TryGetPedsDlcFiles(dlc, out pedsDlcFiles)) + { + if (pedsDlcFiles.TextureDicts.TryGetValue(texhash, out var file)) + { + var ytd = await gfc.GetFileUncachedAsync(file); + while (ytd != null && !ytd.Loaded) + { + await Task.Delay(1);//kinda hacky + await gfc.TryLoadEnqueue(ytd); + } + if (ytd?.TextureDict?.Textures?.data_items.Length > 0) + { + t = ytd.TextureDict.Textures.data_items[0];//should only be one in this dict + } + } + else + { + Console.WriteLine($"Couldn't find texture file in PedsFiles"); + } + } + + if (t is null && Ytd?.TextureDict?.Dict != null) { Ytd.TextureDict.Dict.TryGetValue(texhash, out t); } + if ((t == null) && (TextureFilesDict != null)) { RpfFileEntry file = null; @@ -227,10 +324,25 @@ namespace CodeWalker.World { Yld.Dict.TryGetValue(namehash, out cc); } + if (cc == null && PedsFiles.TryGetPedsDlcFiles(dlc, out pedsDlcFiles)) + { + if (pedsDlcFiles.TextureDicts.TryGetValue(namehash, out var file)) + { + var yld = await gfc.GetFileUncachedAsync(file); + while ((yld != null) && (!yld.Loaded)) + { + await Task.Delay(1);//kinda hacky + await gfc.TryLoadEnqueue(yld); + } + if (yld?.ClothDictionary?.Clothes?.data_items?.Length > 0) + { + cc = yld.ClothDictionary.Clothes.data_items[0];//should only be one in this dict + } + } + } if ((cc == null) && (ClothFilesDict != null)) { - RpfFileEntry file = null; - if (ClothFilesDict.TryGetValue(namehash, out file)) + if (ClothFilesDict.TryGetValue(namehash, out RpfFileEntry file)) { var yld = await gfc.GetFileUncachedAsync(file); while ((yld != null) && (!yld.Loaded)) @@ -279,7 +391,7 @@ namespace CodeWalker.World { var name = item?.GetDrawableName(alt); var texn = item?.GetTextureName(tex); - await SetComponentDrawableAsync(index, name, texn, gfc); + await SetComponentDrawableAsync(index, name, texn, 0, gfc); } } } diff --git a/CodeWalker.Core/World/PopZones.cs b/CodeWalker.Core/World/PopZones.cs index 2d2a33b..b7aa6b1 100644 --- a/CodeWalker.Core/World/PopZones.cs +++ b/CodeWalker.Core/World/PopZones.cs @@ -1,8 +1,11 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -15,25 +18,18 @@ namespace CodeWalker.World public Dictionary Groups = new Dictionary(); - public Vector4[] GetNodePositions() - { - return null; - } - public EditorVertex[] GetPathVertices() - { - return null; - } public EditorVertex[] GetTriangleVertices() { return TriangleVerts; } - public EditorVertex[] TriangleVerts; + public EditorVertex[] TriangleVerts = Array.Empty(); public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("PopZones Init"); Inited = false; GameFileCache = gameFileCache; @@ -55,9 +51,9 @@ namespace CodeWalker.World Groups.Clear(); - var ipllines = ipltext.Split('\n'); + //var ipllines = ipltext.Split('\n'); bool inzone = false; - foreach (var iplline in ipllines) + foreach (var iplline in ipltext.EnumerateSplit('\n')) { var linet = iplline.Trim(); if (linet == "zone") @@ -73,8 +69,7 @@ namespace CodeWalker.World PopZoneBox box = new PopZoneBox(); box.Init(linet); - PopZone group; - if (!Groups.TryGetValue(box.NameLabel, out group)) + if (!Groups.TryGetValue(box.NameLabel, out var group)) { group = new PopZone(); group.NameLabel = box.NameLabel; @@ -88,7 +83,7 @@ namespace CodeWalker.World foreach (var group in Groups.Values) { - var hash = JenkHash.GenHash(group.NameLabel.ToLowerInvariant()); + var hash = JenkHash.GenHashLower(group.NameLabel); group.Name = GlobalText.TryGetString(hash); } @@ -103,34 +98,26 @@ namespace CodeWalker.World public void BuildVertices() { - var vlist = new List(); - var v1 = new EditorVertex(); - var v2 = new EditorVertex(); - var v3 = new EditorVertex(); - var v4 = new EditorVertex(); + using var vlist = new PooledList(); foreach (var group in Groups.Values) { - var hash = JenkHash.GenHash(group.NameLabel.ToLowerInvariant()); + var hash = JenkHash.GenHashLower(group.NameLabel); byte cr = (byte)((hash >> 8) & 0xFF); byte cg = (byte)((hash >> 16) & 0xFF); byte cb = (byte)((hash >> 24) & 0xFF); byte ca = 60; uint cv = (uint)new Color(cr, cg, cb, ca).ToRgba(); - v1.Colour = cv; - v2.Colour = cv; - v3.Colour = cv; - v4.Colour = cv; foreach (var box in group.Boxes) { var min = box.Box.Minimum; var max = box.Box.Maximum; - v1.Position = new Vector3(min.X, min.Y, 0); - v2.Position = new Vector3(max.X, min.Y, 0); - v3.Position = new Vector3(min.X, max.Y, 0); - v4.Position = new Vector3(max.X, max.Y, 0); + var v1 = new EditorVertex(new Vector3(min.X, min.Y, 0), cv); + var v2 = new EditorVertex(new Vector3(max.X, min.Y, 0), cv); + var v3 = new EditorVertex(new Vector3(min.X, max.Y, 0), cv); + var v4 = new EditorVertex(new Vector3(max.X, max.Y, 0), cv); vlist.Add(v1); vlist.Add(v2); @@ -147,7 +134,7 @@ namespace CodeWalker.World } else { - TriangleVerts = null; + TriangleVerts = []; } } @@ -165,7 +152,7 @@ namespace CodeWalker.World public override string ToString() { - return NameLabel + ": " + Name; + return $"{NameLabel}: {Name}"; } } @@ -177,29 +164,31 @@ namespace CodeWalker.World public string NameLabel { get; set; } public float UnkVal { get; set; } - - public void Init(string iplline) + [SkipLocalsInit] + public void Init(ReadOnlySpan iplline) { - var parts = iplline.Split(','); - if (parts.Length >= 9) + Span parts = stackalloc Range[10]; + var numParts = iplline.Split(parts, ',', StringSplitOptions.TrimEntries); + //var parts = iplline.Split(','); + if (numParts >= 9) { - ID = parts[0].Trim(); + ID = iplline[parts[0]].ToString(); BoundingBox b = new BoundingBox(); - b.Minimum.X = FloatUtil.Parse(parts[1].Trim()); - b.Minimum.Y = FloatUtil.Parse(parts[2].Trim()); - b.Minimum.Z = FloatUtil.Parse(parts[3].Trim()); - b.Maximum.X = FloatUtil.Parse(parts[4].Trim()); - b.Maximum.Y = FloatUtil.Parse(parts[5].Trim()); - b.Maximum.Z = FloatUtil.Parse(parts[6].Trim()); + b.Minimum.X = FloatUtil.Parse(iplline[parts[1]]); + b.Minimum.Y = FloatUtil.Parse(iplline[parts[2]]); + b.Minimum.Z = FloatUtil.Parse(iplline[parts[3]]); + b.Maximum.X = FloatUtil.Parse(iplline[parts[4]]); + b.Maximum.Y = FloatUtil.Parse(iplline[parts[5]]); + b.Maximum.Z = FloatUtil.Parse(iplline[parts[6]]); Box = b; - NameLabel = parts[7].Trim(); - UnkVal = FloatUtil.Parse(parts[8].Trim()); + NameLabel = iplline[parts[7]].ToString(); + UnkVal = FloatUtil.Parse(iplline[parts[8]]); } } public override string ToString() { - return ID + ": " + NameLabel + ": " + Box.ToString(); + return $"{ID}: {NameLabel}: {Box}"; } } diff --git a/CodeWalker.Core/World/Scenarios.cs b/CodeWalker.Core/World/Scenarios.cs index 4fd1f72..c2a95a9 100644 --- a/CodeWalker.Core/World/Scenarios.cs +++ b/CodeWalker.Core/World/Scenarios.cs @@ -7,6 +7,10 @@ using System.Threading.Tasks; using SharpDX; using System.Xml; using System.ComponentModel; +using System.Xml.Linq; +using CodeWalker.Core.Utils; +using System.Runtime.InteropServices; +using System.Diagnostics.Metrics; namespace CodeWalker.World { @@ -19,11 +23,12 @@ namespace CodeWalker.World public static ScenarioTypes ScenarioTypes { get; set; } - public List ScenarioRegions { get; set; } + public List ScenarioRegions { get; set; } = new List(); - public void Init(GameFileCache gameFileCache, Action updateStatus, Timecycle timecycle) + public async Task InitAsync(GameFileCache gameFileCache, Action updateStatus, Timecycle timecycle) { + using var _ = new DisposableTimer("Scenarios Init"); Timecycle = timecycle; GameFileCache = gameFileCache; @@ -31,7 +36,7 @@ namespace CodeWalker.World EnsureScenarioTypes(gameFileCache); - ScenarioRegions = new List(); + ScenarioRegions.Clear(); //rubidium: @@ -48,8 +53,8 @@ namespace CodeWalker.World var rpfman = gameFileCache.RpfMan; string manifestfilename = "update\\update.rpf\\x64\\levels\\gta5\\sp_manifest.ymt"; - YmtFile manifestymt = rpfman.GetFile(manifestfilename); - if ((manifestymt != null) && (manifestymt.CScenarioPointManifest != null)) + YmtFile? manifestymt = await rpfman.GetFileAsync(manifestfilename); + if (manifestymt is not null && manifestymt.CScenarioPointManifest is not null) { foreach (var region in manifestymt.CScenarioPointManifest.RegionDefs) @@ -63,14 +68,9 @@ namespace CodeWalker.World { usefilename = basefilename; } - YmtFile regionymt = rpfman.GetFile(usefilename); + YmtFile? regionymt = await rpfman.GetFileAsync(usefilename) ?? await rpfman.GetFileAsync(basefilename); - if (regionymt == null) - { - regionymt = rpfman.GetFile(basefilename); - } - - if (regionymt != null) + if (regionymt is not null) { var sregion = regionymt.ScenarioRegion; if (sregion != null) @@ -118,18 +118,13 @@ namespace CodeWalker.World [TypeConverter(typeof(ExpandableObjectConverter))] public class ScenarioRegion : BasePathData { - public EditorVertex[] PathVerts { get; set; } - public EditorVertex[] TriangleVerts { get; set; } - public Vector4[] NodePositions { get; set; } + public EditorVertex[] PathVerts { get; set; } = []; + public Vector4[] NodePositions { get; set; } = []; public EditorVertex[] GetPathVertices() { return PathVerts; } - public EditorVertex[] GetTriangleVertices() - { - return TriangleVerts; - } public Vector4[] GetNodePositions() { return NodePositions; @@ -168,17 +163,25 @@ namespace CodeWalker.World public void LoadTypes() { - if ((Ymt == null) || (Region == null)) - { return; } + if (Ymt == null || Region == null) + { + return; + } if (Region.LookUps == null) - { return; } + { + return; + } if (Scenarios.ScenarioTypes == null) //these are loaded by Scenarios.Init - { return; } + { + return; + } if (Nodes == null) //nodes not loaded yet - BuildVertices needs to be called first! - { return; } + { + return; + } foreach (var node in Nodes) { @@ -190,11 +193,12 @@ namespace CodeWalker.World private void LoadTypes(MCScenarioPointRegion r, MCScenarioPoint scp) { - if (scp == null) return; + if (scp is null) + return; var types = Scenarios.ScenarioTypes; //these are loaded by Scenarios.Init - if (types == null) - { return; } + if (types is null) + return; var typhashes = r.LookUps.TypeNames; var pedhashes = r.LookUps.PedModelSetNames; @@ -211,8 +215,6 @@ namespace CodeWalker.World scp.Type = types.GetScenarioTypeRef(hash); isveh = scp.Type?.IsVehicle ?? false; //TODO: make a warning about this if scp.Type is null? } - else - { } var msind = scp.ModelSetId; if (isveh) @@ -221,13 +223,7 @@ namespace CodeWalker.World { var hash = vehhashes[msind]; scp.ModelSet = types.GetVehicleModelSet(hash); - if (scp.ModelSet != null) - { } - else if (hash != 493038497)//"None" - { } } - else - { } } else { @@ -235,13 +231,7 @@ namespace CodeWalker.World { var hash = pedhashes[msind]; scp.ModelSet = types.GetPedModelSet(hash); - if (scp.ModelSet != null) - { } - else if (hash != 493038497)//"None" - { } } - else - { } } var intind = scp.InteriorId; @@ -268,10 +258,13 @@ namespace CodeWalker.World } private void LoadTypes(MCScenarioPointRegion r, MCScenarioChainingNode spn) { - if (spn == null) return; + if (spn == null) + return; var types = Scenarios.ScenarioTypes; //these are loaded by Scenarios.Init if (types == null) - { return; } + { + return; + } uint hash = spn._Data.ScenarioType; if ((hash != 0) && (hash != 493038497)) @@ -279,10 +272,6 @@ namespace CodeWalker.World bool isveh = false; spn.Type = types.GetScenarioTypeRef(hash); isveh = spn.Type?.IsVehicle ?? false; - if (isveh) - { } - else - { } } } @@ -294,11 +283,11 @@ namespace CodeWalker.World NodeDict = new Dictionary(); Nodes = new List(); - if ((Ymt != null) && (Ymt.CScenarioPointRegion != null)) + if (Ymt?.CScenarioPointRegion is not null) { var r = Ymt.CScenarioPointRegion; - if ((r.Paths != null) && (r.Paths.Nodes != null)) + if (r.Paths?.Nodes is not null) { foreach (var node in r.Paths.Nodes) { @@ -428,7 +417,7 @@ namespace CodeWalker.World public void BuildBVH() { - BVH = new PathBVH(Nodes, 10, 10); + BVH = new PathBVH(Nodes.ToArray(), 10, 10); } public void BuildVertices() @@ -441,11 +430,9 @@ namespace CodeWalker.World uint cgrn = (uint)Color.Green.ToBgra(); uint cblk = (uint)Color.Black.ToBgra(); - if ((Ymt != null) && (Ymt.CScenarioPointRegion != null)) + if (Ymt?.CScenarioPointRegion is not null) { var r = Ymt.CScenarioPointRegion; - EditorVertex pv1 = new EditorVertex(); - EditorVertex pv2 = new EditorVertex(); if ((r.Paths != null) && (r.Paths.Nodes != null)) { @@ -470,12 +457,10 @@ namespace CodeWalker.World byte cb1 = (byte)(255 - cr1); byte cb2 = (byte)(255 - cr2); - pv1.Position = v1.Position; - pv2.Position = v2.Position; - pv1.Colour = (uint)new Color(cr1, cg, cb1, (byte)255).ToRgba();// (v1._Data.HasIncomingEdges == 1) ? cred : cblu; - pv2.Colour = (uint)new Color(cr2, cg, cb2, (byte)255).ToRgba();// (v2._Data.HasIncomingEdges == 1) ? cred : cblu; - pathverts.Add(pv1); - pathverts.Add(pv2); + var colour1 = (uint)new Color(cr1, cg, cb1, (byte)255).ToRgba(); + var colour2 = (uint)new Color(cr2, cg, cb2, (byte)255).ToRgba(); + pathverts.Add(new EditorVertex(v1.Position, colour1)); + pathverts.Add(new EditorVertex(v2.Position, colour2)); } } } @@ -528,25 +513,18 @@ namespace CodeWalker.World } else { - PathVerts = null; + PathVerts = []; } - List nodes = new List(Nodes.Count); - foreach (var node in Nodes) + Vector4[] nodes = new Vector4[Nodes.Count]; + for (int i = 0; i < Nodes.Count; i++) { - nodes.Add(new Vector4(node.Position, 1.0f)); - } - if (nodes.Count > 0) - { - NodePositions = nodes.ToArray(); - } - else - { - NodePositions = null; + nodes[i] = new Vector4(Nodes[i].Position, 1.0f); } + NodePositions = nodes; } @@ -556,17 +534,18 @@ namespace CodeWalker.World private ScenarioNode EnsureNode(MCScenarioChainingNode cnode) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(cnode.Position, out exnode) && (exnode.ChainingNode == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, cnode.Position, out var exists); + if (exists && (exnode?.ChainingNode is null)) { - exnode.ChainingNode = cnode; + exnode!.ChainingNode = cnode; } else { - exnode = new ScenarioNode(cnode.Region?.Ymt); - exnode.ChainingNode = cnode; - exnode.Position = cnode.Position; - NodeDict[cnode.Position] = exnode; + exnode = new ScenarioNode(cnode.Region?.Ymt) + { + ChainingNode = cnode, + Position = cnode.Position, + }; Nodes.Add(exnode); } cnode.ScenarioNode = exnode; @@ -574,8 +553,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureNode(MCScenarioPoint point) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(point.Position, out exnode) && (exnode.MyPoint == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, point.Position, out var exists); + if (exists && (exnode!.MyPoint is null)) { exnode.MyPoint = point; exnode.Orientation = point.Orientation; @@ -586,15 +565,14 @@ namespace CodeWalker.World exnode.MyPoint = point; exnode.Position = point.Position; exnode.Orientation = point.Orientation; - NodeDict[point.Position] = exnode; Nodes.Add(exnode); } return exnode; } private ScenarioNode EnsureNode(MCExtensionDefSpawnPoint point) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(point.Position, out exnode) && (exnode.LoadSavePoint == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, point.Position, out var exists); + if (exists && (exnode!.LoadSavePoint is null)) { exnode.LoadSavePoint = point; } @@ -611,8 +589,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureClusterNode(MCScenarioPointCluster cluster) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(cluster.Position, out exnode) && (exnode.Cluster == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, cluster.Position, out var exists); + if (exists && (exnode!.Cluster is null)) { exnode.Cluster = cluster; } @@ -628,8 +606,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureClusterNode(MCScenarioPoint point) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(point.Position, out exnode) && (exnode.ClusterMyPoint == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, point.Position, out var exists); + if (exists && (exnode!.ClusterMyPoint is null)) { exnode.ClusterMyPoint = point; exnode.Orientation = point.Orientation; @@ -647,8 +625,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureClusterNode(MCExtensionDefSpawnPoint point) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(point.Position, out exnode) && (exnode.ClusterLoadSavePoint == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, point.Position, out var exists); + if (exists && exnode is not null && exnode.ClusterLoadSavePoint is null) { exnode.ClusterLoadSavePoint = point; } @@ -664,8 +642,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureEntityNode(MCExtensionDefSpawnPoint point) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(point.Position, out exnode) && (exnode.EntityPoint == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, point.Position, out var exists); + if (exists && exnode is not null && exnode.EntityPoint is null) { exnode.EntityPoint = point; } @@ -682,8 +660,8 @@ namespace CodeWalker.World } private ScenarioNode EnsureEntityNode(MCScenarioEntityOverride entity) { - ScenarioNode exnode; - if (NodeDict.TryGetValue(entity.Position, out exnode) && (exnode.Entity == null)) + ref var exnode = ref CollectionsMarshal.GetValueRefOrAddDefault(NodeDict, entity.Position, out var exists); + if (exists && exnode is not null && exnode.Entity is null) { exnode.Entity = entity; } @@ -703,40 +681,42 @@ namespace CodeWalker.World - public ScenarioNode AddNode(ScenarioNode copy = null) + public ScenarioNode AddNode(ScenarioNode? copy = null) { var n = new ScenarioNode(Ymt); var rgn = Ymt.CScenarioPointRegion; - if (copy != null) + if (copy is not null) { - if (copy.MyPoint != null) n.MyPoint = new MCScenarioPoint(rgn, copy.MyPoint); - if (copy.LoadSavePoint != null) n.LoadSavePoint = new MCExtensionDefSpawnPoint(rgn, copy.LoadSavePoint); - if (copy.ClusterMyPoint != null) + if (copy.MyPoint is not null) + n.MyPoint = new MCScenarioPoint(rgn, copy.MyPoint); + if (copy.LoadSavePoint is not null) + n.LoadSavePoint = new MCExtensionDefSpawnPoint(rgn, copy.LoadSavePoint); + if (copy.ClusterMyPoint is not null) { n.Cluster = copy.Cluster; n.ClusterMyPoint = new MCScenarioPoint(rgn, copy.ClusterMyPoint); } - else if (copy.ClusterLoadSavePoint != null) + else if (copy.ClusterLoadSavePoint is not null) { n.Cluster = copy.Cluster; n.ClusterLoadSavePoint = new MCExtensionDefSpawnPoint(rgn, copy.ClusterLoadSavePoint); } - else if (copy.Cluster != null) + else if (copy.Cluster is not null) { n.Cluster = new MCScenarioPointCluster(rgn, copy.Cluster); } - if (copy.EntityPoint != null) + if (copy.EntityPoint is not null) { n.Entity = copy.Entity; n.EntityPoint = new MCExtensionDefSpawnPoint(rgn, copy.EntityPoint); } - else if (copy.Entity != null) + else if (copy.Entity is not null) { n.Entity = new MCScenarioEntityOverride(rgn, copy.Entity); } - if (copy.ChainingNode != null) + if (copy.ChainingNode is not null) { n.ChainingNode = new MCScenarioChainingNode(rgn, copy.ChainingNode); n.ChainingNode.ScenarioNode = n; @@ -1046,7 +1026,8 @@ namespace CodeWalker.World public void RebuildAccelGrid() { - if (Region == null) return; + if (Region == null) + return; //find the grid extents, then sort points into the cell buckets. //output cell end point indexes to the accel grid data. @@ -1179,7 +1160,8 @@ namespace CodeWalker.World } public void RebuildLookUps() { - if (Region == null) return; + if (Region is null) + return; //find all unique hashes from the points, and assign new indices on points. @@ -1208,7 +1190,7 @@ namespace CodeWalker.World int interiorid = 0; int groupid = 0; int imapid = 0; - if ((mp.Type != null) && (!typeNames.TryGetValue(mp.Type.NameHash, out typeid))) + if (mp.Type != null && !typeNames.TryGetValue(mp.Type.NameHash, out typeid)) { typeid = typeNames.Count; typeNames[mp.Type.NameHash] = typeid; @@ -1233,17 +1215,17 @@ namespace CodeWalker.World } } } - if ((mp.InteriorName != 0) && (!interiorNames.TryGetValue(mp.InteriorName, out interiorid))) + if (mp.InteriorName != 0 && !interiorNames.TryGetValue(mp.InteriorName, out interiorid)) { interiorid = interiorNames.Count; interiorNames[mp.InteriorName] = interiorid; } - if ((mp.GroupName != 0) && (!groupNames.TryGetValue(mp.GroupName, out groupid))) + if (mp.GroupName != 0 && !groupNames.TryGetValue(mp.GroupName, out groupid)) { groupid = groupNames.Count; groupNames[mp.GroupName] = groupid; } - if ((mp.IMapName != 0) && (!imapNames.TryGetValue(mp.IMapName, out imapid))) + if (mp.IMapName != 0 && !imapNames.TryGetValue(mp.IMapName, out imapid)) { imapid = imapNames.Count; imapNames[mp.IMapName] = imapid; @@ -1254,44 +1236,39 @@ namespace CodeWalker.World mp.GroupId = (ushort)groupid; mp.IMapId = (byte)imapid; } - if (node.LoadSavePoint != null) + if (node.LoadSavePoint is not null) { var sp = node.LoadSavePoint; - int typeid = 0; - int modelsetid = 0; - int interiorid = 0; - int groupid = 0; - int imapid = 0; - if ((sp.SpawnType != 0) && (!typeNames.TryGetValue(sp.SpawnType, out typeid))) + if (sp.SpawnType != 0 && !typeNames.TryGetValue(sp.SpawnType, out var typeid)) { typeid = typeNames.Count; typeNames[sp.SpawnType] = typeid; } - if ((sp.PedType != 0) && (!pedModelSetNames.TryGetValue(sp.PedType, out modelsetid))) + if (sp.PedType != 0 && !pedModelSetNames.TryGetValue(sp.PedType, out var modelsetid)) { modelsetid = pedModelSetNames.Count; pedModelSetNames[sp.PedType] = modelsetid; } - if ((sp.Group != 0) && (!groupNames.TryGetValue(sp.Group, out groupid))) + if (sp.Group != 0 && !groupNames.TryGetValue(sp.Group, out var groupid)) { groupid = groupNames.Count; groupNames[sp.Group] = groupid; } - if ((sp.Interior != 0) && (!interiorNames.TryGetValue(sp.Interior, out interiorid))) + if (sp.Interior != 0 && !interiorNames.TryGetValue(sp.Interior, out var interiorid)) { interiorid = interiorNames.Count; interiorNames[sp.Interior] = interiorid; } - if ((sp.RequiredImap != 0) && (!imapNames.TryGetValue(sp.RequiredImap, out imapid))) + if (sp.RequiredImap != 0 && !imapNames.TryGetValue(sp.RequiredImap, out var imapid)) { imapid = imapNames.Count; imapNames[sp.RequiredImap] = imapid; } } - if (node.Cluster != null) - { - var cl = node.Cluster; - } + //if (node.Cluster is not null) + //{ + // var cl = node.Cluster; + //} if (node.ClusterMyPoint != null) { var mp = node.ClusterMyPoint; @@ -1300,7 +1277,7 @@ namespace CodeWalker.World int interiorid = 0; int groupid = 0; int imapid = 0; - if ((mp.Type != null) && (!typeNames.TryGetValue(mp.Type.NameHash, out typeid))) + if (mp.Type != null && !typeNames.TryGetValue(mp.Type.NameHash, out typeid)) { typeid = typeNames.Count; typeNames[mp.Type.NameHash] = typeid; @@ -1346,89 +1323,89 @@ namespace CodeWalker.World mp.GroupId = (ushort)groupid; mp.IMapId = (byte)imapid; } - if (node.ClusterLoadSavePoint != null) - { - var sp = node.ClusterLoadSavePoint; - //int typeid = 0; - //int modelsetid = 0; - //int interiorid = 0; - //int groupid = 0; - //int imapid = 0; - //if ((sp.SpawnType != 0) && (!typeNames.TryGetValue(sp.SpawnType, out typeid))) - //{ - // typeid = typeNames.Count; - // typeNames[sp.SpawnType] = typeid; - //} - //if ((sp.PedType != 0) && (!pedModelSetNames.TryGetValue(sp.PedType, out modelsetid))) - //{ - // modelsetid = pedModelSetNames.Count; - // pedModelSetNames[sp.PedType] = modelsetid; - //} - //if ((sp.Group != 0) && (!groupNames.TryGetValue(sp.Group, out groupid))) - //{ - // groupid = groupNames.Count; - // groupNames[sp.Group] = groupid; - //} - //if ((sp.Interior != 0) && (!interiorNames.TryGetValue(sp.Interior, out interiorid))) - //{ - // interiorid = interiorNames.Count; - // interiorNames[sp.Interior] = interiorid; - //} - //if ((sp.RequiredImap != 0) && (!imapNames.TryGetValue(sp.RequiredImap, out imapid))) - //{ - // imapid = imapNames.Count; - // imapNames[sp.RequiredImap] = imapid; - //} - } - if (node.Entity != null) - { - var en = node.Entity; - } - if (node.EntityPoint != null) - { - var sp = node.EntityPoint; - //int typeid = 0; - //int modelsetid = 0; - //int interiorid = 0; - //int groupid = 0; - //int imapid = 0; - //if ((sp.SpawnType != 0) && (!typeNames.TryGetValue(sp.SpawnType, out typeid))) - //{ - // typeid = typeNames.Count; - // typeNames[sp.SpawnType] = typeid; - //} - //if ((sp.PedType != 0) && (!pedModelSetNames.TryGetValue(sp.PedType, out modelsetid))) - //{ - // modelsetid = pedModelSetNames.Count; - // pedModelSetNames[sp.PedType] = modelsetid; - //} - //if ((sp.Group != 0) && (!groupNames.TryGetValue(sp.Group, out groupid))) - //{ - // groupid = groupNames.Count; - // groupNames[sp.Group] = groupid; - //} - //if ((sp.Interior != 0) && (!interiorNames.TryGetValue(sp.Interior, out interiorid))) - //{ - // interiorid = interiorNames.Count; - // interiorNames[sp.Interior] = interiorid; - //} - //if ((sp.RequiredImap != 0) && (!imapNames.TryGetValue(sp.RequiredImap, out imapid))) - //{ - // imapid = imapNames.Count; - // imapNames[sp.RequiredImap] = imapid; - //} - } - if (node.ChainingNode != null) - { - var cn = node.ChainingNode; - //int typeid = 0; - //if ((cn.Type != null) && (!typeNames.TryGetValue(cn.Type.NameHash, out typeid))) - //{ - // typeid = typeNames.Count; - // typeNames[cn.Type.NameHash] = typeid; - //} - //cn.TypeHash = cn.Type?.NameHash ?? 0; - } + //if (node.ClusterLoadSavePoint != null) + //{ + // var sp = node.ClusterLoadSavePoint; + // //int typeid = 0; + // //int modelsetid = 0; + // //int interiorid = 0; + // //int groupid = 0; + // //int imapid = 0; + // //if ((sp.SpawnType != 0) && (!typeNames.TryGetValue(sp.SpawnType, out typeid))) + // //{ + // // typeid = typeNames.Count; + // // typeNames[sp.SpawnType] = typeid; + // //} + // //if ((sp.PedType != 0) && (!pedModelSetNames.TryGetValue(sp.PedType, out modelsetid))) + // //{ + // // modelsetid = pedModelSetNames.Count; + // // pedModelSetNames[sp.PedType] = modelsetid; + // //} + // //if ((sp.Group != 0) && (!groupNames.TryGetValue(sp.Group, out groupid))) + // //{ + // // groupid = groupNames.Count; + // // groupNames[sp.Group] = groupid; + // //} + // //if ((sp.Interior != 0) && (!interiorNames.TryGetValue(sp.Interior, out interiorid))) + // //{ + // // interiorid = interiorNames.Count; + // // interiorNames[sp.Interior] = interiorid; + // //} + // //if ((sp.RequiredImap != 0) && (!imapNames.TryGetValue(sp.RequiredImap, out imapid))) + // //{ + // // imapid = imapNames.Count; + // // imapNames[sp.RequiredImap] = imapid; + // //} + //} + //if (node.Entity != null) + //{ + // var en = node.Entity; + //} + //if (node.EntityPoint != null) + //{ + // var sp = node.EntityPoint; + // //int typeid = 0; + // //int modelsetid = 0; + // //int interiorid = 0; + // //int groupid = 0; + // //int imapid = 0; + // //if ((sp.SpawnType != 0) && (!typeNames.TryGetValue(sp.SpawnType, out typeid))) + // //{ + // // typeid = typeNames.Count; + // // typeNames[sp.SpawnType] = typeid; + // //} + // //if ((sp.PedType != 0) && (!pedModelSetNames.TryGetValue(sp.PedType, out modelsetid))) + // //{ + // // modelsetid = pedModelSetNames.Count; + // // pedModelSetNames[sp.PedType] = modelsetid; + // //} + // //if ((sp.Group != 0) && (!groupNames.TryGetValue(sp.Group, out groupid))) + // //{ + // // groupid = groupNames.Count; + // // groupNames[sp.Group] = groupid; + // //} + // //if ((sp.Interior != 0) && (!interiorNames.TryGetValue(sp.Interior, out interiorid))) + // //{ + // // interiorid = interiorNames.Count; + // // interiorNames[sp.Interior] = interiorid; + // //} + // //if ((sp.RequiredImap != 0) && (!imapNames.TryGetValue(sp.RequiredImap, out imapid))) + // //{ + // // imapid = imapNames.Count; + // // imapNames[sp.RequiredImap] = imapid; + // //} + //} + //if (node.ChainingNode != null) + //{ + // var cn = node.ChainingNode; + // //int typeid = 0; + // //if ((cn.Type != null) && (!typeNames.TryGetValue(cn.Type.NameHash, out typeid))) + // //{ + // // typeid = typeNames.Count; + // // typeNames[cn.Type.NameHash] = typeid; + // //} + // //cn.TypeHash = cn.Type?.NameHash ?? 0; + //} } @@ -1441,42 +1418,42 @@ namespace CodeWalker.World foreach (var kvp in typeNames) { if (kvp.Value >= htypeNames.Length) - { continue; } + continue; htypeNames[kvp.Value] = kvp.Key; } foreach (var kvp in pedModelSetNames) { if (kvp.Value >= hpedModelSetNames.Length) - { continue; } + continue; hpedModelSetNames[kvp.Value] = kvp.Key; } foreach (var kvp in vehicleModelSetNames) { if (kvp.Value >= hvehicleModelSetNames.Length) - { continue; } + continue; hvehicleModelSetNames[kvp.Value] = kvp.Key; } foreach (var kvp in interiorNames) { if (kvp.Value >= hinteriorNames.Length) - { continue; } + continue; hinteriorNames[kvp.Value] = kvp.Key; } foreach (var kvp in groupNames) { if (kvp.Value >= hgroupNames.Length) - { continue; } + continue; hgroupNames[kvp.Value] = kvp.Key; } foreach (var kvp in imapNames) { if (kvp.Value >= himapNames.Length) - { continue; } + continue; himapNames[kvp.Value] = kvp.Key; } - if (Region.LookUps == null) + if (Region.LookUps is null) { Region.LookUps = new MCScenarioPointLookUps(); Region.LookUps.Region = Region; @@ -1494,7 +1471,7 @@ namespace CodeWalker.World } public void RebuildChains() { - if (Region == null) return; + if (Region is null) return; //update chain nodes array, update from/to indexes //currently not necessary - editor updates indexes and arrays already. @@ -1510,7 +1487,8 @@ namespace CodeWalker.World - [TypeConverter(typeof(ExpandableObjectConverter))] public class ScenarioNode : BasePathNode + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ScenarioNode : BasePathNode { public YmtFile Ymt { get; set; } public MCScenarioPointRegion Region { get; set; } @@ -1524,21 +1502,40 @@ namespace CodeWalker.World public MCExtensionDefSpawnPoint EntityPoint { get; set; } public MCScenarioChainingNode ChainingNode { get; set; } - public Vector3 Position { get; set; } - public Quaternion Orientation { get; set; } = Quaternion.Identity; + public Vector3 _Position; + public ref Vector3 Position => ref _Position; + + public Quaternion _Orientation = Quaternion.Identity; + public ref Quaternion Orientation => ref _Orientation; public string ShortTypeName { get { - if (MyPoint != null) return "ScenarioPoint"; - if (LoadSavePoint != null) return "ScenarioPoint"; - if (ClusterMyPoint != null) return "ScenarioPoint"; - if (ClusterLoadSavePoint != null) return "ScenarioPoint"; - if (Cluster != null) return "ScenarioCluster"; - if (EntityPoint != null) return "ScenarioPoint"; - if (Entity != null) return "ScenarioPoint"; - if (ChainingNode != null) return "ScenarioPoint"; + if (MyPoint is not null) + return "ScenarioPoint"; + + if (LoadSavePoint is not null) + return "ScenarioPoint"; + + if (ClusterMyPoint is not null) + return "ScenarioPoint"; + + if (ClusterLoadSavePoint is not null) + return "ScenarioPoint"; + + if (Cluster is not null) + return "ScenarioCluster"; + + if (EntityPoint is not null) + return "ScenarioPoint"; + + if (Entity is not null) + return "ScenarioPoint"; + + if (ChainingNode is not null) + return "ScenarioPoint"; + return "ScenarioPoint"; } } @@ -1546,14 +1543,30 @@ namespace CodeWalker.World { get { - if (MyPoint != null) return "Scenario MyPoint"; - if (LoadSavePoint != null) return "Scenario LoadSavePoint"; - if (ClusterMyPoint != null) return "Scenario Cluster MyPoint"; - if (ClusterLoadSavePoint != null) return "Scenario Cluster LoadSavePoint"; - if (Cluster != null) return "Scenario Cluster"; - if (EntityPoint != null) return "Scenario Entity Override Point"; - if (Entity != null) return "Scenario Entity Override"; - if (ChainingNode != null) return "Scenario Chaining Node"; + if (MyPoint is not null) + return "Scenario MyPoint"; + + if (LoadSavePoint is not null) + return "Scenario LoadSavePoint"; + + if (ClusterMyPoint is not null) + return "Scenario Cluster MyPoint"; + + if (ClusterLoadSavePoint is not null) + return "Scenario Cluster LoadSavePoint"; + + if (Cluster is not null) + return "Scenario Cluster"; + + if (EntityPoint is not null) + return "Scenario Entity Override Point"; + + if (Entity is not null) + return "Scenario Entity Override"; + + if (ChainingNode is not null) + return "Scenario Chaining Node"; + return "Scenario Point"; } } @@ -1561,14 +1574,22 @@ namespace CodeWalker.World { get { - if (MyPoint != null) return "MyPoint"; - if (LoadSavePoint != null) return "LoadSavePoint"; - if (ClusterMyPoint != null) return "Cluster MyPoint"; - if (ClusterLoadSavePoint != null) return "Cluster LoadSavePoint"; - if (Cluster != null) return "Cluster"; - if (EntityPoint != null) return "Entity Override Point"; - if (Entity != null) return "Entity Override"; - if (ChainingNode != null) return "Chaining Node"; + if (MyPoint is not null) + return "MyPoint"; + if (LoadSavePoint is not null) + return "LoadSavePoint"; + if (ClusterMyPoint is not null) + return "Cluster MyPoint"; + if (ClusterLoadSavePoint is not null) + return "Cluster LoadSavePoint"; + if (Cluster is not null) + return "Cluster"; + if (EntityPoint is not null) + return "Entity Override Point"; + if (Entity is not null) + return "Entity Override"; + if (ChainingNode is not null) + return "Chaining Node"; return "Point"; } } @@ -1576,14 +1597,30 @@ namespace CodeWalker.World { get { - if (MyPoint != null) return MyPoint.ToString(); - if (LoadSavePoint != null) return LoadSavePoint.ToString(); - if (ClusterMyPoint != null) return ClusterMyPoint.ToString(); - if (ClusterLoadSavePoint != null) return ClusterLoadSavePoint.ToString(); - if (Cluster != null) return Cluster.ToString(); - if (EntityPoint != null) return EntityPoint.ToString(); - if (Entity != null) return Entity.ToString(); - if (ChainingNode != null) return ChainingNode.ToString(); + if (MyPoint is not null) + return MyPoint.ToString(); + + if (LoadSavePoint is not null) + return LoadSavePoint.ToString(); + + if (ClusterMyPoint is not null) + return ClusterMyPoint.ToString(); + + if (ClusterLoadSavePoint is not null) + return ClusterLoadSavePoint.ToString(); + + if (Cluster is not null) + return Cluster.ToString(); + + if (EntityPoint is not null) + return EntityPoint.ToString(); + + if (Entity is not null) + return Entity.ToString(); + + if (ChainingNode is not null) + return ChainingNode.ToString(); + return FloatUtil.GetVector3String(Position); } } @@ -1601,34 +1638,58 @@ namespace CodeWalker.World { Position = position; - if (MyPoint != null) MyPoint.Position = position; - if (LoadSavePoint != null) LoadSavePoint.Position = position; - if (ClusterMyPoint != null) ClusterMyPoint.Position = position; - if (ClusterLoadSavePoint != null) ClusterLoadSavePoint.Position = position; - if ((Cluster != null) && (ClusterMyPoint == null) && (ClusterLoadSavePoint == null)) Cluster.Position = position; - if (EntityPoint != null) EntityPoint.Position = position; - if ((Entity != null) && (EntityPoint == null)) Entity.Position = position; - if (ChainingNode != null) ChainingNode.Position = position; + if (MyPoint is not null) + MyPoint.Position = position; + + if (LoadSavePoint is not null) + LoadSavePoint.Position = position; + + if (ClusterMyPoint is not null) + ClusterMyPoint.Position = position; + + if (ClusterLoadSavePoint is not null) + ClusterLoadSavePoint.Position = position; + + if (Cluster is not null && ClusterMyPoint is null && ClusterLoadSavePoint is null) + Cluster.Position = position; + + if (EntityPoint is not null) + EntityPoint.Position = position; + + if (Entity is not null && EntityPoint is null) + Entity.Position = position; + + if (ChainingNode is not null) + ChainingNode.Position = position; } public void SetOrientation(Quaternion orientation) { Orientation = orientation; - if (MyPoint != null) MyPoint.Orientation = orientation; - if (LoadSavePoint != null) LoadSavePoint.Orientation = orientation; - if (ClusterMyPoint != null) ClusterMyPoint.Orientation = orientation; - if (ClusterLoadSavePoint != null) ClusterLoadSavePoint.Orientation = orientation; + if (MyPoint is not null) + MyPoint.Orientation = orientation; + + if (LoadSavePoint is not null) + LoadSavePoint.Orientation = orientation; + + if (ClusterMyPoint is not null) + ClusterMyPoint.Orientation = orientation; + + if (ClusterLoadSavePoint is not null) + ClusterLoadSavePoint.Orientation = orientation; + //if (Cluster != null) Cluster.Orientation = orientation; - if (EntityPoint != null) EntityPoint.Orientation = orientation; + if (EntityPoint is not null) + EntityPoint.Orientation = orientation; + //if (Entity != null) Entity.Orientation = orientation; //if (ChainingNode != null) ChainingNode.Orientation = orientation; } - public override string ToString() { - return MedTypeName + " " + StringText; + return $"{MedTypeName} {StringText}"; } } @@ -1640,7 +1701,7 @@ namespace CodeWalker.World public class ScenarioTypes { - private object SyncRoot = new object(); //keep this thread-safe.. technically shouldn't be necessary, but best to be safe + private readonly object SyncRoot = new object(); //keep this thread-safe.. technically shouldn't be necessary, but best to be safe private Dictionary TypeRefs { get; set; } private Dictionary Types { get; set; } @@ -1663,7 +1724,7 @@ namespace CodeWalker.World VehicleModelSets = LoadModelSets(gfc, "common:\\data\\ai\\vehiclemodelsets.meta"); AnimGroups = LoadAnimGroups(gfc, "common:\\data\\ai\\conditionalanims.meta"); - TypeRefs = new Dictionary(); + TypeRefs = new Dictionary(Types.Count + TypeGroups.Count); foreach (var kvp in Types) { TypeRefs[kvp.Key] = new ScenarioTypeRef(kvp.Value); @@ -1695,7 +1756,7 @@ namespace CodeWalker.World var xml = LoadXml(gfc, filename); - if ((xml == null) || (xml.DocumentElement == null)) + if (xml?.DocumentElement is null) { return types; } @@ -1706,7 +1767,7 @@ namespace CodeWalker.World foreach (XmlNode item in items) { var typestr = Xml.GetStringAttribute(item, "type"); - ScenarioType typeobj = null; + ScenarioType typeobj; switch (typestr) { case "CScenarioPlayAnimsInfo": @@ -1728,17 +1789,15 @@ namespace CodeWalker.World break; } - if (typeobj != null) + if (typeobj is not null) { typeobj.Load(item); - if (!string.IsNullOrEmpty(typeobj.NameLower)) + if (!string.IsNullOrEmpty(typeobj.Name)) { - JenkIndex.Ensure(typeobj.NameLower); - uint hash = JenkHash.GenHash(typeobj.NameLower); + JenkIndex.EnsureLower(typeobj.Name); + uint hash = JenkHash.GenHashLower(typeobj.Name); types[hash] = typeobj; } - else - { } } } @@ -1754,7 +1813,7 @@ namespace CodeWalker.World var xml = LoadXml(gfc, filename); - if ((xml == null) || (xml.DocumentElement == null)) + if (xml?.DocumentElement == null) { return types; } @@ -1767,14 +1826,12 @@ namespace CodeWalker.World ScenarioTypeGroup group = new ScenarioTypeGroup(); group.Load(item); - if (!string.IsNullOrEmpty(group.NameLower)) + if (!string.IsNullOrEmpty(group.Name)) { - JenkIndex.Ensure(group.NameLower); - uint hash = JenkHash.GenHash(group.NameLower); + JenkIndex.EnsureLower(group.Name); + uint hash = JenkHash.GenHashLower(group.Name); types[hash] = group; } - else - { } } JenkIndex.Ensure("none"); @@ -1788,7 +1845,7 @@ namespace CodeWalker.World var xml = LoadXml(gfc, filename); - if ((xml == null) || (xml.DocumentElement == null)) + if (xml?.DocumentElement == null) { return sets; } @@ -1796,7 +1853,6 @@ namespace CodeWalker.World var setsxml = xml.DocumentElement; var items = setsxml.SelectNodes("ModelSets/Item"); - var noneset = new AmbientModelSet(); noneset.Name = "NONE"; noneset.NameHash = JenkHash.GenHash("none"); @@ -1824,7 +1880,7 @@ namespace CodeWalker.World var xml = LoadXml(gfc, filename); - if ((xml == null) || (xml.DocumentElement == null)) + if (xml?.DocumentElement == null) { return groups; } @@ -1852,87 +1908,89 @@ namespace CodeWalker.World - public ScenarioTypeRef GetScenarioTypeRef(uint hash) + public ScenarioTypeRef? GetScenarioTypeRef(uint hash) { lock (SyncRoot) { - if (TypeRefs == null) return null; + if (TypeRefs == null) + return null; ScenarioTypeRef st; TypeRefs.TryGetValue(hash, out st); return st; } } - public ScenarioType GetScenarioType(uint hash) + public ScenarioType? GetScenarioType(uint hash) { lock (SyncRoot) { - if (Types == null) return null; - ScenarioType st; - Types.TryGetValue(hash, out st); + if (Types == null) + return null; + Types.TryGetValue(hash, out var st); return st; } } - public ScenarioTypeGroup GetScenarioTypeGroup(uint hash) + public ScenarioTypeGroup? GetScenarioTypeGroup(uint hash) { lock (SyncRoot) { - if (TypeGroups == null) return null; - ScenarioTypeGroup tg; - TypeGroups.TryGetValue(hash, out tg); + if (TypeGroups == null) + return null; + TypeGroups.TryGetValue(hash, out var tg); return tg; } } - public AmbientModelSet GetPropSet(uint hash) + public AmbientModelSet? GetPropSet(uint hash) { lock (SyncRoot) { - if (PropSets == null) return null; - AmbientModelSet ms; - PropSets.TryGetValue(hash, out ms); + if (PropSets == null) + return null; + PropSets.TryGetValue(hash, out var ms); return ms; } } - public AmbientModelSet GetPedModelSet(uint hash) + public AmbientModelSet? GetPedModelSet(uint hash) { lock (SyncRoot) { - if (PedModelSets == null) return null; - AmbientModelSet ms; - if(!PedModelSets.TryGetValue(hash, out ms)) + if (PedModelSets == null) + return null; + if(!PedModelSets.TryGetValue(hash, out var ms)) { string s_hash = hash.ToString("X"); ms = new AmbientModelSet(); ms.Name = $"UNKNOWN PED MODELSET ({s_hash})"; ms.NameHash = new MetaHash(hash); - ms.Models = new AmbientModel[] { }; + ms.Models = []; PedModelSets.Add(hash, ms); } return ms; } } - public AmbientModelSet GetVehicleModelSet(uint hash) + public AmbientModelSet? GetVehicleModelSet(uint hash) { lock (SyncRoot) { - if (VehicleModelSets == null) return null; - AmbientModelSet ms; - if(!VehicleModelSets.TryGetValue(hash, out ms)) + if (VehicleModelSets == null) + return null; + if(!VehicleModelSets.TryGetValue(hash, out var ms)) { string s_hash = hash.ToString("X"); ms = new AmbientModelSet(); ms.Name = $"UNKNOWN VEHICLE MODELSET ({s_hash})"; ms.NameHash = new MetaHash(hash); - ms.Models = new AmbientModel[] {}; + ms.Models = []; VehicleModelSets.Add(hash, ms); } return ms; } } - public ConditionalAnimsGroup GetAnimGroup(uint hash) + public ConditionalAnimsGroup? GetAnimGroup(uint hash) { lock (SyncRoot) { - if (AnimGroups == null) return null; + if (AnimGroups == null) + return null; ConditionalAnimsGroup ag; AnimGroups.TryGetValue(hash, out ag); return ag; @@ -1943,7 +2001,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (TypeRefs == null) return null; + if (TypeRefs == null) + return []; return TypeRefs.Values.ToArray(); } } @@ -1951,7 +2010,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (Types == null) return null; + if (Types == null) + return []; return Types.Values.ToArray(); } } @@ -1959,7 +2019,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (TypeGroups == null) return null; + if (TypeGroups == null) + return []; return TypeGroups.Values.ToArray(); } } @@ -1967,7 +2028,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (PropSets == null) return null; + if (PropSets == null) + return []; return PropSets.Values.ToArray(); } } @@ -1975,7 +2037,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (PedModelSets == null) return null; + if (PedModelSets == null) + return []; return PedModelSets.Values.ToArray(); } } @@ -1983,7 +2046,8 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (VehicleModelSets == null) return null; + if (VehicleModelSets == null) + return []; return VehicleModelSets.Values.ToArray(); } } @@ -1991,14 +2055,16 @@ namespace CodeWalker.World { lock (SyncRoot) { - if (AnimGroups == null) return null; + if (AnimGroups == null) + return []; return AnimGroups.Values.ToArray(); } } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ScenarioTypeRef + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ScenarioTypeRef { /// /// Represents a scenario type that may either be a or a . @@ -2006,7 +2072,6 @@ namespace CodeWalker.World /// public string Name => IsGroup ? Group.Name : Type.Name; - public string NameLower => IsGroup ? Group.NameLower : Type.NameLower; public MetaHash NameHash => IsGroup ? Group.NameHash : Type.NameHash; public bool IsVehicle => IsGroup ? false : Type.IsVehicle; // groups don't support vehicle infos, so always false public string VehicleModelSet => IsGroup ? null : Type.VehicleModelSet; @@ -2037,23 +2102,20 @@ namespace CodeWalker.World } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ScenarioType + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ScenarioType { - public string OuterXml { get; set; } - public string Name { get; set; } - public string NameLower { get; set; } + public string? Name { get; set; } public MetaHash NameHash { get; set; } public bool IsVehicle { get; set; } - public string VehicleModelSet { get; set; } + public string? VehicleModelSet { get; set; } public MetaHash VehicleModelSetHash { get; set; } public virtual void Load(XmlNode node) { - OuterXml = node.OuterXml; Name = Xml.GetChildInnerText(node, "Name"); - NameLower = Name.ToLowerInvariant(); - NameHash = JenkHash.GenHash(NameLower); + NameHash = JenkHash.GenHashLower(Name); if (IsVehicle) @@ -2061,12 +2123,12 @@ namespace CodeWalker.World VehicleModelSet = Xml.GetChildStringAttribute(node, "VehicleModelSet", "ref"); if (!string.IsNullOrEmpty(VehicleModelSet) && (VehicleModelSet != "NULL")) { - VehicleModelSetHash = JenkHash.GenHash(VehicleModelSet.ToLowerInvariant()); + VehicleModelSetHash = JenkHash.GenHashLower(VehicleModelSet); } } } - public override string ToString() + public override string? ToString() { return Name; } @@ -2081,26 +2143,20 @@ namespace CodeWalker.World } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ScenarioTypeGroup + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ScenarioTypeGroup { - public string OuterXml { get; set; } public string Name { get; set; } - public string NameLower { get; set; } public MetaHash NameHash { get; set; } public void Load(XmlNode node) { - OuterXml = node.OuterXml; Name = Xml.GetChildInnerText(node, "Name"); - NameLower = Name.ToLowerInvariant(); - NameHash = JenkHash.GenHash(NameLower); + NameHash = JenkHash.GenHashLower(Name); } - public override string ToString() - { - return Name; - } + public override string ToString() => Name; } @@ -2182,15 +2238,14 @@ namespace CodeWalker.World } - [TypeConverter(typeof(ExpandableObjectConverter))] public class ConditionalAnimsGroup + [TypeConverter(typeof(ExpandableObjectConverter))] + public class ConditionalAnimsGroup { - public string OuterXml { get; set; } public string Name { get; set; } public void Load(XmlNode node) { - OuterXml = node.OuterXml; Name = Xml.GetChildInnerText(node, "Name"); } diff --git a/CodeWalker.Core/World/Space.cs b/CodeWalker.Core/World/Space.cs index b6df1dd..2ffa429 100644 --- a/CodeWalker.Core/World/Space.cs +++ b/CodeWalker.Core/World/Space.cs @@ -1,9 +1,13 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; +using Collections.Pooled; +using CommunityToolkit.HighPerformance; using SharpDX; using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading.Tasks; namespace CodeWalker.World { @@ -50,48 +54,50 @@ namespace CodeWalker.World private MetaHash CurrentWeather; - public void Init(GameFileCache gameFileCache, Action updateStatus) + public async Task InitAsync(GameFileCache gameFileCache, Action? updateStatus) { + using var _ = new DisposableTimer("Space Init"); GameFileCache = gameFileCache; - updateStatus("Scanning manifests..."); + updateStatus?.Invoke("Scanning manifests..."); InitManifestData(); - updateStatus("Scanning caches..."); + updateStatus?.Invoke("Scanning caches..."); - InitCacheData(); + await InitCacheDataAsync(); - updateStatus("Building map data store..."); + updateStatus?.Invoke("Building map data store..."); InitMapDataStore(); - updateStatus("Building bounds store..."); + updateStatus?.Invoke("Building bounds store..."); InitBoundsStore(); - updateStatus("Loading paths..."); + updateStatus?.Invoke("Loading paths..."); InitNodeGrid(); - updateStatus("Loading nav meshes..."); + updateStatus?.Invoke("Loading nav meshes..."); InitNavGrid(); Inited = true; - updateStatus("World initialised."); + updateStatus?.Invoke("World initialised."); } private void InitManifestData() { + using var _ = new DisposableTimer("InitManifestData"); interiorLookup.Clear(); interiorManifest.Clear(); ymaptimes.Clear(); @@ -102,54 +108,40 @@ namespace CodeWalker.World foreach (var manifest in manifests) { //build interior lookup - maps child->parent interior bounds - if (manifest.Interiors != null) - { - foreach (var interior in manifest.Interiors) - { - var intname = interior.Interior.Name; - if (interiorManifest.ContainsKey(intname)) - { } - interiorManifest[intname] = interior; - if (interior.Bounds != null) + foreach(var interior in manifest.Interiors) + { + var intname = interior.Interior.Name; + interiorManifest[intname] = interior; + + if (interior.Bounds != null) + { + foreach (var intbound in interior.Bounds) { - foreach (var intbound in interior.Bounds) - { - if (interiorLookup.ContainsKey(intbound)) - { }//updates can hit here - interiorLookup[intbound] = intname; - } + interiorLookup[intbound] = intname; } - else - { } } } //these appear to be all the dynamic "togglable" ymaps.... - if (manifest.MapDataGroups != null) + if (manifest.MapDataGroups.Length > 0) { - foreach (var mapgroup in manifest.MapDataGroups) + foreach(var mapgroup in manifest.MapDataGroups) { if (mapgroup.HoursOnOff != 0) { ymaptimes[mapgroup.Name] = mapgroup.HoursOnOff; } - if (mapgroup.WeatherTypes != null) + if (mapgroup.WeatherTypes.Length > 0) { ymapweathertypes[mapgroup.Name] = mapgroup.WeatherTypes; } if (dataGroupDict.ContainsKey(mapgroup.DataGroup.Name)) { - if (mapgroup.Bounds != null) + if (mapgroup.Bounds.Length == 0) { - var ex = dataGroupDict[mapgroup.DataGroup.Name]; - if (ex.Bounds != null) - { } //only 1 hit here - redcarpet - } - else - { - continue;//nothing to replace with + continue; } } dataGroupDict[mapgroup.DataGroup.Name] = mapgroup; @@ -174,178 +166,167 @@ namespace CodeWalker.World } - private void InitCacheData() + private async Task InitCacheDataAsync() { //build the grid from the cached data + using var _ = new DisposableTimer("InitCacheDataAsync"); var caches = GameFileCache.AllCacheFiles; - nodedict = new Dictionary(); - MetaHash inthash; - List intlist = new List(); - boundsdict = new Dictionary(); - usedboundsdict = new Dictionary(); - interiorProxies = new Dictionary(); + nodedict = new Dictionary(6000); + //List intlist = new List(); + boundsdict = new Dictionary(10000); + usedboundsdict = new Dictionary(10000); + interiorProxies = new Dictionary(1000); - Dictionary filedates = new Dictionary(); - Dictionary filedates2 = new Dictionary(); + //Dictionary filedates = new Dictionary(1500); + //Dictionary filedates2 = new Dictionary(1500); - foreach (var cache in caches) + using(new DisposableTimer("caches loop")) { - foreach (var filedate in cache.FileDates) + foreach (var cache in caches) { - CacheFileDate exdate; - if (filedates.TryGetValue(filedate.FileName, out exdate)) + //foreach (var filedate in cache.FileDates) + //{ + // if (filedates.TryGetValue(filedate.FileName, out CacheFileDate? exdate)) + // { + // if (filedate.TimeStamp >= exdate.TimeStamp) + // { + // filedates[filedate.FileName] = filedate; + // } + // } + // else + // { + // filedates[filedate.FileName] = filedate; + // } + + // if (filedates2.TryGetValue(filedate.FileID, out exdate)) + // { + // if (filedate.TimeStamp >= exdate.TimeStamp) + // { + // filedates2[filedate.FileID] = filedate; + // } + // } + // else + // { + // filedates2[filedate.FileID] = filedate; + // } + + //} + + + foreach (var node in cache.AllMapNodes) { - if (filedate.TimeStamp >= exdate.TimeStamp) + if (!GameFileCache.YmapDict.ContainsKey(node.Name)) + continue; + nodedict[node.Name] = node; + } + + foreach (var intprx in cache.AllCInteriorProxies) + { + //these might need to go into the grid. which grid..? + //but might need to map back to the bounds store... this has more info though! + SpaceBoundsKey key = new SpaceBoundsKey(intprx.Name, intprx.Position); + //if (interiorProxies.ContainsKey(key)) + //{ }//updates/dlc hit here + interiorProxies[key] = intprx; + } + + foreach (var item in cache.AllBoundsStoreItems) + { + if (!GameFileCache.YbnDict.ContainsKey(item.Name)) + continue; + + if (!interiorLookup.TryGetValue(item.Name, out var inthash)) { - filedates[filedate.FileName] = filedate; + SpaceBoundsKey key = new SpaceBoundsKey(item.Name, item.Min); + boundsdict[key] = item; } - else //if (filedate.TimeStamp < exdate.TimeStamp) - { } - } - else - { - filedates[filedate.FileName] = filedate; + //else + //{ + // intlist.Add(item);//handle it later? use the parent for a dict? + //} + usedboundsdict[item.Name] = item; } - if (filedates2.TryGetValue(filedate.FileID, out exdate)) - { - if (filedate.FileName != exdate.FileName) - { } - if (filedate.TimeStamp >= exdate.TimeStamp) - { - filedates2[filedate.FileID] = filedate; - } - else - { } - } - else - { - filedates2[filedate.FileID] = filedate; - } - - } - - - - foreach (var node in cache.AllMapNodes) - { - if (!GameFileCache.YmapDict.ContainsKey(node.Name)) - { continue; } - nodedict[node.Name] = node; - } - - foreach (var intprx in cache.AllCInteriorProxies) - { - //these might need to go into the grid. which grid..? - //but might need to map back to the bounds store... this has more info though! - SpaceBoundsKey key = new SpaceBoundsKey(intprx.Name, intprx.Position); - if (interiorProxies.ContainsKey(key)) - { }//updates/dlc hit here - interiorProxies[key] = intprx; - } - - foreach (var item in cache.AllBoundsStoreItems) - { - if (!GameFileCache.YbnDict.ContainsKey(item.Name)) - { continue; } - - if ((item.Layer < 0) || (item.Layer > 3)) - { } //won't hit here.. - if (interiorLookup.TryGetValue(item.Name, out inthash)) - { - //it's an interior... the vectors are in local space... - intlist.Add(item);//handle it later? use the parent for a dict? - } - else //interiors filtered out - { - SpaceBoundsKey key = new SpaceBoundsKey(item.Name, item.Min); - if (boundsdict.ContainsKey(key)) - { }//updates/dlc hit here - boundsdict[key] = item; - - } - usedboundsdict[item.Name] = item; } } - - //try and generate the cache data for uncached ymaps... mainly for mod maps! - var maprpfs = GameFileCache.ActiveMapRpfFiles; - foreach (var maprpf in maprpfs.Values) + using var ymapTimer = new DisposableTimer("ymaps"); + using var ybnTimer = new DisposableTimer("ybns"); + using(new DisposableTimer("maprpfs.Values")) { - foreach (var entry in maprpf.AllEntries) + //try and generate the cache data for uncached ymaps... mainly for mod maps! + var maprpfs = GameFileCache.ActiveMapRpfFiles; + foreach (var maprpf in maprpfs.Values) { - if (entry.IsExtension(".ymap")) + foreach (var entry in maprpf.AllEntries) { - if (!nodedict.ContainsKey(new MetaHash(entry.ShortNameHash))) + if (entry.IsExtension(".ymap")) { - //non-cached ymap. mostly only mods... but some interesting test things also - var ymap = GameFileCache.RpfMan.GetFile(entry); - if (ymap != null) + if (!nodedict.ContainsKey(new MetaHash(entry.ShortNameHash))) { - MapDataStoreNode dsn = new MapDataStoreNode(ymap); - if (dsn.Name != 0) + //non-cached ymap. mostly only mods... but some interesting test things also + var ymap = await RpfManager.GetFileAsync(entry); + if (ymap is not null) { - nodedict[dsn.Name] = dsn;//perhaps should add as entry.ShortNameHash? + MapDataStoreNode dsn = new MapDataStoreNode(ymap); + if (dsn.Name != 0) + { + nodedict[dsn.Name] = dsn;//perhaps should add as entry.ShortNameHash? + } } - else - { } } - else - { } } - } - if (entry.IsExtension(".ybn")) - { - MetaHash ehash = new MetaHash(entry.ShortNameHash); - if (!usedboundsdict.ContainsKey(ehash)) + if (entry.IsExtension(".ybn")) { - if (interiorLookup.ContainsKey(ehash)) + MetaHash ehash = new MetaHash(entry.ShortNameHash); + if (!usedboundsdict.ContainsKey(ehash)) { - } - else - { - //exterior ybn's that aren't already cached... only noncached modded bounds hit here... - //load the ybn and cache its extents. - var ybn = GameFileCache.RpfMan.GetFile(entry); - BoundsStoreItem item = new BoundsStoreItem(ybn.Bounds); - item.Name = ehash; - SpaceBoundsKey key = new SpaceBoundsKey(ehash, item.Min); - if (boundsdict.ContainsKey(key)) - { } - boundsdict[key] = item; + if (!interiorLookup.ContainsKey(ehash)) + { + //exterior ybn's that aren't already cached... only noncached modded bounds hit here... + //load the ybn and cache its extents. + var ybn = await RpfManager.GetFileAsync(entry); + if (ybn is not null) + { + BoundsStoreItem item = new BoundsStoreItem(ybn.Bounds); + item.Name = ehash; + SpaceBoundsKey key = new SpaceBoundsKey(ehash, item.Min); + boundsdict[key] = item; + } + } } } } } } + Console.WriteLine($"nodedict: {nodedict.Count}; boundsdict: {boundsdict.Count}; usedboundsdict: {usedboundsdict.Count}; interiorProxies: {interiorProxies.Count}"); } private void InitMapDataStore() { - + using var _ = new DisposableTimer("InitMapDataStore"); MapDataStore = new SpaceMapDataStore(); - MapDataStore.Init(nodedict.Values.ToList()); + MapDataStore.Init(nodedict.Values); } private void InitBoundsStore() { - + using var _ = new DisposableTimer("InitBoundsStore"); BoundsStore = new SpaceBoundsStore(); - BoundsStore.Init(boundsdict.Values.ToList()); + BoundsStore.Init(boundsdict.Values); } private void InitNodeGrid() { - + using var _ = new DisposableTimer("InitNodeGrid"); NodeGrid = new SpaceNodeGrid(); AllYnds.Clear(); @@ -358,7 +339,7 @@ namespace CodeWalker.World if (GameFileCache.EnableDlc) { var updrpf = rpfman.FindRpfFile("update\\update.rpf"); //load nodes from patch area... - if (updrpf != null) + if (updrpf is not null) { foreach (var rpffile in updrpf.Children) { @@ -367,7 +348,8 @@ namespace CodeWalker.World } foreach (var dlcrpf in GameFileCache.DlcActiveRpfs) //load nodes from current dlc rpfs { - if (dlcrpf.Path.StartsWith("x64", StringComparison.OrdinalIgnoreCase)) continue; //don't override update.rpf YNDs with x64 ones! *hack + if (dlcrpf.Path.StartsWith("x64", StringComparison.OrdinalIgnoreCase)) + continue; //don't override update.rpf YNDs with x64 ones! *hack foreach (var rpffile in dlcrpf.Children) { AddRpfYnds(rpffile, yndentries); @@ -384,12 +366,11 @@ namespace CodeWalker.World for (int y = 0; y < NodeGrid.CellCountY; y++) { var cell = NodeGrid.Cells[x, y]; - string fname = "nodes" + cell.ID + ".ynd"; + string fname = $"nodes{cell.ID}.ynd"; uint fnhash = JenkHash.GenHash(fname); - RpfFileEntry fentry = null; - if (yndentries.TryGetValue(fnhash, out fentry)) + if (yndentries.TryGetValue(fnhash, out RpfFileEntry? fentry)) { - cell.Ynd = rpfman.GetFile(fentry); + cell.Ynd = RpfManager.GetFile(fentry); cell.Ynd.BBMin = corner + (cellsize * new Vector3(x, y, 0)); cell.Ynd.BBMax = cell.Ynd.BBMin + cellsize; cell.Ynd.CellX = x; @@ -482,8 +463,8 @@ namespace CodeWalker.World //join the dots.... //StringBuilder sb = new StringBuilder(); List tverts = new List(); - List tlinks = new List(); - List nlinks = new List(); + using PooledList tlinks = new PooledList(); + using PooledList nlinks = new PooledList(); foreach (var ynd in AllYnds.Values) { BuildYndData(ynd, tverts, tlinks, nlinks); @@ -503,35 +484,34 @@ namespace CodeWalker.World private void AddRpfYnds(RpfFile rpffile, Dictionary yndentries) { - if (rpffile.AllEntries == null) return; + if (rpffile.AllEntries is null) + return; foreach (var entry in rpffile.AllEntries) { - if (entry is RpfFileEntry) + if (entry is RpfFileEntry fentry) { - RpfFileEntry fentry = entry as RpfFileEntry; - if (entry.IsExtension(".ynd")) + if (fentry.IsExtension(".ynd")) { - if (yndentries.ContainsKey(entry.NameHash)) - { } yndentries[entry.NameHash] = fentry; } } } } - public void BuildYndLinks(YndFile ynd, List tlinks = null, List nlinks = null) + public void BuildYndLinks(YndFile ynd, IList? tlinks = null, IList? nlinks = null) { var ynodes = ynd.Nodes; var nodes = ynd.NodeDictionary?.Nodes; var links = ynd.NodeDictionary?.Links; - if ((ynodes == null) || (nodes == null) || (links == null)) return; + if (ynodes is null || nodes is null || links is null) return; int nodecount = ynodes.Length; //build the links arrays. - if(tlinks==null) tlinks = new List(); - if(nlinks==null) nlinks = new List(); + tlinks ??= new PooledList(); + nlinks ??= new PooledList(); + tlinks.Clear(); for (int i = 0; i < nodecount; i++) { @@ -570,26 +550,26 @@ namespace CodeWalker.World ynd.Links = tlinks.ToArray(); } - public void BuildYndVerts(YndFile ynd, YndNode[] selectedNodes, List tverts = null) + public void BuildYndVerts(YndFile ynd, YndNode[]? selectedNodes, IList? tverts = null) { var laneColour = (uint) new Color4(0f, 0f, 1f, 1f).ToRgba(); var ynodes = ynd.Nodes; - if (ynodes == null) return; + if (ynodes is null) + return; int nodecount = ynodes.Length; //build the main linked vertex array (used by the renderable to draw the lines). - if(tverts==null) tverts = new List(); + tverts ??= new PooledList(); tverts.Clear(); for (int i = 0; i < nodecount; i++) { var node = ynodes[i]; - if (node.Links == null) continue; + if (node.Links is null) + continue; - var nvert = new EditorVertex(); - nvert.Position = node.Position; - nvert.Colour = (uint)node.Colour.ToRgba(); + var nvert = new EditorVertex(node.Position, (uint)node.Colour.ToRgba()); for (int l = 0; l < node.Links.Length; l++) @@ -607,10 +587,9 @@ namespace CodeWalker.World var tnode = yl.Node2; - if (tnode == null) continue; //invalid links could hit here - var tvert = new EditorVertex(); - tvert.Position = tnode.Position; - tvert.Colour = (uint)tnode.Colour.ToRgba(); + if (tnode == null) + continue; //invalid links could hit here + var tvert = new EditorVertex(tnode.Position, (uint)tnode.Colour.ToRgba()); tverts.Add(nvert); tverts.Add(tvert); @@ -621,17 +600,8 @@ namespace CodeWalker.World var vertOffset = laneDirCross * (offset + laneWidth * j); vertOffset.Z = 0.1f; - var lvert1 = new EditorVertex - { - Position = nvert.Position + vertOffset, - Colour = laneColour - }; - - var lvert2 = new EditorVertex - { - Position = tvert.Position + vertOffset, - Colour = laneColour - }; + var lvert1 = new EditorVertex(nvert.Position + vertOffset, laneColour); + var lvert2 = new EditorVertex(tvert.Position + vertOffset, laneColour); tverts.Add(lvert1); tverts.Add(lvert2); @@ -640,10 +610,10 @@ namespace CodeWalker.World var apos = lvert1.Position + laneDir * yl.LinkLength / 2; const float asize = 0.5f; const float negasize = asize * -1f; - tverts.Add(new EditorVertex(){ Position = apos, Colour = laneColour}); - tverts.Add(new EditorVertex() { Position = apos + laneDir * negasize + laneDirCross * asize, Colour = laneColour }); - tverts.Add(new EditorVertex() { Position = apos, Colour = laneColour }); - tverts.Add(new EditorVertex() { Position = apos + laneDir * negasize + laneDirCross * negasize, Colour = laneColour }); + tverts.Add(new EditorVertex(apos, laneColour)); + tverts.Add(new EditorVertex(apos + laneDir * negasize + laneDirCross * asize, laneColour)); + tverts.Add(new EditorVertex(apos, laneColour)); + tverts.Add(new EditorVertex(apos + laneDir * negasize + laneDirCross * negasize, laneColour)); } } } @@ -662,8 +632,8 @@ namespace CodeWalker.World { var junc = yjuncs[i]; var cell = NodeGrid.GetCell(junc.RefData.AreaID); - if ((cell == null) || (cell.Ynd == null) || (cell.Ynd.Nodes == null)) - { continue; } + if (cell?.Ynd?.Nodes is null) + continue; var jynd = cell.Ynd; if (cell.Ynd != ynd) //junc in different ynd..? no hits here, except ynds in project.. @@ -677,7 +647,7 @@ namespace CodeWalker.World } if (junc.RefData.NodeID >= jynd.Nodes.Length) - { continue; } + continue; var jnode = jynd.Nodes[junc.RefData.NodeID]; jnode.Junction = junc; @@ -686,7 +656,7 @@ namespace CodeWalker.World } } - public void BuildYndData(YndFile ynd, List tverts = null, List tlinks = null, List nlinks = null) + public void BuildYndData(YndFile ynd, IList? tverts = null, IList? tlinks = null, IList? nlinks = null) { BuildYndLinks(ynd, tlinks, nlinks); @@ -755,6 +725,7 @@ namespace CodeWalker.World private void InitNavGrid() { + using var _ = new DisposableTimer("InitNavGrid"); NavGrid = new SpaceNavGrid(); var rpfman = GameFileCache.RpfMan; @@ -968,7 +939,7 @@ namespace CodeWalker.World BoundingSphere sph = new BoundingSphere(r.HitPos + e.Center, e.Radius); - r.SphereHit = SphereIntersect(sph, CollisionLayers); + r.SphereHit = SphereIntersect(ref sph, CollisionLayers); if (!r.SphereHit.Hit) { @@ -976,7 +947,7 @@ namespace CodeWalker.World { Ray rayt = new Ray(sphpos, r.HitVelDir); float rayl = absdisp + e.Radius * 4.0f; //include some extra incase of glancing hit - var rayhit = RayIntersect(rayt, rayl); + var rayhit = RayIntersect(ref rayt, rayl); if (rayhit.Hit) //looks like it is tunnelling... need to find the sphere hit point { sph.Center = rayhit.Position - (r.HitVelDir*Math.Min(e.Radius*0.5f, rayhit.HitDist)); @@ -988,7 +959,7 @@ namespace CodeWalker.World sph.Center = r.HitPos + e.Center; //this really shouldn't happen... but just in case of glancing hit.. } - r.SphereHit = SphereIntersect(sph, CollisionLayers); //this really should be a hit! + r.SphereHit = SphereIntersect(ref sph, CollisionLayers); //this really should be a hit! } } } @@ -1003,7 +974,7 @@ namespace CodeWalker.World while (curiter < maxiter) //iterate to find a closer hit time... improve this! { sph.Center = sphpos + disp * curt; - var tcollres = SphereIntersect(sph, CollisionLayers); + var tcollres = SphereIntersect(ref sph, CollisionLayers); if (tcollres.Hit) { r.HitT = curt; @@ -1060,24 +1031,23 @@ namespace CodeWalker.World private bool IsYmapAvailable(uint ymaphash, int hour, MetaHash weather) { - MetaHash ymapname = new MetaHash(ymaphash); - uint ymaptime; - MetaHash[] weathers; - if ((hour >= 0) && (hour <= 23)) + if (hour >= 0 && hour <= 23) { - if (ymaptimes.TryGetValue(ymapname, out ymaptime)) + if (ymaptimes.TryGetValue(ymaphash, out var ymaptime)) { uint mask = 1u << hour; - if ((ymaptime & mask) == 0) return false; + if ((ymaptime & mask) == 0) + return false; } } if (weather.Hash != 0) { - if (ymapweathertypes.TryGetValue(ymapname, out weathers)) + if (ymapweathertypes.TryGetValue(ymaphash, out var weathers)) { for (int i = 0; i < weathers.Length; i++) { - if (weathers[i] == weather) return true; + if (weathers[i] == weather) + return true; } return false; } @@ -1087,15 +1057,17 @@ namespace CodeWalker.World public void GetVisibleYmaps(Camera cam, int hour, MetaHash weather, Dictionary ymaps) { - if (!Inited) return; - if (MapDataStore == null) return; + if (!Inited) + return; + if (MapDataStore is null) + return; CurrentHour = hour; CurrentWeather = weather; - var items = MapDataStore.GetItems(ref cam.Position); - for (int i = 0; i < items.Count; i++) + var items = MapDataStore.GetItems(in cam.Position); + + foreach(var item in items.AsSpan()) { - var item = items[i]; - if (item == null) + if (item is null) { continue; } @@ -1104,12 +1076,21 @@ namespace CodeWalker.World if (!ymaps.ContainsKey(hash)) { var ymap = (hash > 0) ? GameFileCache.GetYmap(hash) : null; - while ((ymap != null) && (ymap.Loaded)) + while (ymap is not null && ymap.Loaded) { - if (!IsYmapAvailable(hash, hour, weather)) break; + if (!IsYmapAvailable(hash, hour, weather)) + { + break; + } + ymaps[hash] = ymap; hash = ymap._CMapData.parent; - if (ymaps.ContainsKey(hash)) break; + if (ymaps.ContainsKey(hash)) + { + break; + } + + ymap = (hash > 0) ? GameFileCache.GetYmap(hash) : null; } } @@ -1119,22 +1100,26 @@ namespace CodeWalker.World public void GetVisibleBounds(Camera cam, int gridrange, bool[] layers, List boundslist) { - if (!Inited) return; + if (!Inited) + return; - if (BoundsStore == null) return; + if (BoundsStore is null) + return; float dist = 50.0f * gridrange; var pos = cam.Position; var min = pos - dist; var max = pos + dist; - var items = BoundsStore.GetItems(ref min, ref max, layers); + var items = BoundsStore.GetItems(in min, in max, layers); boundslist.AddRange(items); } public void GetVisibleYnds(Camera cam, List ynds) { - if (!Inited) return; - if (NodeGrid == null) return; + if (!Inited) + return; + if (NodeGrid is null) + return; //int x = 9; //int y = 15; //== nodes489.ynd @@ -1148,8 +1133,10 @@ namespace CodeWalker.World public void GetVisibleYnvs(Camera cam, int gridrange, List ynvs) { - if (!Inited) return; - if (NavGrid == null) return; + if (!Inited) + return; + if (NavGrid is null) + return; ynvs.Clear(); @@ -1181,16 +1168,18 @@ namespace CodeWalker.World } - public SpaceRayIntersectResult RayIntersect(Ray ray, float maxdist = float.MaxValue, bool[] layers = null) + public SpaceRayIntersectResult RayIntersect(ref Ray ray, float maxdist = float.MaxValue, bool[]? layers = null) { var res = new SpaceRayIntersectResult(); - if (GameFileCache == null) return res; + if (GameFileCache is null) + return res; bool testcomplete = true; res.HitDist = maxdist; var box = new BoundingBox(); float boxhitdisttest; - if ((BoundsStore == null) || (MapDataStore == null)) return res; + if (BoundsStore is null || MapDataStore is null) + return res; var boundslist = BoundsStore.GetItems(ref ray, layers); var mapdatalist = MapDataStore.GetItems(ref ray); @@ -1203,24 +1192,33 @@ namespace CodeWalker.World if (ray.Intersects(ref box, out boxhitdisttest)) { if (boxhitdisttest > res.HitDist) - { continue; } //already a closer hit + { + continue; + } //already a closer hit YbnFile ybn = GameFileCache.GetYbn(bound.Name); if (ybn == null) - { continue; } //ybn not found? + { + continue; + } //ybn not found? if (!ybn.Loaded) - { testcomplete = false; continue; } //ybn not loaded yet... + { + testcomplete = false; + continue; + } //ybn not loaded yet... var b = ybn.Bounds; - if (b == null) - { continue; } + if (b is null) + { + continue; + } var bhit = b.RayIntersect(ref ray, res.HitDist); if (bhit.Hit) { bhit.HitYbn = ybn; } - res.TryUpdate(ref bhit); + res.TryUpdate(in bhit); } } @@ -1232,50 +1230,58 @@ namespace CodeWalker.World continue; } if ((mapdata.ContentFlags & 1) == 0) - { continue; } //only test HD ymaps + { + continue; + } //only test HD ymaps box.Minimum = mapdata.entitiesExtentsMin; box.Maximum = mapdata.entitiesExtentsMax; if (ray.Intersects(ref box, out boxhitdisttest)) { if (boxhitdisttest > res.HitDist) - { continue; } //already a closer hit + { + continue; + } //already a closer hit var hash = mapdata.Name; var ymap = (hash > 0) ? GameFileCache.GetYmap(hash) : null; - if ((ymap != null) && (ymap.Loaded) && (ymap.AllEntities != null)) + if (ymap is not null && ymap.Loaded && ymap.AllEntities.Length > 0) { if (!IsYmapAvailable(hash, CurrentHour, CurrentWeather)) - { continue; } - - for (int e = 0; e < ymap.AllEntities.Length; e++) { - var ent = ymap.AllEntities[e]; + continue; + } + foreach(var ent in ymap.AllEntities) + { if (!EntityCollisionsEnabled(ent)) - { continue; } + { + continue; + } box.Minimum = ent.BBMin; box.Maximum = ent.BBMax; if (ray.Intersects(ref box, out boxhitdisttest)) { if (boxhitdisttest > res.HitDist) - { continue; } //already a closer hit + { + continue; + } //already a closer hit if (ent.IsMlo) { var ihit = RayIntersectInterior(ref ray, ent, res.HitDist); - res.TryUpdate(ref ihit); + res.TryUpdate(in ihit); } else { var ehit = RayIntersectEntity(ref ray, ent, res.HitDist); - res.TryUpdate(ref ehit); + res.TryUpdate(in ehit); } } } } - else if ((ymap != null) && (!ymap.Loaded)) + else if (ymap is not null && !ymap.Loaded) { testcomplete = false; } @@ -1306,40 +1312,40 @@ namespace CodeWalker.World var eorinv = Quaternion.Invert(ent.Orientation); var eray = new Ray(); eray.Position = eorinv.Multiply(ray.Position - ent.Position); - eray.Direction = eorinv.Multiply(ray.Direction); + eray.Direction = eorinv.Multiply(in ray.Direction); if ((drawable is Drawable sdrawable) && (sdrawable.Bound != null)) { var dhit = sdrawable.Bound.RayIntersect(ref eray, res.HitDist); if (dhit.Hit) { - dhit.Position = eori.Multiply(dhit.Position) + ent.Position; - dhit.Normal = eori.Multiply(dhit.Normal); + dhit.Position = eori.Multiply(in dhit.Position) + ent.Position; + dhit.Normal = eori.Multiply(in dhit.Normal); } - res.TryUpdate(ref dhit); + res.TryUpdate(in dhit); } else if (drawable is FragDrawable fdrawable) { - if (fdrawable.Bound != null) + if (fdrawable.Bound is not null) { var fhit = fdrawable.Bound.RayIntersect(ref eray, res.HitDist); if (fhit.Hit) { - fhit.Position = eori.Multiply(fhit.Position) + ent.Position; - fhit.Normal = eori.Multiply(fhit.Normal); + fhit.Position = eori.Multiply(in fhit.Position) + ent.Position; + fhit.Normal = eori.Multiply(in fhit.Normal); } - res.TryUpdate(ref fhit); + res.TryUpdate(in fhit); } var fbound = fdrawable.OwnerFragment?.PhysicsLODGroup?.PhysicsLOD1?.Bound; - if (fbound != null) + if (fbound is not null) { var fhit = fbound.RayIntersect(ref eray, res.HitDist);//TODO: these probably have extra transforms..! if (fhit.Hit) { - fhit.Position = eori.Multiply(fhit.Position) + ent.Position; - fhit.Normal = eori.Multiply(fhit.Normal); + fhit.Position = eori.Multiply(in fhit.Position) + ent.Position; + fhit.Normal = eori.Multiply(in fhit.Normal); } - res.TryUpdate(ref fhit); + res.TryUpdate(in fhit); } } } @@ -1355,84 +1361,97 @@ namespace CodeWalker.World var res = new SpaceRayIntersectResult(); res.HitDist = maxdist; - if (mlo.Archetype == null) - { return res; } + if (mlo.Archetype is null) + { + return res; + } var iori = mlo.Orientation; var iorinv = Quaternion.Invert(mlo.Orientation); var iray = new Ray(); iray.Position = iorinv.Multiply(ray.Position - mlo.Position); - iray.Direction = iorinv.Multiply(ray.Direction); + iray.Direction = iorinv.Multiply(in ray.Direction); var hash = mlo.Archetype.Hash; var ybn = GameFileCache.GetYbn(hash); - if ((ybn != null) && (ybn.Loaded)) + if (ybn is not null && ybn.Loaded) { var ihit = ybn.Bounds.RayIntersect(ref iray, res.HitDist); if (ihit.Hit) { ihit.HitYbn = ybn; ihit.HitEntity = mlo; - ihit.Position = iori.Multiply(ihit.Position) + mlo.Position; - ihit.Normal = iori.Multiply(ihit.Normal); + ihit.Position = iori.Multiply(in ihit.Position) + mlo.Position; + ihit.Normal = iori.Multiply(in ihit.Normal); } - res.TryUpdate(ref ihit); + res.TryUpdate(in ihit); } var mlodat = mlo.MloInstance; - if (mlodat == null) - { return res; } + if (mlodat is null) + { + return res; + } var box = new BoundingBox(); float boxhitdisttest; - if (mlodat.Entities != null) + if (mlodat.Entities != null && mlodat.Entities.Length > 0) { - for (int j = 0; j < mlodat.Entities.Length; j++) //should really improve this by using rooms! + foreach(var intent in mlodat.Entities) { - var intent = mlodat.Entities[j]; - if (intent.Archetype == null) continue; //missing archetype... + if (intent.Archetype is null) + continue; //missing archetype... if (!EntityCollisionsEnabled(intent)) - { continue; } + { + continue; + } box.Minimum = intent.BBMin; box.Maximum = intent.BBMax; if (ray.Intersects(ref box, out boxhitdisttest)) { if (boxhitdisttest > res.HitDist) - { continue; } //already a closer hit + { + continue; + } //already a closer hit var ehit = RayIntersectEntity(ref ray, intent, res.HitDist); - res.TryUpdate(ref ehit); + res.TryUpdate(in ehit); } } } - if (mlodat.EntitySets != null) + if (mlodat.EntitySets is not null && mlodat.EntitySets.Length > 0) { - for (int e = 0; e < mlodat.EntitySets.Length; e++) + foreach(var entityset in mlodat.EntitySets) { - var entityset = mlodat.EntitySets[e]; - if (!entityset.Visible) continue; + if (!entityset.Visible) + continue; var entities = entityset.Entities; - if (entities == null) continue; + if (entities is null) + continue; for (int i = 0; i < entities.Count; i++) //should really improve this by using rooms! { var intent = entities[i]; if (intent.Archetype == null) continue; //missing archetype... if (!EntityCollisionsEnabled(intent)) - { continue; } + { + continue; + } box.Minimum = intent.BBMin; box.Maximum = intent.BBMax; if (ray.Intersects(ref box, out boxhitdisttest)) { if (boxhitdisttest > res.HitDist) - { continue; } //already a closer hit + { + continue; + } //already a closer hit var ehit = RayIntersectEntity(ref ray, intent, res.HitDist); - res.TryUpdate(ref ehit); + res.TryUpdate(in ehit); } } } @@ -1441,7 +1460,7 @@ namespace CodeWalker.World return res; } - public SpaceSphereIntersectResult SphereIntersect(BoundingSphere sph, bool[] layers = null) + public SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph, bool[] layers = null) { var res = new SpaceSphereIntersectResult(); if (GameFileCache == null) return res; @@ -1450,10 +1469,11 @@ namespace CodeWalker.World Vector3 sphmax = sph.Center + sph.Radius; var box = new BoundingBox(); - if ((BoundsStore == null) || (MapDataStore == null)) return res; + if (BoundsStore is null || MapDataStore is null) + return res; - var boundslist = BoundsStore.GetItems(ref sphmin, ref sphmax, layers); - var mapdatalist = MapDataStore.GetItems(ref sphmin, ref sphmax); + var boundslist = BoundsStore.GetItems(in sphmin, in sphmax, layers); + var mapdatalist = MapDataStore.GetItems(in sphmin, in sphmax); for (int i = 0; i < boundslist.Count; i++) { @@ -1462,15 +1482,15 @@ namespace CodeWalker.World box.Maximum = bound.Max; if (sph.Intersects(ref box)) { - YbnFile ybn = GameFileCache.GetYbn(bound.Name); - if (ybn == null) - { continue; } //ybn not found? + YbnFile? ybn = GameFileCache.GetYbn(bound.Name); + if (ybn is null) + continue; //ybn not found? if (!ybn.Loaded) { testcomplete = false; continue; } //ybn not loaded yet... var b = ybn.Bounds; - if (b == null) - { continue; } + if (b is null) + continue; var bhit = b.SphereIntersect(ref sph); res.TryUpdate(ref bhit); @@ -1489,17 +1509,21 @@ namespace CodeWalker.World { var hash = mapdata.Name; var ymap = (hash > 0) ? GameFileCache.GetYmap(hash) : null; - if ((ymap != null) && (ymap.Loaded) && (ymap.AllEntities != null)) + if (ymap is not null && ymap.Loaded && ymap.AllEntities.Length > 0) { if (!IsYmapAvailable(hash, CurrentHour, CurrentWeather)) - { continue; } + { + continue; + } for (int e = 0; e < ymap.AllEntities.Length; e++) { var ent = ymap.AllEntities[e]; if (!EntityCollisionsEnabled(ent)) - { continue; } + { + continue; + } box.Minimum = ent.BBMin; box.Maximum = ent.BBMax; @@ -1552,8 +1576,8 @@ namespace CodeWalker.World var dhit = sdrawable.Bound.SphereIntersect(ref esph); if (dhit.Hit) { - dhit.Position = eori.Multiply(dhit.Position) + ent.Position; - dhit.Normal = eori.Multiply(dhit.Normal); + dhit.Position = eori.Multiply(in dhit.Position) + ent.Position; + dhit.Normal = eori.Multiply(in dhit.Normal); } res.TryUpdate(ref dhit); } @@ -1564,8 +1588,8 @@ namespace CodeWalker.World var fhit = fdrawable.Bound.SphereIntersect(ref esph); if (fhit.Hit) { - fhit.Position = eori.Multiply(fhit.Position) + ent.Position; - fhit.Normal = eori.Multiply(fhit.Normal); + fhit.Position = eori.Multiply(in fhit.Position) + ent.Position; + fhit.Normal = eori.Multiply(in fhit.Normal); } res.TryUpdate(ref fhit); } @@ -1575,8 +1599,8 @@ namespace CodeWalker.World var fhit = fbound.SphereIntersect(ref esph);//TODO: these probably have extra transforms..! if (fhit.Hit) { - fhit.Position = eori.Multiply(fhit.Position) + ent.Position; - fhit.Normal = eori.Multiply(fhit.Normal); + fhit.Position = eori.Multiply(in fhit.Position) + ent.Position; + fhit.Normal = eori.Multiply(in fhit.Normal); } res.TryUpdate(ref fhit); } @@ -1604,8 +1628,8 @@ namespace CodeWalker.World var ihit = ybn.Bounds.SphereIntersect(ref isph); if (ihit.Hit) { - ihit.Position = iori.Multiply(ihit.Position) + mlo.Position; - ihit.Normal = iori.Multiply(ihit.Normal); + ihit.Position = iori.Multiply(in ihit.Position) + mlo.Position; + ihit.Normal = iori.Multiply(in ihit.Normal); } res.TryUpdate(ref ihit); } @@ -1699,7 +1723,7 @@ namespace CodeWalker.World public List VisibleItems = new List(); - public void Init(List rootnodes) + public void Init(IEnumerable rootnodes) { RootNode = new SpaceMapDataStoreNode(); RootNode.Owner = this; @@ -1710,25 +1734,19 @@ namespace CodeWalker.World RootNode.TrySplit(SplitThreshold); } - public List GetItems(ref Vector3 p) //get items at a point, using the streaming extents + public List GetItems(in Vector3 p) //get items at a point, using the streaming extents { VisibleItems.Clear(); - if (RootNode != null) - { - RootNode.GetItems(ref p, VisibleItems); - } + RootNode?.GetItems(in p, VisibleItems); return VisibleItems; } - public List GetItems(ref Vector3 min, ref Vector3 max) //get items intersecting a box, using the entities extents + public List GetItems(in Vector3 min, in Vector3 max) //get items intersecting a box, using the entities extents { VisibleItems.Clear(); - if (RootNode != null) - { - RootNode.GetItems(ref min, ref max, VisibleItems); - } + RootNode?.GetItems(in min, in max, VisibleItems); return VisibleItems; } @@ -1736,38 +1754,33 @@ namespace CodeWalker.World { VisibleItems.Clear(); - if (RootNode != null) - { - RootNode.GetItems(ref ray, VisibleItems); - } + RootNode?.GetItems(ref ray, VisibleItems); return VisibleItems; } } public class SpaceMapDataStoreNode { - public SpaceMapDataStore Owner = null; - public SpaceMapDataStoreNode[] Children = null; - public List Items = null; + public SpaceMapDataStore? Owner = null; + public SpaceMapDataStoreNode[]? Children = null; + public List? Items = null; public Vector3 BBMin = new Vector3(float.MaxValue); public Vector3 BBMax = new Vector3(float.MinValue); public int Depth = 0; public void Add(MapDataStoreNode item) { - if (Items == null) - { - Items = new List(); - } - BBMin = Vector3.Min(BBMin, item.streamingExtentsMin); - BBMax = Vector3.Max(BBMax, item.streamingExtentsMax); + Items ??= new List(); + + Vectors.Min(in BBMin, item.streamingExtentsMin, out BBMin); + Vectors.Max(in BBMax, item.streamingExtentsMax, out BBMax); Items.Add(item); } public void TrySplit(int threshold) { - if ((Items == null) || (Items.Count <= threshold)) - { return; } + if (Items is null || Items.Count <= threshold) + return; Children = new SpaceMapDataStoreNode[4]; @@ -1794,7 +1807,7 @@ namespace CodeWalker.World { var cind = ((icen.X > ncen.X) ? 1 : 0) + ((icen.Y > ncen.Y) ? 2 : 0); var c = Children[cind]; - if (c == null) + if (c is null) { c = new SpaceMapDataStoreNode(); c.Owner = Owner; @@ -1807,72 +1820,58 @@ namespace CodeWalker.World for (int i = 0; i < 4; i++) { - var c = Children[i]; - if (c != null) - { - c.TrySplit(threshold); - } + Children[i]?.TrySplit(threshold); } Items = newItems; } - public void GetItems(ref Vector3 p, List items) //get items at a point, using the streaming extents + public void GetItems(in Vector3 p, List items) //get items at a point, using the streaming extents { - if ((p.X >= BBMin.X) && (p.X <= BBMax.X) && (p.Y >= BBMin.Y) && (p.Y <= BBMax.Y)) + if (p.X >= BBMin.X && p.X <= BBMax.X && p.Y >= BBMin.Y && p.Y <= BBMax.Y) { - if (Items != null) + if (Items is not null) { - for (int i = 0; i < Items.Count; i++) + foreach (var item in Items.AsSpan()) { - var item = Items[i]; var imin = item.streamingExtentsMin; var imax = item.streamingExtentsMax; - if ((p.X >= imin.X) && (p.X <= imax.X) && (p.Y >= imin.Y) && (p.Y <= imax.Y)) + if (p.X >= imin.X && p.X <= imax.X && p.Y >= imin.Y && p.Y <= imax.Y) { items.Add(item); } } } - if (Children != null) + if (Children is not null) { - for (int i = 0; i < 4; i++) + foreach(var c in Children) { - var c = Children[i]; - if (c != null) - { - c.GetItems(ref p, items); - } + c?.GetItems(in p, items); } } } } - public void GetItems(ref Vector3 min, ref Vector3 max, List items) //get items intersecting a box, using the entities extents + public void GetItems(in Vector3 min, in Vector3 max, List items) //get items intersecting a box, using the entities extents { if ((max.X >= BBMin.X) && (min.X <= BBMax.X) && (max.Y >= BBMin.Y) && (min.Y <= BBMax.Y)) { - if (Items != null) + if (Items is not null) { - for (int i = 0; i < Items.Count; i++) + foreach(var item in Items.AsSpan()) { - var item = Items[i]; var imin = item.entitiesExtentsMin; var imax = item.entitiesExtentsMax; - if ((max.X >= imin.X) && (min.X <= imax.X) && (max.Y >= imin.Y) && (min.Y <= imax.Y)) + if (max.X >= imin.X && min.X <= imax.X && max.Y >= imin.Y && min.Y <= imax.Y) { items.Add(item); } } } - if (Children != null) + if (Children is not null) { - for (int i = 0; i < 4; i++) + foreach(var child in Children) { - var c = Children[i]; - if (c != null) - { - c.GetItems(ref min, ref max, items); - } + child?.GetItems(in min, in max, items); } } } @@ -1884,9 +1883,8 @@ namespace CodeWalker.World { if (Items != null) { - for (int i = 0; i < Items.Count; i++) + foreach(var item in Items.AsSpan()) { - var item = Items[i]; bb.Minimum = item.entitiesExtentsMin; bb.Maximum = item.entitiesExtentsMax; if (ray.Intersects(ref bb)) @@ -1900,10 +1898,7 @@ namespace CodeWalker.World for (int i = 0; i < 4; i++) { var c = Children[i]; - if (c != null) - { - c.GetItems(ref ray, items); - } + c?.GetItems(ref ray, items); } } } @@ -1918,7 +1913,7 @@ namespace CodeWalker.World public List VisibleItems = new List(); - public void Init(List items) + public void Init(IEnumerable items) { RootNode = new SpaceBoundsStoreNode(); RootNode.Owner = this; @@ -1929,25 +1924,19 @@ namespace CodeWalker.World RootNode.TrySplit(SplitThreshold); } - public List GetItems(ref Vector3 min, ref Vector3 max, bool[] layers = null) + public List GetItems(in Vector3 min, in Vector3 max, bool[]? layers = null) { VisibleItems.Clear(); - if (RootNode != null) - { - RootNode.GetItems(ref min, ref max, VisibleItems, layers); - } + RootNode?.GetItems(in min, in max, VisibleItems, layers); return VisibleItems; } - public List GetItems(ref Ray ray, bool[] layers = null) + public List GetItems(ref Ray ray, bool[]? layers = null) { VisibleItems.Clear(); - if (RootNode != null) - { - RootNode.GetItems(ref ray, VisibleItems, layers); - } + RootNode?.GetItems(ref ray, VisibleItems, layers); return VisibleItems; } @@ -2015,17 +2004,13 @@ namespace CodeWalker.World for (int i = 0; i < 4; i++) { - var c = Children[i]; - if (c != null) - { - c.TrySplit(threshold); - } + Children[i]?.TrySplit(threshold); } Items = newItems; } - public void GetItems(ref Vector3 min, ref Vector3 max, List items, bool[] layers = null) + public void GetItems(in Vector3 min, in Vector3 max, List items, bool[] layers = null) { if ((max.X >= BBMin.X) && (min.X <= BBMax.X) && (max.Y >= BBMin.Y) && (min.Y <= BBMax.Y)) { @@ -2036,7 +2021,9 @@ namespace CodeWalker.World var item = Items[i]; if ((layers != null) && (item.Layer < 3) && (!layers[item.Layer])) - { continue; } + { + continue; + } if ((max.X >= item.Min.X) && (min.X <= item.Max.X) && (max.Y >= item.Min.Y) && (min.Y <= item.Max.Y)) { @@ -2048,45 +2035,39 @@ namespace CodeWalker.World { for (int i = 0; i < 4; i++) { - var c = Children[i]; - if (c != null) - { - c.GetItems(ref min, ref max, items, layers); - } + Children[i]?.GetItems(in min, in max, items, layers); } } } } - public void GetItems(ref Ray ray, List items, bool[] layers = null) + public void GetItems(ref Ray ray, List items, bool[]? layers = null) { var box = new BoundingBox(BBMin, BBMax); if (ray.Intersects(ref box)) { - if (Items != null) + if (Items is not null) { for (int i = 0; i < Items.Count; i++) { var item = Items[i]; - if ((layers != null) && (item.Layer < 3) && (!layers[item.Layer])) - { continue; } + if (layers is not null && item.Layer < 3 && !layers[item.Layer]) + { + continue; + } box = new BoundingBox(item.Min, item.Max); - if (ray.Intersects(box)) + if (ray.Intersects(ref box)) { items.Add(item); } } } - if (Children != null) + if (Children is not null) { for (int i = 0; i < 4; i++) { - var c = Children[i]; - if (c != null) - { - c.GetItems(ref ray, items, layers); - } + Children[i]?.GetItems(ref ray, items, layers); } } } @@ -2131,7 +2112,7 @@ namespace CodeWalker.World return null; } - public SpaceNodeGridCell GetCellForPosition(Vector3 position) + public SpaceNodeGridCell? GetCellForPosition(in Vector3 position) { var x = (int)((position.X - CornerX) / CellSize); var y = (int)((position.Y - CornerY) / CellSize); @@ -2145,11 +2126,11 @@ namespace CodeWalker.World } - public YndNode GetYndNode(ushort areaid, ushort nodeid) + public YndNode? GetYndNode(ushort areaid, ushort nodeid) { var cell = GetCell(areaid); - if ((cell == null) || (cell.Ynd == null) || (cell.Ynd.Nodes == null)) - { return null; } + if (cell?.Ynd?.Nodes is null) + return null; if (nodeid >= cell.Ynd.Nodes.Length) { return null; } return cell.Ynd.Nodes[nodeid]; @@ -2309,7 +2290,7 @@ namespace CodeWalker.World public bool TestComplete; public BoundMaterial_s Material; - public void TryUpdate(ref SpaceRayIntersectResult r) + public void TryUpdate(in SpaceRayIntersectResult r) { if (r.Hit) { diff --git a/CodeWalker.Core/World/Timecycle.cs b/CodeWalker.Core/World/Timecycle.cs index 0dfb8e2..453112c 100644 --- a/CodeWalker.Core/World/Timecycle.cs +++ b/CodeWalker.Core/World/Timecycle.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -31,17 +32,18 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("Timecycle Init"); var rpfman = gameFileCache.RpfMan; string filename = "common.rpf\\data\\levels\\gta5\\time.xml"; XmlDocument timexml = rpfman.GetFileXml(filename); - XmlElement time = timexml.DocumentElement; - XmlNode suninfo = time.SelectSingleNode("suninfo"); - XmlNode mooninfo = time.SelectSingleNode("mooninfo"); - XmlNodeList samples = time.SelectNodes("sample"); - XmlNodeList regions = time.SelectNodes("region"); + XmlElement? time = timexml.DocumentElement; + XmlNode? suninfo = time?.SelectSingleNode("suninfo"); + XmlNode? mooninfo = time?.SelectSingleNode("mooninfo"); + XmlNodeList? samples = time?.SelectNodes("sample"); + XmlNodeList? regions = time?.SelectNodes("region"); sun_roll = Xml.GetFloatAttribute(suninfo, "sun_roll"); sun_yaw = Xml.GetFloatAttribute(suninfo, "sun_yaw"); @@ -51,19 +53,36 @@ namespace CodeWalker.World moon_wobble_offset = Xml.GetFloatAttribute(mooninfo, "moon_wobble_offset"); Samples.Clear(); - for (int i = 0; i < samples.Count; i++) + if (samples is not null) { - TimecycleSample tcs = new TimecycleSample(); - tcs.Init(samples[i]); - Samples.Add(tcs); + Samples.EnsureCapacity(samples.Count); + for (int i = 0; i < samples.Count; i++) + { + var sample = samples.Item(i); + if (sample is not null) + { + TimecycleSample tcs = new TimecycleSample(); + tcs.Init(sample); + Samples.Add(tcs); + } + } } Regions.Clear(); - for (int i = 0; i < regions.Count; i++) + if (regions is not null) { - Regions.Add(Xml.GetStringAttribute(regions[i], "name")); + Regions.EnsureCapacity(regions.Count); + for (int i = 0; i < regions.Count; i++) + { + var attr = regions[i]?.GetStringAttribute("name"); + if (attr is not null) + { + Regions.Add(attr); + } + } } + Inited = true; } @@ -95,13 +114,7 @@ namespace CodeWalker.World } } - public bool IsNightTime - { - get - { - return (CurrentHour < 6.0f) || (CurrentHour > 20.0f); - } - } + public bool IsNightTime => (CurrentHour < 6.0f) || (CurrentHour > 20.0f); } public class TimecycleSample @@ -113,10 +126,10 @@ namespace CodeWalker.World public void Init(XmlNode node) { - name = Xml.GetStringAttribute(node, "name"); - hour = Xml.GetFloatAttribute(node, "hour"); - duration = Xml.GetFloatAttribute(node, "duration"); - uw_tc_mod = Xml.GetStringAttribute(node, "uw_tc_mod"); + name = node.GetStringAttribute("name"); + hour = node.GetFloatAttribute("hour"); + duration = node.GetFloatAttribute("duration"); + uw_tc_mod = node.GetStringAttribute("uw_tc_mod"); } } diff --git a/CodeWalker.Core/World/TimecycleMods.cs b/CodeWalker.Core/World/TimecycleMods.cs index 0e64065..230a67e 100644 --- a/CodeWalker.Core/World/TimecycleMods.cs +++ b/CodeWalker.Core/World/TimecycleMods.cs @@ -59,17 +59,17 @@ namespace CodeWalker.World float version = Xml.GetFloatAttribute(root, "version"); var modnodes = root.SelectNodes("modifier"); - foreach (XmlNode modnode in modnodes) + if (modnodes is not null) { - if (!(modnode is XmlElement)) continue; - TimecycleMod mod = new TimecycleMod(); - mod.Init(modnode); - Dict[mod.nameHash] = mod; + foreach (XmlNode modnode in modnodes) + { + if (!(modnode is XmlElement)) continue; + TimecycleMod mod = new TimecycleMod(); + mod.Init(modnode); + Dict[mod.nameHash] = mod; + } } - } - - } @@ -113,7 +113,7 @@ namespace CodeWalker.World public override string ToString() { - return name + " (" + numMods.ToString() + " mods, userFlags: " + userFlags.ToString() + ")"; + return $"{name} ({numMods} mods, userFlags: {userFlags})"; } } @@ -141,7 +141,7 @@ namespace CodeWalker.World public override string ToString() { - return name + ": " + FloatUtil.ToString(value1) + ", " + FloatUtil.ToString(value2); + return $"{name}: {FloatUtil.ToString(value1)}, {FloatUtil.ToString(value2)}"; } } diff --git a/CodeWalker.Core/World/Trains.cs b/CodeWalker.Core/World/Trains.cs index 1267951..13709c3 100644 --- a/CodeWalker.Core/World/Trains.cs +++ b/CodeWalker.Core/World/Trains.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using System.Xml; using SharpDX; +using CodeWalker.Core.Utils; namespace CodeWalker.World { @@ -19,6 +20,7 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("Trains Init"); GameFileCache = gameFileCache; var rpfman = gameFileCache.RpfMan; @@ -69,7 +71,7 @@ namespace CodeWalker.World get { int sc = 0; - if (Nodes != null) + if (Nodes.Count > 0) { foreach (var node in Nodes) { @@ -79,22 +81,19 @@ namespace CodeWalker.World } } } + return sc; } } - public EditorVertex[] LinkedVerts { get; set; } - public Vector4[] NodePositions { get; set; } + public EditorVertex[] LinkedVerts { get; set; } = Array.Empty(); + public Vector4[] NodePositions { get; set; } = Array.Empty(); public EditorVertex[] GetPathVertices() { return LinkedVerts; } - public EditorVertex[] GetTriangleVertices() - { - return null; - } public Vector4[] GetNodePositions() { return NodePositions; @@ -194,8 +193,7 @@ namespace CodeWalker.World string[] trackstrs = trackstr.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (trackstrs.Length > 1) { - int nodecount; - int.TryParse(trackstrs[0], out nodecount); + int.TryParse(trackstrs[0], out var nodecount); NodeCount = nodecount; List nodes = new List(); for (int i = 1; i < trackstrs.Length; i++) @@ -208,41 +206,30 @@ namespace CodeWalker.World var x = FloatUtil.Parse(nodevals[0]); var y = FloatUtil.Parse(nodevals[1]); var z = FloatUtil.Parse(nodevals[2]); - int nodetype; - int.TryParse(nodevals[3], out nodetype); + int.TryParse(nodevals[3], out var nodetype); ttnode.Position = new Vector3(x, y, z); ttnode.NodeType = nodetype; ttnode.Track = this; ttnode.Index = nodes.Count; ttnode.Links[0] = (nodes.Count > 0) ? nodes[nodes.Count - 1] : null; - if (ttnode.Links[0] != null) + if (ttnode.Links[0] is not null) { - ttnode.Links[0].Links[1] = ttnode; + ttnode.Links[0]!.Links[1] = ttnode; } nodes.Add(ttnode); } - else - { } } Nodes = nodes; } - else - { } - } - else - { } - - if (Nodes == null) - { - Nodes = new List(); } + Nodes ??= new List(); } public void BuildVertices() { - if ((Nodes != null) && (Nodes.Count > 0)) + if (Nodes != null && Nodes.Count > 0) { var nc = Nodes.Count; var lc = nc - 1; @@ -300,7 +287,7 @@ namespace CodeWalker.World public void BuildBVH() { - BVH = new PathBVH(Nodes, 10, 10); + BVH = new PathBVH(Nodes.ToArray(), 10, 10); } @@ -400,12 +387,13 @@ namespace CodeWalker.World public class TrainTrackNode : BasePathNode { - public Vector3 Position { get; set; } + public Vector3 _Position; + public ref Vector3 Position => ref _Position; public int NodeType { get; set; } - public TrainTrack Track { get; set; } + public TrainTrack? Track { get; set; } public int Index { get; set; } - public TrainTrackNode[] Links { get; set; } = new TrainTrackNode[2]; + public TrainTrackNode?[] Links { get; set; } = new TrainTrackNode[2]; public int GetColour() { diff --git a/CodeWalker.Core/World/Water.cs b/CodeWalker.Core/World/Water.cs index 9503eca..734f193 100644 --- a/CodeWalker.Core/World/Water.cs +++ b/CodeWalker.Core/World/Water.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -19,6 +20,7 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("Water Init"); GameFileCache = gameFileCache; var rpfman = gameFileCache.RpfMan; @@ -27,10 +29,11 @@ namespace CodeWalker.World XmlDocument waterxml = rpfman.GetFileXml(filename); - XmlElement waterdata = waterxml.DocumentElement; + XmlElement? waterdata = waterxml.DocumentElement; - XmlNodeList waterquads = waterdata.SelectNodes("WaterQuads/Item"); + XmlNodeList? waterquads = waterdata.SelectNodes("WaterQuads/Item"); WaterQuads.Clear(); + WaterQuads.EnsureCapacity(waterquads.Count); for (int i = 0; i < waterquads.Count; i++) { var waterquad = new WaterQuad(); @@ -38,8 +41,9 @@ namespace CodeWalker.World WaterQuads.Add(waterquad); } - XmlNodeList calmingquads = waterdata.SelectNodes("CalmingQuads/Item"); + XmlNodeList? calmingquads = waterdata.SelectNodes("CalmingQuads/Item"); CalmingQuads.Clear(); + CalmingQuads.EnsureCapacity(calmingquads.Count); for (int i = 0; i < calmingquads.Count; i++) { var calmingquad = new WaterCalmingQuad(); @@ -47,8 +51,9 @@ namespace CodeWalker.World CalmingQuads.Add(calmingquad); } - XmlNodeList wavequads = waterdata.SelectNodes("WaveQuads/Item"); + XmlNodeList? wavequads = waterdata.SelectNodes("WaveQuads/Item"); WaveQuads.Clear(); + WaveQuads.EnsureCapacity(wavequads.Count); for (int i = 0; i < wavequads.Count; i++) { var wavequad = new WaterWaveQuad(); @@ -65,7 +70,8 @@ namespace CodeWalker.World { List quads = new List(); - if (!Inited) return quads; + if (!Inited) + return quads; var vf = camera.ViewFrustum; foreach (var quad in allQuads) @@ -104,7 +110,7 @@ namespace CodeWalker.World public override string ToString() { - return string.Format("[{0}] X=({1} : {2}), Y=({3} : {4})", xmlNodeIndex, minX, maxX, minY, maxY); + return $"[{xmlNodeIndex}] X=({minX} : {maxX}), Y=({minY} : {maxY})"; } } @@ -188,7 +194,8 @@ namespace CodeWalker.World public float Amplitude { get; set; } public float XDirection { get; set; } public float YDirection { get; set; } - public Quaternion WaveOrientation { get; set; } + public Quaternion _WaveOrientation; + public ref Quaternion WaveOrientation => ref _WaveOrientation; public override void Init(XmlNode node, int index) @@ -203,7 +210,7 @@ namespace CodeWalker.World YDirection = Xml.GetChildFloatAttribute(node, "YDirection", "value"); float angl = (float)Math.Atan2(YDirection, XDirection); - WaveOrientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl); + Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl, out WaveOrientation); /* diff --git a/CodeWalker.Core/World/Watermaps.cs b/CodeWalker.Core/World/Watermaps.cs index f715ae4..b5b876c 100644 --- a/CodeWalker.Core/World/Watermaps.cs +++ b/CodeWalker.Core/World/Watermaps.cs @@ -1,4 +1,6 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; @@ -18,21 +20,18 @@ namespace CodeWalker.World { return NodePositions; } - public EditorVertex[] GetPathVertices() - { - return null; - } public EditorVertex[] GetTriangleVertices() { return TriangleVerts; } - public Vector4[] NodePositions; - public EditorVertex[] TriangleVerts; + public Vector4[] NodePositions = []; + public EditorVertex[] TriangleVerts = []; public void Init(GameFileCache gameFileCache, Action updateStatus) { + using var _ = new DisposableTimer("Watermaps Init"); Inited = false; GameFileCache = gameFileCache; @@ -61,8 +60,8 @@ namespace CodeWalker.World public void BuildVertices() { - var vlist = new List(); - var nlist = new List(); + using var vlist = new PooledList(); + using var nlist = new PooledList(); foreach (var wmf in WatermapFiles) { @@ -73,26 +72,18 @@ namespace CodeWalker.World { TriangleVerts = vlist.ToArray(); } - else - { - TriangleVerts = null; - } if (nlist.Count > 0) { NodePositions = nlist.ToArray(); } - else - { - NodePositions = null; - } } - private void BuildWatermapVertices(WatermapFile wmf, List vl, List nl) + private void BuildWatermapVertices(WatermapFile wmf, IList vl, IList nl) { - var v1 = new EditorVertex(); - var v2 = new EditorVertex(); - var v3 = new EditorVertex(); - var v4 = new EditorVertex(); + EditorVertex v1; + EditorVertex v2; + EditorVertex v3; + EditorVertex v4; uint cblu = (uint)new Color(0, 0, 128, 60).ToRgba(); @@ -121,41 +112,44 @@ namespace CodeWalker.World uint getColour(int o) { var harr = wmf.GridWatermapRefs[o]; - if (harr == null) return cblu; - if (harr.Length == 0) return cblu; + if (harr == null) + return cblu; + if (harr.Length == 0) + return cblu; var i0 = harr[0].Item; - if (i0 == null) return cblu; + if (i0 == null) + return cblu; var c = i0.Colour; c.A = 128; return (uint)c.ToRgba(); } - var w = wmf.Width; - var h = wmf.Height; - var min = new Vector3(wmf.CornerX, wmf.CornerY, 0.0f); - var step = new Vector3(wmf.TileX, -wmf.TileY, 1.0f); + //var w = wmf.Width; + //var h = wmf.Height; + //var min = new Vector3(wmf.CornerX, wmf.CornerY, 0.0f); + //var step = new Vector3(wmf.TileX, -wmf.TileY, 1.0f); //var siz = new Vector3(w, h, 1) * step; - for (int yi = 1; yi < h; yi++) - { - var yo = yi - 1; - for (int xi = 1; xi < w; xi++) - { - var xo = xi - 1; - var o1 = yi * w + xo; - var o2 = yi * w + xi; - var o3 = yo * w + xo; - var o4 = yo * w + xi; - v1.Position = min + step * new Vector3(xo, yi, getHeight(o1)); - v2.Position = min + step * new Vector3(xi, yi, getHeight(o2)); - v3.Position = min + step * new Vector3(xo, yo, getHeight(o3)); - v4.Position = min + step * new Vector3(xi, yo, getHeight(o4)); - v1.Colour = getColour(o1); - v2.Colour = getColour(o2); - v3.Colour = getColour(o3); - v4.Colour = getColour(o4); - //vl.Add(v1); vl.Add(v2); vl.Add(v3); - //vl.Add(v3); vl.Add(v2); vl.Add(v4); - } - } + //for (int yi = 1; yi < h; yi++) + //{ + // var yo = yi - 1; + // for (int xi = 1; xi < w; xi++) + // { + // var xo = xi - 1; + // var o1 = yi * w + xo; + // var o2 = yi * w + xi; + // var o3 = yo * w + xo; + // var o4 = yo * w + xi; + // v1.Position = min + step * new Vector3(xo, yi, getHeight(o1)); + // v2.Position = min + step * new Vector3(xi, yi, getHeight(o2)); + // v3.Position = min + step * new Vector3(xo, yo, getHeight(o3)); + // v4.Position = min + step * new Vector3(xi, yo, getHeight(o4)); + // v1.Colour = getColour(o1); + // v2.Colour = getColour(o2); + // v3.Colour = getColour(o3); + // v4.Colour = getColour(o4); + // //vl.Add(v1); vl.Add(v2); vl.Add(v3); + // //vl.Add(v3); vl.Add(v2); vl.Add(v4); + // } + //} //for (int y = 0; y < h; y++) //{ // for (int x = 0; x < w; x++) @@ -166,23 +160,23 @@ namespace CodeWalker.World //} - void addQuad(Quad q) + void addQuad(in Quad q, uint color) { - v1.Position = q.P1; - v2.Position = q.P2; - v3.Position = q.P3; - v4.Position = q.P4; - vl.Add(v1); vl.Add(v2); vl.Add(v3); + v1 = new EditorVertex(q.P1, color); + v2 = new EditorVertex(q.P2, color); + v3 = new EditorVertex(q.P3, color); + v4 = new EditorVertex(q.P4, color); + vl.Add(new EditorVertex()); vl.Add(v2); vl.Add(v3); vl.Add(v3); vl.Add(v2); vl.Add(v4); } - void addRivEnd(Vector3 p, Vector3 s, Vector3 d, float r) + void addRivEnd(in Vector3 p, in Vector3 s, in Vector3 d, float r, uint color) { - v1.Position = p; - v2.Position = p + s * r; - v3.Position = p + d * r; - v4.Position = p - s * r; - vl.Add(v1); vl.Add(v2); vl.Add(v3); - vl.Add(v1); vl.Add(v3); vl.Add(v4); + v1 = new EditorVertex(p, color); + v2 = new EditorVertex(p + s * r, color); + v3 = new EditorVertex(p + d * r, color); + v4 = new EditorVertex(p - s * r, color); + vl.Add(new EditorVertex()); vl.Add(v2); vl.Add(v3); + vl.Add(new EditorVertex()); vl.Add(v3); vl.Add(v4); } var rivers = wmf.Rivers; if (rivers != null) @@ -195,7 +189,7 @@ namespace CodeWalker.World var rwid = 20.0f; var rc = river.Colour; rc.A = 128; - v1.Colour = v2.Colour = v3.Colour = v4.Colour = (uint)rc.ToRgba(); + var riverColor = (uint)rc.ToRgba(); var quads = new Quad[river.Vectors.Length - 1]; var li = river.Vectors.Length - 1; for (int i = 1; i < river.Vectors.Length; i++) @@ -215,8 +209,8 @@ namespace CodeWalker.World quads[o].P2 = vo.XYZ() + sid*rwid; quads[o].P3 = vi.XYZ() - sid*rwid; quads[o].P4 = vi.XYZ() + sid*rwid; - if (i == 1) addRivEnd(vo.XYZ(), -sid, -dir, rwid); - if (i == li) addRivEnd(vi.XYZ(), sid, dir, rwid); + if (i == 1) addRivEnd(vo.XYZ(), -sid, -dir, rwid, riverColor); + if (i == li) addRivEnd(vi.XYZ(), in sid, in dir, rwid, riverColor); } for (int i = 1; i < quads.Length; i++) { @@ -226,7 +220,7 @@ namespace CodeWalker.World } for (int i = 0; i < quads.Length; i++) { - addQuad(quads[i]); + addQuad(in quads[i], riverColor); } } } @@ -241,17 +235,19 @@ namespace CodeWalker.World var lp = lake.Position; var lc = lake.Colour; lc.A = 128; - v1.Colour = v2.Colour = v3.Colour = v4.Colour = (uint)lc.ToRgba(); + var lakeColor = (uint)lc.ToRgba(); for (int i = 0; i < lake.Vectors.Length; i++) { var vi = lake.Vectors[i]; var vp = new Vector3(vi.X, vi.Y, lp.Z); - var q = new Quad(); - q.P1 = vp + new Vector3(vi.Z, -vi.W, 0); - q.P2 = vp + new Vector3(vi.Z, vi.W, 0); - q.P3 = vp + new Vector3(-vi.Z, -vi.W, 0); - q.P4 = vp + new Vector3(-vi.Z, vi.W, 0); - addQuad(q); + var q = new Quad + { + P1 = vp + new Vector3(vi.Z, -vi.W, 0), + P2 = vp + new Vector3(vi.Z, vi.W, 0), + P3 = vp + new Vector3(-vi.Z, -vi.W, 0), + P4 = vp + new Vector3(-vi.Z, vi.W, 0), + }; + addQuad(in q, lakeColor); } } } @@ -264,13 +260,14 @@ namespace CodeWalker.World var ps = pool.Size; var pc = pool.Colour; pc.A = 128; - v1.Colour = v2.Colour = v3.Colour = v4.Colour = (uint)pc.ToRgba(); - var q = new Quad(); - q.P1 = pp + new Vector3(ps.X, -ps.Y, 0); - q.P2 = pp + new Vector3(ps.X, ps.Y, 0); - q.P3 = pp + new Vector3(-ps.X, -ps.Y, 0); - q.P4 = pp + new Vector3(-ps.X, ps.Y, 0); - addQuad(q); + var q = new Quad + { + P1 = pp + new Vector3(ps.X, -ps.Y, 0), + P2 = pp + new Vector3(ps.X, ps.Y, 0), + P3 = pp + new Vector3(-ps.X, -ps.Y, 0), + P4 = pp + new Vector3(-ps.X, ps.Y, 0) + }; + addQuad(in q, (uint)pc.ToRgba()); } } diff --git a/CodeWalker.Core/World/Weather.cs b/CodeWalker.Core/World/Weather.cs index 8e43042..1c16cfa 100644 --- a/CodeWalker.Core/World/Weather.cs +++ b/CodeWalker.Core/World/Weather.cs @@ -1,4 +1,5 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using SharpDX; using System; using System.Collections.Generic; @@ -32,6 +33,7 @@ namespace CodeWalker.World public void Init(GameFileCache gameFileCache, Action updateStatus, Timecycle timecycle) { + using var _ = new DisposableTimer("Weather Init"); Timecycle = timecycle; var rpfman = gameFileCache.RpfMan; diff --git a/CodeWalker.Peds/CodeWalker.Peds.csproj b/CodeWalker.Peds/CodeWalker.Peds.csproj index b63529e..2cbbe5f 100644 --- a/CodeWalker.Peds/CodeWalker.Peds.csproj +++ b/CodeWalker.Peds/CodeWalker.Peds.csproj @@ -1,7 +1,7 @@  WinExe - net6.0-windows + net8.0-windows true CWPeds.ico dexyfex diff --git a/CodeWalker.Peds/Program.cs b/CodeWalker.Peds/Program.cs index c07a408..bbfc67f 100644 --- a/CodeWalker.Peds/Program.cs +++ b/CodeWalker.Peds/Program.cs @@ -1,5 +1,7 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using CodeWalker.Properties; +using CodeWalker.Utils; using System; using System.Collections.Generic; using System.Linq; @@ -18,11 +20,15 @@ namespace CodeWalker.Peds { //Process.Start("CodeWalker.exe", "peds"); - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new PedsForm()); + if (!NamedPipe.TrySendMessageToOtherProcess("peds-mode")) + { + ConsoleWindow.Hide(); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new PedsForm()); - GTAFolder.UpdateSettings(); + GTAFolder.UpdateSettings(); + } } } } diff --git a/CodeWalker.Peds/Properties/PublishProfiles/FolderProfile.pubxml b/CodeWalker.Peds/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..74d593d --- /dev/null +++ b/CodeWalker.Peds/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + ..\publish\ + FileSystem + <_TargetId>Folder + net8.0-windows + win-x64 + false + false + true + + \ No newline at end of file diff --git a/CodeWalker.RPFExplorer/CodeWalker.RPFExplorer.csproj b/CodeWalker.RPFExplorer/CodeWalker.RPFExplorer.csproj index e03e61c..be85dc3 100644 --- a/CodeWalker.RPFExplorer/CodeWalker.RPFExplorer.csproj +++ b/CodeWalker.RPFExplorer/CodeWalker.RPFExplorer.csproj @@ -1,7 +1,7 @@  WinExe - net6.0-windows + net8.0-windows true true CWRPFExplorer.ico @@ -10,6 +10,7 @@ dexyfex CodeWalker RPF Explorer latest + true x64 @@ -17,6 +18,9 @@ x64 + + + diff --git a/CodeWalker.RPFExplorer/Program.cs b/CodeWalker.RPFExplorer/Program.cs index baa1d9c..9dd697f 100644 --- a/CodeWalker.RPFExplorer/Program.cs +++ b/CodeWalker.RPFExplorer/Program.cs @@ -8,6 +8,8 @@ using System.Threading.Tasks; using System.Windows.Forms; using CodeWalker.Utils; using CodeWalker.Core.Utils; +using System.Diagnostics.Tracing; +using System.Threading; namespace CodeWalker.RPFExplorer { @@ -23,6 +25,7 @@ namespace CodeWalker.RPFExplorer { if (!NamedPipe.TrySendMessageToOtherProcess("explorer")) { + CodeWalker.Program.LoadConfig(); ConsoleWindow.Hide(); //Process.Start("CodeWalker.exe", "explorer"); Application.EnableVisualStyles(); @@ -30,7 +33,7 @@ namespace CodeWalker.RPFExplorer var form = new ExploreForm(); var namedPipe = new NamedPipe(form); - namedPipe.Init(); + namedPipe.StartServer(); Application.Run(form); diff --git a/CodeWalker.RPFExplorer/Properties/PublishProfiles/FolderProfile.pubxml b/CodeWalker.RPFExplorer/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..2027c54 --- /dev/null +++ b/CodeWalker.RPFExplorer/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + ..\publish\ + FileSystem + <_TargetId>Folder + net8.0-windows + false + win-x64 + false + true + + \ No newline at end of file diff --git a/CodeWalker.Shaders/CodeWalker.Shaders.vcxproj b/CodeWalker.Shaders/CodeWalker.Shaders.vcxproj index da33fd1..a7748f9 100644 --- a/CodeWalker.Shaders/CodeWalker.Shaders.vcxproj +++ b/CodeWalker.Shaders/CodeWalker.Shaders.vcxproj @@ -68,7 +68,10 @@ - + + true + $(ProjectDir)..\Shaders\ + Level3 @@ -105,7 +108,7 @@ $(ProjectDir)..\Shaders\%(Filename).cso - 4.0 + 5.0 true diff --git a/CodeWalker.Shaders/LightPS.hlsl b/CodeWalker.Shaders/LightPS.hlsl index 429a517..c831ab9 100644 --- a/CodeWalker.Shaders/LightPS.hlsl +++ b/CodeWalker.Shaders/LightPS.hlsl @@ -1,5 +1,6 @@ #include "LightPS.hlsli" +SamplerState TextureSS : register(s0); Texture2D DepthTex : register(t0); Texture2D DiffuseTex : register(t2); @@ -18,7 +19,7 @@ float4 main(VS_Output input) : SV_TARGET { uint3 ssloc = uint3(input.Pos.xy, 0); //pixel location float depth = DepthTex.Load(ssloc).r; - if (depth == 0) + if (depth <= 9.99999997e-07) discard; //no existing pixel rendered here float4 diffuse = DiffuseTex.Load(ssloc); diff --git a/CodeWalker.Shaders/LightPS.hlsli b/CodeWalker.Shaders/LightPS.hlsli index d143386..c834dd9 100644 --- a/CodeWalker.Shaders/LightPS.hlsli +++ b/CodeWalker.Shaders/LightPS.hlsli @@ -171,6 +171,31 @@ float4 DeferredLODLight(float3 camRel, float3 norm, float4 diffuse, float4 specu return float4(lcol, 1); } +bool IsInRange(float3 camRel) +{ + float3 srpos = InstPosition - camRel; + float ldist = length(srpos); + + if (InstType == 4) + { + float3 ext = InstDirection.xyz * (InstCapsuleExtent.y * 0.5); + float4 lsn = GetLineSegmentNearestPoint(srpos, ext, -ext); + ldist = lsn.w; + srpos.xyz = lsn.xyz; + } + + if (ldist > InstFalloff) + return false; + if (ldist <= 0) + return false; + + float d = dot(srpos, InstCullingPlaneNormal) - InstCullingPlaneOffset; + if (d > 0) + return false; + + return true; +} + float4 DeferredLight(float3 camRel, float3 norm, float4 diffuse, float4 specular, float4 irradiance) { float3 srpos = InstPosition - camRel; //light position relative to surface position diff --git a/CodeWalker.Shaders/LightPS_MS.hlsl b/CodeWalker.Shaders/LightPS_MS.hlsl index e998070..3eabcdb 100644 --- a/CodeWalker.Shaders/LightPS_MS.hlsl +++ b/CodeWalker.Shaders/LightPS_MS.hlsl @@ -1,5 +1,6 @@ #include "LightPS.hlsli" +SamplerState TextureSS : register(s0); Texture2DMS DepthTex : register(t0); Texture2DMS DiffuseTex : register(t2); @@ -24,7 +25,7 @@ float4 main(VS_Output input) : SV_TARGET for (int i = 0; i < sc; i++) { float depth = DepthTex.Load(ssloc, i); - if (depth == 0) + if (depth <= 9.99999997e-07) continue; //no existing subpixel rendered here float4 diffuse = DiffuseTex.Load(ssloc, i); diff --git a/CodeWalker.Shaders/LodLightsVS.hlsl b/CodeWalker.Shaders/LodLightsVS.hlsl index d0409d3..704bf88 100644 --- a/CodeWalker.Shaders/LodLightsVS.hlsl +++ b/CodeWalker.Shaders/LodLightsVS.hlsl @@ -58,6 +58,7 @@ VS_Output main(float4 ipos : POSITION, uint iid : SV_InstanceID) cpos.y += (ipos.w * 2 - 1) * lodlight.OuterAngleOrCapExt; opos = (cpos.x * lodlight.TangentX.xyz) + (cpos.y * lodlight.Direction.xyz) + (cpos.z * lodlight.TangentY.xyz); } + opos += (lodlight.Position - CameraPos.xyz); float4 spos = mul(float4(opos, 1), ViewProj); VS_Output output; diff --git a/CodeWalker.Shaders/Shadowmap.hlsli b/CodeWalker.Shaders/Shadowmap.hlsli index 1dba4ed..c2441db 100644 --- a/CodeWalker.Shaders/Shadowmap.hlsli +++ b/CodeWalker.Shaders/Shadowmap.hlsli @@ -1,5 +1,8 @@ #include "Common.hlsli" +#define PCFSTART -1 +#define PCFEND 2 + //Texture2DArray Depthmap : register(t1); //SamplerState DepthmapSS : register(s1); Texture2D Depthmap : register(t1); @@ -54,9 +57,11 @@ void ShadowmapCalculatePCFPercentLit(in float4 vShadowTexCoord, fPercentLit = 0.0f; // This loop could be unrolled, and texture immediate offsets could be used if the kernel size were fixed. // This would be performance improvment. - for (int x = PCFLoopStart; x < PCFLoopEnd; ++x) + [unroll] + for (int x = PCFSTART; x < PCFEND; ++x) { - for (int y = PCFLoopStart; y < PCFLoopEnd; ++y) + [unroll] + for (int y = PCFSTART; y < PCFEND; ++y) { float depthcompare = vShadowTexCoord.z; // A very simple solution to the depth bias problems of PCF is to use an offset. diff --git a/CodeWalker.Test/CodeWalker.Test.csproj b/CodeWalker.Test/CodeWalker.Test.csproj index 1fca3ae..e67d4a8 100644 --- a/CodeWalker.Test/CodeWalker.Test.csproj +++ b/CodeWalker.Test/CodeWalker.Test.csproj @@ -1,18 +1,18 @@  - net6.0 + net8.0 enable false latest - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/CodeWalker.Test/Files/content.xml b/CodeWalker.Test/Files/content.xml new file mode 100644 index 0000000..fd43264 --- /dev/null +++ b/CodeWalker.Test/Files/content.xml @@ -0,0 +1,382 @@ + + + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_JetSki_Ramp.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_JetSki_Ramp.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_stunt.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_stunt.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_Inflatable_CP.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_Inflatable_CP.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_signs.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_signs.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_tubes.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_tubes.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_neongates.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_neongates.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_CP_Towers.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_CP_Towers.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_Blocks.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_Blocks.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_FireHoops.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_FireHoops.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_checkpoints.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_checkpoints.ityp + DLC_ITYP_REQUEST + + + + CONTENTS_PROPS + + + dlc_mpAirracesCRC:/common/data/contentunlocks.meta + CONTENT_UNLOCKING_META_FILE + + + + + + dlc_mpAirraces:/common/data/overlayinfo.xml + OVERLAY_INFO_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/data/effects/ptfx.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/anim/creaturemetadata.rpf + RPF_FILE + + + + + + dlc_mpAirracesCRC:/common/data/pedalternatevariations.meta + ALTERNATE_VARIATIONS_FILE + + + + + + dlc_mpAirraces:/common/data/effects/peds/first_person.meta + PED_FIRST_PERSON_ASSET_DATA + + + + + + dlc_mpAirracesCRC:/common/data/mp_f_freemode_01_airraces_shop.meta + SHOP_PED_APPAREL_META_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_female.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_female_p.rpf + RPF_FILE + + + + + + dlc_mpAirracesCRC:/common/data/mp_m_freemode_01_airraces_shop.meta + SHOP_PED_APPAREL_META_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_male.rpf + RPF_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_male_p.rpf + RPF_FILE + + + + + + dlc_mpAirracesCRC:/common/data/shop_tattoo.meta + TATTOO_SHOP_DLC_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_game.dat + AUDIO_GAMEDATA + + + + + + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_sounds.dat + AUDIO_SOUNDDATA + + + + + + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_mix.dat + AUDIO_DYNAMIXDATA + + + + + + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_amp.dat + AUDIO_SYNTHDATA + + + + + + dlc_mpAirraces:/%PLATFORM%/audio/sfx/dlc_Airraces + AUDIO_WAVEPACK + + + + + + dlc_mpAirracesCRC:/common/data/effects/peds/mpAirraces_overlays.xml + PED_OVERLAY_FILE + + + + + + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirraces_ped_mp_overlay_txds.rpf + RPF_FILE + + + + + + + + MPAIRRACES_AUTOGEN + + + + + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_JetSki_Ramp.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_JetSki_Ramp.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_stunt.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_stunt.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_Inflatable_CP.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_Inflatable_CP.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_signs.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_signs.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_tubes.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_tubes.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_neongates.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_neongates.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_CP_Towers.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_CP_Towers.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_Blocks.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_Blocks.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/Prop_AR_FireHoops.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_Prop_AR_FireHoops.ityp + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/prop_ar_checkpoints.rpf + dlc_mpAirraces:/%PLATFORM%/levels/gta5/props/ar_prop_ar_checkpoints.ityp + dlc_mpAirraces:/%PLATFORM%/data/effects/ptfx.rpf + dlc_mpAirraces:/%PLATFORM%/anim/creaturemetadata.rpf + dlc_mpAirracesCRC:/common/data/pedalternatevariations.meta + dlc_mpAirraces:/common/data/effects/peds/first_person.meta + dlc_mpAirraces:/common/data/overlayinfo.xml + dlc_mpAirracesCRC:/common/data/mp_f_freemode_01_airraces_shop.meta + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_female.rpf + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_female_p.rpf + dlc_mpAirracesCRC:/common/data/mp_m_freemode_01_airraces_shop.meta + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_male.rpf + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirRaces_male_p.rpf + dlc_mpAirracesCRC:/common/data/shop_tattoo.meta + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_game.dat + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_sounds.dat + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_mix.dat + dlc_mpAirraces:/%PLATFORM%/audio/dlcAirraces_amp.dat + dlc_mpAirraces:/%PLATFORM%/audio/sfx/dlc_Airraces + dlc_mpAirracesCRC:/common/data/effects/peds/mpAirraces_overlays.xml + dlc_mpAirraces:/%PLATFORM%/models/cdimages/mpAirraces_ped_mp_overlay_txds.rpf + + + + + + + + + MPAIRRACES_UNLOCKS_AUTOGEN + + + + + dlc_mpAirracesCRC:/common/data/contentunlocks.meta + + + + + + + + + MPAIRRACES_INTERIOR_ADDITIONS + + + MO_JIM_L11 + + + + + + + + LOADINGSCREEN_CONTEXT_LAST_FRAME + + + + + diff --git a/CodeWalker.Test/FloatUtilTests.cs b/CodeWalker.Test/FloatUtilTests.cs new file mode 100644 index 0000000..1db8976 --- /dev/null +++ b/CodeWalker.Test/FloatUtilTests.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace CodeWalker.Test +{ + public class FloatUtilTests(ITestOutputHelper testOutputHelper) + { + [Fact] + public void FloatUtilTest() + { + float num = 1234.1234128934612983542364891263489125346758128793648972634921783945981234f; + Assert.Equal(num.ToString(), FloatUtil.ToString(num)); + Assert.Equal(num, float.Parse(FloatUtil.ToString(num))); + Assert.Equal(num, float.Parse(num.ToString())); + var random = new Random(42); + + for (int i = 0; i < 100000; i++) + { + var number = (float)(random.NextDouble() * random.Next(int.MinValue, int.MaxValue)); + + var numToString = number.ToString(); + + var floatUtilToString = FloatUtil.ToString(number); + + Assert.Equal(numToString, floatUtilToString); + } + + } + } +} diff --git a/CodeWalker.Test/GTACryptTests.cs b/CodeWalker.Test/GTACryptTests.cs index 17f063f..ab6fdff 100644 --- a/CodeWalker.Test/GTACryptTests.cs +++ b/CodeWalker.Test/GTACryptTests.cs @@ -96,7 +96,7 @@ namespace CodeWalker.Test public void DecryptWithSpanShouldReturnExpectedData() { var data = Convert.FromBase64String(InputData); - GTACrypto.DecryptNG(data.AsSpan(), Key); + GTACrypto.DecryptNG(data.AsMemory(), Key); Assert.Equal(OutputData, Convert.ToBase64String(data)); } diff --git a/CodeWalker.Test/GameFileTests.cs b/CodeWalker.Test/GameFileTests.cs new file mode 100644 index 0000000..3bec430 --- /dev/null +++ b/CodeWalker.Test/GameFileTests.cs @@ -0,0 +1,70 @@ +using CodeWalker.GameFiles; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace CodeWalker.Test +{ + public class GameFileTests + { + [Fact] + public void SettingLoadedShouldUpdateLoaded() + { + var gameFile = new YmapFile(); + + gameFile.Loaded = true; + + Assert.True(gameFile.Loaded); + + gameFile.Loaded = false; + + Assert.False(gameFile.Loaded); + } + + [Fact] + public void SettingLoadQueuedShouldUpdateLoadQueued() + { + var gameFile = new YmapFile(); + + gameFile.LoadQueued = true; + + Assert.True(gameFile.LoadQueued); + + gameFile.LoadQueued = false; + + Assert.False(gameFile.LoadQueued); + } + + [Fact] + // This is a requirement for thread safety, this allows an if statement which is atomic when checking for load state + public void SetLoadQueuedShouldReturnFalseWhenValueNotUpdated() + { + var gameFile = new YmapFile(); + + Assert.False(gameFile.LoadQueued); + + Assert.True(gameFile.SetLoadQueued(true)); + Assert.False(gameFile.SetLoadQueued(true)); + + Assert.True(gameFile.SetLoadQueued(false)); + Assert.False(gameFile.SetLoadQueued(false)); + } + + [Fact] + public void SetLoadedShouldReturnFalseWhenValueNotUpdated() + { + var gameFile = new YmapFile(); + + Assert.False(gameFile.Loaded); + + Assert.True(gameFile.SetLoaded(true)); + Assert.False(gameFile.SetLoaded(true)); + + Assert.True(gameFile.SetLoaded(false)); + Assert.False(gameFile.SetLoaded(false)); + } + } +} diff --git a/CodeWalker.Test/MetaTypesTests.cs b/CodeWalker.Test/MetaTypesTests.cs new file mode 100644 index 0000000..b07e1c4 --- /dev/null +++ b/CodeWalker.Test/MetaTypesTests.cs @@ -0,0 +1,716 @@ +using CodeWalker.GameFiles; +using System; +using System.Buffers.Binary; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Xml.Linq; +using Xunit; +using Xunit.Abstractions; + +namespace CodeWalker.Test +{ + public static class TestData + { + public const string ReferenceDataBytes = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAADWA9YDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAATABMAAAAAAAAAAAAAAAAACgAAAAAAAADZAdkBAAAAAAYAAAAAAAAAogGiAQAAAAABAAAAAAAAADsAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3///8mAAAANgAAAEkAAAAAAAAAAAAAAAAAAAAAAAAAAACAQgAAgEIAAAAAAAAAAAAAAAAIQDQAAAAAAEgDSAMAAAAABwAAAAAAAAAGAAYAAAAAAAgAAAAAAAAANwA3AAAAAAAIwA0AAAAAAB4AHgAAAAAACEAVAAAAAAAOAA4AAAAAAAjAGAAAAAAACQAJAAAAAAAIABsAAAAAAAIAAgAAAAAACIAbAAAAAAABAAEAAAAAAA=="; + public static CScenarioPointRegion ReferenceData => new CScenarioPointRegion + { + AccelGrid = new rage__spdGrid2D + { + CellDimX = 64, + CellDimY = 64, + MaxCellX = 38, + MaxCellY = 73, + MinCellX = -3, + MinCellY = 54, + }, + ChainingGraph = new CodeWalker.GameFiles.CScenarioChainingGraph + { + Chains = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 59, + Count2 = 59, + Pointer = 1, + }, + Edges = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 418, + Count2 = 418, + Pointer = 6, + }, + Nodes = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 473, + Count2 = 473, + Pointer = 10, + } + }, + Clusters = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 6, + Count2 = 6, + Pointer = 7, + }, + EntityOverrides = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 19, + Count2 = 19, + Pointer = 2, + }, + LookUps = new CodeWalker.GameFiles.CScenarioPointLookUps + { + GroupNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 9, + Count2 = 9, + Pointer = 1622024, + }, + InteriorNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 2, + Count2 = 2, + Pointer = 1769480, + }, + PedModelSetNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 30, + Count2 = 30, + Pointer = 901128, + }, + RequiredIMapNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 1, + Count2 = 1, + Pointer = 1802248, + }, + TypeNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 55, + Count2 = 55, + Pointer = 8, + }, + VehicleModelSetNames = new CodeWalker.GameFiles.Array_uint + { + Count1 = 14, + Count2 = 14, + Pointer = 1392648, + }, + }, + Points = new CodeWalker.GameFiles.CScenarioPointContainer + { + LoadSavePoints = new CodeWalker.GameFiles.Array_Structure + { + PointerDataIndex = 4294967295, + }, + MyPoints = new CodeWalker.GameFiles.Array_Structure + { + Count1 = 982, + Count2 = 982, + Pointer = 3, + } + }, + Unk_3844724227 = new CodeWalker.GameFiles.Array_ushort + { + Count1 = 840, + Count2 = 840, + Pointer = 3424264, + } + }; + } + + public class PsoTypesTests + { + private readonly ITestOutputHelper _output; + public PsoTypesTests(ITestOutputHelper testOutputHelper) + { + _output = testOutputHelper; + } + + private const string ExpectedResult = "AAAAA3pyMzUwX2Rhc2gxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2gyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2gzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2g0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoNCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI0K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI1K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI2K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI3K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI4K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hvb2RhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9ob29kYStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFhK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFiK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFjK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTFsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUxbCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTFyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUxcitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTJsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUybCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTJyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUycitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTAraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTYraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsNytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsOCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsOStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3QzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0MytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0OCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + private const string InputData = "AAAAA3pyMzUwX2Rhc2gxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2gyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2gzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoMytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2Rhc2g0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9kYXNoNCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI0K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI1K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI2K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI3K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ZpbHRlcjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9maWx0ZXI4K2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX2xfNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9sXzUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hsaXRlX3JfNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9obGl0ZV9yXzUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2hvb2RhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9ob29kYStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFhK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFiK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX2ludGVyY29vbGVyMWMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9pbnRlcmNvb2xlcjFjK2hpZnIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTFsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUxbCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTFyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUxcitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTJsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUybCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3NsZWVweWV5ZTJyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zbGVlcHlleWUycitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTAraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTQraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTUraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwxNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMTYraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWwzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsMytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsNytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsOCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N0d2hlZWw5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdHdoZWVsOStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3QzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0MytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NStoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0NytoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pyMzUwX3N1c3Q4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6cjM1MF9zdXN0OCtoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + + [Fact] + public void TestConvertData() + { + var data = Convert.FromBase64String(InputData); + var result = PsoTypes.ConvertDataArrayRaw(data, 0, 43); + Assert.Equal(43, result.Length); + + var firstResult = result[0]; + + Assert.Equal(768, firstResult.Unused02); + Assert.Equal("zr350_dash1+hifr", firstResult.HDTxd.ToString()); + Assert.Equal("zr350_dash1", firstResult.targetAsset.ToString()); + + var outputData = Convert.ToBase64String(MemoryMarshal.AsBytes(result.AsSpan())); + + Assert.Equal(ExpectedResult, outputData); + + Assert.Equal(InputData, outputData); + } + + private const string InputDataWithOffset = "UFNJTgAAAXhwcHBwcHBwcAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnYl9idW1mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ2JfYnVtZitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnYl9idW1yAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ2JfYnVtcitoaWZyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="; + + [Fact] + public void TestConvertDataWithOffset() + { + var data = Convert.FromBase64String(InputDataWithOffset); + + var result = PsoTypes.ConvertDataArrayRaw(data, 112, 2); + Assert.Equal(2, result.Length); + + var firstResult = result[0]; + + Assert.Equal(768, firstResult.Unused02); + Assert.Equal("gb_bumf+hifr", firstResult.HDTxd.ToString()); + Assert.Equal("gb_bumf", firstResult.targetAsset.ToString()); + + var secondResult = result[1]; + + Assert.Equal(768, secondResult.Unused02); + Assert.Equal("gb_bumr+hifr", secondResult.HDTxd.ToString()); + Assert.Equal("gb_bumr", secondResult.targetAsset.ToString()); + + data = Convert.FromBase64String("UFNJTgAAJBBwcHBwcHBwcFYVuAxACWAVAAAAAPJlYolcYBoCAAAAAAmC8HDuekF4AAAAADUL+WFACWAVAAAAAFjK8ellJCzqAAAAAIOyHh1OoX6FAAAAAJ9UxM3KoXfjAAAAAFjUJ/bnD60/AAAAAMpEH+i7aVgrAAAAAE/rnt/r3zvtAAAAAHBwcHBwcHBw/DbCSgAAAAAAAAADAAAAAAABAAEAAAAACG1sZAAAAAAAAEADAAAAAAABAAEAAAAAQowWXQAAAAAAAIADAAAAAAAPAA8AAAAAW/i9MQAAAAAABEADAAAAAAAHAAcAAAAAq/sPWgAAAAAABgADAAAAAAADAAMAAAAAu0Kt6QAAAAAABsADAAAAAAADAAMAAAAAeN2pIAAAAAAAB4ADAAAAAAADAAMAAAAA9AhDmgAAAAAACEADAAAAAAAEAAQAAAAAkeTPmwAAAAAACUADAAAAAAALAAsAAAAAQOutrgAAAAAADAADAAAAAAALAAsAAAAALXyG0AAAAAAADsADAAAAAAAPAA8AAAAAXF9klQAAAAAAEoADAAAAAAAKAAoAAAAAShvADgAAAAAAFQADAAAAAAARABEAAAAA+gIf3AAAAAAAGUADAAAAAAALAAsAAAAAJ8n7awAAAAAAHAADAAAAAAAPAA8AAAAAESZOJAAAAAAAH8ADAAAAAAASABIAAAAAv4Uq3wAAAAAAJEADAAAAAAAQABAAAAAArZcHAwAAAAAAKEADAAAAAAAWABYAAAAApJyL+wAAAAAALcADAAAAAAAMAAwAAAAA0fvmuQAAAAAAMMADAAAAAAALAAsAAAAAzRLc5wAAAAAAM4ADAAAAAAAEAAQAAAAA+te4cAAAAAAANIADAAAAAAASABIAAAAAzDuXTgAAAAAAOQADAAAAAAAKAAoAAAAAuwj06QAAAAAAO4ADAAAAAAAGAAYAAAAA769eNQAAAAAAPQADAAAAAAAIAAgAAAAA3fu6zgAAAAAAPwADAAAAAAAHAAcAAAAAA0UFYAAAAAAAQMADAAAAAAAMAAwAAAAA+YRbugAAAAAAQ8ADAAAAAAADAAMAAAAA3b0kLAAAAAAARIADAAAAAAAFAAUAAAAAzBqA5wAAAAAARcADAAAAAAABAAEAAAAAQkltQwAAAAAARgADAAAAAAAFAAUAAAAAMI3JzAAAAAAAR0ADAAAAAAACAAIAAAAAGlcdXwAAAAAAR8ADAAAAAAAEAAQAAAAAhB1w7gAAAAAASMADAAAAAAADAAMAAAAAecdcQgAAAAAASYADAAAAAAACAAIAAAAAaaC79QAAAAAASgADAAAAAAACAAIAAAAAT1OHWwAAAAAASoADAAAAAAAGAAYAAAAAVhW4DAAAAAEATAADAAAAAAABAAEAAAAA7cm3HQAAAAAATEADAAAAAAABAAEAAAAA1KhsMwAAAAAATIADAAAAAAAIAAgAAAAATplgKwAAAAAAToADAAAAAAAQABAAAAAAIOmEzAAAAAAAUoADAAAAAAAOAA4AAAAAe906ogAAAAAAVgADAAAAAAASABIAAAAAToBf+QAAAAAAWoADAAAAAAAQABAAAAAAY/ipmAAAAAAAXoADAAAAAAAIAAgAAAAAdbtNHQAAAAAAYIADAAAAAAADAAMAAAAA8cNFJwAAAAAAYUADAAAAAAAGAAYAAAAAvb3DwQAAAAAAYsADAAAAAAAEAAQAAAAA0DTorwAAAAAAY8ADAAAAAAAGAAYAAAAA12GKTQAAAAAAZUADAAAAAAABAAEAAAAArHb1oAAAAAAAZYADAAAAAAAPAA8AAAAAvdgYYgAAAAAAaUADAAAAAAATABMAAAAAqwF/0QAAAAAAbgADAAAAAAAEAAQAAAAACj4T5QAAAAAAbwADAAAAAAABAAEAAAAA7v45sgAAAAAAb0ADAAAAAAABAAEAAAAAKbMMTgAAAAAAb4ADAAAAAAASABIAAAAAjE3RggAAAAAAdAADAAAAAAAPAA8AAAAAfhg1FwAAAAAAd8ADAAAAAAAEAAQAAAAAbsiWeAAAAAAAeMADAAAAAAAEAAQAAAAAqHCIcAAAAAAAecADAAAAAAAKAAoAAAAALpiqqgAAAAAAfEADAAAAAAADAAMAAAAA20MSPAAAAAAAfQADAAAAAAABAAEAAAAA/ZPtWQAAAAAAfUADAAAAAAAWABYAAAAAW+Mp+gAAAAAAgsADAAAAAAANAA0AAAAATZmNZwAAAAAAhgADAAAAAAAMAAwAAAAAWQGGyAAAAAAAiQADAAAAAAADAAMAAAAA8mViiQAAAAEAicADAAAAAAABAAEAAAAAFYEGtwAAAAAAigADAAAAAAABAAEAAAAAx8e8JAAAAAAAikADAAAAAAALAAsAAAAAtgoYqQAAAAAAjQADAAAAAAAOAA4AAAAAbxMKvAAAAAAAkIADAAAAAAATABMAAAAAklxRTgAAAAAAlUADAAAAAAABAAEAAAAAZa8bkAAAAAAAlYADAAAAAAACAAIAAAAACYLwcAAAAAEAlgADAAAAAAABAAEAAAAAP99bcwAAAAAAlkADAAAAAAABAAEAAAAA3VCzcAAAAAAAloADAAAAAAASABIAAAAAzqAWDwAAAAAAmwADAAAAAAATABMAAAAAdSYNhgAAAAAAn8ADAAAAAAADAAMAAAAAdnZIeAAAAAAAoIADAAAAAAABAAEAAAAA1D1FKQAAAAAAoMADAAAAAAAUABQAAAAAJhPo1QAAAAAApcADAAAAAAASABIAAAAARsAI9AAAAAAAqkADAAAAAAACAAIAAAAAKDQJVQAAAAAAqsADAAAAAAABAAEAAAAA/j+L/QAAAAAAqwADAAAAAAATABMAAAAA4klUDQAAAAAAr8ADAAAAAAAVABUAAAAA0k60GAAAAAAAtQADAAAAAAAYABgAAAAAwOwRUwAAAAAAuwADAAAAAAASABIAAAAAeDI33wAAAAAAv4ADAAAAAAAEAAQAAAAAheI6gwAAAAAAwIADAAAAAAABAAEAAAAANQv5YQAAAAEAwMADAAAAAAABAAEAAAAAWMrx6QAAAAEAwQADAAAAAAABAAEAAAAAg7IeHQAAAAEAwUADAAAAAAABAAEAAAAAn1TEzQAAAAEAwYADAAAAAAABAAEAAAAAbsqWgQAAAAAAwcADAAAAAAABAAEAAAAAD9yu1AAAAAAAwgADAAAAAAANAA0AAAAA8l5z2AAAAAAAxUADAAAAAAAPAA8AAAAAdkl7sAAAAAAAyQADAAAAAAAMAAwAAAAAZNjYzwAAAAAAzAADAAAAAAAUABQAAAAAVpY8SgAAAAAA0QADAAAAAAAVABUAAAAAOVoB0gAAAAAA1kADAAAAAAAMAAwAAAAAfRqJSgAAAAAA2UADAAAAAAAMAAwAAAAAiPTPpwAAAAAA3EADAAAAAAAHAAcAAAAAkz/kPQAAAAAA3gADAAAAAAAGAAYAAAAAmu46dwAAAAAA34ADAAAAAAAEAAQAAAAAfJgyHAAAAAAA4IADAAAAAAABAAEAAAAA1pIbAwAAAAAA4MADAAAAAAANAA0AAAAAB59vQwAAAAAA5AADAAAAAAAFAAUAAAAAyBaLigAAAAAA5UADAAAAAAAEAAQAAAAA7GTUJgAAAAAA5kADAAAAAAACAAIAAAAAm/qzUwAAAAAA5sADAAAAAAADAAMAAAAAkeefLQAAAAAA54ADAAAAAAADAAMAAAAAREIDtwAAAAAA6EADAAAAAAAFAAUAAAAAYZ4+bwAAAAAA6YADAAAAAAACAAIAAAAAZUCDcQAAAAAA6gADAAAAAAACAAIAAAAAzHKKuQAAAAAA6oADAAAAAAASABIAAAAAviXuHAAAAAAA7wADAAAAAAARABEAAAAArJvLaAAAAAAA80ADAAAAAAAUABQAAAAA3tSv3QAAAAAA+EADAAAAAAAaABoAAAAA0SaUgQAAAAAA/sADAAAAAAAJAAkAAAAAA2j5BQAAAAABAQADAAAAAAARABEAAAAAI9HlRAAAAAABBUADAAAAAAAMAAwAAAAAFJ9G3wAAAAABCEADAAAAAAAMAAwAAAAAF97JswAAAAABC0ADAAAAAAAGAAYAAAAACR8sNAAAAAABDMADAAAAAAAEAAQAAAAA0oQ+/wAAAAABDcADAAAAAAACAAIAAAAAJEbigwAAAAABDkADAAAAAAADAAMAAAAAzmq20AAAAAABDwADAAAAAAAEAAQAAAAAwJmbLgAAAAABEAADAAAAAAADAAMAAAAAWNQn9gAAAAEBEMADAAAAAAABAAEAAAAAc44gDAAAAAABEQADAAAAAAABAAEAAAAAQH0cNgAAAAABEUADAAAAAAANAA0AAAAATr+4uwAAAAABFIADAAAAAAAWABYAAAAAN74pOQAAAAABGgADAAAAAAAKAAoAAAAAUKeyYgAAAAABHIADAAAAAAADAAMAAAAAX/lRBQAAAAABHUADAAAAAAAEAAQAAAAAOaOEVgAAAAABHkADAAAAAAADAAMAAAAATHap/AAAAAABHwADAAAAAAAEAAQAAAAAJgXdGwAAAAABIAADAAAAAAAEAAQAAAAAKNPitwAAAAABIQADAAAAAAAGAAYAAAAAAogWIAAAAAABIoADAAAAAAAEAAQAAAAAykQf6AAAAAEBI4ADAAAAAAABAAEAAAAAhONhWAAAAAABI8ADAAAAAAABAAEAAAAAe8Kq7wAAAAABJAADAAAAAAABAAEAAAAA2Z7DzAAAAAABJEADAAAAAAABAAEAAAAAk29vPQAAAAABJIADAAAAAAABAAEAAAAA+xuQ6QAAAAABJMADAAAAAAABAAEAAAAAT+ue3wAAAAEBJQADAAAAAAABAAEAAAAAFf+3fwAAAAABJUADAAAAAAABAAEAAAAAG5yOHQAAAAABJYADAAAAAAAQABAAAAAA5HKfxgAAAAABKYADAAAAAAASABIAAAAAUi77QQAAAAABLgADAAAAAAAOAA4AAAAANsxgJAAAAAABMYADAAAAAAASABIAAAAALhsWjgAAAAABNgADAAAAAAAJAAkAAAAAN9eqBwAAAAABOEADAAAAAAAKAAoAAAAAihXOggAAAAABOsADAAAAAAAHAAcAAAAAlGrjLAAAAAABPIADAAAAAAAJAAkAAAAAZsEH2QAAAAABPsADAAAAAAAIAAgAAAAAvGHXswAAAAABQMADAAAAAAABAAEAAAAAUQeX6AAAAAABQQADAAAAAAABAAEAAAAASFpxhgAAAAABQUADAAAAAAABAAEAAAAA0p8egh/Uvy+7YcCKHwitVGU1+vf9/n0Y8xM/saXQfSJyDnfWoYQyRfuFnmqnT+UNUYkmUaMJ2SYCzpjpQRksJP3o33W7YcCKZTX69/3+fRj7hZ5qownZJgLOmOn96N91ZTX6901cmZL96N91ZTX693IOd9b96N91ZTX6901cmZL96N91wJkAubJjZE7FK5fQqvJ8XG0NSbYAc9lGHwitVGU1+vf9/n0Ycg531vuFnmqnT+UNUYkmUROjiemjCdkmbQ1JtgBz2UZfSN27HwitVGU1+vel0H0icg531lGJJlGjCdkmAs6Y6f3o33VtDUm2AHPZRh8IrVRlNfr3NQnl6vMTP7Gl0H0icg531pD05XFRiSZRE6OJ6aMJ2SY5a+dIAs6Y6UEZLCRtDUm2AHPZRh8IrVRlNfr3pdB9InIOd9bUQybNUYkmUaMJ2SZBGSwkbQ1JtgBz2UYfCK1UZTX690Wb0RP9/n0YCA2/6aryfFyl0H0icg531qGEMkVRiSZRE6OJ6aMJ2SYCzpjpQRksJP3o33VtDUm2AHPZRh8IrVRlNfr3pdB9InIOd9anT+UNUYkmUROjiek5a+dIAs6Y6W0NSbYAc9lGHwitVGU1+vc1CeXqqvJ8XKXQfSJyDnfWkPTlcfuFnmqnT+UNUYkmUROjiekCzpjpQRksJG0NSbYAc9lGHwitVGU1+vcE/uPd/f59GAgNv+lyDnfWkPTlcdRDJs1Z2j7m+4WeaqdP5Q1RiSZRownZJgLOmOlBGSwk/ejfdW0NSbYAc9lGX0jdux8IrVRlNfr3RZvRE/3+fRgIDb/ppdB9IgXY20ahhDJFUYkmUaMJ2SYCzpjpQRksJP3o33VtDUm2AHPZRjcd6kxfSN27HwitVGU1+vcE/uPd/f59GDUJ5eqq8nxcpdB9InIOd9YF2NtGHMDlJaGEMkWnT+UNUYkmUROjiek5a+dIAs6Y6UEZLCT96N91X0jdu2U1+vf9/n0YCA2/6aXQfSJyDnfWoYQyRfuFnmpRiSZRAs6Y6UEZLCT96N91bQ1JtgBz2UYfCK1UZTX696ryfFyl0H0icg531lGJJlETo4npAs6Y6UEZLCRtDUm2AHPZRmU1+vdRiSZRbQ1JtgBz2UYfCK1UZTX69/3+fRg1CeXqCA2/6fMTP7Gl0H0icg531pD05XH7hZ5qp0/lDVGJJlETo4npAs6Y6UEZLCT96N91bQ1JtgBz2UYfCK1UZTX690Wb0RNyDnfW+4WeaqMJ2SY5a+dIAs6Y6W0NSbYAc9lGZTX690Wb0RNyDnfW/ejfdW0NSbYAc9lGZTX690Wb0RMAeeTtcg531svFdJb96N91bQ1JtgBz2UZlNfr3RZvRE3IOd9ZRiSZROWvnSG0NSbYAc9lGHwitVGU1+vdFm9ET/f59GBzA5SWhhDJF+4WealGJJlGjCdkmAs6Y6WU1+vdyDnfW/ejfdR8IrVRlNfr3cg531k1cmZL96N91ZTX692U1+veq8nxccg531k1cmZL96N91ZTX69/3o33VlNfr3QRksJE1cmZL96N91ZTX693IOd9b96N91ZTX69/3o33VlNfr3/ejfdTxnPgMfCK1UZTX693IOd9ZNXJmS/ejfdUAJYBUJVJIvOhuP/zxnPgNlNfr3RZvREwgNv+lyDnfWE6OJ6UEZLCQ6G4//PGc+A19I3bsfCK1UZTX690Wb0RP9/n0YCA2/6aXQfSKnT+UNUYkmUROjiemjCdkmAs6Y6UEZLCT96N91OhuP/zxnPgMfCK1UZTX690Wb0RP9/n0YpdB9InIOd9ahhDJFp0/lDVGJJlECzpjpQRksJP3o33U6G4//PGc+Ax8IrVRlNfr3RZvREwT+4939/n0YCA2/6aXQfSJyDnfWHMDlJaGEMkWnT+UNUYkmUROjiekCzpjpQRksJP3o33U6G4//PGc+A83rir8fCK1UZTX690Wb0RP9/n0YNQnl6qXQfSJyDnfWp0/lDVGJJlETo4npAs6Y6UEZLCT96N91OhuP/zxnPgNlNfr3RZvRE/3+fRil0H0i+4WeaqMJ2SY6G4//PGc+A2U1+vc6G4//PGc+A2U1+vcAeeTtp0/lDaMJ2SY8Zz4DZTX6901cmZL96N91PGc+A2U1+vcAeeTtp0/lDU1cmZL96N91OU3w+UFA2/kliMYYZTX69/3+fRgIDb/pcg531pD05XGhhDJFp0/lDVGJJlETo4npownZJgLOmOlBGSwk/ejfdUFA2/k8Zz4DOy+wcB8IrVRlNfr3/f59GDUJ5eoIDb/ppdB9InIOd9aQ9OVxoYQyRadP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJP3o33VBQNv5PGc+A2U1+vf9/n0YTVyZkvJS4wRsdtaPX0jdux8IrVRlNfr3/f59GDUJ5eoIDb/ppdB9IgXY20ahhDJFuZdvdvuFnmqnT+UNUYkmUROjiekCzpjpQRksJP3o33VsdtaPX0jdu2U1+vf9/n0YCA2/6fMTP7Gl0H0iBdjbRqGEMkX7hZ5qp0/lDVGJJlECzpjpQRksJP3o33VsdtaPZTX69/uFnmpRiSZRZTX69/3+fRj7hZ5qUYkmUWx21o9fSN27ZTX69/3+fRgAeeTtpdB9Ihl6HerLxXSW+4WeaqdP5Q08Zz4DX0jdu2U1+vcvA9xlmSC50ABz2UY3HepMzeuKv19I3bsfCK1UZTX69wT+4939/n0YNQnl6ggNv+ml0H0icg531gXY20aQ9OVxoYQyRadP5Q1RiSZRE6OJ6QLOmOlBGSwk/ejfdZkgudAAc9lGOy+wcGU1+vf9/n0YNQnl6ggNv+ml0H0icg531pD05XFRiSZRE6OJ6QLOmOmZILnQAHPZRjcd6kxlNfr3/f59GAgNv+ml0H0icg531lGJJlETo4npownZJgLOmOmZILnQAHPZRmU1+vdcYBoCLwPcZXJjMJE7L7BwZTX69/3+fRgIDb/ppdB9IlGJJlETo4npAs6Y6UEZLCT96N91cmMwkWU1+vf9/n0YNQnl6ggNv+ml0H0icg531pD05XGnT+UNUYkmUROjiekCzpjpQRksJP3o33VyYzCROy+wcB8IrVRlNfr3RZvRE/3+fRg1CeXqCA2/6aXQfSJyDnfWkPTlcaGEMkVZ2j7mp0/lDVGJJlETo4npAs6Y6UEZLCT96N91QRksJHJjMJFlNfr37npBeC8D3GVyYzCRNx3qTDsvsHBlNfr3RZvRE/3+fRg1CeXqCA2/6aXQfSJyDnfWkPTlcdRDJs1KY9dm+4WeaqdP5Q1RiSZRAs6Y6f3o33VyYzCROy+wcGU1+vdFm9ET/f59GDUJ5eoIDb/pqvJ8XKXQfSKQ9OVxSmPXZlnaPub7hZ5qp0/lDVGJJlETo4npAs6Y6UEZLCT96N91cmMwkfuFnmqnT+UNVemqMEFA2/kfCK1UZTX69wT+4939/n0YNQnl6ggNv+ml0H0icg531gXY20aQ9OVxSmPXZlnaPuanT+UNUYkmUROjiemjCdkmAs6Y6UEZLCT96N91QUDb+TsvsHAfCK1UZTX69/3+fRg1CeXqCA2/6aXQfSJyDnfWkPTlcUpj12anT+UNUYkmUROjiemjCdkmAs6Y6UEZLCT96N91QUDb+WU1+vc5TfD5oZ4bJgBz2UY7L7BwHwitVGU1+vdFm9ETCA2/6aXQfSKQ9OVxoYQyRVnaPub7hZ5qp0/lDVGJJlETo4npownZJgLOmOlBGSwk/ejfdaGeGyYAc9lGzeuKvzsvsHAfCK1UZTX690Wb0RP9/n0YCA2/6aXQfSKQ9OVxoYQyRRl6HepZ2j7m+4WeaqdP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJKGeGyYAc9lGNx3qTDsvsHAfCK1UZTX690Wb0RME/uPd/f59GAgNv+nzEz+xpdB9IgXY20aQ9OVxHMDlJRl6HepKY9dm+4WeaqdP5Q1RiSZRownZJgLOmOlBGSwk/ejfdaGeGyYAc9lGHwitVGU1+vdFm9ETBP7j3QgNv+ml0H0icg531pD05XFZ2j7mp0/lDVGJJlETo4npownZJgLOmOlBGSwk/ejfdaGeGyYAc9lGGzKoJ6dP5Q1BGSwkQAlgFWUkLOpOoX6FyqF34/kY8bjRucUsNx3qTB8IrVRlNfr3cg531qGEMkX7hZ5qUYkmUROjiemjCdkmAs6Y6UEZLCT96N910bnFLDcd6kwfCK1UZTX69/3+fRhyDnfWkPTlcUpj12ZZ2j7mp0/lDVGJJlETo4npOWvnSALOmOlBGSwk0bnFLB8IrVRlNfr3RZvRE/3+fRil0H0icg531vuFnmpRiSZRownZJgLOmOlBGSwk0bnFLB8IrVRlNfr3RZvRE/3+fRg1CeXqCA2/6aXQfSJyDnfWkPTlcaGEMkVZ2j7m+4WeaqdP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJP3o33XRucUsAMYrpmU1+vdFm9ET/f59GDUJ5eoIDb/pqvJ8XKXQfSJyDnfWkPTlcaGEMkUZeh3qSmPXZvuFnmqnT+UNUYkmUROjiemjCdkmAs6Y6UEZLCTRucUsOy+wcB8IrVRlNfr3cg531qGEMkVKY9dmUYkmUaMJ2SYCzpjpQRksJP3o33XRucUszeuKv2U1+vdFm9ETCA2/6XIOd9b7hZ5qUYkmUaMJ2SYCzpjpQRksJP3o33XRucUsZTX69/3+fRhyDnfW+4WeaqMJ2SY5a+dI0bnFLB8IrVRlNfr3RZvRE/3+fRj7hZ5qZTX690Wb0RP7hZ5q/ejfdTgxb+y7YcCKZTX690Wb0RMIDb/ppdB9InIOd9ahhDJFSmPXZlGJJlGjCdkmAs6Y6UEZLCT96N91u2HAimU1+vf7hZ5qownZJv3o33VlNfr3RZvRE01cmZL96N91ZTX690Wb0RNlNfr3RZvRE/3o33VlNfr3RZvRE/3o33VlNfr3RZvRE/uFnmpNXJmS/ejfdWU1+vdFm9ET5P3JggDGK6awtfErHwitVGU1+vdFm9ET/f59GAgNv+ml0H0icg531pD05XEcwOUl+4WeaqdP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJP3o33WwtfErAMYrph8IrVRlNfr3BP7j3f3+fRil0H0icg531hzA5SWhhDJF+4WeaqdP5Q1RiSZRownZJgLOmOlBGSwk/ejfdbC18SsfCK1UZTX69/3+fRg1CeXqqvJ8XPMTP7Gl0H0icg531gXY20aQ9OVxoYQyRfuFnmqnT+UNUYkmUROjiemjCdkmAs6Y6UEZLCT96N91sLXxK83rir8AxiumX0jdux8IrVRlNfr3RZvRE/3+fRg1CeXqCA2/6aryfFzzEz+xpdB9InIOd9aQ9OVxHMDlJaGEMkUZeh3q+4WeaqdP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJP3o33WwtfErZTX690Wb0RNyDnfWoYQyRfuFnmpRiSZRownZJkEZLCSwtfErzeuKv19I3bsfCK1UZTX69zUJ5erzEz+xcg531pD05XGhhDJF+4WeaqdP5Q1RiSZRE6OJ6aMJ2SYCzpjpQRksJLC18SsAxiumZTX690Wb0RP9/n0YCA2/6aXQfSL7hZ5qp0/lDVGJJlGjCdkm/ejfdbC18SsAxiumZTX690Wb0RP9/n0YCA2/6QB55O37hZ5qp0/lDVGJJlGjCdkmAs6Y6R8IrVRlNfr3/f59GKdP5Q1BGSwk/ejfdWU1+venT+UNTVyZkv3o33VlNfr3/ejfdWU1+vdNXJmS/ejfdWU1+vf9/n0YTVyZkv3o33VlNfr3TVyZkv3o33XnD60/Lidb1Gx21o88Zz4DHwitVGU1+vdFm9ET/f59GHIOd9ahhDJF+4WealGJJlETo4npownZJgLOmOlsdtaPPGc+AzsvsHAfCK1UZTX69wT+4939/n0YNQnl6ggNv+ml0H0icg531pD05XGhhDJFSmPXZqdP5Q1RiSZRE6OJ6aMJ2SY5a+dIAs6Y6UEZLCT96N91bHbWjzxnPgMfCK1UZTX690Wb0RMAeeTtoYQyRcvFdJajCdkmAs6Y6TxnPgNlNfr3TVyZkjxnPgNlNfr3TVyZkv3o33U8Zz4DZTX6901cmZI8Zz4DZTX6901cmZL96N91PGc+A2U1+vdNXJmS/ejfdTxnPgMfCK1UZTX69wB55O3LxXSW/ejfdTxnPgNlNfr3TVyZkv3o33W7aVgrVemqMEFA2/lV6aowIgv4xCIL+MTr3zvt1s0tIYPgXkY8Zz4DHwitVGU1+vdFm9ET/f59GAgNv+ml0H0icg531qGEMkWnT+UNUYkmUROjiekCzpjpQRksJP3o33WD4F5GPGc+A19I3bsfCK1UZTX690Wb0RM1CeXqpdB9InIOd9YcwOUloYQyRfuFnmqnT+UNUYkmUROjiekCzpjpQRksJP3o33WD4F5GPGc+Ax8IrVRlNfr3/f59GKryfFyl0H0icg531hzA5SWnT+UNUYkmUQLOmOlBGSwk/ejfdYPgXkY8Zz4DX0jdu2U1+vf9/n0YCA2/6QB55O2l0H0icg531hzA5SXLxXSW+4WeaqdP5Q1RiSZRownZJjlr50gCzpjp/ejfdR8IrVRlNfr3AHnk7aXQfSLLxXSWp0/lDVGJJlFNXJmS/ejfdV9I3bsfCK1UZTX69wB55O2l0H0ip0/lDVGJJlFBGSwkTVyZkv3o33U8Zz4DZTX69wB55O2l0H0iUYkmUU1cmZL96N91HwitVGU1+vcAeeTtpdB9IsvFdJanT+UNUYkmUU1cmZL96N91PGc+Ax8IrVRlNfr3AHnk7aXQfSJRiSZRTVyZkv3o33VV6aowIgv4xCIL+MRwcHBwcHBwcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAACgAKAAAAAAAAAAIAAAAAAKAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="); + var result2 = PsoTypes.ConvertDataArrayRaw(data, 144, 160); + Assert.Equal(160, result2.Length); + + var firstResult2 = result2[0]; + + Assert.Equal(0, firstResult2.Unused0); + Assert.Equal(1254242044u, firstResult2.imapName.Hash); + Assert.Equal(256, firstResult2.itypDepArray.Count1); + Assert.Equal(256, firstResult2.itypDepArray.Count2); + Assert.Equal(50331648ul, firstResult2.itypDepArray.Pointer); + + var lastResult = result2[159]; + + Assert.Equal(0, lastResult.Unused0); + Assert.Equal(2255575624, lastResult.imapName.Hash); + Assert.Equal(256, lastResult.itypDepArray.Count1); + Assert.Equal(256, lastResult.itypDepArray.Count2); + Assert.Equal(54542593ul, lastResult.itypDepArray.Pointer); + } + + [Fact] + public void TestStringConversion() + { + var arr = new byte[64]; + + for (int i = 0; i <= 'j' - 'a'; i++) + { + arr[i] = (byte)('a' + i); + } + + MemoryMarshal.TryRead(arr, out var str1); + MemoryMarshal.TryRead(arr, out var str2); + + Assert.Equal("abcdefghij", str1.ToString()); + Assert.Equal("abcdefghij", str2.ToString()); + + for (int i = 0; i <= 'Z' - 'A'; i++) + { + arr[i] = (byte)('A' + i); + } + + MemoryMarshal.TryRead(arr, out str1); + MemoryMarshal.TryRead(arr, out str2); + + Assert.Equal("ABCDEFGHIJKLMNOPQRSTUVWXYZ", str1.ToString()); + Assert.Equal("ABCDEFGHIJKLMNOPQRSTUVWXYZ", str2.ToString()); + } + + [Fact] + public void StringConversionShouldRespectNullTerminators() + { + var arr = new byte[64]; + + for (int i = 0; i <= 'Z' - 'A'; i++) + { + arr[i] = (byte)('A' + i); + } + + arr[15] = (byte)'\0'; + + MemoryMarshal.TryRead(arr, out var str1); + + Assert.Equal("ABCDEFGHIJKLMNO", str1.ToString()); + + MemoryMarshal.TryRead(arr, out var str2); + + Assert.Equal("ABCDEFGHIJKLMNO", str2.ToString()); + } + + [Fact] + public void TestGetItem() + { + var data = Convert.FromBase64String("UFNJTgAAAoBwcHBwcHBwcAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN6aGFiX2Noc3NfMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemhhYl9jaHNzXzMraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN6aGFiX2ZlbmRfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemhhYl9mZW5kXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN6aGFiX21pcnJfMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemhhYl9taXJyXzEraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN6aGFiX21pcnJfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAemhhYl9taXJyXzIraGlmcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="); + + var result = PsoTypes.ConvertData(data, 16); + + Assert.Equal(4, result._HDTxdBindingArray.Count1); + Assert.Equal(4, result._HDTxdBindingArray.Count2); + Assert.Equal(2ul, result._HDTxdBindingArray.Pointer); + + + Assert.Equal(0, result._Interiors.Count1); + Assert.Equal(0, result._Interiors.Count2); + Assert.Equal(0ul, result._Interiors.Pointer); + + Assert.Equal(0, result._MapDataGroups.Count1); + Assert.Equal(0, result._MapDataGroups.Count2); + Assert.Equal(0ul, result._MapDataGroups.Pointer); + + Assert.Equal(0, result._imapDependencies.Count1); + Assert.Equal(0, result._imapDependencies.Count2); + Assert.Equal(0ul, result._imapDependencies.Pointer); + + Assert.Equal(0, result._imapDependencies_2.Count1); + Assert.Equal(0, result._imapDependencies_2.Count2); + Assert.Equal(0ul, result._imapDependencies_2.Pointer); + + Assert.Equal(0, result._itypDependencies_2.Count1); + Assert.Equal(0, result._itypDependencies_2.Count2); + Assert.Equal(0ul, result._itypDependencies_2.Pointer); + } + } + + public class MetaTypesTests + { + private readonly ITestOutputHelper _output; + public MetaTypesTests(ITestOutputHelper testOutputHelper) + { + _output = testOutputHelper; + } + [Fact] + public void TestConvertData() + { + var data = BitConverter.GetBytes((uint)1234); + var number = MetaTypes.ConvertData(data); + + Assert.Equal(1234U, number); + } + + [Fact] + public void Test_Convert_Data_From_Bytes() + { + var bytes = Convert.FromBase64String(TestData.ReferenceDataBytes); + + var newData = MetaTypes.ConvertData(bytes); + + Assert.Equivalent(TestData.ReferenceData, newData); + } + + [Fact] + public void Test_Convert_Data_From_Bytes_Offset() + { + var bytes = Convert.FromBase64String(TestData.ReferenceDataBytes); + bytes = new byte[4].Concat(bytes).ToArray(); + + var newData = MetaTypes.ConvertData(bytes, 4); + + Assert.Equivalent(TestData.ReferenceData, newData); + + MetaTypes.TryConvertData(bytes, 4, out newData); + + Assert.Equivalent(TestData.ReferenceData, newData); + } + + [Fact] + public void Test_Convert_To_Bytes() + { + var bytes = MetaTypes.ConvertToBytes(TestData.ReferenceData); + + var bytesBase64 = Convert.ToBase64String(bytes); + + Assert.Equivalent(TestData.ReferenceDataBytes, bytesBase64); + } + + [Fact] + public void Test_Convert_Data_From_And_To_Bytes() + { + var bytes = MetaTypes.ConvertToBytes(TestData.ReferenceData); + + var newData = MetaTypes.ConvertData(bytes); + + Assert.Equivalent(TestData.ReferenceData, newData); + } + + private readonly SharpDX.Vector3[] referenceArray = new SharpDX.Vector3[] { new SharpDX.Vector3(12.5f, 23.0f, 65.0f), new SharpDX.Vector3(1234.234f, 17896.22f, 9845.12f), new SharpDX.Vector3(-12.3f, -82349.123f, 1234.9f), new SharpDX.Vector3(-23412.4f, 1289.2f, 948.0f) }; + private readonly string referenceArrayBytes = "AABIQQAAuEEAAIJCfUeaRHHQi0Z71BlGzcxEwZDWoMfNXJpEzei2xmYmoUQAAG1E"; + + [Fact] + public void Test_Convert_Array_To_Bytes() + { + var bytes = MetaTypes.ConvertArrayToBytes(referenceArray); + + var base64 = Convert.ToBase64String(bytes); + + Assert.Equal(referenceArrayBytes, base64); + } + + [Fact] + public void Test_Convert_Bytes_To_Array() + { + var bytes = Convert.FromBase64String(referenceArrayBytes); + var arr = MetaTypes.ConvertDataArray(bytes, 0, referenceArray.Length).ToArray(); + Assert.Equal(referenceArray, arr); + + var newBytes = MetaTypes.ConvertArrayToBytes(arr); + + var base64 = Convert.ToBase64String(newBytes); + + Assert.Equal(referenceArrayBytes, base64); + } + + [Fact] + public void TestSwapBytes() + { + ushort testValue = (ushort)12345u; + ushort result = MetaTypes.SwapBytes(testValue); + + Assert.Equal(14640, result); + Assert.Equal(testValue, MetaTypes.SwapBytes(result)); + + uint testValueUInt = 12345u; + uint resultUInt = MetaTypes.SwapBytes(testValueUInt); + + Assert.Equal(959447040u, resultUInt); + Assert.Equal(testValueUInt, MetaTypes.SwapBytes(resultUInt)); + + int testValueInt = 12345; + int resultInt = MetaTypes.SwapBytes(testValueInt); + + Assert.Equal(959447040, resultInt); + Assert.Equal(testValueInt, MetaTypes.SwapBytes(resultInt)); + + short testValueShort = (short)12345; + short resultShort = MetaTypes.SwapBytes(testValueShort); + + Assert.Equal(14640, resultShort); + Assert.Equal(testValueShort, MetaTypes.SwapBytes(resultShort)); + + ulong testValueUlong = 0x123456789ABCDEFFUL; + ulong resultUlong = MetaTypes.SwapBytes(testValueUlong); + + Assert.Equal(0x78563412FFDEBC9AUL, resultUlong); + Assert.Equal(testValueUlong, MetaTypes.SwapBytes(resultUlong)); + + float testValueFloat = 12345.12345f; + float resultFloat = MetaTypes.SwapBytes(testValueFloat); + + Assert.Equal(1.5169885490328965E+38, resultFloat); + Assert.Equal(testValueFloat, MetaTypes.SwapBytes(resultFloat)); + } + } + + public class TestResourceData + { + [Fact] + public void Test_Write_Struct() + { + using var systemStream = new MemoryStream(); + using var graphicsStream = new MemoryStream(); + + using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); + dataWriter.Position = 0x50000000; + + dataWriter.WriteStruct(TestData.ReferenceData); + + var buffer = systemStream.ToArray(); + + var base64 = Convert.ToBase64String(buffer); + + Assert.Equal(TestData.ReferenceDataBytes, base64); + } + + [Fact] + public void Test_Read_Struct() + { + var buffer = Convert.FromBase64String(TestData.ReferenceDataBytes); + using var systemStream = new MemoryStream(buffer); + using var graphicsStream = new MemoryStream(); + + using var dataReader = new ResourceDataReader(systemStream, graphicsStream); + + var region = dataReader.ReadStruct(); + + Assert.Equal(TestData.ReferenceData, region); + } + + [Fact] + public void Test_Write_Single() + { + using var systemStream = new MemoryStream(); + using var graphicsStream = new MemoryStream(); + + using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); + dataWriter.Position = 0x50000000; + + dataWriter.Write(20.0f); + + var buffer = systemStream.ToArray(); + var result = BitConverter.ToSingle(buffer, 0); + + Assert.Equal(20.0f, result); + } + + [Fact] + public void Test_Write_Single_Big_Endian() + { + using var systemStream = new MemoryStream(); + using var graphicsStream = new MemoryStream(); + + using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream, Endianess.BigEndian); + dataWriter.Position = 0x50000000; + + dataWriter.Write(20.0f); + + var buffer = systemStream.ToArray(); + + var valueInt = BinaryPrimitives.ReadInt32BigEndian(buffer); + var valueFloat = Unsafe.ReadUnaligned(ref Unsafe.As(ref valueInt)); + //BinaryPrimitives.ReverseEndianness(20.0f) + + Assert.Equal(20.0f, valueFloat); + + dataWriter.Position = 0x50000000; + + dataWriter.Write(double.MaxValue); + + buffer = systemStream.ToArray(); + + var valueLong = BinaryPrimitives.ReadInt64BigEndian(buffer); + var valueDouble = Unsafe.ReadUnaligned(ref Unsafe.As(ref valueLong)); + + Assert.Equal(double.MaxValue, valueDouble); + } + + [Fact] + public void Test_Write_Multiple_Structs() + { + using var systemStream = new MemoryStream(); + using var graphicsStream = new MemoryStream(); + + using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); + dataWriter.Position = 0x50000000; + + dataWriter.WriteStructs(new[] + { + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData + }); + + var buffer = systemStream.ToArray(); + + var structs = MemoryMarshal.Cast(buffer); + + Assert.Equal(4, structs.Length); + + foreach (var scenarioRegion in structs) + { + Assert.Equal(TestData.ReferenceData, scenarioRegion); + } + } + + [Fact] + public void Test_Read_Multiple_Structs() + { + using var systemStream = new MemoryStream(); + using var graphicsStream = new MemoryStream(); + + using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); + dataWriter.Position = 0x50000000; + + dataWriter.WriteStructs(new[] + { + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData + }); + + var buffer = systemStream.ToArray(); + systemStream.Position = 0; + var dataReader = new ResourceDataReader(systemStream, graphicsStream); + + + var structs = dataReader.ReadStructs(4); + + Assert.Equal(4, structs.Length); + + foreach (var scenarioRegion in structs) + { + Assert.Equal(TestData.ReferenceData, scenarioRegion); + } + + structs = dataReader.ReadStructsAt(0 | 0x50000000, 4); + + foreach (var scenarioRegion in structs) + { + Assert.Equal(TestData.ReferenceData, scenarioRegion); + } + + systemStream.Position = 0; + dataWriter.Position = 0x50000000; + + dataWriter.Write(new byte[] { 0, 0, 0, 0 }); + + dataWriter.WriteStructs(new[] +{ + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData, + TestData.ReferenceData + }); + + structs = dataReader.ReadStructsAt(4 | 0x50000000, 4); + + foreach (var scenarioRegion in structs) + { + Assert.Equal(TestData.ReferenceData, scenarioRegion); + } + } + + //[Fact] + //public void Test() + //{ + // var attachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects); + //} + + private const string ArchetypeData = "AAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAACYimfA1ehVuLYT5b4BAIB/JopnQFmFTTiUE+U+AQCAfwAAZLfAN4a1AAAItQEAgH/sTWlAAACgQFVVCx0lzgxeAAAAAAAAAAAAAAAAAgAAAFVVCx0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAY0EjAAAAAAC6txr4BAIB/MdBIQL03hjUMrcY+AQCAfwAAQDa9NwY1AAAItQEAgH/FV0pAAACgQNUOy/klzgxeAAAAAAAAAAAAAAAAAgAAANUOy/kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAx0EjAvTeGtS6txr4BAIB/GNBIQAAAAAAMrcY+AQCAfwAAULa9Nwa1AAAItQEAgH/FV0pAAACgQEiqhAclzgxeAAAAAAAAAAAAAAAAAgAAAEiqhAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAY0EjAkwEgvC6txr4BAIB/MdBIQGH9H7wMrcY+AQCAfwAAQDZ6/x+8AAAItQEAgH/FV0pAAACgQKSeG4ElzgxeAAAAAAAAAAAAAAAAAgAAAKSeG4EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAxtGa/csLov5Jc7r4BAIB/MbRmP4vC6D8OgpA/AQCAfwAAAAAAAMA10tWpPgEAgH/jjAtAAACgQIfyZY4lzgxeAAAAAAAAAAAAAAAAAgAAAIfyZY4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAALJAPB8jGNwZaxG8ABAIB/NAYFQeBdl0FFuWFAAQCAfwAVcT3gviI/YA8MPwEAgH8sQqJBAACgQHL9S+klzgxeAAAAAAAAAAAAAAAAAgAAAHL9S+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAKLn/ABr2HQCHIl78BAIB/v5s+wMU4s0ArFKE/AQCAf+TkXsDmep1AoMAUPQEAgH9vRb4/AACgQFfFB8MlzgxeAAAAAAAAAAAAAAAAAgAAAFfFB8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACi49fArIuHwUSHNMABAIB/uePXQCvaikFEhzRAAQCAfwAAwDYAoFM+AAAAAAEAgH9xJpVBAACgQHfsUVglzgxeAAAAAAAAAAAAAAAAAgAAAHfsUVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAALiATB8jGNwZaxG8ABAIB/NAYFQeBdl0ETZG9AAQCAfwBUfDzgviI/+GQnPwEAgH8mh6JBAACgQBJukFolzgxeAAAAAAAAAAAAAAAAAgAAABJukFoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAABCa4rAzOZiwV1wB8ABAIB/LdDSQFwRgEEnUEBAAQCAf9jJkD9g32k/KH/jPgEAgH/3B4JBAACgQAPtbvIlzgxeAAAAAAAAAAAAAAAAAgAAAAPtbvIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAgAAAAAAAAAAAAAAAAAAAAAAABw/QLBnTGhwUn1278BAIB/VEUPQa5Ll0G0TJ1AAQCAf0B+xD7gXh6/w57MPwEAgH+hraxBAACgQMJw94QAAAAAAAAAAAAAAAAAAAAAAgAAAMJw94QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAABQmNbAvGduwY4GYL8BAIB/X7TVQDqwQ0EctYY/AQCAfwDwY7wI3qq/qI61PQEAgH8dg3JBAACgQF2sfxslzgxeAAAAAAAAAAAAAAAAAgAAAF2sfxsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACnXNjAzySKwT7MAUABAIB/FD7TQA7RjUEhr1BAAQCAf0DSo72AD2s+sD0pQAEAgH9G65VBAACgQP9/spclzgxeAAAAAAAAAAAAAAAAAgAAAP9/spcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAANwu9enIzwFxymr8BAIB/lSkmPXVyM0BUcpo/AQCAf6CUVzsAAAC1AAAAtQEAgH9bX0NAAACgQC4F4xglzgxeAAAAAAAAAAAAAAAAAgAAAC4F4xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACHiFu9cXIzwFxymr8BAIB/4PZEPXpyM0BUcpo/AQCAfzCNNLsAAKA1AAAAtQEAgH+RYkNAAACgQP3hSkclzgxeAAAAAAAAAAAAAAAAAgAAAP3hSkcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAJNri/F/HdvX7gLr8BAIB/pDW4PzDz3T1+4C4/AQCAfwAAzLYAgAY2AAAAAAEAgH9jYcw/AACgQM6jquglzgxeAAAAAAAAAAAAAAAAAgAAAM6jqugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACHiFu9dXIzwFxymr8BAIB/4PZEPXVyM0BUcpo/AQCAfzCNNLsAAAAAAAAAtQEAgH+NYkNAAACgQDjw2rUlzgxeAAAAAAAAAAAAAAAAAgAAADjw2rUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAABHdwTAqd0awJKRs7oBAIB/gXcEQKXdGkCSkbM6AQCAfwAA6DYAAAC1AAAAAAEAgH99yktAAACgQLF+sQIlzgxeAAAAAAAAAAAAAAAAAgAAALF+sQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAABVL7m/3EjpvwAAAAABAIB/LzC5PwZJ6T8AAAAAAQCAfwAAWjcAACg2AAAAAAEAgH8U7RRAAACgQIFf4BwlzgxeAAAAAAAAAAAAAAAAAgAAAIFf4BwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADG+0XAsDpHwL03hrUBAIB/ZftFQKw6R0C9NwY2AQCAfwAAQLcAAAC1vjcGNQEAgH+zb4xAAACgQCUyMgYlzgxeAAAAAAAAAAAAAAAAAgAAACUyMgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAD/JX2/AHAjwL03hrUBAIB/ryR9P+9vI0AAAAAAAQCAfwAAKLcAAAC2vTcGtQEAgH81Qy9AAACgQJqWbPglzgxeAAAAAAAAAAAAAAAAAgAAAJqWbPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAAxgXA/3l5wJxTSbYBAIB/68UFQAd6eUCcU0k2AQCAfwAAILYAAIA1AAAAAAEAgH8kio1AAACgQPUilP4lzgxeAAAAAAAAAAAAAAAAAgAAAPUilP4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAADQ7y/9pcIwAAAAAABAIB/fEK8P/aXCEC9N4Y1AQCAfwAABrcAAAAAvTcGNQEAgH/z4iVAAACgQJaGZPAlzgxeAAAAAAAAAAAAAAAAAgAAAJaGZPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAACKAQ7A93bXvxb7y7wBAIB/AAIOQP921z8v/cs8AQCAfwAAbDcAAAA1AAAGNQEAgH86QTJAAACgQLwZ/DklzgxeAAAAAAAAAAAAAAAAAgAAALwZ/DkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADUIwPBslSewcrf7b8BAIB/MgYFQeBdl0Ho2OG/AQCAfwAvcT1A2t6+WdznvwEAgH8QWKhBAACgQDcbq+MlzgxeAAAAAAAAAAAAAAAAAgAAADcbq+MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADYfszAdjI/wSdPCb8BAIB/qH7MQHUyP0EnTwk/AQCAfwAAQLcAAAAAAAAAAAEAgH9h/VhBAACgQL+uSSUlzgxeAAAAAAAAAAAAAAAAAgAAAL+uSSUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + + private readonly CBaseArchetypeDef referenceArchetype = new CBaseArchetypeDef + { + assetName = new MetaHash((uint)0x1d0b5555), + assetType = rage__fwArchetypeDef__eAssetType.ASSET_TYPE_DRAWABLE, + bbMax = new SharpDX.Vector3(3.617807f, 4.9E-05f, 0.447415f), + bbMin = new SharpDX.Vector3(-3.617834f, -5.1E-05f, -0.447416f), + bsCentre = new SharpDX.Vector3(-1.3589859E-05f, -1.00000034E-06f, -5.066395E-07f), + bsRadius = 3.645381f, + hdTextureDist = 5, + lodDist = 100, + Unused05 = float.NaN, + Unused06 = float.NaN, + Unused07 = float.NaN, + name = new MetaHash((uint)0x1d0b5555), + textureDictionary = new MetaHash((uint)0x5e0cce25), + flags = 0x00002000, + }; + + [Fact] + public void TestConvertDataRaw() + { + var data = Convert.FromBase64String(ArchetypeData); + var basearch = PsoTypes.ConvertDataRawOld(data, 0); + + Assert.Equivalent(referenceArchetype, basearch); + + var basearch2 = PsoTypes.ConvertDataRaw(data, 0); + + Assert.Equivalent(basearch, basearch2); + + var random = new Random(); + var length = random.Next(100); + + var newData = Enumerable.Empty().Concat(new byte[length]).Concat(data).ToArray(); + + basearch = PsoTypes.ConvertDataRawOld(newData, length); + Assert.Equivalent(basearch, referenceArchetype); + + basearch2 = PsoTypes.ConvertDataRaw(newData, length); + + Assert.Equivalent(basearch, basearch2); + + //a.Extensions = MetaTypes.GetExtensions(Meta, basearch.extensions); + } + } + + public class TestConvertDataArray + { + private readonly ITestOutputHelper _output; + public TestConvertDataArray(ITestOutputHelper output) + { + _output = output; + } + private static string GetFilePath(string filename) + { + // Directory we're looking for. + var dirToFind = Path.Combine(@"CodeWalker.Test", "Files"); + + // Search up directory tree starting at assembly path looking for 'Images' dir. + var searchPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + while (true) + { + var testPath = Path.Combine(searchPath, dirToFind); + if (Directory.Exists(testPath)) + { + // Found it! + return Path.Combine(testPath, filename); + } + + // Move up one directory. + var newSearchPath = Path.GetFullPath(Path.Combine(searchPath, "..")); + if (newSearchPath == searchPath) + { + // Didn't move up, so we're at the root. + throw new FileNotFoundException($"Could not find '{dirToFind}' directory."); + } + searchPath = newSearchPath; + } + } + + public string TestData = "AAAAAAAAAAAFAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAKDAAACgwAAAAMAAAAAAAACgQAAAoEAAAABAAAAAAAAAgD9kViJCAAAAAGAAAAABAAAAAAAAAP////8AAAAABgAAAAAAAAABAAEAAAAAAAAAAAAAAAAABWAAAAAAAAAKAAoAAAAAAAAAAAAAAAAAgPEnwiB/QcIAcFzBAAAAAADgDsL9ke/BHKgswQAAAAAAAIA/yyTUkwAAAABgAAAAAQAAAAEAAAD/////AAAAAAYAAQAAAAAALgAuAAAAAAA="; + [Fact] + public void ConvertDataArrayShouldReturnSameAsConvertData() + { + var data = Convert.FromBase64String(TestData); + + var referenceData = MetaTypes.ConvertData(data); + + var arrayData = MetaTypes.ConvertDataArray(data, 0, 2); + + var path = GetFilePath("anwblokaal.ytyp"); + var bytes = File.ReadAllBytes(path); + var entry = RpfFile.CreateFileEntry("anwblokaal.ytyp", path, ref bytes); + var ytypFile = RpfFile.GetFile(entry, bytes); + + var rooms = ytypFile.AllArchetypes + .Where(p => p is MloArchetype) + .Select(p => p as MloArchetype) + .SelectMany(p => p.rooms) + .Select(p => p.Data); + + var secondRoom = rooms.Last(); + + var arr = new byte[Marshal.SizeOf() * rooms.Count()]; + //MemoryMarshal.Write(arr.AsSpan(), ref rooms); + + _output.WriteLine(Convert.ToBase64String(MemoryMarshal.AsBytes(rooms.ToArray().AsSpan()))); + + // I know the bbMax values don't really make sense here, seems to be a weird ytyp, but it's mostly about testing the serialization, not about using a 100% correct ytyp + // And didn't want to include a ytyp from Rockstar Games since that could cause some legal issues down the road + // Another possible solution would be to do abest attempt to find the GTA V installed on the user's computer running the tests and use files from there, but this would add complexity and links which could break tests + // However this would be more in the scope of implementation testing as it tests the whole chain including encryption which is not wanted here + Assert.Equivalent(new SharpDX.Vector3(-41.98584f, -48.3741455f, -13.7773438f), secondRoom.bbMin); + Assert.Equivalent(new SharpDX.Vector3(-35.71875f, -29.9462833f, -10.7910423f), secondRoom.bbMax); + Assert.Equivalent(new Array_uint(65542, 46), secondRoom.attachedObjects); + Assert.Equal(96u, secondRoom.flags); + Assert.Equal(1, secondRoom.floorId); + Assert.Equivalent(new CharPointer() { Count1 = 10, Count2 = 10, Pointer = 24581 }, secondRoom.name); + Assert.Equal(1u, secondRoom.portalCount); + Assert.Equal(2480153803, secondRoom.timecycleName.Hash); + + // First room is limbo, so this check isn't that useful, but just make sure, and the following check will compare the entire array anyways + Assert.Equivalent(referenceData, rooms.First()); + + Assert.Equivalent(arrayData.ToArray(), rooms); + } + } +} \ No newline at end of file diff --git a/CodeWalker.Test/ResourceBaseTypesTests.cs b/CodeWalker.Test/ResourceBaseTypesTests.cs new file mode 100644 index 0000000..d144c76 --- /dev/null +++ b/CodeWalker.Test/ResourceBaseTypesTests.cs @@ -0,0 +1,37 @@ +using CodeWalker.GameFiles; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace CodeWalker.Test +{ + public class ResourceBaseTypesTests + { + [Fact] + public void AddingItemsToResourceSimpleArrayShouldAddItem() + { + var list = new ResourceSimpleArray(); + + var entry1 = new ClipAnimationsEntry(); + list.Add(entry1); + + var entry2 = new ClipAnimationsEntry(); + list.Add(entry2); + + Assert.Equal(entry1, list[0]); + Assert.Equal(entry2, list[1]); + + list = new ResourceSimpleArray(); + list.Data = new List(); + + list.Add(entry1); + list.Add(entry2); + + Assert.Equal(entry1, list[0]); + Assert.Equal(entry2, list[1]); + } + } +} diff --git a/CodeWalker.Test/RpfFileTests.cs b/CodeWalker.Test/RpfFileTests.cs new file mode 100644 index 0000000..a1b47c6 --- /dev/null +++ b/CodeWalker.Test/RpfFileTests.cs @@ -0,0 +1,58 @@ +using CodeWalker.GameFiles; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace CodeWalker.Test +{ + public class RpfFileTests(ITestOutputHelper testOutputHelper) + { + public static IEnumerable RpfFiles => new List + { + new object[] { new RpfResourceFileEntry() }, + new object[] { new RpfBinaryFileEntry() }, + }; + + [Theory] + [MemberData(nameof(RpfFiles))] + public void SettingFileSizeShouldUpdateHFileSize(RpfFileEntry fileEntry) + { + fileEntry.FileSize = 0x64U; + + Assert.Equal(0x64U, fileEntry.FileSize); + } + + [Theory] + [MemberData(nameof(RpfFiles))] + public void SettingFileOffsetShouldRemoveSystemPosition(RpfFileEntry fileEntry) + { + fileEntry.FileOffset = 0x021D30U; + + Assert.Equal(0x021D30U, fileEntry.FileOffset); + } + + [Theory] + [MemberData(nameof(RpfFiles))] + public void SettingNameOffsetShouldUpdateNameOffset(RpfFileEntry fileEntry) + { + fileEntry.NameOffset = 0x022E; + + Assert.Equal(0x022EU, fileEntry.NameOffset); + } + + [Theory] + [MemberData(nameof(RpfFiles))] + public void HeaderRelatedChangesShouldBeReflectedInHeader(RpfFileEntry fileEntry) + { + fileEntry.NameOffset = 0x022E; + fileEntry.FileOffset = 0x021D30U; + fileEntry.FileSize = 0x147067; + + Assert.Equal(0x821D30147067022EUL, fileEntry.Header); + } + } +} diff --git a/CodeWalker.Test/SequenceReaderTests.cs b/CodeWalker.Test/SequenceReaderTests.cs new file mode 100644 index 0000000..773264c --- /dev/null +++ b/CodeWalker.Test/SequenceReaderTests.cs @@ -0,0 +1,34 @@ +using CodeWalker.Core.Utils; +using System; +using System.Buffers; +using System.Buffers.Binary; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace CodeWalker.Test +{ + public class SequenceReaderTests + { + [Fact] + public void SetPositionShouldSetConsumedToGivenValue() + { + var bytes = new byte[1024]; + BinaryPrimitives.WriteDoubleLittleEndian(bytes.AsSpan(0, 8), 12.6d); + var sequence = new ReadOnlySequence(bytes); + var reader = new SequenceReader(sequence); + + Assert.Equal(0, reader.Consumed); + Assert.Equal(12.6d, reader.ReadDouble()); + Assert.Equal(8, reader.Consumed); + reader.SetPosition(2); + Assert.Equal(2, reader.Consumed); + + reader.SetPosition(197); + Assert.Equal(197, reader.Consumed); + + } + } +} diff --git a/CodeWalker.Test/TestBinaryConversions.cs b/CodeWalker.Test/TestBinaryConversions.cs deleted file mode 100644 index 4b69b2f..0000000 --- a/CodeWalker.Test/TestBinaryConversions.cs +++ /dev/null @@ -1,534 +0,0 @@ -using CodeWalker.GameFiles; -using System; -using System.Buffers.Binary; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Xml.Linq; -using Xunit; -using Xunit.Abstractions; - -namespace CodeWalker.Test -{ - public static class TestData - { - public const string ReferenceDataBytes = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAADWA9YDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAATABMAAAAAAAAAAAAAAAAACgAAAAAAAADZAdkBAAAAAAYAAAAAAAAAogGiAQAAAAABAAAAAAAAADsAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3///8mAAAANgAAAEkAAAAAAAAAAAAAAAAAAAAAAAAAAACAQgAAgEIAAAAAAAAAAAAAAAAIQDQAAAAAAEgDSAMAAAAABwAAAAAAAAAGAAYAAAAAAAgAAAAAAAAANwA3AAAAAAAIwA0AAAAAAB4AHgAAAAAACEAVAAAAAAAOAA4AAAAAAAjAGAAAAAAACQAJAAAAAAAIABsAAAAAAAIAAgAAAAAACIAbAAAAAAABAAEAAAAAAA=="; - public static CScenarioPointRegion ReferenceData => new CScenarioPointRegion - { - AccelGrid = new rage__spdGrid2D - { - CellDimX = 64, - CellDimY = 64, - MaxCellX = 38, - MaxCellY = 73, - MinCellX = -3, - MinCellY = 54, - }, - ChainingGraph = new CodeWalker.GameFiles.CScenarioChainingGraph - { - Chains = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 59, - Count2 = 59, - Pointer = 1, - }, - Edges = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 418, - Count2 = 418, - Pointer = 6, - }, - Nodes = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 473, - Count2 = 473, - Pointer = 10, - } - }, - Clusters = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 6, - Count2 = 6, - Pointer = 7, - }, - EntityOverrides = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 19, - Count2 = 19, - Pointer = 2, - }, - LookUps = new CodeWalker.GameFiles.CScenarioPointLookUps - { - GroupNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 9, - Count2 = 9, - Pointer = 1622024, - }, - InteriorNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 2, - Count2 = 2, - Pointer = 1769480, - }, - PedModelSetNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 30, - Count2 = 30, - Pointer = 901128, - }, - RequiredIMapNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 1, - Count2 = 1, - Pointer = 1802248, - }, - TypeNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 55, - Count2 = 55, - Pointer = 8, - }, - VehicleModelSetNames = new CodeWalker.GameFiles.Array_uint - { - Count1 = 14, - Count2 = 14, - Pointer = 1392648, - }, - }, - Points = new CodeWalker.GameFiles.CScenarioPointContainer - { - LoadSavePoints = new CodeWalker.GameFiles.Array_Structure - { - PointerDataIndex = 4294967295, - }, - MyPoints = new CodeWalker.GameFiles.Array_Structure - { - Count1 = 982, - Count2 = 982, - Pointer = 3, - } - }, - Unk_3844724227 = new CodeWalker.GameFiles.Array_ushort - { - Count1 = 840, - Count2 = 840, - Pointer = 3424264, - } - }; - } - - public class TestBinaryConversions - { - private readonly ITestOutputHelper _output; - public TestBinaryConversions(ITestOutputHelper testOutputHelper) - { - _output = testOutputHelper; - } - [Fact] - public void TestConvertData() - { - var data = BitConverter.GetBytes((uint)1234); - var number = MetaTypes.ConvertData(data); - if (number != (uint)1234) - { - throw new Exception("number 1234 converted back to itself doesn't equal 1234"); - } - } - - public bool Equals(Array_Structure a, Array_Structure b) - { - return a.Count1 == b.Count1 && a.Count2 == b.Count2 && a.Pointer == b.Pointer; - } - - public bool Equals(Array_uint a, Array_uint b) - { - return a.Count1 == b.Count1 && a.Count2 == b.Count2 && a.Pointer == b.Pointer; - } - - public bool Equals(rage__spdGrid2D a, rage__spdGrid2D b) - { - return a.Dimensions == b.Dimensions && a.Max == b.Max && a.Min == b.Min; - } - - [Fact] - public void Test_Convert_Data_From_Bytes() - { - var bytes = Convert.FromBase64String(TestData.ReferenceDataBytes); - - var newData = MetaTypes.ConvertData(bytes); - - Assert.Equal(TestData.ReferenceData, newData); - } - - [Fact] - public void Test_Convert_Data_From_Bytes_Offset() - { - var bytes = Convert.FromBase64String(TestData.ReferenceDataBytes); - bytes = new byte[4].Concat(bytes).ToArray(); - - var newData = MetaTypes.ConvertData(bytes, 4); - - Assert.Equal(TestData.ReferenceData, newData); - } - - [Fact] - public void Test_Convert_To_Bytes() - { - var bytes = MetaTypes.ConvertToBytes(TestData.ReferenceData); - - var bytesBase64 = Convert.ToBase64String(bytes); - - Assert.Equal(TestData.ReferenceDataBytes, bytesBase64); - } - - [Fact] - public void Test_Convert_Data_From_And_To_Bytes() - { - var bytes = MetaTypes.ConvertToBytes(TestData.ReferenceData); - - var newData = MetaTypes.ConvertData(bytes); - - Assert.Equal(TestData.ReferenceData, newData); - } - - private readonly SharpDX.Vector3[] referenceArray = new SharpDX.Vector3[] { new SharpDX.Vector3(12.5f, 23.0f, 65.0f), new SharpDX.Vector3(1234.234f, 17896.22f, 9845.12f), new SharpDX.Vector3(-12.3f, -82349.123f, 1234.9f), new SharpDX.Vector3(-23412.4f, 1289.2f, 948.0f) }; - private readonly string referenceArrayBytes = "AABIQQAAuEEAAIJCfUeaRHHQi0Z71BlGzcxEwZDWoMfNXJpEzei2xmYmoUQAAG1E"; - - [Fact] - public void Test_Convert_Array_To_Bytes() - { - var bytes = MetaTypes.ConvertArrayToBytes(referenceArray); - - var base64 = Convert.ToBase64String(bytes); - - Assert.Equal(referenceArrayBytes, base64); - } - - [Fact] - public void Test_Convert_Bytes_To_Array() - { - var bytes = Convert.FromBase64String(referenceArrayBytes); - var arr = MetaTypes.ConvertDataArray(bytes, 0, referenceArray.Length).ToArray(); - Assert.Equal(referenceArray, arr); - - var newBytes = MetaTypes.ConvertArrayToBytes(arr); - - var base64 = Convert.ToBase64String(newBytes); - - Assert.Equal(referenceArrayBytes, base64); - } - } - - public class TestResourceData - { - [Fact] - public void Test_Write_Struct() - { - using var systemStream = new MemoryStream(); - using var graphicsStream = new MemoryStream(); - - using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); - dataWriter.Position = 0x50000000; - - dataWriter.WriteStruct(TestData.ReferenceData); - - var buffer = systemStream.ToArray(); - - var base64 = Convert.ToBase64String(buffer); - - Assert.Equal(TestData.ReferenceDataBytes, base64); - } - - [Fact] - public void Test_Read_Struct() - { - var buffer = Convert.FromBase64String(TestData.ReferenceDataBytes); - using var systemStream = new MemoryStream(buffer); - using var graphicsStream = new MemoryStream(); - - using var dataReader = new ResourceDataReader(systemStream, graphicsStream); - - var region = dataReader.ReadStruct(); - - Assert.Equal(TestData.ReferenceData, region); - } - - [Fact] - public void Test_Write_Single() - { - using var systemStream = new MemoryStream(); - using var graphicsStream = new MemoryStream(); - - using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); - dataWriter.Position = 0x50000000; - - dataWriter.Write(20.0f); - - var buffer = systemStream.ToArray(); - var result = BitConverter.ToSingle(buffer, 0); - - Assert.Equal(20.0f, result); - } - - [Fact] - public void Test_Write_Single_Big_Endian() - { - using var systemStream = new MemoryStream(); - using var graphicsStream = new MemoryStream(); - - using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream, Endianess.BigEndian); - dataWriter.Position = 0x50000000; - - dataWriter.Write(20.0f); - - var buffer = systemStream.ToArray(); - - var valueInt = BinaryPrimitives.ReadInt32BigEndian(buffer); - var valueFloat = Unsafe.ReadUnaligned(ref Unsafe.As(ref valueInt)); - //BinaryPrimitives.ReverseEndianness(20.0f) - - Assert.Equal(20.0f, valueFloat); - - dataWriter.Position = 0x50000000; - - dataWriter.Write(double.MaxValue); - - buffer = systemStream.ToArray(); - - var valueLong = BinaryPrimitives.ReadInt64BigEndian(buffer); - var valueDouble = Unsafe.ReadUnaligned(ref Unsafe.As(ref valueLong)); - - Assert.Equal(double.MaxValue, valueDouble); - } - - [Fact] - public void Test_Write_Multiple_Structs() - { - using var systemStream = new MemoryStream(); - using var graphicsStream = new MemoryStream(); - - using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); - dataWriter.Position = 0x50000000; - - dataWriter.WriteStructs(new[] - { - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData - }); - - var buffer = systemStream.ToArray(); - - var structs = MemoryMarshal.Cast(buffer); - - Assert.Equal(4, structs.Length); - - foreach (var scenarioRegion in structs) - { - Assert.Equal(TestData.ReferenceData, scenarioRegion); - } - } - - [Fact] - public void Test_Read_Multiple_Structs() - { - using var systemStream = new MemoryStream(); - using var graphicsStream = new MemoryStream(); - - using var dataWriter = new ResourceDataWriter(systemStream, graphicsStream); - dataWriter.Position = 0x50000000; - - dataWriter.WriteStructs(new[] - { - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData - }); - - var buffer = systemStream.ToArray(); - systemStream.Position = 0; - var dataReader = new ResourceDataReader(systemStream, graphicsStream); - - - var structs = dataReader.ReadStructs(4); - - Assert.Equal(4, structs.Length); - - foreach (var scenarioRegion in structs) - { - Assert.Equal(TestData.ReferenceData, scenarioRegion); - } - - structs = dataReader.ReadStructsAt(0 | 0x50000000, 4); - - foreach (var scenarioRegion in structs) - { - Assert.Equal(TestData.ReferenceData, scenarioRegion); - } - - systemStream.Position = 0; - dataWriter.Position = 0x50000000; - - dataWriter.Write(new byte[] { 0, 0, 0, 0 }); - - dataWriter.WriteStructs(new[] -{ - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData, - TestData.ReferenceData - }); - - structs = dataReader.ReadStructsAt(4 | 0x50000000, 4); - - foreach (var scenarioRegion in structs) - { - Assert.Equal(TestData.ReferenceData, scenarioRegion); - } - } - - //[Fact] - //public void Test() - //{ - // var attachedObjects = MetaTypes.GetUintArray(meta, _Data.attachedObjects); - //} - - private const string ArchetypeData = "AAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAACYimfA1ehVuLYT5b4BAIB/JopnQFmFTTiUE+U+AQCAfwAAZLfAN4a1AAAItQEAgH/sTWlAAACgQFVVCx0lzgxeAAAAAAAAAAAAAAAAAgAAAFVVCx0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAY0EjAAAAAAC6txr4BAIB/MdBIQL03hjUMrcY+AQCAfwAAQDa9NwY1AAAItQEAgH/FV0pAAACgQNUOy/klzgxeAAAAAAAAAAAAAAAAAgAAANUOy/kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAx0EjAvTeGtS6txr4BAIB/GNBIQAAAAAAMrcY+AQCAfwAAULa9Nwa1AAAItQEAgH/FV0pAAACgQEiqhAclzgxeAAAAAAAAAAAAAAAAAgAAAEiqhAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAY0EjAkwEgvC6txr4BAIB/MdBIQGH9H7wMrcY+AQCAfwAAQDZ6/x+8AAAItQEAgH/FV0pAAACgQKSeG4ElzgxeAAAAAAAAAAAAAAAAAgAAAKSeG4EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAxtGa/csLov5Jc7r4BAIB/MbRmP4vC6D8OgpA/AQCAfwAAAAAAAMA10tWpPgEAgH/jjAtAAACgQIfyZY4lzgxeAAAAAAAAAAAAAAAAAgAAAIfyZY4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAALJAPB8jGNwZaxG8ABAIB/NAYFQeBdl0FFuWFAAQCAfwAVcT3gviI/YA8MPwEAgH8sQqJBAACgQHL9S+klzgxeAAAAAAAAAAAAAAAAAgAAAHL9S+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAKLn/ABr2HQCHIl78BAIB/v5s+wMU4s0ArFKE/AQCAf+TkXsDmep1AoMAUPQEAgH9vRb4/AACgQFfFB8MlzgxeAAAAAAAAAAAAAAAAAgAAAFfFB8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACi49fArIuHwUSHNMABAIB/uePXQCvaikFEhzRAAQCAfwAAwDYAoFM+AAAAAAEAgH9xJpVBAACgQHfsUVglzgxeAAAAAAAAAAAAAAAAAgAAAHfsUVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAALiATB8jGNwZaxG8ABAIB/NAYFQeBdl0ETZG9AAQCAfwBUfDzgviI/+GQnPwEAgH8mh6JBAACgQBJukFolzgxeAAAAAAAAAAAAAAAAAgAAABJukFoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAABCa4rAzOZiwV1wB8ABAIB/LdDSQFwRgEEnUEBAAQCAf9jJkD9g32k/KH/jPgEAgH/3B4JBAACgQAPtbvIlzgxeAAAAAAAAAAAAAAAAAgAAAAPtbvIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAgAAAAAAAAAAAAAAAAAAAAAAABw/QLBnTGhwUn1278BAIB/VEUPQa5Ll0G0TJ1AAQCAf0B+xD7gXh6/w57MPwEAgH+hraxBAACgQMJw94QAAAAAAAAAAAAAAAAAAAAAAgAAAMJw94QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAABQmNbAvGduwY4GYL8BAIB/X7TVQDqwQ0EctYY/AQCAfwDwY7wI3qq/qI61PQEAgH8dg3JBAACgQF2sfxslzgxeAAAAAAAAAAAAAAAAAgAAAF2sfxsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACnXNjAzySKwT7MAUABAIB/FD7TQA7RjUEhr1BAAQCAf0DSo72AD2s+sD0pQAEAgH9G65VBAACgQP9/spclzgxeAAAAAAAAAAAAAAAAAgAAAP9/spcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAANwu9enIzwFxymr8BAIB/lSkmPXVyM0BUcpo/AQCAf6CUVzsAAAC1AAAAtQEAgH9bX0NAAACgQC4F4xglzgxeAAAAAAAAAAAAAAAAAgAAAC4F4xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACHiFu9cXIzwFxymr8BAIB/4PZEPXpyM0BUcpo/AQCAfzCNNLsAAKA1AAAAtQEAgH+RYkNAAACgQP3hSkclzgxeAAAAAAAAAAAAAAAAAgAAAP3hSkcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAAAJNri/F/HdvX7gLr8BAIB/pDW4PzDz3T1+4C4/AQCAfwAAzLYAgAY2AAAAAAEAgH9jYcw/AACgQM6jquglzgxeAAAAAAAAAAAAAAAAAgAAAM6jqugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCAAAAAAAAAAAAAAAAAAAAAAAAAACHiFu9dXIzwFxymr8BAIB/4PZEPXVyM0BUcpo/AQCAfzCNNLsAAAAAAAAAtQEAgH+NYkNAAACgQDjw2rUlzgxeAAAAAAAAAAAAAAAAAgAAADjw2rUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAABHdwTAqd0awJKRs7oBAIB/gXcEQKXdGkCSkbM6AQCAfwAA6DYAAAC1AAAAAAEAgH99yktAAACgQLF+sQIlzgxeAAAAAAAAAAAAAAAAAgAAALF+sQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAABVL7m/3EjpvwAAAAABAIB/LzC5PwZJ6T8AAAAAAQCAfwAAWjcAACg2AAAAAAEAgH8U7RRAAACgQIFf4BwlzgxeAAAAAAAAAAAAAAAAAgAAAIFf4BwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADG+0XAsDpHwL03hrUBAIB/ZftFQKw6R0C9NwY2AQCAfwAAQLcAAAC1vjcGNQEAgH+zb4xAAACgQCUyMgYlzgxeAAAAAAAAAAAAAAAAAgAAACUyMgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAD/JX2/AHAjwL03hrUBAIB/ryR9P+9vI0AAAAAAAQCAfwAAKLcAAAC2vTcGtQEAgH81Qy9AAACgQJqWbPglzgxeAAAAAAAAAAAAAAAAAgAAAJqWbPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAAAxgXA/3l5wJxTSbYBAIB/68UFQAd6eUCcU0k2AQCAfwAAILYAAIA1AAAAAAEAgH8kio1AAACgQPUilP4lzgxeAAAAAAAAAAAAAAAAAgAAAPUilP4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAAADQ7y/9pcIwAAAAAABAIB/fEK8P/aXCEC9N4Y1AQCAfwAABrcAAAAAvTcGNQEAgH/z4iVAAACgQJaGZPAlzgxeAAAAAAAAAAAAAAAAAgAAAJaGZPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAACKAQ7A93bXvxb7y7wBAIB/AAIOQP921z8v/cs8AQCAfwAAbDcAAAA1AAAGNQEAgH86QTJAAACgQLwZ/DklzgxeAAAAAAAAAAAAAAAAAgAAALwZ/DkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADUIwPBslSewcrf7b8BAIB/MgYFQeBdl0Ho2OG/AQCAfwAvcT1A2t6+WdznvwEAgH8QWKhBAACgQDcbq+MlzgxeAAAAAAAAAAAAAAAAAgAAADcbq+MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMhCACAAAAAAAAAAAAAAAAAAAAAAAADYfszAdjI/wSdPCb8BAIB/qH7MQHUyP0EnTwk/AQCAfwAAQLcAAAAAAAAAAAEAgH9h/VhBAACgQL+uSSUlzgxeAAAAAAAAAAAAAAAAAgAAAL+uSSUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; - - private readonly CBaseArchetypeDef referenceArchetype = new CBaseArchetypeDef - { - assetName = new MetaHash((uint)0x1d0b5555), - assetType = rage__fwArchetypeDef__eAssetType.ASSET_TYPE_DRAWABLE, - bbMax = new SharpDX.Vector3(3.617807f, 4.9E-05f, 0.447415f), - bbMin = new SharpDX.Vector3(-3.617834f, -5.1E-05f, -0.447416f), - bsCentre = new SharpDX.Vector3(-1.3589859E-05f, -1.00000034E-06f, -5.066395E-07f), - bsRadius = 3.645381f, - hdTextureDist = 5, - lodDist = 100, - Unused05 = float.NaN, - Unused06 = float.NaN, - Unused07 = float.NaN, - name = new MetaHash((uint)0x1d0b5555), - textureDictionary = new MetaHash((uint)0x5e0cce25), - flags = 0x00002000, - }; - - [Fact] - public void TestConvertDataRaw() - { - var data = Convert.FromBase64String(ArchetypeData); - var basearch = PsoTypes.ConvertDataRawOld(data, 0); - - Assert.Equivalent(referenceArchetype, basearch); - - var basearch2 = PsoTypes.ConvertDataRaw(data, 0); - - Assert.Equivalent(basearch, basearch2); - - var random = new Random(); - var length = random.Next(100); - - var newData = Enumerable.Empty().Concat(new byte[length]).Concat(data).ToArray(); - - basearch = PsoTypes.ConvertDataRawOld(newData, length); - Assert.Equivalent(basearch, referenceArchetype); - - basearch2 = PsoTypes.ConvertDataRaw(newData, length); - - Assert.Equivalent(basearch, basearch2); - - //a.Extensions = MetaTypes.GetExtensions(Meta, basearch.extensions); - - - } - } - - public class TestConvertDataArray - { - private readonly ITestOutputHelper _output; - public TestConvertDataArray(ITestOutputHelper output) - { - _output = output; - } - private string GetFilePath(string filename) - { - // Directory we're looking for. - var dirToFind = Path.Combine(@"CodeWalker.Test", "Files"); - - // Search up directory tree starting at assembly path looking for 'Images' dir. - var searchPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - while (true) - { - var testPath = Path.Combine(searchPath, dirToFind); - if (Directory.Exists(testPath)) - { - // Found it! - return Path.Combine(testPath, filename); - } - - // Move up one directory. - var newSearchPath = Path.GetFullPath(Path.Combine(searchPath, "..")); - if (newSearchPath == searchPath) - { - // Didn't move up, so we're at the root. - throw new FileNotFoundException($"Could not find '{dirToFind}' directory."); - } - searchPath = newSearchPath; - } - } - - public string TestData = "AAAAAAAAAAAFAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAKDAAACgwAAAAMAAAAAAAACgQAAAoEAAAABAAAAAAAAAgD9kViJCAAAAAGAAAAABAAAAAAAAAP////8AAAAABgAAAAAAAAABAAEAAAAAAAAAAAAAAAAABWAAAAAAAAAKAAoAAAAAAAAAAAAAAAAAgPEnwiB/QcIAcFzBAAAAAADgDsL9ke/BHKgswQAAAAAAAIA/yyTUkwAAAABgAAAAAQAAAAEAAAD/////AAAAAAYAAQAAAAAALgAuAAAAAAA="; - [Fact] - public void ConvertDataArrayShouldReturnSameAsConvertData() - { - var data = Convert.FromBase64String(TestData); - - var referenceData = MetaTypes.ConvertData(data); - - var arrayData = MetaTypes.ConvertDataArray(data, 0, 2); - - var path = GetFilePath("anwblokaal.ytyp"); - var bytes = File.ReadAllBytes(path); - var entry = RpfFile.CreateFileEntry("anwblokaal.ytyp", path, ref bytes); - var ytypFile = RpfFile.GetFile(entry, bytes); - - var rooms = ytypFile.AllArchetypes - .Where(p => p is MloArchetype) - .Select(p => p as MloArchetype) - .SelectMany(p => p.rooms) - .Select(p => p.Data); - - var secondRoom = rooms.Last(); - - var arr = new byte[Marshal.SizeOf() * rooms.Count()]; - //MemoryMarshal.Write(arr.AsSpan(), ref rooms); - - _output.WriteLine(Convert.ToBase64String(MemoryMarshal.AsBytes(rooms.ToArray().AsSpan()))); - - // I know the bbMax values don't really make sense here, seems to be a weird ytyp, but it's mostly about testing the serialization, not about using a 100% correct ytyp - // And didn't want to include a ytyp from Rockstar Games since that could cause some legal issues down the road - // Another possible solution would be to do abest attempt to find the GTA V installed on the user's computer running the tests and use files from there, but this would add complexity and links which could break tests - // However this would be more in the scope of implementation testing as it tests the whole chain including encryption which is not wanted here - Assert.Equivalent(new SharpDX.Vector3(-41.98584f, -48.3741455f, -13.7773438f), secondRoom.bbMin); - Assert.Equivalent(new SharpDX.Vector3(-35.71875f, -29.9462833f, -10.7910423f), secondRoom.bbMax); - Assert.Equivalent(new Array_uint(65542, 46), secondRoom.attachedObjects); - Assert.Equal(96u, secondRoom.flags); - Assert.Equal(1, secondRoom.floorId); - Assert.Equivalent(new CharPointer() { Count1 = 10, Count2 = 10, Pointer = 24581 }, secondRoom.name); - Assert.Equal(1u, secondRoom.portalCount); - Assert.Equal(2480153803, secondRoom.timecycleName.Hash); - - // First room is limbo, so this check isn't that useful, but just make sure, and the following check will compare the entire array anyways - Assert.Equivalent(referenceData, rooms.First()); - - Assert.Equivalent(arrayData.ToArray(), rooms); - } - } -} \ No newline at end of file diff --git a/CodeWalker.Test/XmlTests.cs b/CodeWalker.Test/XmlTests.cs index a00b248..07d8721 100644 --- a/CodeWalker.Test/XmlTests.cs +++ b/CodeWalker.Test/XmlTests.cs @@ -960,19 +960,18 @@ namespace CodeWalker.Test var xdoc = new XmlDocument(); xdoc.LoadXml(markup); - XmlNodeList items = xdoc.SelectNodes("CVehicleModelInfo__InitDataList/InitDatas/Item | CVehicleModelInfo__InitDataList/InitDatas/item"); + XmlNodeList? items = xdoc.SelectNodes("CVehicleModelInfo__InitDataList/InitDatas/Item | CVehicleModelInfo__InitDataList/InitDatas/item"); + VehicleInitData? initDataExpected = null; + VehicleInitData? initData = null; - - string modelName = null; - string gameName = null; - VehicleInitData initDataExpected = null; - VehicleInitData initData = null; - - var InitDatas = new List(); + string? modelName; + string? gameName; for (int i = 0; i < items.Count; i++) { var node = items[i]; + Assert.NotNull(node); + initDataExpected = new VehicleInitData(); initDataExpected.Load(node); @@ -992,7 +991,7 @@ namespace CodeWalker.Test //Assert.Null(initDataExpected.trailers); Assert.Equal(9, initDataExpected.trailers.Length); Assert.Single(initDataExpected.drivers); - Assert.Equal("S_M_Y_Cop_01", initDataExpected.drivers[0].driverName); + Assert.Equal("S_M_Y_Cop_01", initDataExpected.drivers[0].DriverName); Assert.Equal("trailers4", initDataExpected.trailers[4]); using XmlReader xmlReader = XmlReader.Create(new StringReader(markup)); @@ -1019,8 +1018,10 @@ namespace CodeWalker.Test Assert.NotNull(initData.pOverrideRagdollThreshold); + Assert.Equal(initDataExpected.pOverrideRagdollThreshold, initData.pOverrideRagdollThreshold); + Assert.Equal(initDataExpected.requiredExtras, initData.requiredExtras); + Assert.Equivalent(initDataExpected, initData); - Assert.Equal(initDataExpected.GetHashCode(), initData.GetHashCode()); var bytes = Encoding.UTF8.GetBytes(markup); @@ -1063,6 +1064,7 @@ namespace CodeWalker.Test xDocument.LoadXml(xmlText); var pedsFile = new CPedModelInfo__InitDataList(xmlReader); + Assert.NotNull(xDocument?.DocumentElement); var pedsFileExpected = new CPedModelInfo__InitDataList(xDocument.DocumentElement); for (int i = 0; i < pedsFileExpected.InitDatas.Length; i++) @@ -1077,5 +1079,29 @@ namespace CodeWalker.Test Assert.Equivalent(pedsFileExpected, pedsFile); } + + [Fact] + public void ContentFileShouldBeTheSame() + { + var fileStream = File.OpenRead(TestFiles.GetFilePath("content.xml")); + + var xmlReader = XmlReader.Create(fileStream); + + var contentFile = new DlcContentFile(); + contentFile.Load(xmlReader); + + var xmlDocument = new XmlDocument(); + xmlDocument.LoadXml(TextUtil.GetUTF8Text(File.ReadAllBytes(TestFiles.GetFilePath("content.xml")))); + + var contentFileExpected = new DlcContentFile(); + contentFileExpected.Load(xmlDocument); + + for (int i = 0; i < contentFileExpected.contentChangeSets.Count; i++) + { + Assert.Equivalent(contentFileExpected.contentChangeSets[i], contentFile.contentChangeSets[i]); + } + + Assert.Equivalent(contentFileExpected, contentFile); + } } } diff --git a/CodeWalker.Vehicles/CodeWalker.Vehicles.csproj b/CodeWalker.Vehicles/CodeWalker.Vehicles.csproj index 21f6fc1..f70ec58 100644 --- a/CodeWalker.Vehicles/CodeWalker.Vehicles.csproj +++ b/CodeWalker.Vehicles/CodeWalker.Vehicles.csproj @@ -1,7 +1,7 @@  WinExe - net6.0-windows + net8.0-windows true CWVehicles.ico dexyfex diff --git a/CodeWalker.WinForms/CodeWalker.WinForms.csproj b/CodeWalker.WinForms/CodeWalker.WinForms.csproj index c728afd..ed755ec 100644 --- a/CodeWalker.WinForms/CodeWalker.WinForms.csproj +++ b/CodeWalker.WinForms/CodeWalker.WinForms.csproj @@ -1,7 +1,7 @@  Library - net6.0-windows + net8.0-windows true true latest @@ -14,7 +14,6 @@ - diff --git a/CodeWalker.WinForms/FormUtils.cs b/CodeWalker.WinForms/FormUtils.cs index cf11d71..df4036f 100644 --- a/CodeWalker.WinForms/FormUtils.cs +++ b/CodeWalker.WinForms/FormUtils.cs @@ -1,10 +1,13 @@ -using System; +using Microsoft.Win32; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows.Forms; +using System.Windows.Threading; using WeifenLuo.WinFormsUI.Docking; using Point = System.Drawing.Point; @@ -240,46 +243,52 @@ namespace CodeWalker { if (Environment.OSVersion.Version.Major >= 6) { - var ofd = new OpenFileDialog(); - ofd.Filter = "Folders|\n"; - ofd.AddExtension = false; - ofd.CheckFileExists = false; + var ofd = new OpenFolderDialog(); + //ofd.Filter = "Folders|\n"; + //ofd.AddExtension = false; + //ofd.CheckFileExists = false; ofd.DereferenceLinks = true; ofd.Multiselect = false; ofd.InitialDirectory = fbd.SelectedPath; - int result = 0; - var ns = "MS.Internal.AppModel"; - var asmb = Assembly.Load("System.Windows.Forms.Primitives"); - //var asmb = Assembly.LoadWithPartialName("PresentationFramework"); - var dialogint = asmb.GetType("Interop+Shell32+IFileDialog"); - //var dialogint = GetType(asmb, ns, "IFileDialog"); - var dialog = Call(typeof(OpenFileDialog), ofd, "CreateVistaDialog"); - Call(typeof(OpenFileDialog), ofd, "OnBeforeVistaDialog", dialog); - var options = Convert.ToUInt32(Call(typeof(FileDialog), ofd, "GetOptions")); + ofd.ValidateNames = true; - var enumValue = GetEnumValue("System.Windows.Forms.Primitives", "Interop+Shell32+FOS", "PICKFOLDERS"); - options |= Convert.ToUInt32(enumValue); + var result = ofd.ShowDialog() ?? false; - Call(dialogint, dialog, "SetOptions", options); - dynamic pfde = New("System.Windows.Forms", "System.Windows.Forms.FileDialog+VistaDialogEvents", ofd); - var parameters = new object[] { pfde, (uint)0 }; - Call(dialogint, dialog, "Advise", parameters); - var adviseres = Convert.ToUInt32(parameters[1]); - try { - result = Convert.ToInt32(Call(dialogint, dialog, "Show", hWndOwner)); - } - finally { - //pfde.Dispose(); - Call(dialogint, dialog, "Unadvise", adviseres); - } - GC.KeepAlive(pfde); + //int result = 0; + //var ns = "MS.Internal.AppModel"; + //var asmb = Assembly.Load("System.Windows.Forms.Primitives"); + ////var asmb = Assembly.LoadWithPartialName("PresentationFramework"); + //var dialogint = asmb.GetType("Interop+Shell32+IFileDialog"); + ////var dialogint = GetType(asmb, ns, "IFileDialog"); + //var dialog = Call(typeof(OpenFileDialog), ofd, "CreateVistaDialog"); + //Call(typeof(OpenFileDialog), ofd, "OnBeforeVistaDialog", dialog); + //var options = Convert.ToUInt32(Call(typeof(FileDialog), ofd, "GetOptions")); + + //var enumValue = GetEnumValue("System.Windows.Forms.Primitives", "Interop+Shell32+FOS", "PICKFOLDERS"); + //options |= Convert.ToUInt32(enumValue); + + //Call(dialogint, dialog, "SetOptions", options); + //dynamic pfde = New("System.Windows.Forms", "System.Windows.Forms.FileDialog+VistaDialogEvents", ofd); + //var parameters = new object[] { pfde, (uint)0 }; + //Call(dialogint, dialog, "Advise", parameters); + //var adviseres = Convert.ToUInt32(parameters[1]); + //try { + // result = Convert.ToInt32(Call(dialogint, dialog, "Show", hWndOwner)); + //} + //finally { + // //pfde.Dispose(); + // Call(dialogint, dialog, "Unadvise", adviseres); + //} + //GC.KeepAlive(pfde); - fbd.SelectedPath = ofd.FileName; + fbd.SelectedPath = ofd.FolderName; - return (result == 0) ? DialogResult.OK : DialogResult.Cancel; + //return (result == 0) ? DialogResult.OK : DialogResult.Cancel; + + return result ? DialogResult.OK : DialogResult.Cancel; } else { @@ -302,11 +311,22 @@ namespace CodeWalker } return type; } + private static object Call(Type type, object obj, string func, params object[] parameters) { var mi = type.GetMethod(func, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - if (mi == null) return null; - return mi.Invoke(obj, parameters); + if (mi == null) + return null; + try + { + return mi.Invoke(obj, parameters); + } + catch(Exception ex) + { + Console.WriteLine($"Exception occured while invoking method {type} {func}"); + Console.WriteLine(ex.ToString()); + throw; + } } private static object GetEnumValue(string assemblyName, string typeName, string name) @@ -459,6 +479,55 @@ namespace CodeWalker } + public static class InvokeExtensions + { + public static void InvokeIfRequired(this Form form, System.Windows.Forms.MethodInvoker method) + { + if (form.InvokeRequired) + { + form.Invoke(method); + return; + } + + method?.Invoke(); + } + + public static void InvokeIfRequired(this Form form, Action action, params object[] args) + { + if (form.InvokeRequired) + { + form.Invoke(action, args); + return; + } + + action?.Invoke(args); + } + + public static SwitchToUiAwaitable SwitchToUi(this Form form) + { + return new SwitchToUiAwaitable(form); + } + + public readonly struct SwitchToUiAwaitable(Form form) : INotifyCompletion + { + public SwitchToUiAwaitable GetAwaiter() + { + return this; + } + + public void GetResult() + { + } + + public bool IsCompleted => !form.InvokeRequired; + + public void OnCompleted(Action continuation) + { + form.BeginInvoke(continuation); + } + } + } + //unused //public class AccurateTimer diff --git a/CodeWalker.WinForms/PropertyGridFix.Designer.cs b/CodeWalker.WinForms/PropertyGridFix.Designer.cs index 6d96a50..e9743cf 100644 --- a/CodeWalker.WinForms/PropertyGridFix.Designer.cs +++ b/CodeWalker.WinForms/PropertyGridFix.Designer.cs @@ -1,6 +1,8 @@ -namespace CodeWalker.WinForms +using System.Windows.Forms; + +namespace CodeWalker.WinForms { - partial class PropertyGridFix + public partial class PropertyGridFix : PropertyGrid { /// /// Required designer variable. diff --git a/CodeWalker.WinForms/ReadOnlyPropertyGrid.Designer.cs b/CodeWalker.WinForms/ReadOnlyPropertyGrid.Designer.cs index 958ef32..2dde2d0 100644 --- a/CodeWalker.WinForms/ReadOnlyPropertyGrid.Designer.cs +++ b/CodeWalker.WinForms/ReadOnlyPropertyGrid.Designer.cs @@ -1,6 +1,6 @@ namespace CodeWalker.WinForms { - partial class ReadOnlyPropertyGrid + public partial class ReadOnlyPropertyGrid : PropertyGridFix { /// /// Required designer variable. diff --git a/CodeWalker.WinForms/ReadOnlyPropertyGrid.resx b/CodeWalker.WinForms/ReadOnlyPropertyGrid.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/CodeWalker.WinForms/ReadOnlyPropertyGrid.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CodeWalker.sln b/CodeWalker.sln index 4cc8a7a..747299b 100644 --- a/CodeWalker.sln +++ b/CodeWalker.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.7.34031.279 @@ -27,6 +26,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeWalker.Test", "CodeWalk EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeWalker.Benchmarks", "CodeWalker.Benchmarks\CodeWalker.Benchmarks.csproj", "{EDDA8A8E-5333-4E28-8221-A31E3B70EB7A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5017C2E3-D441-4BDF-AC7C-46CAEC2F38F4}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/CodeWalker/.editorconfig b/CodeWalker/.editorconfig new file mode 100644 index 0000000..e69de29 diff --git a/CodeWalker/CodeWalker.csproj b/CodeWalker/CodeWalker.csproj index 83c35d6..78ffc23 100644 --- a/CodeWalker/CodeWalker.csproj +++ b/CodeWalker/CodeWalker.csproj @@ -1,15 +1,18 @@  WinExe - net6.0-windows + net8.0-windows + net8.0-windows true true CW.ico dexyfex dexyfex software dexyfex - latest - annotations + 12.0 + enable + true + true x64 @@ -18,16 +21,13 @@ x64 + + + - - - + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - @@ -35,13 +35,26 @@ - - + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + + + + + ..\..\FastColoredTextBox\FastColoredTextBox\bin\Release\net8.0-windows\FastColoredTextBox.dll + + True @@ -55,4 +68,10 @@ Settings.Designer.cs + + + + + + \ No newline at end of file diff --git a/CodeWalker/ExploreForm.cs b/CodeWalker/ExploreForm.cs index 6687061..fa91962 100644 --- a/CodeWalker/ExploreForm.cs +++ b/CodeWalker/ExploreForm.cs @@ -22,6 +22,10 @@ using WeifenLuo.WinFormsUI.Docking; using System.Runtime.CompilerServices; using static CodeWalker.GameFiles.GameFileCache; using System.Diagnostics.CodeAnalysis; +using CodeWalker.Rendering; +using CommunityToolkit.HighPerformance; +using Collections.Pooled; +using Microsoft.Extensions.ObjectPool; namespace CodeWalker { @@ -38,7 +42,7 @@ namespace CodeWalker public MainTreeFolder? RootFolder; public List ExtraRootFolders = new List(); public MainTreeFolder? CurrentFolder; - public List? CurrentFiles; + public PooledList? CurrentFiles; private bool FirstRefreshed = false; private List CopiedFiles = new List(); @@ -55,7 +59,7 @@ namespace CodeWalker private List? AllRpfs { get; set; } private static GameFileCache FileCache => GameFileCacheFactory.Instance; - private readonly object FileCacheSyncRoot = new object(); + private readonly SemaphoreSlim FileCacheSyncRoot = new SemaphoreSlim(1, 1); public bool EditMode { get; private set; } = false; @@ -72,13 +76,15 @@ namespace CodeWalker public ExploreForm() { - ETWEvents.Log.CreatingForm(nameof(ExploreForm)); + ETWEvents.Log.CreatingFormStart(nameof(ExploreForm)); Instance = this; - SuspendLayout(); InitializeComponent(); - ResumeLayout(); - SetTheme(Settings.Default.ExplorerWindowTheme, false); + _ = Task.Run(() => + { + SetTheme(Settings.Default.ExplorerWindowTheme, false); + }); + ShowMainListViewPathColumn(false); @@ -87,6 +93,7 @@ namespace CodeWalker UpdateStatus += UpdateStatus_EventHandler; ErrorLog += UpdateErrorLog; ForceTreeRefresh += RefreshMainTreeView_EventHandler; + ETWEvents.Log.CreatingFormStop(); } private void SetTheme(string themestr, bool changing = true) @@ -95,6 +102,12 @@ namespace CodeWalker //MainDockPanel.SaveAsXml(configFile); //CloseAllContents(); + if (InvokeRequired) + { + BeginInvoke(SetTheme, themestr, changing); + return; + } + foreach (ToolStripMenuItem menu in ViewThemeMenu.DropDownItems) { menu.Checked = false; @@ -193,7 +206,7 @@ namespace CodeWalker Settings.Default.Save(); } - [MemberNotNull(nameof(FileCache))] + [SuppressMessage("CodeSmell", "EPC17:Avoid async-void delegates", Justification = "Long running background thread which handles errors")] private void Init() { ETWEvents.Log.LoadingForm(nameof(ExploreForm)); @@ -216,8 +229,9 @@ namespace CodeWalker { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); } - catch + catch(Exception ex) { + Console.WriteLine(ex); UpdateStatus?.Invoke("Unable to load gta5.exe!"); return; } @@ -250,7 +264,6 @@ namespace CodeWalker } catch(Exception e) { Console.WriteLine(e); - throw; } }, CancellationTokenSource.Token, TaskCreationOptions.LongRunning).Start(TaskScheduler.Default); } @@ -259,11 +272,12 @@ namespace CodeWalker { if (FileCache.IsInited) { - return new ValueTask(); + return ValueTask.CompletedTask; } - return new ValueTask(Task.Run(() => + return new ValueTask(Task.Run(async () => { - lock (FileCacheSyncRoot) + FileCacheSyncRoot.Wait(); + try { if (!FileCache.IsInited) { @@ -272,7 +286,7 @@ namespace CodeWalker UpdateStatus?.Invoke("Loading file cache..."); var allRpfs = AllRpfs; - FileCache.Init(updateStatus: null, ErrorLog, allRpfs); //inits main dicts and archetypes only... + await FileCache.InitAsync(updateStatus: null, ErrorLog, allRpfs); //inits main dicts and archetypes only... UpdateStatus?.Invoke("Loading materials..."); BoundsMaterialTypes.Init(FileCache); @@ -281,24 +295,20 @@ namespace CodeWalker Scenarios.EnsureScenarioTypes(FileCache); UpdateStatus?.Invoke("File cache loaded."); - } catch(Exception ex) + } + catch (Exception ex) { MessageBox.Show(ex.ToString(), ex.Message); } } } + finally + { + FileCacheSyncRoot.Release(); + } }, CancellationTokenSource.Token)); } - public GameFileCache GetFileCache() - { - lock (FileCacheSyncRoot) - { - if (FileCache.IsInited) return FileCache; - } - InitFileCache(); //if we got here, it's not inited yet - init it! - return FileCache; //return it even though it's probably not inited yet.. - } [MemberNotNull(nameof(FileTypes))] public static void InitFileTypes() @@ -432,36 +442,53 @@ namespace CodeWalker public event Action UpdateStatus; public event Action ErrorLog; - public void InvokeUpdateStatus(string msg) + private Stopwatch lastStatusUpdate = Stopwatch.StartNew(); + private TimeSpan updateInterval = TimeSpan.FromSeconds(0.05); + public void InvokeUpdateStatus(string msg, bool force = false) { + if (!force) + { + var elapsed = lastStatusUpdate.Elapsed; + if (elapsed < updateInterval) + return; + } + UpdateStatus?.Invoke(msg); } - public void UpdateStatus_EventHandler(string text) + private void doUpdateStatus(string text) { - try + if (InvokeRequired) { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { UpdateStatus_EventHandler(text); })); - } - else - { - StatusLabel.Text = text; - } + BeginInvoke(doUpdateStatus, text); } - catch(Exception ex) { - Console.WriteLine(ex); - Debug.WriteLine(ex); + else + { + StatusLabel.Text = text; } } + + private void UpdateStatus_EventHandler(string text) + { + + lastStatusUpdate.Restart(); + try + { + doUpdateStatus(text); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + public void UpdateErrorLog(string text) { try { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateErrorLog(text); })); + BeginInvoke(UpdateErrorLog, text); } else { @@ -479,15 +506,16 @@ namespace CodeWalker public void Navigate(MainTreeFolder? f) { - if (!Ready) return; - if (f == CurrentFolder) return; //already there! - ArgumentNullException.ThrowIfNull(f); + if (!Ready) + return; + if (f == CurrentFolder) + return; //already there! if (f.IsSearchResults) { AddMainTreeViewRoot(f); //add the current search result node - TreeNode sr = FindTreeNode(f, null); - if (sr != null) + TreeNode? sr = FindTreeNode(f, null); + if (sr is not null) { MainTreeView.SelectedNode = sr; //navigate to the new search results node } @@ -505,7 +533,7 @@ namespace CodeWalker } List hierarchy = new List(); var pf = f; - while (pf != null) + while (pf is not null) { hierarchy.Add(pf); pf = pf.Parent; @@ -515,7 +543,7 @@ namespace CodeWalker { n = FindTreeNode(hierarchy[i], n); } - if (n != null) + if (n is not null) { if (MainTreeView.SelectedNode != n) { @@ -530,11 +558,14 @@ namespace CodeWalker } public void Navigate(string path) { - if (!Ready) return; + if (!Ready) + return; + var pathl = path.Replace('/', '\\'); - if ((CurrentFolder != null) && (CurrentFolder.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase))) + if (CurrentFolder != null && CurrentFolder.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase)) return; //already there - var hierarchy = pathl.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries); + + var hierarchy = pathl.Split('\\', StringSplitOptions.RemoveEmptyEntries); TreeNode? n = null;// FindTreeNode("gta v", null); if (!string.IsNullOrEmpty(path)) { @@ -553,6 +584,10 @@ namespace CodeWalker } } + else + { + n = MainTreeView.Nodes[0]; // Main node + } if (n != null) { if (MainTreeView.SelectedNode != n) @@ -567,7 +602,7 @@ namespace CodeWalker } private void NavigateFailed(string path) { - MessageBox.Show("Unable to navigate to \"" + path + "\"."); + MessageBox.Show($"Unable to navigate to \"{path}\"."); } private void NavigateComplete(MainTreeFolder prevFolder) { @@ -578,7 +613,7 @@ namespace CodeWalker if (!HistoryNavigating) //only do this if not currently navigating forward or back { - if (prevFolder != null) + if (prevFolder is not null) { ForwardSteps.Clear(); BackSteps.Push(prevFolder); @@ -603,7 +638,7 @@ namespace CodeWalker if (BackSteps.Count == 0) return; var s = BackSteps.Pop(); ForwardSteps.Push(CurrentFolder); - while ((toFolder != null) && (s != toFolder) && (BackSteps.Count > 0)) + while (toFolder is not null && s != toFolder && BackSteps.Count > 0) { ForwardSteps.Push(s); s = BackSteps.Pop(); @@ -618,7 +653,7 @@ namespace CodeWalker if (ForwardSteps.Count == 0) return; var s = ForwardSteps.Pop(); BackSteps.Push(CurrentFolder); - while ((toFolder != null) && (s != toFolder) && (ForwardSteps.Count > 0)) + while (toFolder is not null && s != toFolder && ForwardSteps.Count > 0) { BackSteps.Push(s); s = ForwardSteps.Pop(); @@ -634,7 +669,7 @@ namespace CodeWalker UpButton.DropDownItems.Clear(); var pf = CurrentFolder?.Parent; int i = 0; - while (pf != null) + while (pf is not null) { var button = UpButton.DropDownItems.Add(pf.GetToolText()); button.Tag = pf; @@ -674,7 +709,7 @@ namespace CodeWalker { var ic = MainListView.VirtualListSize; var sc = MainListView.SelectedIndices.Count; - var str = ic.ToString() + " item" + ((ic != 1) ? "s" : "") + " shown"; + var str = $"{ic} item{((ic != 1) ? "s" : "")} shown"; bool isitem = false; bool isfile = false; bool issearch = CurrentFolder?.IsSearchResults ?? false; @@ -705,13 +740,13 @@ namespace CodeWalker canedit = EditMode && !issearch; } } - str += ", " + sc.ToString() + " selected"; + str += $", {sc} selected"; if (bc > 0) { - str += ", " + TextUtil.GetBytesReadable(bc); + str += $", {TextUtil.GetBytesReadable(bc)}"; } } - UpdateStatus(str); + UpdateStatus?.Invoke(str); @@ -739,7 +774,7 @@ namespace CodeWalker private TreeNode? FindTreeNode(MainTreeFolder f, TreeNode? parent) { - var tnc = (parent != null) ? parent.Nodes : MainTreeView.Nodes; + var tnc = parent?.Nodes ?? MainTreeView.Nodes; foreach (TreeNode node in tnc) { if (node.Tag == f) @@ -751,7 +786,7 @@ namespace CodeWalker } private TreeNode? FindTreeNode(string text, TreeNode? parent) { - var tnc = (parent != null) ? parent.Nodes : MainTreeView.Nodes; + var tnc = parent?.Nodes ?? MainTreeView.Nodes; foreach (TreeNode node in tnc) { if (node.Text.Equals(text, StringComparison.OrdinalIgnoreCase)) @@ -771,8 +806,6 @@ namespace CodeWalker Ready = false; AllRpfs = null; - BeginInvoke(() => MainTreeView.BeginUpdate); - UpdateStatus?.Invoke("Scanning..."); @@ -798,15 +831,7 @@ namespace CodeWalker if (Directory.Exists(extraroot.FullPath)) { - try - { - tasks.Add(Task.Run(() => RefreshMainTreeViewRoot(extraroot))); - } - catch(Exception ex) - { - remFolders.Add(extraroot); - } - + tasks.Add(Task.Run(() => RefreshMainTreeViewRoot(extraroot))); } else { @@ -823,23 +848,35 @@ namespace CodeWalker BeginInvoke(() => { - SuspendLayout(); - MainTreeView.BeginUpdate(); - ClearMainTreeView(); + try + { + MainTreeView.BeginUpdate(); + ClearMainTreeView(); - MainTreeView.Nodes.AddRange(nodes); + MainTreeView.Nodes.AddRange(nodes); - Ready = true; + Ready = true; - MainTreeView.EndUpdate(); - ResumeLayout(); - MainTreeViewRefreshComplete(); + MainTreeView.EndUpdate(); + MainTreeViewRefreshComplete(); + } + catch(Exception ex) + { + Console.WriteLine(ex); + } }); } + private struct RpfFileScanData + { + public required RpfFile RpfFile; + public required MainTreeFolder Node; + } + private TreeNode RefreshMainTreeViewRoot(MainTreeFolder f, bool gameRoot = false) { + ETWEvents.Log.RefreshingMainTreeViewStart(f.Path); var allRpfs = new ConcurrentBag(); var fullPath = f.FullPath; var subPath = f.Path; @@ -847,69 +884,65 @@ namespace CodeWalker using (new DisposableTimer("RefreshMainTreeViewRoot -> EnumerateFileSystemInfos")) { - allpaths = new DirectoryInfo(fullPath).EnumerateFileSystemInfos("*", SearchOption.AllDirectories).ToArray(); + // Randomizing order is done to avoid lock contention (all files in same folder get read in order we don't want that) + var random = new Random(42); + allpaths = new DirectoryInfo(fullPath).EnumerateFileSystemInfos("*", SearchOption.AllDirectories).OrderBy(order => random.Next()).ToArray(); } - using var _ = new DisposableTimer("RefreshMainTreeViewRoot"); + using var timer = new DisposableTimer("RefreshMainTreeViewRoot"); //var allpaths = Directory.EnumerateFileSystemEntries(fullPath, "*", SearchOption.AllDirectories); //var allDirs = new HashSet(Directory.EnumerateDirectories(fullPath, "*", SearchOption.AllDirectories)); //var allfiles = new HashSet(Directory.GetFiles(fullPath, "*", SearchOption.AllDirectories)); - var nodes = new ConcurrentDictionary(4, allpaths.Length, StringComparer.OrdinalIgnoreCase); + var nodes = new ConcurrentDictionary(Environment.ProcessorCount, allpaths.Length); - var partitioner = Partitioner.Create(allpaths, EnumerablePartitionerOptions.NoBuffering); - - Parallel.ForEach(partitioner, new ParallelOptions { MaxDegreeOfParallelism = 4, TaskScheduler = TaskScheduler.Default }, (fileEntryInfo) => + Parallel.ForEach(allpaths, (fileEntryInfo) => { try { var path = fileEntryInfo.FullName; - var relpath = path.Substring(fullPath.Length); + var relpath = path.AsSpan(fullPath.Length..); var isFile = fileEntryInfo is FileInfo; //var isFile = !path.I.Contains(path); //could be a folder //UpdateStatus?.Invoke("Scanning " + relpath + "..."); - MainTreeFolder parentnode = null, prevnode = null, node = null; - var prevnodepath = ""; + MainTreeFolder? parentnode = null, prevnode = null, node = null; + var prevnodepath = ReadOnlySpan.Empty; var idx = isFile ? relpath.LastIndexOf('\\') : relpath.Length; while (idx > 0) //create the folder tree nodes and build up the hierarchy { - var parentpath = relpath.Substring(0, idx); + var parentpath = relpath[..idx]; var parentidx = parentpath.LastIndexOf('\\'); - var parentname = parentpath.Substring(parentidx + 1); var exists = true; - MainTreeFolder _node = null; - node = nodes.GetOrAdd(parentpath, (key) => + var parentpathHash = string.GetHashCode(parentpath, StringComparison.OrdinalIgnoreCase); + if (!nodes.TryGetValue(parentpathHash, out node)) { - //Console.WriteLine($"Creating treenode for {parentpath}"); - var node = CreateRootDirTreeFolder(parentname, subPath + parentpath, fullPath + parentpath); - _node = node; - exists = false; - return node; - }); - if (_node != null && node != _node) - { - exists = true; + var parentname = parentpath[(parentidx + 1)..]; + node = CreateRootDirTreeFolder(parentname.ToString(), $"{subPath}{parentpath}", $"{fullPath}{parentpath}"); + exists = !nodes.TryAdd(parentpathHash, node); + node = nodes[parentpathHash]; } + //if (_node is not null && node != _node) + //{ + // exists = true; + //} parentnode ??= node; - if (prevnode != null) + if (prevnode is not null) { node.AddChild(prevnode); } prevnode = node; prevnodepath = parentpath; - idx = relpath.LastIndexOf('\\', idx - 1); - if (exists) break; + if (exists) + break; + + idx = relpath.Slice(0, idx - 1).LastIndexOf('\\'); if (idx < 0) { - lock (f) - { - f.AddChild(node); - } - + f.AddChild(node); } } @@ -917,17 +950,17 @@ namespace CodeWalker { if (path.EndsWith(".rpf", StringComparison.OrdinalIgnoreCase)) //add RPF nodes { - RpfFile rpf = new RpfFile(path, relpath); + RpfFile rpf = new RpfFile(path, relpath.ToString()); - rpf.ScanStructure(updateStatus: null, ErrorLog); + var result = rpf.ScanStructure(updateStatus: null, ErrorLog, out _); - if (rpf.LastException != null) //incase of corrupted rpf (or renamed NG encrypted RPF) + if (!result) //incase of corrupted rpf (or renamed NG encrypted RPF) { Console.WriteLine(rpf.LastException); return; } - node = CreateRpfTreeFolder(rpf, relpath, path); + node = CreateRpfTreeFolder(rpf, rpf.Path, rpf.FilePath); RecurseMainTreeViewRPF(node, allRpfs); @@ -942,8 +975,8 @@ namespace CodeWalker } else { - JenkIndex.EnsureLower(Path.GetFileNameWithoutExtension(path)); - if (parentnode != null) + JenkIndex.EnsureLower(Path.GetFileNameWithoutExtension(path.AsSpan())); + if (parentnode is not null) { parentnode.AddFile(path); } @@ -954,7 +987,8 @@ namespace CodeWalker } } } - catch (Exception ex) { + catch (Exception ex) + { Console.WriteLine(ex); ErrorLog?.Invoke(ex.ToString()); } @@ -962,11 +996,11 @@ namespace CodeWalker var rootNode = CreateTreeNode(f); - if (f.Children != null) + if (f.Children is not null) { - f.Children.Sort((n1, n2) => StringComparer.OrdinalIgnoreCase.Compare(n1.Name, n2.Name)); + f.Children.Sort(new MainTreeFolderComparer(StringComparer.OrdinalIgnoreCase)); - foreach (var node in f.Children) + foreach (var node in f.Children.Span) { AddMainTreeViewNode(node); } @@ -975,20 +1009,24 @@ namespace CodeWalker if (gameRoot) { AllRpfs = allRpfs.ToList(); + rootNode.Expand(); } + ETWEvents.Log.RefreshingMainTreeViewStop(); + return rootNode; } + private void RecurseMainTreeViewRPF(MainTreeFolder f, ConcurrentBag allRpfs) { var rootpath = GTAFolder.GetCurrentGTAFolderWithTrailingSlash(); var fld = f.RpfFolder; - if (fld != null) + if (fld is not null) { - if (fld.Directories != null) + if (fld.Directories is not null) { - foreach (var dir in fld.Directories) + foreach (var dir in fld.Directories.Span) { var dtnf = CreateRpfDirTreeFolder(dir, dir.Path, rootpath + dir.Path); f.AddChild(dtnf); @@ -998,13 +1036,13 @@ namespace CodeWalker } var rpf = f.RpfFile; - if (rpf != null) + if (rpf is not null) { allRpfs.Add(rpf); - if (rpf.Children != null) + if (rpf.Children is not null) { - foreach (var child in rpf.Children) + foreach (var child in rpf.Children.Span) { var ctnf = CreateRpfTreeFolder(child, child.Path, rootpath + child.Path); f.AddChildToHierarchy(ctnf); @@ -1013,9 +1051,9 @@ namespace CodeWalker } //JenkIndex.Ensure(rpf.Name); - if (rpf.AllEntries != null) + if (rpf.AllEntries is not null) { - foreach (RpfEntry entry in rpf.AllEntries) + foreach (RpfEntry entry in rpf.AllEntries.Span) { if (string.IsNullOrEmpty(entry.Name)) continue; var shortName = entry.ShortName; @@ -1030,7 +1068,7 @@ namespace CodeWalker { if (InvokeRequired) { - Invoke(new Action(() => { ClearMainTreeView(); })); + Invoke(ClearMainTreeView); } else { @@ -1045,7 +1083,9 @@ namespace CodeWalker MainListView.VirtualListSize = 0; //also clear the list view... } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private TreeNode CreateTreeNode(MainTreeFolder f) @@ -1068,7 +1108,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { AddMainTreeViewRoot(f); })); + BeginInvoke(AddMainTreeViewRoot, f); } else { @@ -1076,51 +1116,74 @@ namespace CodeWalker MainTreeView.Nodes.Add(node); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void AddMainTreeViewNode(MainTreeFolder f) { try { - //if (InvokeRequired) - //{ - // Invoke(new Action(() => { AddMainTreeViewNode(f); })); - //} - //else - //{ + if (InvokeRequired) + { + Invoke(AddMainTreeViewNode, f); + } + else + { string n = f.Name; var root = f.Parent?.TreeNode; RecurseAddMainTreeViewNodes(f, root); - - root.Expand(); - //} + } + } + catch(Exception ex) { + Console.WriteLine(ex); } - catch { } } + + public class MainTreeFolderComparer : IComparer + { + private readonly StringComparer _comparer; + public MainTreeFolderComparer(StringComparer comparer) + { + _comparer = comparer; + } + + public int Compare(MainTreeFolder? x, MainTreeFolder? y) + { + return _comparer.Compare(x?.Name, y?.Name); + } + } + private void RecurseAddMainTreeViewNodes(MainTreeFolder f, TreeNode parent) { int imgIndex = 1; //FOLDER imageIndex - if (f.RpfFile != null) imgIndex = 3; //RPF FILE imageIndex + if (f.RpfFile is not null) + imgIndex = 3; //RPF FILE imageIndex - var nc = (parent != null) ? parent.Nodes : MainTreeView.Nodes; + var nc = parent?.Nodes ?? MainTreeView.Nodes; - var tn = nc.Add(f.Path, f.Name, imgIndex, imgIndex); + var tn = new TreeNode(f.Name, imgIndex, imgIndex) + { + Name = f.Path + }; tn.ToolTipText = f.Path; tn.Tag = f; f.TreeNode = tn; - if (f.Children != null) + if (f.Children is not null) { - f.Children.Sort((n1, n2) => StringComparer.OrdinalIgnoreCase.Compare(n1.Name, n2.Name)); + f.Children.Sort(new MainTreeFolderComparer(StringComparer.OrdinalIgnoreCase)); - foreach (var child in f.Children) + foreach (var child in f.Children.Span) { RecurseAddMainTreeViewNodes(child, tn); } } + + nc.Add(tn); } private void MainTreeViewRefreshComplete() { @@ -1128,7 +1191,7 @@ namespace CodeWalker { if (InvokeRequired) { - Invoke(new Action(() => { MainTreeViewRefreshComplete(); })); + Invoke(MainTreeViewRefreshComplete); } else { @@ -1248,7 +1311,7 @@ namespace CodeWalker } } } - private void RemoveTreeFolder(MainTreeFolder f) + private static void RemoveTreeFolder(MainTreeFolder f) { if (f.Parent == null) return; @@ -1328,7 +1391,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { RefreshMainListView(); })); + BeginInvoke(RefreshMainListView); } else { @@ -1345,10 +1408,11 @@ namespace CodeWalker private void RefreshMainListView() { MainListView.VirtualListSize = 0; - if (CurrentFolder != null) + if (CurrentFolder is not null) { if (!CurrentFolder.IsSearchResults) { + CurrentFolder.ListItems?.Dispose(); CurrentFolder.ListItems = null; //makes sure to rebuild the current files list } CurrentFiles = CurrentFolder.GetListItems(); @@ -1371,7 +1435,8 @@ namespace CodeWalker } private void SortMainListView(int col, SortOrder dir) { - if (dir == SortOrder.None) dir = SortOrder.Ascending; //none not supported for actual sorting! + if (dir == SortOrder.None) + dir = SortOrder.Ascending; //none not supported for actual sorting! SortColumnIndex = col; SortDirection = dir; @@ -1380,7 +1445,8 @@ namespace CodeWalker MainListView.VirtualListSize = 0; - if (CurrentFiles == null) return; + if (CurrentFiles == null) + return; CurrentFiles.Sort((i1, i2) => i1.SortCompare(i2, col, dir)); @@ -1410,8 +1476,10 @@ namespace CodeWalker public void Search(string text) { - if (!Ready) return; - if (Searching) return; + if (!Ready) + return; + if (Searching) + return; if (string.IsNullOrEmpty(text)) return; SearchTextBox.Text = text; @@ -1422,8 +1490,8 @@ namespace CodeWalker SearchResults = new MainTreeFolder { - Name = "Search Results: " + text, - Path = "Search Results: " + text, + Name = $"Search Results: {text}", + Path = $"Search Results: {text}", IsSearchResults = true, SearchTerm = text, }; @@ -1436,7 +1504,7 @@ namespace CodeWalker CurrentFiles?.Clear(); - UpdateStatus?.Invoke("Searching..."); + InvokeUpdateStatus("Searching...", true); var term = text; @@ -1456,11 +1524,11 @@ namespace CodeWalker if (Searching) { Searching = false; - UpdateStatus?.Invoke("Search complete. " + resultcount.ToString() + " items found."); + InvokeUpdateStatus($"Search complete. {resultcount} items found.", true); } else { - UpdateStatus?.Invoke("Search aborted. " + resultcount.ToString() + " items found."); + InvokeUpdateStatus($"Search aborted. {resultcount} items found.", true); } Cursor = Cursors.Default; @@ -1483,10 +1551,10 @@ namespace CodeWalker public void AddSearchResult(MainListItem? item) { - if (SearchResults == null) return; - if (SearchResults.ListItems != CurrentFiles) return; + if (SearchResults?.ListItems != CurrentFiles) + return; - if (item != null) + if (item is not null) { CurrentFiles.Add(item); } @@ -1512,9 +1580,9 @@ namespace CodeWalker - private byte[] GetFileData(MainListItem file) + private byte[]? GetFileData(MainListItem file) { - byte[] data = null; + byte[]? data = null; if (file.Folder != null) { var entry = file.Folder.RpfFile?.ParentFileEntry; @@ -1533,22 +1601,47 @@ namespace CodeWalker { data = file.File.File.ExtractFile(file.File); } - else - { } } else if (!string.IsNullOrEmpty(file.FullPath)) { data = File.ReadAllBytes(file.FullPath); //load file from filesystem } - else - { } return data; } + + private async ValueTask GetFileDataAsync(MainListItem file) + { + byte[]? data = null; + if (file.Folder != null) + { + var entry = file.Folder.RpfFile?.ParentFileEntry; + if (entry != null) + { + data = await entry.File.ExtractFileAsync(entry);//extract an RPF from another. + } + else if (!string.IsNullOrEmpty(file.FullPath) && (file.Folder.RpfFile != null)) + { + data = await File.ReadAllBytesAsync(file.FullPath); //load RPF file from filesystem + } + } + else if (file.File != null) //load file from RPF + { + if (file.File.File != null) //need the reference to the RPF archive + { + data = await file.File.File.ExtractFileAsync(file.File); + } + } + else if (!string.IsNullOrEmpty(file.FullPath)) + { + data = await File.ReadAllBytesAsync(file.FullPath); //load file from filesystem + } + return data; + } + private byte[] GetFileDataCompressResources(MainListItem file) { byte[] data = GetFileData(file); - RpfResourceFileEntry rrfe = file.File as RpfResourceFileEntry; - if (rrfe != null) //add resource header if this is a resource file. + if (file.File is RpfResourceFileEntry rrfe) //add resource header if this is a resource file. { data = ResourceBuilder.Compress(data); //not completely ideal to recompress it... data = ResourceBuilder.AddResourceHeader(rrfe, data); @@ -1598,8 +1691,10 @@ namespace CodeWalker private bool CanExportXml(MainListItem item) { - if (item == null) return false; - if (item.FileType == null) return false; + if (item == null) + return false; + if (item.FileType == null) + return false; return item.FileType.XmlConvertible; } @@ -1616,7 +1711,7 @@ namespace CodeWalker return; } - byte[] data = null; + byte[]? data = null; string name = ""; string path = ""; if (item.File != null) @@ -1635,7 +1730,7 @@ namespace CodeWalker path = item.FullPath; } - if (data == null) return; + if (data is null) return; var ft = item.FileType; var fe = item.File; @@ -1771,6 +1866,7 @@ namespace CodeWalker } catch (Exception ex) { + Console.WriteLine(ex); ErrorLog?.Invoke(ex.ToString()); return; } @@ -2174,13 +2270,18 @@ namespace CodeWalker public string SelectFolder() { + if (InvokeRequired) + { + return Invoke(SelectFolder); + } var selpath = Settings.Default.RPFExplorerSelectedFolder; if (!string.IsNullOrEmpty(selpath)) { FolderBrowserDialog.SelectedPath = selpath; } - if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) return ""; + if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) + return ""; string folderpath = FolderBrowserDialog.SelectedPath; if (!folderpath.EndsWith("\\")) folderpath += "\\"; @@ -2210,7 +2311,8 @@ namespace CodeWalker for (int i = 0; i < MainListView.SelectedIndices.Count; i++) { var idx = MainListView.SelectedIndices[i]; - if ((idx < 0) || (idx >= CurrentFiles.Count)) continue; + if ((idx < 0) || (idx >= CurrentFiles.Count)) + continue; var file = CurrentFiles[idx]; if (file.Folder == null) { @@ -2239,10 +2341,12 @@ namespace CodeWalker void collectDrawable(DrawableBase d) { - if (d?.AllModels == null) return; + if (d?.AllModels == null || d.AllModels.Length == 0) + return; foreach (var model in d.AllModels) { - if (model?.Geometries == null) continue; + if (model?.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { var s = geom?.Shader; @@ -2262,22 +2366,26 @@ namespace CodeWalker void collectTextures(DrawableBase d) { collectTexturesFromDict(d?.ShaderGroup?.TextureDictionary, (d.Owner as GameFile)?.Name ?? ""); - if (d?.AllModels == null) return; + if (d?.AllModels is null || d.AllModels.Length == 0) + return; foreach (var model in d.AllModels) { - if (model?.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { - var s = geom?.Shader; - if (s == null) continue; + var s = geom.Shader; + if (s is null) + continue; addTextureuse(s, geom, d); } } } - void collectTexturesFromDict(TextureDictionary textureDictionary, string ownerName) + void collectTexturesFromDict(TextureDictionary? textureDictionary, string ownerName) { - if (textureDictionary == null) return; + if (textureDictionary == null) + return; foreach(var texture in textureDictionary.Dict) { if (!textures.TryGetValue(texture.Value.Name, out var tex)) @@ -2379,8 +2487,9 @@ namespace CodeWalker UpdateStatus?.Invoke(entry.Path); YdrFile ydr = RpfFile.GetFile(entry, fileData); - if (ydr == null) { continue; } - if (ydr.Drawable == null) { continue; } + if (ydr?.Drawable is null) + continue; + collectDrawable(ydr.Drawable); collectTextures(ydr.Drawable); } @@ -2389,8 +2498,8 @@ namespace CodeWalker UpdateStatus?.Invoke(entry.Path); YddFile ydd = RpfFile.GetFile(entry, fileData); - if (ydd == null) { continue; } - if (ydd.Dict == null) { continue; } + if (ydd?.Dict is null) + continue; foreach (var drawable in ydd.Dict.Values) { collectDrawable(drawable); @@ -2402,9 +2511,10 @@ namespace CodeWalker UpdateStatus?.Invoke(entry.Path); YftFile yft = RpfFile.GetFile(entry, fileData); - if (yft == null) { continue; } - if (yft.Fragment == null) { continue; } - if (yft.Fragment.Drawable != null) + if (yft?.Fragment is null) + continue; + + if (yft.Fragment?.Drawable is not null) { collectDrawable(yft.Fragment.Drawable); collectTextures(yft.Fragment.Drawable); @@ -2531,8 +2641,13 @@ namespace CodeWalker File.WriteAllText(Path.Combine(CurrentFolder.FullPath, "shaders.xml"), xml); } - private void ExportXml() + private async ValueTask ExportXmlAsync() { + if (!InvokeRequired) + { + await Task.Run(ExportXmlAsync); + return; + } bool needfolder = false;//need a folder to output ytd XML to, for the texture .dds files if (MainListView.SelectedIndices.Count == 1) { @@ -2542,7 +2657,8 @@ namespace CodeWalker var nl = file?.File?.Name ?? file?.Name; if (!string.IsNullOrEmpty(nl)) { - needfolder = nl.EndsWith(".ytd", StringComparison.OrdinalIgnoreCase) + needfolder = + nl.EndsWith(".ytd", StringComparison.OrdinalIgnoreCase) || nl.EndsWith(".ydr", StringComparison.OrdinalIgnoreCase) || nl.EndsWith(".ydd", StringComparison.OrdinalIgnoreCase) || nl.EndsWith(".yft", StringComparison.OrdinalIgnoreCase) @@ -2557,15 +2673,21 @@ namespace CodeWalker if ((MainListView.SelectedIndices.Count == 1) && (!needfolder)) { var idx = MainListView.SelectedIndices[0]; - if ((idx < 0) || (idx >= CurrentFiles.Count)) return; + if ((idx < 0) || (idx >= CurrentFiles.Count)) + { + Console.WriteLine("SelectedIndex not found!"); + return; + } + var file = CurrentFiles[idx]; if (file.Folder == null) { if (CanExportXml(file)) { - byte[] data = GetFileData(file); + byte[] data = await GetFileDataAsync(file); if (data == null) { + Console.WriteLine($"Unable to extract file: {file.Path}"); MessageBox.Show("Unable to extract file: " + file.Path); return; } @@ -2582,7 +2704,8 @@ namespace CodeWalker string xml = MetaXml.GetXml(fentry, data, out newfn); if (string.IsNullOrEmpty(xml)) { - MessageBox.Show("Unable to convert file to XML: " + file.Path); + Console.WriteLine($"Unable to convert file to XML: {file.Path}"); + MessageBox.Show($"Unable to convert file to XML: {file.Path}"); return; } @@ -2592,13 +2715,12 @@ namespace CodeWalker string path = SaveFileDialog.FileName; try { - File.WriteAllText(path, xml); + await File.WriteAllTextAsync(path, xml); if (CurrentFolder.FullPath.Equals(Path.GetDirectoryName(path), StringComparison.OrdinalIgnoreCase)) { CurrentFolder.EnsureFile(path); refreshNeeded = true; } - } catch (Exception ex) { @@ -2611,7 +2733,8 @@ namespace CodeWalker else { var folderpath = SelectFolder(); - if (string.IsNullOrEmpty(folderpath)) return; + if (string.IsNullOrEmpty(folderpath)) + return; StringBuilder errors = new StringBuilder(); @@ -2631,7 +2754,7 @@ namespace CodeWalker continue; } - string newfn; + string newfn = string.Empty; var fentry = file?.File; if (fentry == null) { @@ -2640,26 +2763,34 @@ namespace CodeWalker fentry = RpfFile.CreateFileEntry(name, file.FullPath, ref data); } - string xml = MetaXml.GetXml(fentry, data, out newfn, folderpath); - if (string.IsNullOrEmpty(xml)) - { - errors.AppendLine("Unable to convert file to XML: " + file.Path); - continue; - } - - var path = folderpath + newfn; try { - File.WriteAllText(path, xml); - if (CurrentFolder?.FullPath?.Equals(Path.GetDirectoryName(path), StringComparison.OrdinalIgnoreCase) ?? false) + string xml = await Task.Run(() => MetaXml.GetXml(fentry, data, out newfn, folderpath)); + if (string.IsNullOrEmpty(xml)) { - CurrentFolder.EnsureFile(path); - refreshNeeded = true; + errors.AppendLine($"Unable to convert file to XML: {file?.Path}"); + continue; + } + + var path = folderpath + newfn; + try + { + File.WriteAllText(path, xml); + if (CurrentFolder?.FullPath?.Equals(Path.GetDirectoryName(path), StringComparison.OrdinalIgnoreCase) ?? false) + { + CurrentFolder.EnsureFile(path); + refreshNeeded = true; + } + } + catch (Exception ex) + { + errors.AppendLine("Error saving file " + path + ":\n" + ex.ToString()); } } - catch (Exception ex) + catch(Exception ex) { - errors.AppendLine("Error saving file " + path + ":\n" + ex.ToString()); + errors.AppendLine($"Unable to convert file to XML: {file?.Path}\n{ex}"); + Console.WriteLine(ex); } } } @@ -2669,6 +2800,10 @@ namespace CodeWalker { MessageBox.Show("Errors were encountered:\n" + errstr); } + else + { + UpdateStatus?.Invoke("Exporting file done"); + } } if (refreshNeeded) { @@ -2912,7 +3047,7 @@ namespace CodeWalker //create a folder in the filesystem. if (Directory.Exists(fullpath)) { - throw new Exception("Folder " + fullpath + " already exists!"); + throw new Exception($"Folder {fullpath} already exists!"); } Directory.CreateDirectory(fullpath); @@ -2931,7 +3066,8 @@ namespace CodeWalker } catch (Exception ex) { - MessageBox.Show("Error creating new folder: " + ex.Message, "Unable to create new folder"); + MessageBox.Show($"Error creating new folder: {ex.Message}", "Unable to create new folder"); + Console.WriteLine(ex); return; } @@ -3196,7 +3332,7 @@ namespace CodeWalker byte[] data = XmlMeta.GetData(doc, mformat, fpathin); - if (data != null) + if (data != null && data.Length > 0) { if (CurrentFolder.RpfFolder != null) { @@ -3698,10 +3834,11 @@ namespace CodeWalker { try { - Process.Start("explorer", "/select, \"" + path + "\""); + Process.Start("explorer", $"/select, \"{path}\""); } catch (Exception ex) { + Console.WriteLine(ex); ErrorLog?.Invoke(ex.ToString()); } } @@ -3817,8 +3954,7 @@ namespace CodeWalker foreach (var item in ViewMenu.DropDownItems) { - var menu = item as ToolStripMenuItem; - if (menu != null) + if (item is ToolStripMenuItem menu) { menu.Checked = false; } @@ -3957,7 +4093,7 @@ namespace CodeWalker private void MainListView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) { var lvi = new ListViewItem(); - if ((CurrentFiles != null) && (e.ItemIndex < CurrentFiles.Count)) + if (CurrentFiles is not null && e.ItemIndex < CurrentFiles.Count) { var file = CurrentFiles[e.ItemIndex]; var fld = file.Folder; @@ -4005,7 +4141,7 @@ namespace CodeWalker UpdateSelectionUI(); //need to use this instead of SelectedIndexChanged because of shift-click bug :/ } - private void MainListView_KeyDown(object sender, KeyEventArgs e) + private async void MainListView_KeyDown(object sender, KeyEventArgs e) { var ctrl = (e.Control && !e.Shift); var ctrlshft = (e.Control && e.Shift); @@ -4020,7 +4156,10 @@ namespace CodeWalker if (ctrl) ViewSelectedHex(); break; case Keys.S: - if (ctrl) ExportXml(); + if (ctrl) + { + await ExportXmlAsync(); + } break; case Keys.E: if (ctrlshft) ExtractAll(); @@ -4082,7 +4221,7 @@ namespace CodeWalker private void MainListView_AfterLabelEdit(object sender, LabelEditEventArgs e) { - if ((CurrentFiles != null) && (CurrentFiles.Count > e.Item) && (!string.IsNullOrEmpty(e.Label))) + if (CurrentFiles is not null && CurrentFiles.Count > e.Item && !string.IsNullOrEmpty(e.Label)) { RenameItem(CurrentFiles[e.Item], e.Label); } @@ -4159,7 +4298,7 @@ namespace CodeWalker } } } - filenames.Add(dir + "\\" + file.Name); + filenames.Add($"{dir}\\{file.Name}"); } } @@ -4186,8 +4325,7 @@ namespace CodeWalker if (CurrentFolder?.IsSearchResults ?? false) return; if (e.Data.GetDataPresent(DataFormats.FileDrop)) { - var files = e.Data.GetData(DataFormats.FileDrop) as string[]; - if ((files != null) && (files.Length > 0)) + if ((e.Data.GetData(DataFormats.FileDrop) is string[] files) && (files.Length > 0)) { if (!files[0].StartsWith(GetDropFolder(), StringComparison.InvariantCultureIgnoreCase)) //don't dry to drop on ourselves... { @@ -4203,8 +4341,7 @@ namespace CodeWalker if (CurrentFolder?.IsSearchResults ?? false) return; if (e.Data.GetDataPresent(DataFormats.FileDrop)) { - var files = e.Data.GetData(DataFormats.FileDrop) as string[]; - if ((files == null) || (files.Length <= 0)) return; + if ((e.Data.GetData(DataFormats.FileDrop) is not string[] files) || (files.Length <= 0)) return; if (files[0].StartsWith(GetDropFolder(), StringComparison.InvariantCultureIgnoreCase)) return; //don't dry to drop on ourselves... //Import as raw regardless of file type while pressing shift @@ -4229,8 +4366,7 @@ namespace CodeWalker private void BackListButton_Click(object sender, EventArgs e) { - var step = (sender as ToolStripItem)?.Tag as MainTreeFolder; - if (step == null) return; + if ((sender as ToolStripItem)?.Tag is not MainTreeFolder step) return; GoBack(step); } @@ -4241,8 +4377,7 @@ namespace CodeWalker private void ForwardListButton_Click(object sender, EventArgs e) { - var step = (sender as ToolStripItem)?.Tag as MainTreeFolder; - if (step == null) return; + if ((sender as ToolStripItem)?.Tag is not MainTreeFolder step) return; GoForward(step); } @@ -4253,8 +4388,7 @@ namespace CodeWalker private void UpListButton_Click(object sender, EventArgs e) { - var step = (sender as ToolStripItem)?.Tag as MainTreeFolder; - if (step == null) return; + if ((sender as ToolStripItem)?.Tag is not MainTreeFolder step) return; GoUp(step); } @@ -4269,7 +4403,7 @@ namespace CodeWalker private void LocationTextBox_Enter(object sender, EventArgs e) { - BeginInvoke(new Action(() => LocationTextBox.SelectAll())); + BeginInvoke(LocationTextBox.SelectAll); } private void GoButton_Click(object sender, EventArgs e) @@ -4282,7 +4416,7 @@ namespace CodeWalker if (!Ready) return; Task.Run(async () => { - await RefreshMainTreeView(); + await RefreshMainTreeView().ConfigureAwait(false); UpdateStatus?.Invoke("Scan complete."); }, CancellationTokenSource.Token); @@ -4304,7 +4438,7 @@ namespace CodeWalker private void SearchTextBox_Enter(object sender, EventArgs e) { - BeginInvoke(new Action(() => SearchTextBox.SelectAll())); + BeginInvoke(SearchTextBox.SelectAll); } private void SearchButton_ButtonClick(object sender, EventArgs e) @@ -4331,8 +4465,7 @@ namespace CodeWalker private void TreeContextCopyPathMenu_Click(object sender, EventArgs e) { - var f = MainTreeView.SelectedNode?.Tag as MainTreeFolder; - if (f != null) + if (MainTreeView.SelectedNode?.Tag is MainTreeFolder f) { CopyPath(f.FullPath); } @@ -4399,9 +4532,9 @@ namespace CodeWalker GetShadersXml(); } - private void ListContextExportXmlMenu_Click(object sender, EventArgs e) + private async void ListContextExportXmlMenu_Click(object sender, EventArgs e) { - ExportXml(); + await ExportXmlAsync(); } private void ListContextExtractRawMenu_Click(object sender, EventArgs e) @@ -4514,9 +4647,9 @@ namespace CodeWalker ViewSelectedHex(); } - private void EditExportXmlMenu_Click(object sender, EventArgs e) + private async void EditExportXmlMenu_Click(object sender, EventArgs e) { - ExportXml(); + await ExportXmlAsync(); } private void EditExtractRawMenu_Click(object sender, EventArgs e) @@ -4676,32 +4809,19 @@ namespace CodeWalker - public class MainTreeFolder + public class MainTreeFolder : IDisposable, IResettable { public required string Name { get; set; } - - private string? _nameLower; - public string NameLower - { - get - { - return _nameLower ??= Name.ToLowerInvariant(); - } - set - { - _nameLower = value; - } - } public required string Path { get; set; } public string? FullPath { get; set; } public RpfFile? RpfFile { get; set; } public RpfDirectoryEntry? RpfFolder { get; set; } - public HashSet? Files { get; set; } + public PooledList? Files { get; set; } private object filesLock = new object(); public MainTreeFolder? Parent { get; set; } - public List? Children { get; set; } + public PooledList? Children { get; set; } private readonly object childrenLock = new object(); - public List? ListItems { get; set; } + public PooledList? ListItems { get; set; } public TreeNode? TreeNode { get; set; } public bool IsSearchResults { get; set; } = false; public string? SearchTerm { get; set; } @@ -4711,116 +4831,137 @@ namespace CodeWalker { lock (filesLock) { - if (Files == null) - { - Files = new(); - } + Files ??= new(); Files.Add(file); + if (ListItems is not null) + populateListItems(); } } public void AddChild(MainTreeFolder child) { lock(childrenLock) { - if (Children == null) Children = new List(); + Children ??= new PooledList(); Children.Add(child); child.Parent = this; + if (ListItems is not null) + populateListItems(); } } public void RemoveChild(MainTreeFolder child) { - if (Children == null) return; + if (Children is null) return; lock(childrenLock) { Children.Remove(child); child.Parent = null; + if (ListItems is not null) + populateListItems(); + } + } + + public void EnsureFile(string file) + { + if (Files is not null) + { + if (Files.Contains(file)) + return; + } + AddFile(file); + } + public void RemoveFile(string file) + { + if (Files is null) + return; + + lock (filesLock) + { + Files.Remove(file); + if (ListItems is not null) + populateListItems(); } } public void AddChildToHierarchy(MainTreeFolder child) { - var relpath = child.Path.Replace(Path + '\\', ""); + var relpath = child.Path.AsSpan(Path.Length + 1); var idx = relpath.IndexOf('\\'); var lidx = 0; var parent = this; while (idx > 0) { - var pname = relpath.Substring(lidx, idx - lidx); - if (parent.Children == null) break; + var pname = relpath[lidx..idx]; + if (parent.Children == null) + break; foreach (var tc in parent.Children) { - if (tc.Name.Equals(pname, StringComparison.OrdinalIgnoreCase)) + if (pname.Equals(tc.Name, StringComparison.OrdinalIgnoreCase)) { parent = tc; break; } } lidx = idx + 1; - if (lidx >= relpath.Length) break; - idx = relpath.IndexOf('\\', lidx); + if (lidx >= relpath.Length) + break; + idx = relpath.Slice(lidx).IndexOf('\\'); + if (idx > -1) + { + idx += lidx; + } } parent.AddChild(child); } - public void EnsureFile(string file) + [MemberNotNull(nameof(ListItems))] + private void populateListItems() { - if (Files != null) + ListItems ??= new PooledList(); + ListItems.Clear(); + var rootpath = GTAFolder.GetCurrentGTAFolderWithTrailingSlash(); + + if (Children is not null) { - if (Files.Contains(file)) return; + foreach (var child in Children.Span) + { + ListItems.Add(new MainListItem(child)); + } } - AddFile(file); - } - public void RemoveFile(string file) - { - lock(filesLock) + if (Files is not null) { - Files?.Remove(file); + foreach (var file in Files.Span) + { + ListItems.Add(new MainListItem(file, rootpath, this)); + } + } + if (RpfFolder?.Files is not null) + { + foreach (var file in RpfFolder.Files.Span) + { + if (file.IsExtension(".rpf")) + continue; //RPF files are already added.. + + ListItems.Add(new MainListItem(file, rootpath, this)); + } } } - public List GetListItems() + public PooledList GetListItems() { - if (ListItems == null) + if (ListItems is null) { - ListItems = new List(); - var rootpath = GTAFolder.GetCurrentGTAFolderWithTrailingSlash(); - - if (Children != null) - { - foreach (var child in Children) - { - ListItems.Add(new MainListItem(child)); - } - } - if (Files != null) - { - lock(filesLock) - { - foreach (var file in Files) - { - ListItems.Add(new MainListItem(file, rootpath, this)); - } - } - } - if ((RpfFolder != null) && (RpfFolder.Files != null)) - { - foreach (var file in RpfFolder.Files) - { - if (file.IsExtension(".rpf")) - continue; //RPF files are already added.. - ListItems.Add(new MainListItem(file, rootpath, this)); - } - } + populateListItems(); } return ListItems; } public int GetItemCount() { int ic = 0; - if (Children != null) ic += Children.Count; - if (Files != null) ic += Files.Count; - if ((RpfFolder != null) && (RpfFolder.Files != null)) + if (Children is not null) + ic += Children.Count; + if (Files is not null) ic += Files.Count; + if (RpfFolder?.Files is not null) { foreach (var file in RpfFolder.Files) { @@ -4834,16 +4975,33 @@ namespace CodeWalker public string GetToolText() { - if (string.IsNullOrEmpty(Path)) return Name; + if (string.IsNullOrEmpty(Path)) + return Name; + return Path; } + public ReadOnlySpan GetFileName(ReadOnlySpan path) + { + if (path.IsEmpty) + return path; + + int i = path.LastIndexOfAny(System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar); + + if (i == -1) + { + return path; + } + + return path.Slice(i + 1); + } + public int Search(string term, ExploreForm form) { int resultcount = 0; //if (!form.Searching) return resultcount; - form.InvokeUpdateStatus("Searching " + Path + "..."); + form.InvokeUpdateStatus($"Searching {Path}..."); if (Name.Contains(term, StringComparison.OrdinalIgnoreCase)) { @@ -4853,20 +5011,20 @@ namespace CodeWalker var rootpath = GTAFolder.GetCurrentGTAFolderWithTrailingSlash(); - if (Files != null) + if (Files is not null) { foreach (var file in Files) { //if (!form.Searching) return resultcount; - var fi = new FileInfo(file); - if (fi.Name.Contains(term, StringComparison.OrdinalIgnoreCase)) + //var fi = new FileInfo(file); + if (GetFileName(file).Contains(term, StringComparison.OrdinalIgnoreCase)) { form.AddSearchResult(new MainListItem(file, rootpath, this)); resultcount++; } } } - if ((RpfFolder != null) && (RpfFolder.Files != null)) + if (RpfFolder?.Files is not null) { foreach (var file in RpfFolder.Files) { @@ -4881,7 +5039,7 @@ namespace CodeWalker } } - if (Children != null) + if (Children is not null) { foreach (var child in Children) { @@ -4892,7 +5050,7 @@ namespace CodeWalker if (this == form.RootFolder) { - var texDict = form.GetFileCache().TryGetTextureDictForTexture(JenkHash.GenHashLower(term)) ?? form.GetFileCache().TryGetTextureDictForTexture(JenkHash.GenHash(term)); + var texDict = GameFileCacheFactory.Instance.TryGetTextureDictForTexture(JenkHash.GenHashLower(term)) ?? GameFileCacheFactory.Instance.TryGetTextureDictForTexture(JenkHash.GenHash(term)); if (texDict != null) { form.AddSearchResult(new MainListItem(texDict.RpfFileEntry, rootpath, this)); @@ -4909,24 +5067,52 @@ namespace CodeWalker { RpfFile = null; RpfFolder = null; + Files?.Dispose(); Files = null; Parent = null; + if (Children is not null) + { + foreach(var child in Children.Span) + { + child.Dispose(); + } + } + Children?.Dispose(); Children = null; + ListItems?.Dispose(); ListItems = null; TreeNode = null; } + public void Dispose() + { + Clear(); + GC.SuppressFinalize(this); + } + public override string ToString() { return Name; } + + public bool TryReset() + { + Clear(); + Name = string.Empty; + Path = string.Empty; + FullPath = null; + IsSearchResults = false; + SearchTerm = null; + IsExtraFolder = false; + return true; + } } public class MainListItem { private string path; private string attributes; - private long fileSize = -1l; + private long fileSize = -1L; private string fileSizeText; private string fileTypeText; @@ -4937,7 +5123,7 @@ namespace CodeWalker public string Path { get => path; set => path = value; } public string FullPath { get; set; } - public FileTypeInfo FileType { get => ExploreForm.GetFileType(Name); } + public FileTypeInfo FileType => ExploreForm.GetFileType(Name); public string FileTypeText { get { @@ -4982,7 +5168,7 @@ namespace CodeWalker { if (File is RpfResourceFileEntry resf) { - attributes += "Resource [V." + resf.Version.ToString() + "]"; + attributes += $"Resource [V.{resf.Version}]"; } if (File.IsEncrypted) { @@ -4997,7 +5183,7 @@ namespace CodeWalker { if (fld.RpfFile != null) { - attributes += fld.RpfFile.Encryption.ToString() + " encryption"; + attributes += $"{fld.RpfFile.Encryption} encryption"; } } } @@ -5037,6 +5223,7 @@ namespace CodeWalker return Name; } + [MemberNotNull(nameof(fileSizeText), nameof(fileTypeText))] public void CacheDetails() { var fld = Folder; @@ -5061,7 +5248,7 @@ namespace CodeWalker ImageIndex = 1; //FOLDER imageIndex var ic = fld.GetItemCount(); fileSize = ic; - fileSizeText = ic.ToString() + " item" + ((ic != 1) ? "s" : ""); + fileSizeText = $"{ic} item{((ic != 1) ? "s" : "")}"; } } else @@ -5073,8 +5260,8 @@ namespace CodeWalker fileSizeText = TextUtil.GetBytesReadable(fi.Length); } } - fileSizeText ??= ""; - fileTypeText ??= ""; + fileSizeText ??= string.Empty; + fileTypeText ??= string.Empty; } public int SortCompare(MainListItem i, int col, SortOrder dir) diff --git a/CodeWalker/Forms/HexForm.cs b/CodeWalker/Forms/HexForm.cs index 6184043..390d7ba 100644 --- a/CodeWalker/Forms/HexForm.cs +++ b/CodeWalker/Forms/HexForm.cs @@ -98,16 +98,16 @@ namespace CodeWalker.Forms int poslim = pos + charsperln; hexb.Clear(); texb.Clear(); - hexb.AppendFormat("{0:X4}: ", pos); + hexb.Append($"{pos:X4}: "); for (int c = pos; c < poslim; c++) { if (c < data.Length) { byte b = data[c]; - hexb.AppendFormat("{0:X2} ", b); + hexb.Append($"{b:X2} "); if (char.IsControl((char)b)) { - texb.Append("."); + texb.Append('.'); } else { @@ -117,12 +117,12 @@ namespace CodeWalker.Forms else { hexb.Append(" "); - texb.Append(" "); + texb.Append(' '); } } //if (i == selline) selstartc = finb.Length; - finb.AppendLine(hexb.ToString() + "| " + texb.ToString()); + finb.AppendLine($"{hexb}| {texb}"); //if (i == selline) selendc = finb.Length - 1; } diff --git a/CodeWalker/Forms/MetaForm.cs b/CodeWalker/Forms/MetaForm.cs index d793ff1..760366b 100644 --- a/CodeWalker/Forms/MetaForm.cs +++ b/CodeWalker/Forms/MetaForm.cs @@ -21,7 +21,7 @@ namespace CodeWalker.Forms private string xml; public string Xml { - get { return xml; } + get => xml; set { xml = value; @@ -32,7 +32,7 @@ namespace CodeWalker.Forms private string fileName; public string FileName { - get { return fileName; } + get => fileName; set { fileName = value; @@ -45,7 +45,7 @@ namespace CodeWalker.Forms private bool LoadingXml = false; private bool DelayHighlight = false; - public RpfFileEntry rpfFileEntry { get; private set; } = null; + public RpfFileEntry? rpfFileEntry { get; private set; } = null; private MetaFormat metaFormat = MetaFormat.XML; @@ -63,44 +63,52 @@ namespace CodeWalker.Forms private void UpdateTextBoxFromData() { - LoadingXml = true; - XmlTextBox.Text = ""; - XmlTextBox.Language = Language.XML; - DelayHighlight = false; - - if (string.IsNullOrEmpty(xml)) + if (InvokeRequired) { - LoadingXml = false; + BeginInvoke(UpdateTextBoxFromData); return; } - //if (xml.Length > (1048576 * 5)) - //{ - // XmlTextBox.Language = Language.Custom; - // XmlTextBox.Text = "[XML size > 10MB - Not shown due to performance limitations - Please use an external viewer for this file.]"; - // return; - //} - //else - if (xml.Length > (1024 * 512)) - { - XmlTextBox.Language = Language.Custom; - DelayHighlight = true; - } - //else - //{ - // XmlTextBox.Language = Language.XML; - //} - - + LoadingXml = true; Cursor = Cursors.WaitCursor; + try + { + XmlTextBox.BeginUpdate(); + XmlTextBox.Clear(); + XmlTextBox.Language = Language.XML; + DelayHighlight = false; + if (string.IsNullOrEmpty(xml)) + { + LoadingXml = false; + return; + } + //if (xml.Length > (1048576 * 5)) + //{ + // XmlTextBox.Language = Language.Custom; + // XmlTextBox.Text = "[XML size > 10MB - Not shown due to performance limitations - Please use an external viewer for this file.]"; + // return; + //} + //else + if (xml.Length > (1024 * 512)) + { + XmlTextBox.Language = Language.Custom; + DelayHighlight = true; + } + //else + //{ + // XmlTextBox.Language = Language.XML; + //} - - XmlTextBox.Text = xml; - //XmlTextBox.IsChanged = false; - XmlTextBox.ClearUndo(); - - Cursor = Cursors.Default; - LoadingXml = false; + XmlTextBox.Text = xml; + //XmlTextBox.IsChanged = false; + XmlTextBox.ClearUndo(); + } + finally + { + Cursor = Cursors.Default; + LoadingXml = false; + XmlTextBox.EndUpdate(); + } } @@ -130,24 +138,28 @@ namespace CodeWalker.Forms } private void NewDocument() { - if (!CloseDocument()) return; + if (!CloseDocument()) + return; FileName = "New.xml"; rpfFileEntry = null; //TODO: decide XML/RSC/PSO/RBF format..? } - private void OpenDocument() + private async ValueTask OpenDocument() { - if (OpenFileDialog.ShowDialog() != DialogResult.OK) return; + if (OpenFileDialog.ShowDialog() != DialogResult.OK) + return; - if (!CloseDocument()) return; + if (!CloseDocument()) + return; var fn = OpenFileDialog.FileName; - if (!File.Exists(fn)) return; //couldn't find file? + if (!File.Exists(fn)) + return; //couldn't find file? - Xml = File.ReadAllText(fn); + Xml = await File.ReadAllTextAsync(fn); modified = false; FilePath = fn; @@ -190,7 +202,8 @@ namespace CodeWalker.Forms if (!string.IsNullOrEmpty(fn)) { var dir = new FileInfo(fn).DirectoryName; - if (!Directory.Exists(dir)) dir = ""; + if (!Directory.Exists(dir)) + dir = ""; SaveFileDialog.InitialDirectory = dir; } SaveFileDialog.FileName = FileName; @@ -235,9 +248,12 @@ namespace CodeWalker.Forms metaFormat = MetaFormat.XML; if (ymf != null) { - if (ymf.Meta != null) metaFormat = MetaFormat.RSC; - if (ymf.Pso != null) metaFormat = MetaFormat.PSO; - if (ymf.Rbf != null) metaFormat = MetaFormat.RBF; + if (ymf.Meta != null) + metaFormat = MetaFormat.RSC; + if (ymf.Pso != null) + metaFormat = MetaFormat.PSO; + if (ymf.Rbf != null) + metaFormat = MetaFormat.RBF; } } public void LoadMeta(YmapFile ymap) @@ -251,9 +267,12 @@ namespace CodeWalker.Forms metaFormat = MetaFormat.XML; if (ymap != null) { - if (ymap.Meta != null) metaFormat = MetaFormat.RSC; - if (ymap.Pso != null) metaFormat = MetaFormat.PSO; - if (ymap.Rbf != null) metaFormat = MetaFormat.RBF; + if (ymap.Meta != null) + metaFormat = MetaFormat.RSC; + if (ymap.Pso != null) + metaFormat = MetaFormat.PSO; + if (ymap.Rbf != null) + metaFormat = MetaFormat.RBF; } } public void LoadMeta(YtypFile ytyp) @@ -267,9 +286,12 @@ namespace CodeWalker.Forms metaFormat = MetaFormat.XML; if (ytyp != null) { - if (ytyp.Meta != null) metaFormat = MetaFormat.RSC; - if (ytyp.Pso != null) metaFormat = MetaFormat.PSO; - if (ytyp.Rbf != null) metaFormat = MetaFormat.RBF; + if (ytyp.Meta != null) + metaFormat = MetaFormat.RSC; + if (ytyp.Pso != null) + metaFormat = MetaFormat.PSO; + if (ytyp.Rbf != null) + metaFormat = MetaFormat.RBF; } } public void LoadMeta(JPsoFile jpso) @@ -283,7 +305,8 @@ namespace CodeWalker.Forms metaFormat = MetaFormat.XML; if (jpso != null) { - if (jpso.Pso != null) metaFormat = MetaFormat.PSO; + if (jpso.Pso != null) + metaFormat = MetaFormat.PSO; } } public void LoadMeta(CutFile cut) @@ -297,7 +320,8 @@ namespace CodeWalker.Forms metaFormat = MetaFormat.XML; if (cut != null) { - if (cut.Pso != null) metaFormat = MetaFormat.PSO; + if (cut.Pso != null) + metaFormat = MetaFormat.PSO; } } public void LoadMeta(YndFile ynd) @@ -415,7 +439,7 @@ namespace CodeWalker.Forms public void LoadMeta(PackedFile gameFile) { - gameFile = gameFile ?? throw new ArgumentNullException(nameof(gameFile)); + ArgumentNullException.ThrowIfNull(gameFile, nameof(gameFile)); if (gameFile is YmfFile ymfFile) { @@ -484,33 +508,32 @@ namespace CodeWalker.Forms //otherwise, save the generated file to disk? //(currently just return false and revert to XML file save) - if (!(ExploreForm.Instance?.EditMode ?? false)) return false; + if (!(ExploreForm.Instance?.EditMode ?? false)) + return false; - if(metaFormat == MetaFormat.XML) return false;//what are we even doing here? + if(metaFormat == MetaFormat.XML) + return false;//what are we even doing here? - byte[] data = null; + byte[] data; -#if !DEBUG try -#endif { data = XmlMeta.GetData(doc, metaFormat, string.Empty); - if (data == null) + if (data.Length == 0) { MessageBox.Show("Schema not supported.", "Cannot import " + XmlMeta.GetXMLFormatName(metaFormat)); return false; } } -#if !DEBUG catch (Exception ex) { MessageBox.Show("Exception encountered!\r\n" + ex.ToString(), "Cannot convert XML"); + Console.WriteLine(ex); return false; } -#endif if (rpfFileEntry?.Parent != null) { @@ -524,11 +547,10 @@ namespace CodeWalker.Forms try { - if (!(ExploreForm.EnsureRpfValidEncryption(rpfFileEntry.File))) return false; + if (!ExploreForm.EnsureRpfValidEncryption(rpfFileEntry.File)) + return false; var newentry = RpfFile.CreateFile(rpfFileEntry.Parent, rpfFileEntry.Name, data); - if (newentry != rpfFileEntry) - { } rpfFileEntry = newentry; ExploreForm.RefreshMainListViewInvoke(); //update the file details in explorer... @@ -541,6 +563,7 @@ namespace CodeWalker.Forms } catch (Exception ex) { + Console.WriteLine(ex); MessageBox.Show("Error saving file to RPF! The RPF archive may be corrupted...\r\n" + ex.ToString(), "Really Bad Error"); } } @@ -560,6 +583,7 @@ namespace CodeWalker.Forms } catch (Exception ex) { + Console.WriteLine(ex); MessageBox.Show("Error saving file to filesystem!\r\n" + ex.ToString(), "File I/O Error"); } } @@ -616,9 +640,9 @@ namespace CodeWalker.Forms NewDocument(); } - private void OpenButton_ButtonClick(object sender, EventArgs e) + private async void OpenButton_ButtonClick(object sender, EventArgs e) { - OpenDocument(); + await OpenDocument(); } private void SaveButton_ButtonClick(object sender, EventArgs e) @@ -631,9 +655,9 @@ namespace CodeWalker.Forms NewDocument(); } - private void FileOpenMenu_Click(object sender, EventArgs e) + private async void FileOpenMenu_Click(object sender, EventArgs e) { - OpenDocument(); + await OpenDocument(); } private void FileSaveMenu_Click(object sender, EventArgs e) diff --git a/CodeWalker/Forms/ModelForm.cs b/CodeWalker/Forms/ModelForm.cs index afb136e..159fd97 100644 --- a/CodeWalker/Forms/ModelForm.cs +++ b/CodeWalker/Forms/ModelForm.cs @@ -17,6 +17,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using System.Windows.Markup; namespace CodeWalker.Forms { @@ -38,6 +39,7 @@ namespace CodeWalker.Forms Clouds clouds; public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); + public CancellationToken CancellationToken { get; } bool MouseLButtonDown = false; bool MouseRButtonDown = false; @@ -47,7 +49,8 @@ namespace CodeWalker.Forms System.Drawing.Point MouseLastPoint; bool MouseInvert = Settings.Default.MouseInvert; - int VerticesCount = 0; + uint VerticesCount = 0; + uint PolyCount = 0; @@ -131,7 +134,7 @@ namespace CodeWalker.Forms public ModelForm() { - if (this.DesignMode) return; + CancellationToken = CancellationTokenSource.Token; InitializeComponent(); if (ExploreForm.Instance == null) @@ -143,10 +146,10 @@ namespace CodeWalker.Forms gameFileCache.LoadArchetypes = false;//to speed things up a little gameFileCache.BuildExtendedJenkIndex = true;//to speed things up a little gameFileCache.DoFullStringIndex = false;//to get all global text from DLC... - Task.Run(() => { + Task.Run(async () => { try { - gameFileCache.Init(); + await gameFileCache.InitAsync(); if (DetailsPropertyGrid.SelectedObject is DrawableBase drawableBase) { UpdateDrawableUI(drawableBase); @@ -298,7 +301,7 @@ namespace CodeWalker.Forms camera.TargetRotation.X = 0.5f * (float)Math.PI; camera.CurrentRotation.X = 0.5f * (float)Math.PI; - Renderer.shaders.deferred = false; //no point using this here yet + Renderer.Shaders.deferred = false; //no point using this here yet LoadSettings(); @@ -310,12 +313,18 @@ namespace CodeWalker.Forms frametimer.Start(); } - public void CleanupScene() + public ValueTask CleanupScene() { + if (!CancellationTokenSource.IsCancellationRequested) + { + CancellationTokenSource.Cancel(); + } formopen = false; Renderer.DeviceDestroyed(); + return default; + //int count = 0; //while (running && (count < 5000)) //wait for the content thread to exit gracefully //{ @@ -347,42 +356,47 @@ namespace CodeWalker.Forms if (Pauserendering) return; - if (!Monitor.TryEnter(Renderer.RenderSyncRoot, 50)) + if (!await Renderer.RenderSyncRoot.WaitAsync(50)) { return; } //couldn't get a lock, try again next time - UpdateControlInputs(elapsed); + try + { + UpdateControlInputs(elapsed); - Renderer.Update(elapsed, MouseLastPoint.X, MouseLastPoint.Y); + Renderer.Update(elapsed, MouseLastPoint.X, MouseLastPoint.Y); - UpdateWidgets(); + UpdateWidgets(); - Renderer.BeginRender(context); + Renderer.BeginRender(context); - Renderer.RenderSkyAndClouds(); + Renderer.RenderSkyAndClouds(); - RenderSingleItem(); + RenderSingleItem(); - RenderGrid(context); + RenderGrid(context); - RenderLightSelection(); + RenderLightSelection(); - Renderer.RenderQueued(); + Renderer.RenderQueued(); - Renderer.RenderSelectionGeometry(MapSelectionMode.Entity); + Renderer.RenderSelectionGeometry(MapSelectionMode.Entity); - Renderer.RenderFinalPass(); + Renderer.RenderFinalPass(); - RenderWidgets(); + RenderWidgets(); - Renderer.EndRender(); - - Monitor.Exit(Renderer.RenderSyncRoot); + Renderer.EndRender(); + } + finally + { + Renderer.RenderSyncRoot.Release(); + } } public bool ConfirmQuit() { @@ -465,9 +479,9 @@ namespace CodeWalker.Forms bool rcItemsPending = Renderer.ContentThreadProc(); - if (!(rcItemsPending)) //gameFileCache.ItemsStillPending || + if (!rcItemsPending) //gameFileCache.ItemsStillPending || { - await Task.Delay(ActiveForm == null ? 50 : 1).ConfigureAwait(false); + await Task.Delay(ActiveForm == null ? 50 : 5).ConfigureAwait(false); } } @@ -484,7 +498,7 @@ namespace CodeWalker.Forms { if (InvokeRequired) { - BeginInvoke(new Action(() => { InitAnimation(); })); + BeginInvoke(InitAnimation); } else { @@ -496,7 +510,7 @@ namespace CodeWalker.Forms List ycdlist = new List(); foreach (var ycde in ycds) { - ycdlist.Add(ycde.ShortName); + ycdlist.Add(ycde.ShortName.ToString()); } ClipDictComboBox.AutoCompleteCustomSource.AddRange(ycdlist.ToArray()); ClipDictComboBox.Text = ""; @@ -663,7 +677,7 @@ namespace CodeWalker.Forms } public void SetWidgetMode(WidgetMode mode) { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Widget.Mode = mode; } @@ -915,17 +929,19 @@ namespace CodeWalker.Forms FileName = yft.Name; Yft = yft; rpfFileEntry = Yft.RpfFileEntry; - ModelHash = Yft.RpfFileEntry?.ShortNameHash ?? 0; - var name = Yft.RpfFileEntry?.ShortName; - if (name?.EndsWith("_hi", StringComparison.OrdinalIgnoreCase) ?? false) + if (rpfFileEntry is not null) { - ModelHash = JenkHash.GenHashLower(name.AsSpan(0, name.Length - 3)); + ModelHash = Yft.RpfFileEntry.ShortNameHash; + var name = Yft.RpfFileEntry.ShortName; + if (name.EndsWith("_hi", StringComparison.OrdinalIgnoreCase)) + { + ModelHash = JenkHash.GenHashLower(name.Slice(0, name.Length - 3)); + } + if (ModelHash != 0) + { + ModelArchetype = TryGetArchetype(ModelHash); + } } - if (ModelHash != 0) - { - ModelArchetype = TryGetArchetype(ModelHash); - } - var dr = yft.Fragment?.Drawable; if (dr != null) @@ -1034,14 +1050,16 @@ namespace CodeWalker.Forms { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void LogError(string text) @@ -1050,14 +1068,16 @@ namespace CodeWalker.Forms { if (InvokeRequired) { - Invoke(new Action(() => { LogError(text); })); + Invoke(LogError, text); } else { ConsoleTextBox.AppendText(text + "\r\n"); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -1237,8 +1257,7 @@ namespace CodeWalker.Forms AddDrawableModelsTreeNodes(drawable.DrawableModels?.VLow, "Very Low Detail", false); //AddDrawableModelsTreeNodes(drawable.DrawableModels?.Extra, "X Detail", false); - var fdrawable = drawable as FragDrawable; - if (fdrawable != null) + if (drawable is FragDrawable fdrawable) { var plod1 = fdrawable.OwnerFragment?.PhysicsLODGroup?.PhysicsLOD1; if ((plod1 != null) && (plod1.Children?.data_items != null)) @@ -1367,6 +1386,7 @@ namespace CodeWalker.Forms dnode.Checked = check; VerticesCount = 0; + PolyCount = 0; AddDrawableModelsTreeNodes(drawable.DrawableModels?.High, "High Detail", true, dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Med, "Medium Detail", false, dnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Low, "Low Detail", false, dnode); @@ -1376,7 +1396,8 @@ namespace CodeWalker.Forms } private void AddDrawableModelsTreeNodes(DrawableModel[] models, string prefix, bool check, TreeNode parentDrawableNode = null) { - if (models == null) return; + if (models is null) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -1396,12 +1417,14 @@ namespace CodeWalker.Forms Renderer.SelectionModelDrawFlags[model] = false; } - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { var gname = geom.ToString(); VerticesCount += geom.VerticesCount; + PolyCount += geom.IndicesCount / 3; var gnode = mnode.Nodes.Add(gname); gnode.Tag = geom; gnode.Checked = true;// check; @@ -1418,12 +1441,10 @@ namespace CodeWalker.Forms { var hash = pl.Hashes[ip]; var parm = pl.Parameters[ip]; - var tex = parm.Data as TextureBase; - if (tex != null) + if (parm.Data is TextureBase tex) { - var t = tex as Texture; var tstr = tex.Name.Trim(); - if (t != null) + if (tex is Texture t) { tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height); } @@ -1442,49 +1463,36 @@ namespace CodeWalker.Forms } private void UpdateSelectionDrawFlags(TreeNode node) { - //update the selection draw flags depending on tag and checked/unchecked - var drwbl = node.Tag as DrawableBase; - var model = node.Tag as DrawableModel; - var geom = node.Tag as DrawableGeometry; bool rem = node.Checked; - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { - if (drwbl != null) + if (node.Tag is DrawableBase drwbl) { if (rem) { - if (DrawableDrawFlags.ContainsKey(drwbl)) - { - DrawableDrawFlags.Remove(drwbl); - } + DrawableDrawFlags.Remove(drwbl); } else { DrawableDrawFlags[drwbl] = false; } } - if (model != null) + if (node.Tag is DrawableModel model) { if (rem) { - if (Renderer.SelectionModelDrawFlags.ContainsKey(model)) - { - Renderer.SelectionModelDrawFlags.Remove(model); - } + Renderer.SelectionModelDrawFlags.Remove(model); } else { Renderer.SelectionModelDrawFlags[model] = false; } } - if (geom != null) + if (node.Tag is DrawableGeometry geom) { if (rem) { - if (Renderer.SelectionGeometryDrawFlags.ContainsKey(geom)) - { - Renderer.SelectionGeometryDrawFlags.Remove(geom); - } + Renderer.SelectionGeometryDrawFlags.Remove(geom); } else { @@ -1530,7 +1538,8 @@ namespace CodeWalker.Forms foreach (var model in dwbl.AllModels) { - if (model?.Geometries == null) continue; + if (model?.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { geom.UpdateRenderableParameters = true; @@ -1772,19 +1781,23 @@ namespace CodeWalker.Forms - private void Save(bool saveAs = false) + private async ValueTask SaveAsync(bool saveAs = false) { var editMode = ExploreForm.Instance?.EditMode ?? false; if (string.IsNullOrEmpty(FilePath)) { - if (!editMode) saveAs = true; - if (rpfFileEntry == null) saveAs = true; + if (!editMode) + saveAs = true; + if (this.rpfFileEntry == null) + saveAs = true; } else { - if (FilePath.StartsWith(GTAFolder.CurrentGTAFolder, StringComparison.OrdinalIgnoreCase)) saveAs = true; - if (!File.Exists(FilePath)) saveAs = true; + if (FilePath.StartsWith(GTAFolder.CurrentGTAFolder, StringComparison.OrdinalIgnoreCase)) + saveAs = true; + if (!File.Exists(FilePath)) + saveAs = true; } var fn = FilePath; @@ -1793,7 +1806,8 @@ namespace CodeWalker.Forms if (!string.IsNullOrEmpty(fn)) { var dir = new FileInfo(fn).DirectoryName; - if (!Directory.Exists(dir)) dir = ""; + if (!Directory.Exists(dir)) + dir = ""; SaveFileDialog.InitialDirectory = dir; } SaveFileDialog.FileName = FileName; @@ -1803,53 +1817,90 @@ namespace CodeWalker.Forms { fileExt = fileExt.Substring(1); } - SaveFileDialog.Filter = fileExt.ToUpperInvariant() + " files|*." + fileExt + "|All files|*.*"; + SaveFileDialog.Filter = $"{fileExt.ToUpperInvariant()} files|*.{fileExt}|Export XML|*.{fileExt}.xml|All files|*.*"; - if (SaveFileDialog.ShowDialog() != DialogResult.OK) return; + if (SaveFileDialog.ShowDialog() != DialogResult.OK) + return; fn = SaveFileDialog.FileName; FilePath = fn; } - byte[] fileBytes = null; + byte[]? fileBytes = null; + RpfFileEntry? rpfFileEntry = null; + + var exportXml = fn.EndsWith(".xml"); + string xml = string.Empty; -#if !DEBUG try { -#endif - if (Ydr != null) - { - fileBytes = Ydr.Save(); - } - else if (Ydd != null) - { - fileBytes = Ydd.Save(); - } - else if (Yft != null) - { - fileBytes = Yft.Save(); - } - else if (Ybn != null) - { - fileBytes = Ybn.Save(); - } - else if (Ypt != null) - { - fileBytes = Ypt.Save(); - } - else if (Ynv != null) - { - fileBytes = Ynv.Save(); - } -#if !DEBUG + if (Ydr != null) + { + fileBytes = Ydr.Save(); + rpfFileEntry = Ydr.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Ydr, out _, Path.Join(Path.GetDirectoryName(fn), Ydr.RpfFileEntry.ShortName)); + } + } + else if (Ydd != null) + { + fileBytes = Ydd.Save(); + rpfFileEntry = Ydd.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Ydd, out _, Path.Join(Path.GetDirectoryName(fn), Ydd.RpfFileEntry.ShortName)); + } + } + else if (Yft != null) + { + fileBytes = Yft.Save(); + rpfFileEntry = Yft.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Yft, out _, Path.Join(Path.GetDirectoryName(fn), Yft.RpfFileEntry.ShortName)); + } + } + else if (Ybn != null) + { + fileBytes = Ybn.Save(); + rpfFileEntry = Ybn.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Ybn, out _); + } + } + else if (Ypt != null) + { + fileBytes = Ypt.Save(); + rpfFileEntry = Ypt.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Ypt, out _, Path.Join(Path.GetDirectoryName(fn), Ypt.RpfFileEntry.ShortName)); + } + } + else if (Ynv != null) + { + fileBytes = Ynv.Save(); + rpfFileEntry = Ypt.RpfFileEntry; + if (exportXml) + { + xml = MetaXml.GetXml(Ynv, out _); + } + } + + if (exportXml) + { + fileBytes = Encoding.UTF8.GetBytes(xml); + } } catch(Exception ex) { + Console.WriteLine(ex); MessageBox.Show("Error saving file!\n" + ex.ToString()); return; } -#endif if (fileBytes == null) { MessageBox.Show("Error saving file!\n fileBytes was null!"); @@ -1857,11 +1908,11 @@ namespace CodeWalker.Forms } - var rpfSave = editMode && (rpfFileEntry?.Parent != null) && !saveAs; + var rpfSave = editMode && (this.rpfFileEntry?.Parent != null) && !saveAs; - if (rpfSave) + if (rpfSave && !exportXml) { - if (!rpfFileEntry.Path.StartsWith("mods", StringComparison.OrdinalIgnoreCase)) + if (!this.rpfFileEntry.Path.StartsWith("mods", StringComparison.OrdinalIgnoreCase)) { if (MessageBox.Show("This file is NOT located in the mods folder - Are you SURE you want to save this file?\r\nWARNING: This could cause permanent damage to your game!!!", "WARNING: Are you sure about this?", MessageBoxButtons.YesNo) != DialogResult.Yes) { @@ -1871,22 +1922,22 @@ namespace CodeWalker.Forms try { - if (!(ExploreForm.EnsureRpfValidEncryption(rpfFileEntry.File))) return; + if (!ExploreForm.EnsureRpfValidEncryption(this.rpfFileEntry.File)) + return; - var newentry = RpfFile.CreateFile(rpfFileEntry.Parent, rpfFileEntry.Name, fileBytes); - if (newentry != rpfFileEntry) - { } - rpfFileEntry = newentry; + var newentry = RpfFile.CreateFile(this.rpfFileEntry.Parent, this.rpfFileEntry.Name, fileBytes); + this.rpfFileEntry = newentry; ExploreForm.RefreshMainListViewInvoke(); //update the file details in explorer... - StatusLabel.Text = rpfFileEntry.Name + " saved successfully at " + DateTime.Now.ToString(); + StatusLabel.Text = $"{this.rpfFileEntry.Name} saved successfully at {DateTime.Now}"; //victory! } catch (Exception ex) { MessageBox.Show("Error saving file to RPF! The RPF archive may be corrupted...\r\n" + ex.ToString(), "Really Bad Error"); + Console.WriteLine(ex); } } @@ -1894,22 +1945,38 @@ namespace CodeWalker.Forms { if (string.IsNullOrEmpty(fn)) { - fn = rpfFileEntry?.Path; + fn = this.rpfFileEntry?.Path; + } + if (string.IsNullOrEmpty(fn)) + { + MessageBox.Show("File name is empty!", "Filename missing"); + return; } try { - File.WriteAllBytes(fn, fileBytes); + if (!string.IsNullOrWhiteSpace(xml)) + { + await File.WriteAllTextAsync(fn, xml); + } + else + { + await File.WriteAllBytesAsync(fn, fileBytes); + } fileName = Path.GetFileName(fn); ExploreForm.RefreshMainListViewInvoke(); //update the file details in explorer... - StatusLabel.Text = fileName + " saved successfully at " + DateTime.Now.ToString(); + this.InvokeIfRequired(() => + { + StatusLabel.Text = $"{fileName} saved successfully at {DateTime.Now}"; + }); } catch (Exception ex) { MessageBox.Show("Error writing file to disk!\n" + ex.ToString()); + Console.WriteLine(ex); return; } } @@ -1924,22 +1991,26 @@ namespace CodeWalker.Forms - private void SaveAllTextures(bool includeEmbedded) + private async ValueTask SaveAllTexturesAsync(bool includeEmbedded) { - if (gameFileCache == null) + if (gameFileCache is null) { MessageBox.Show("This operation requires GameFileCache to continue. This shouldn't happen!"); return; } - if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) return; + if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) + return; + string folderpath = FolderBrowserDialog.SelectedPath; - if (!folderpath.EndsWith("\\")) folderpath += "\\"; + if (!folderpath.EndsWith('\\')) + folderpath += '\\'; - - var tryGetTextureFromYtd = new Func((texHash, ytd) => + var tryGetTextureFromYtd = new Func((texHash, ytd) => { - if (ytd == null) return null; + if (ytd is null) + return null; + int tries = 0; while (!ytd.Loaded && (tries < 500)) //wait upto ~5 sec { @@ -1952,7 +2023,7 @@ namespace CodeWalker.Forms } return null; }); - var tryGetTexture = new Func((texHash, txdHash) => + var tryGetTexture = new Func((texHash, txdHash) => { if (txdHash != 0) { @@ -1976,7 +2047,7 @@ namespace CodeWalker.Forms textures.Add(tex); } } - if ((d?.Owner is YptFile ypt) && (ypt.PtfxList?.TextureDictionary?.Textures?.data_items != null)) + if (d?.Owner is YptFile ypt && ypt.PtfxList?.TextureDictionary?.Textures?.data_items != null) { foreach (var tex in ypt.PtfxList.TextureDictionary.Textures.data_items) { @@ -1989,7 +2060,7 @@ namespace CodeWalker.Forms if (d?.ShaderGroup?.Shaders?.data_items == null) return; var archhash = 0u; - if (d is Drawable dwbl) + if (d is Drawable dwbl && !string.IsNullOrEmpty(dwbl.Name)) { var dname = dwbl.Name.ToLowerInvariant(); dname = dname.Replace(".#dr", "").Replace(".#dd", ""); @@ -2013,13 +2084,13 @@ namespace CodeWalker.Forms foreach (var s in d.ShaderGroup.Shaders.data_items) { - if (s?.ParametersList?.Parameters == null) continue; + if (s?.ParametersList?.Parameters is null) + continue; foreach (var p in s.ParametersList.Parameters) { - var t = p.Data as TextureBase; - if (t == null) continue; - var tex = t as Texture; - if (tex != null) + if (p.Data is not TextureBase t) + continue; + if (t is Texture tex) { if (includeEmbedded) { @@ -2030,28 +2101,28 @@ namespace CodeWalker.Forms { var texhash = t.NameHash; tex = tryGetTexture(texhash, txdHash); - if (tex == null) + if (tex is null) { var ptxdhash = gameFileCache.TryGetParentYtdHash(txdHash); - while ((ptxdhash != 0) && (tex == null)) + while (ptxdhash != 0 && tex is null) { tex = tryGetTexture(texhash, ptxdhash); - if (tex == null) + if (tex is null) { ptxdhash = gameFileCache.TryGetParentYtdHash(ptxdhash); } } - if (tex == null) + if (tex is null) { var ytd = gameFileCache.TryGetTextureDictForTexture(texhash); tex = tryGetTextureFromYtd(texhash, ytd); } - if (tex == null) + if (tex is null) { texturesMissing.Add(t.Name); } } - if (tex != null) + if (tex is not null) { textures.Add(tex); } @@ -2060,30 +2131,30 @@ namespace CodeWalker.Forms } }); - if (Ydr != null) + if (Ydr is not null) { collectTextures(Ydr.Drawable); } - if (Ydd?.Drawables != null) + if (Ydd?.Drawables is not null) { foreach (var d in Ydd.Drawables) { collectTextures(d); } } - if (Yft?.Fragment != null) + if (Yft?.Fragment is not null) { var f = Yft.Fragment; collectTextures(f.Drawable); collectTextures(f.DrawableCloth); - if (f.DrawableArray?.data_items != null) + if (f.DrawableArray?.data_items is not null) { foreach (var d in f.DrawableArray.data_items) { collectTextures(d); } } - if (f.Cloths?.data_items != null) + if (f.Cloths?.data_items is not null) { foreach (var c in f.Cloths.data_items) { @@ -2091,7 +2162,7 @@ namespace CodeWalker.Forms } } var fc = f.PhysicsLODGroup?.PhysicsLOD1?.Children?.data_items; - if (fc != null) + if (fc is not null) { foreach (var fcc in fc) { @@ -2100,7 +2171,7 @@ namespace CodeWalker.Forms } } } - if (Ypt?.DrawableDict != null) + if (Ypt?.DrawableDict is not null) { foreach (var d in Ypt.DrawableDict.Values) { @@ -2114,29 +2185,30 @@ namespace CodeWalker.Forms { try { - string fpath = folderpath + tex.Name + ".dds"; + string fpath = $"{folderpath}{tex.Name}.dds"; byte[] dds = DDSIO.GetDDSFile(tex); - File.WriteAllBytes(fpath, dds); + await File.WriteAllBytesAsync(fpath, dds); successcount++; } catch(Exception ex) { errordds.Add(tex.Name ?? "???"); + Console.WriteLine(ex); } } var sb = new StringBuilder(); if (successcount > 0) { - sb.AppendLine(successcount.ToString() + " textures successfully exported."); + sb.AppendLine($"{successcount} textures successfully exported."); } if (texturesMissing.Count > 0) { - sb.AppendLine(texturesMissing.Count.ToString() + " textures weren't found!"); + sb.AppendLine($"{texturesMissing.Count} textures weren't found!"); } if (errordds.Count > 0) { - sb.AppendLine(errordds.Count.ToString() + " textures couldn't be converted to .dds!"); + sb.AppendLine($"{errordds.Count} textures couldn't be converted to .dds!"); } if (sb.Length > 0) { @@ -2437,7 +2509,7 @@ namespace CodeWalker.Forms private void StatsUpdateTimer_Tick(object sender, EventArgs e) { - StatsLabel.Text = Renderer.GetStatusText() + $" verts: {VerticesCount}"; + StatsLabel.Text = Renderer.GetStatusText() + $" verts: {VerticesCount}; tris: {PolyCount};"; if (Renderer.timerunning) { @@ -2509,17 +2581,22 @@ namespace CodeWalker.Forms private void HDRRenderingCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + using(Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.hdr = HDRRenderingCheckBox.Checked; + Renderer.Shaders.hdr = HDRRenderingCheckBox.Checked; } } private void ShadowsCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + + using(Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.shadows = ShadowsCheckBox.Checked; + Renderer.Shaders.shadows = ShadowsCheckBox.Checked; } } @@ -2539,7 +2616,7 @@ namespace CodeWalker.Forms int v = TimeOfDayTrackBar.Value; float fh = v / 60.0f; UpdateTimeOfDayLabel(); - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Renderer.timeofday = fh; timecycle.SetTime(Renderer.timeofday); @@ -2554,12 +2631,16 @@ namespace CodeWalker.Forms private void WireframeCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.wireframe = WireframeCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.wireframe = WireframeCheckBox.Checked; } private void AnisotropicFilteringCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; } private void HDTexturesCheckBox_CheckedChanged(object sender, EventArgs e) @@ -2575,42 +2656,42 @@ namespace CodeWalker.Forms { default: case "Default": - Renderer.shaders.RenderMode = WorldRenderMode.Default; + Renderer.Shaders.RenderMode = WorldRenderMode.Default; break; case "Single texture": - Renderer.shaders.RenderMode = WorldRenderMode.SingleTexture; + Renderer.Shaders.RenderMode = WorldRenderMode.SingleTexture; TextureSamplerComboBox.Enabled = true; TextureCoordsComboBox.Enabled = true; break; case "Vertex normals": - Renderer.shaders.RenderMode = WorldRenderMode.VertexNormals; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexNormals; break; case "Vertex tangents": - Renderer.shaders.RenderMode = WorldRenderMode.VertexTangents; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexTangents; break; case "Vertex colour 1": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 1; break; case "Vertex colour 2": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 2; break; case "Vertex colour 3": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 3; break; case "Texture coord 1": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 1; break; case "Texture coord 2": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 2; break; case "Texture coord 3": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 3; break; } } @@ -2619,7 +2700,7 @@ namespace CodeWalker.Forms { if (TextureSamplerComboBox.SelectedItem is ShaderParamNames) { - Renderer.shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; + Renderer.Shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; } } @@ -2629,13 +2710,13 @@ namespace CodeWalker.Forms { default: case "Texture coord 1": - Renderer.shaders.RenderTextureSamplerCoord = 1; + Renderer.Shaders.RenderTextureSamplerCoord = 1; break; case "Texture coord 2": - Renderer.shaders.RenderTextureSamplerCoord = 2; + Renderer.Shaders.RenderTextureSamplerCoord = 2; break; case "Texture coord 3": - Renderer.shaders.RenderTextureSamplerCoord = 3; + Renderer.Shaders.RenderTextureSamplerCoord = 3; break; } } @@ -2687,39 +2768,39 @@ namespace CodeWalker.Forms StatusStrip.Visible = StatusBarCheckBox.Checked; } - private void SaveAllTexturesButton_Click(object sender, EventArgs e) + private async void SaveAllTexturesButton_Click(object sender, EventArgs e) { - SaveAllTextures(true); + await SaveAllTexturesAsync(true); } - private void SaveSharedTexturesButton_Click(object sender, EventArgs e) + private async void SaveSharedTexturesButton_Click(object sender, EventArgs e) { - SaveAllTextures(false); + await SaveAllTexturesAsync(false); } - private void SaveButton_ButtonClick(object sender, EventArgs e) + private async void SaveButton_ButtonClick(object sender, EventArgs e) { - Save(); + await SaveAsync(); } - private void SaveMenuButton_Click(object sender, EventArgs e) + private async void SaveMenuButton_Click(object sender, EventArgs e) { - Save(); + await SaveAsync(); } - private void SaveAsMenuButton_Click(object sender, EventArgs e) + private async void SaveAsMenuButton_Click(object sender, EventArgs e) { - Save(true); + await SaveAsync(true); } - private void SaveAllTexturesMenuButton_Click(object sender, EventArgs e) + private async void SaveAllTexturesMenuButton_Click(object sender, EventArgs e) { - SaveAllTextures(true); + await SaveAllTexturesAsync(true); } - private void SaveSharedTexturesMenuButton_Click(object sender, EventArgs e) + private async void SaveSharedTexturesMenuButton_Click(object sender, EventArgs e) { - SaveAllTextures(false); + await SaveAllTexturesAsync(false); } private void ClipDictComboBox_TextChanged(object sender, EventArgs e) @@ -2739,7 +2820,7 @@ namespace CodeWalker.Forms private void DeferredShadingCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.deferred = DeferredShadingCheckBox.Checked; + Renderer.Shaders.deferred = DeferredShadingCheckBox.Checked; } private void HDLightsCheckBox_CheckedChanged(object sender, EventArgs e) diff --git a/CodeWalker/Forms/ModelLightForm.cs b/CodeWalker/Forms/ModelLightForm.cs index 58b25e5..0822a81 100644 --- a/CodeWalker/Forms/ModelLightForm.cs +++ b/CodeWalker/Forms/ModelLightForm.cs @@ -37,10 +37,7 @@ namespace CodeWalker.Forms LightsTreeView.Nodes.Clear(); LightsTreeView.ShowRootLines = false; - var dr = drawable as Drawable; - var fr = drawable as FragDrawable; - - if (dr != null) + if (drawable is Drawable dr) { Drawable = dr; var lights = dr.LightAttributes; @@ -49,7 +46,7 @@ namespace CodeWalker.Forms AddLightsTreeNodes(lights.data_items); } } - else if (fr != null) + else if (drawable is FragDrawable fr) { FragDrawable = fr; var lights = fr.OwnerFragment?.LightAttributes; @@ -353,8 +350,7 @@ namespace CodeWalker.Forms var n = LightsTreeView.SelectedNode; if (n != null) { - var dr = n.Tag as Drawable; - if (dr == null) { dr = n.Parent.Tag as Drawable; } //try parent node tag also + if (n.Tag is not Drawable dr) { dr = n.Parent.Tag as Drawable; } //try parent node tag also if (dr!= null) { if (dr.LightAttributes == null) dr.LightAttributes = new ResourceSimpleList64(); @@ -389,8 +385,7 @@ namespace CodeWalker.Forms } else { - var dr = LightsTreeView.SelectedNode.Parent.Tag as Drawable; - if (dr != null) + if (LightsTreeView.SelectedNode.Parent.Tag is Drawable dr) { List lights = dr.LightAttributes.data_items.ToList(); lights.Remove(selectedLight); @@ -429,8 +424,7 @@ namespace CodeWalker.Forms var n = LightsTreeView.SelectedNode; if (n != null) { - var dr = n.Tag as Drawable; - if (dr == null) { dr = n.Parent.Tag as Drawable; } //try parent node tag also + if (n.Tag is not Drawable dr) { dr = n.Parent.Tag as Drawable; } //try parent node tag also if (dr != null) { if (dr.LightAttributes == null) dr.LightAttributes = new ResourceSimpleList64(); diff --git a/CodeWalker/Forms/ModelMatForm.cs b/CodeWalker/Forms/ModelMatForm.cs index 0bbeac4..58122dc 100644 --- a/CodeWalker/Forms/ModelMatForm.cs +++ b/CodeWalker/Forms/ModelMatForm.cs @@ -41,8 +41,7 @@ namespace CodeWalker.Forms AddDrawableModelsTreeNodes(drawable.DrawableModels?.Low, "Low Detail"); AddDrawableModelsTreeNodes(drawable.DrawableModels?.VLow, "Very Low Detail"); - var fdrawable = drawable as FragDrawable; - if (fdrawable != null) + if (drawable is FragDrawable fdrawable) { var plod1 = fdrawable.OwnerFragment?.PhysicsLODGroup?.PhysicsLOD1; if ((plod1 != null) && (plod1.Children?.data_items != null)) @@ -114,7 +113,8 @@ namespace CodeWalker.Forms private void AddDrawableModelsTreeNodes(DrawableModel[] models, string prefix, TreeNode parentDrawableNode = null) { - if (models == null) return; + if (models is null) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -125,7 +125,8 @@ namespace CodeWalker.Forms var mnode = tnc.Add(mprefix + " " + model.ToString()); mnode.Tag = model; - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { @@ -213,17 +214,19 @@ namespace CodeWalker.Forms private void ParamTextBox_TextChanged(object sender, EventArgs e) { - var tb = sender as TextBox; - var parm = tb?.Tag as ShaderParameter; - var txt = tb?.Text; + if (sender is not TextBox tb) + { + throw new InvalidOperationException($"TextBox is not a textbox on {nameof(ParamTextBox_TextChanged)}"); + } + var txt = tb.Text; - if (parm == null) return; + if (tb.Tag is not ShaderParameter parm) + return; if (parm.DataType == 0)//texture { var tex = parm.Data as TextureBase; - var ttex = tex as Texture; - if (ttex == null)//don't do this for embedded textures! + if (tex is not null && tex is not Texture ttex)//don't do this for embedded textures! { tex.Name = txt; tex.NameHash = JenkHash.GenHashLower(txt); @@ -254,8 +257,7 @@ namespace CodeWalker.Forms } - var geom = ModelsTreeView.SelectedNode?.Tag as DrawableGeometry; - if (geom != null) + if (ModelsTreeView.SelectedNode?.Tag is DrawableGeometry geom) { if (Drawable != null) { diff --git a/CodeWalker/Forms/RelForm.Designer.cs b/CodeWalker/Forms/RelForm.Designer.cs index 8307057..692a471 100644 --- a/CodeWalker/Forms/RelForm.Designer.cs +++ b/CodeWalker/Forms/RelForm.Designer.cs @@ -28,638 +28,592 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RelForm)); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - this.RelPropertyGrid = new CodeWalker.WinForms.PropertyGridFix(); - this.MainTabControl = new System.Windows.Forms.TabControl(); - this.XmlTabPage = new System.Windows.Forms.TabPage(); - this.XmlTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); - this.DetailsTabPage = new System.Windows.Forms.TabPage(); - this.NameTableTabPage = new System.Windows.Forms.TabPage(); - this.MainTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.SearchTabPage = new System.Windows.Forms.TabPage(); - this.SearchTextRadio = new System.Windows.Forms.RadioButton(); - this.SearchHashRadio = new System.Windows.Forms.RadioButton(); - this.label12 = new System.Windows.Forms.Label(); - this.SearchTextBox = new System.Windows.Forms.TextBox(); - this.SearchButton = new System.Windows.Forms.Button(); - this.SearchResultsGrid = new CodeWalker.WinForms.PropertyGridFix(); - this.SynthsTabPage = new System.Windows.Forms.TabPage(); - this.SynthStopButton = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.SynthVariablesTextBox = new System.Windows.Forms.TextBox(); - this.SynthOutputsTextBox = new System.Windows.Forms.TextBox(); - this.SynthBufferChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.SynthPlayButton = new System.Windows.Forms.Button(); - this.SynthCopyXMLButton = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.SynthsComboBox = new System.Windows.Forms.ComboBox(); - this.SynthTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); - this.MainToolbar = new System.Windows.Forms.ToolStrip(); - this.NewButton = new System.Windows.Forms.ToolStripSplitButton(); - this.OpenButton = new System.Windows.Forms.ToolStripSplitButton(); - this.SaveButton = new System.Windows.Forms.ToolStripSplitButton(); - this.MainStatusStrip = new System.Windows.Forms.StatusStrip(); - this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.MainMenu = new System.Windows.Forms.MenuStrip(); - this.FileMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSaveMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSaveAsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.FileCloseMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.wIPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ViewMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.wIPToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.SaveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.MainTabControl.SuspendLayout(); - this.XmlTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.XmlTextBox)).BeginInit(); - this.DetailsTabPage.SuspendLayout(); - this.NameTableTabPage.SuspendLayout(); - this.SearchTabPage.SuspendLayout(); - this.SynthsTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SynthBufferChart)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.SynthTextBox)).BeginInit(); - this.MainToolbar.SuspendLayout(); - this.MainStatusStrip.SuspendLayout(); - this.MainMenu.SuspendLayout(); - this.SuspendLayout(); + RelPropertyGrid = new WinForms.PropertyGridFix(); + MainTabControl = new System.Windows.Forms.TabControl(); + XmlTabPage = new System.Windows.Forms.TabPage(); + XmlTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); + DetailsTabPage = new System.Windows.Forms.TabPage(); + NameTableTabPage = new System.Windows.Forms.TabPage(); + MainTextBox = new WinForms.TextBoxFix(); + SearchTabPage = new System.Windows.Forms.TabPage(); + SearchTextRadio = new System.Windows.Forms.RadioButton(); + SearchHashRadio = new System.Windows.Forms.RadioButton(); + label12 = new System.Windows.Forms.Label(); + SearchTextBox = new System.Windows.Forms.TextBox(); + SearchButton = new System.Windows.Forms.Button(); + SearchResultsGrid = new WinForms.PropertyGridFix(); + SynthsTabPage = new System.Windows.Forms.TabPage(); + SynthStopButton = new System.Windows.Forms.Button(); + label3 = new System.Windows.Forms.Label(); + label2 = new System.Windows.Forms.Label(); + SynthVariablesTextBox = new System.Windows.Forms.TextBox(); + SynthOutputsTextBox = new System.Windows.Forms.TextBox(); + SynthPlayButton = new System.Windows.Forms.Button(); + SynthCopyXMLButton = new System.Windows.Forms.Button(); + label1 = new System.Windows.Forms.Label(); + SynthsComboBox = new System.Windows.Forms.ComboBox(); + SynthTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); + MainToolbar = new System.Windows.Forms.ToolStrip(); + NewButton = new System.Windows.Forms.ToolStripSplitButton(); + OpenButton = new System.Windows.Forms.ToolStripSplitButton(); + SaveButton = new System.Windows.Forms.ToolStripSplitButton(); + MainStatusStrip = new System.Windows.Forms.StatusStrip(); + StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + MainMenu = new System.Windows.Forms.MenuStrip(); + FileMenu = new System.Windows.Forms.ToolStripMenuItem(); + FileNewMenu = new System.Windows.Forms.ToolStripMenuItem(); + FileOpenMenu = new System.Windows.Forms.ToolStripMenuItem(); + FileSaveMenu = new System.Windows.Forms.ToolStripMenuItem(); + FileSaveAsMenu = new System.Windows.Forms.ToolStripMenuItem(); + toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + FileCloseMenu = new System.Windows.Forms.ToolStripMenuItem(); + EditMenu = new System.Windows.Forms.ToolStripMenuItem(); + wIPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + ViewMenu = new System.Windows.Forms.ToolStripMenuItem(); + wIPToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + OpenFileDialog = new System.Windows.Forms.OpenFileDialog(); + SaveFileDialog = new System.Windows.Forms.SaveFileDialog(); + MainTabControl.SuspendLayout(); + XmlTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)XmlTextBox).BeginInit(); + DetailsTabPage.SuspendLayout(); + NameTableTabPage.SuspendLayout(); + SearchTabPage.SuspendLayout(); + SynthsTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)SynthTextBox).BeginInit(); + MainToolbar.SuspendLayout(); + MainStatusStrip.SuspendLayout(); + MainMenu.SuspendLayout(); + SuspendLayout(); // // RelPropertyGrid // - this.RelPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.RelPropertyGrid.HelpVisible = false; - this.RelPropertyGrid.Location = new System.Drawing.Point(6, 6); - this.RelPropertyGrid.Name = "RelPropertyGrid"; - this.RelPropertyGrid.Size = new System.Drawing.Size(819, 448); - this.RelPropertyGrid.TabIndex = 0; + RelPropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + RelPropertyGrid.HelpVisible = false; + RelPropertyGrid.Location = new System.Drawing.Point(7, 7); + RelPropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + RelPropertyGrid.Name = "RelPropertyGrid"; + RelPropertyGrid.Size = new System.Drawing.Size(955, 517); + RelPropertyGrid.TabIndex = 0; // // MainTabControl // - this.MainTabControl.Controls.Add(this.XmlTabPage); - this.MainTabControl.Controls.Add(this.DetailsTabPage); - this.MainTabControl.Controls.Add(this.NameTableTabPage); - this.MainTabControl.Controls.Add(this.SearchTabPage); - this.MainTabControl.Controls.Add(this.SynthsTabPage); - this.MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.MainTabControl.Location = new System.Drawing.Point(0, 49); - this.MainTabControl.Margin = new System.Windows.Forms.Padding(0); - this.MainTabControl.Name = "MainTabControl"; - this.MainTabControl.SelectedIndex = 0; - this.MainTabControl.Size = new System.Drawing.Size(839, 486); - this.MainTabControl.TabIndex = 1; + MainTabControl.Controls.Add(XmlTabPage); + MainTabControl.Controls.Add(DetailsTabPage); + MainTabControl.Controls.Add(NameTableTabPage); + MainTabControl.Controls.Add(SearchTabPage); + MainTabControl.Controls.Add(SynthsTabPage); + MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; + MainTabControl.Location = new System.Drawing.Point(0, 49); + MainTabControl.Margin = new System.Windows.Forms.Padding(0); + MainTabControl.Name = "MainTabControl"; + MainTabControl.SelectedIndex = 0; + MainTabControl.Size = new System.Drawing.Size(979, 572); + MainTabControl.TabIndex = 1; // // XmlTabPage // - this.XmlTabPage.Controls.Add(this.XmlTextBox); - this.XmlTabPage.Location = new System.Drawing.Point(4, 22); - this.XmlTabPage.Name = "XmlTabPage"; - this.XmlTabPage.Padding = new System.Windows.Forms.Padding(3); - this.XmlTabPage.Size = new System.Drawing.Size(831, 460); - this.XmlTabPage.TabIndex = 3; - this.XmlTabPage.Text = "XML"; - this.XmlTabPage.UseVisualStyleBackColor = true; + XmlTabPage.Controls.Add(XmlTextBox); + XmlTabPage.Location = new System.Drawing.Point(4, 24); + XmlTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + XmlTabPage.Name = "XmlTabPage"; + XmlTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + XmlTabPage.Size = new System.Drawing.Size(971, 544); + XmlTabPage.TabIndex = 3; + XmlTabPage.Text = "XML"; + XmlTabPage.UseVisualStyleBackColor = true; // // XmlTextBox // - this.XmlTextBox.AutoCompleteBracketsList = new char[] { - '(', - ')', - '{', - '}', - '[', - ']', - '\"', - '\"', - '\'', - '\''}; - this.XmlTextBox.AutoIndentChars = false; - this.XmlTextBox.AutoIndentCharsPatterns = ""; - this.XmlTextBox.AutoIndentExistingLines = false; - this.XmlTextBox.AutoScrollMinSize = new System.Drawing.Size(27, 14); - this.XmlTextBox.BackBrush = null; - this.XmlTextBox.CharHeight = 14; - this.XmlTextBox.CharWidth = 8; - this.XmlTextBox.CommentPrefix = null; - this.XmlTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; - this.XmlTextBox.DelayedEventsInterval = 1; - this.XmlTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.XmlTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.XmlTextBox.Font = new System.Drawing.Font("Courier New", 9.75F); - this.XmlTextBox.IsReplaceMode = false; - this.XmlTextBox.Language = FastColoredTextBoxNS.Language.XML; - this.XmlTextBox.LeftBracket = '<'; - this.XmlTextBox.LeftBracket2 = '('; - this.XmlTextBox.Location = new System.Drawing.Point(3, 3); - this.XmlTextBox.Name = "XmlTextBox"; - this.XmlTextBox.Paddings = new System.Windows.Forms.Padding(0); - this.XmlTextBox.RightBracket = '>'; - this.XmlTextBox.RightBracket2 = ')'; - this.XmlTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); - this.XmlTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("XmlTextBox.ServiceColors"))); - this.XmlTextBox.Size = new System.Drawing.Size(825, 454); - this.XmlTextBox.TabIndex = 2; - this.XmlTextBox.Zoom = 100; - this.XmlTextBox.TextChanged += new System.EventHandler(this.XmlTextBox_TextChanged); - this.XmlTextBox.VisibleRangeChangedDelayed += new System.EventHandler(this.XmlTextBox_VisibleRangeChangedDelayed); + XmlTextBox.AutoCompleteBracketsList = new char[] { '(', ')', '{', '}', '[', ']', '"', '"', '\'', '\'' }; + XmlTextBox.AutoIndentChars = false; + XmlTextBox.AutoIndentCharsPatterns = ""; + XmlTextBox.AutoIndentExistingLines = false; + XmlTextBox.AutoScrollMinSize = new System.Drawing.Size(27, 14); + XmlTextBox.BackBrush = null; + XmlTextBox.CharHeight = 14; + XmlTextBox.CharWidth = 8; + XmlTextBox.CommentPrefix = null; + XmlTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; + XmlTextBox.DelayedEventsInterval = 1; + XmlTextBox.DisabledColor = System.Drawing.Color.FromArgb(100, 180, 180, 180); + XmlTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + XmlTextBox.IsReplaceMode = false; + XmlTextBox.Language = FastColoredTextBoxNS.Language.XML; + XmlTextBox.LeftBracket = '<'; + XmlTextBox.LeftBracket2 = '('; + XmlTextBox.Location = new System.Drawing.Point(4, 3); + XmlTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + XmlTextBox.Name = "XmlTextBox"; + XmlTextBox.Paddings = new System.Windows.Forms.Padding(0); + XmlTextBox.RightBracket = '>'; + XmlTextBox.RightBracket2 = ')'; + XmlTextBox.SelectionColor = System.Drawing.Color.FromArgb(60, 0, 0, 255); + XmlTextBox.ServiceColors = (FastColoredTextBoxNS.ServiceColors)resources.GetObject("XmlTextBox.ServiceColors"); + XmlTextBox.Size = new System.Drawing.Size(963, 538); + XmlTextBox.TabIndex = 2; + XmlTextBox.Zoom = 100; + XmlTextBox.TextChanged += XmlTextBox_TextChanged; + XmlTextBox.VisibleRangeChangedDelayed += XmlTextBox_VisibleRangeChangedDelayed; // // DetailsTabPage // - this.DetailsTabPage.Controls.Add(this.RelPropertyGrid); - this.DetailsTabPage.Location = new System.Drawing.Point(4, 22); - this.DetailsTabPage.Name = "DetailsTabPage"; - this.DetailsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.DetailsTabPage.Size = new System.Drawing.Size(831, 460); - this.DetailsTabPage.TabIndex = 1; - this.DetailsTabPage.Text = "Details"; - this.DetailsTabPage.UseVisualStyleBackColor = true; + DetailsTabPage.Controls.Add(RelPropertyGrid); + DetailsTabPage.Location = new System.Drawing.Point(4, 24); + DetailsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DetailsTabPage.Name = "DetailsTabPage"; + DetailsTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + DetailsTabPage.Size = new System.Drawing.Size(971, 533); + DetailsTabPage.TabIndex = 1; + DetailsTabPage.Text = "Details"; + DetailsTabPage.UseVisualStyleBackColor = true; // // NameTableTabPage // - this.NameTableTabPage.Controls.Add(this.MainTextBox); - this.NameTableTabPage.Location = new System.Drawing.Point(4, 22); - this.NameTableTabPage.Name = "NameTableTabPage"; - this.NameTableTabPage.Padding = new System.Windows.Forms.Padding(3); - this.NameTableTabPage.Size = new System.Drawing.Size(831, 460); - this.NameTableTabPage.TabIndex = 0; - this.NameTableTabPage.Text = "Names"; - this.NameTableTabPage.UseVisualStyleBackColor = true; + NameTableTabPage.Controls.Add(MainTextBox); + NameTableTabPage.Location = new System.Drawing.Point(4, 24); + NameTableTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + NameTableTabPage.Name = "NameTableTabPage"; + NameTableTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + NameTableTabPage.Size = new System.Drawing.Size(971, 544); + NameTableTabPage.TabIndex = 0; + NameTableTabPage.Text = "Names"; + NameTableTabPage.UseVisualStyleBackColor = true; // // MainTextBox // - this.MainTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.MainTextBox.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MainTextBox.HideSelection = false; - this.MainTextBox.Location = new System.Drawing.Point(6, 6); - this.MainTextBox.Multiline = true; - this.MainTextBox.Name = "MainTextBox"; - this.MainTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.MainTextBox.Size = new System.Drawing.Size(819, 448); - this.MainTextBox.TabIndex = 1; - this.MainTextBox.WordWrap = false; + MainTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + MainTextBox.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + MainTextBox.HideSelection = false; + MainTextBox.Location = new System.Drawing.Point(7, 7); + MainTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MainTextBox.Multiline = true; + MainTextBox.Name = "MainTextBox"; + MainTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + MainTextBox.Size = new System.Drawing.Size(955, 527); + MainTextBox.TabIndex = 1; + MainTextBox.WordWrap = false; // // SearchTabPage // - this.SearchTabPage.Controls.Add(this.SearchTextRadio); - this.SearchTabPage.Controls.Add(this.SearchHashRadio); - this.SearchTabPage.Controls.Add(this.label12); - this.SearchTabPage.Controls.Add(this.SearchTextBox); - this.SearchTabPage.Controls.Add(this.SearchButton); - this.SearchTabPage.Controls.Add(this.SearchResultsGrid); - this.SearchTabPage.Location = new System.Drawing.Point(4, 22); - this.SearchTabPage.Name = "SearchTabPage"; - this.SearchTabPage.Size = new System.Drawing.Size(831, 460); - this.SearchTabPage.TabIndex = 2; - this.SearchTabPage.Text = "Search"; - this.SearchTabPage.UseVisualStyleBackColor = true; + SearchTabPage.Controls.Add(SearchTextRadio); + SearchTabPage.Controls.Add(SearchHashRadio); + SearchTabPage.Controls.Add(label12); + SearchTabPage.Controls.Add(SearchTextBox); + SearchTabPage.Controls.Add(SearchButton); + SearchTabPage.Controls.Add(SearchResultsGrid); + SearchTabPage.Location = new System.Drawing.Point(4, 24); + SearchTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchTabPage.Name = "SearchTabPage"; + SearchTabPage.Size = new System.Drawing.Size(971, 533); + SearchTabPage.TabIndex = 2; + SearchTabPage.Text = "Search"; + SearchTabPage.UseVisualStyleBackColor = true; // // SearchTextRadio // - this.SearchTextRadio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SearchTextRadio.AutoSize = true; - this.SearchTextRadio.Location = new System.Drawing.Point(518, 4); - this.SearchTextRadio.Name = "SearchTextRadio"; - this.SearchTextRadio.Size = new System.Drawing.Size(46, 17); - this.SearchTextRadio.TabIndex = 36; - this.SearchTextRadio.Text = "Text"; - this.SearchTextRadio.UseVisualStyleBackColor = true; + SearchTextRadio.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SearchTextRadio.AutoSize = true; + SearchTextRadio.Location = new System.Drawing.Point(612, 5); + SearchTextRadio.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchTextRadio.Name = "SearchTextRadio"; + SearchTextRadio.Size = new System.Drawing.Size(46, 19); + SearchTextRadio.TabIndex = 36; + SearchTextRadio.Text = "Text"; + SearchTextRadio.UseVisualStyleBackColor = true; // // SearchHashRadio // - this.SearchHashRadio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SearchHashRadio.AutoSize = true; - this.SearchHashRadio.Checked = true; - this.SearchHashRadio.Location = new System.Drawing.Point(462, 4); - this.SearchHashRadio.Name = "SearchHashRadio"; - this.SearchHashRadio.Size = new System.Drawing.Size(50, 17); - this.SearchHashRadio.TabIndex = 35; - this.SearchHashRadio.TabStop = true; - this.SearchHashRadio.Text = "Hash"; - this.SearchHashRadio.UseVisualStyleBackColor = true; + SearchHashRadio.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SearchHashRadio.AutoSize = true; + SearchHashRadio.Checked = true; + SearchHashRadio.Location = new System.Drawing.Point(546, 5); + SearchHashRadio.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchHashRadio.Name = "SearchHashRadio"; + SearchHashRadio.Size = new System.Drawing.Size(52, 19); + SearchHashRadio.TabIndex = 35; + SearchHashRadio.TabStop = true; + SearchHashRadio.Text = "Hash"; + SearchHashRadio.UseVisualStyleBackColor = true; // // label12 // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(8, 6); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(30, 13); - this.label12.TabIndex = 32; - this.label12.Text = "Find:"; + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(9, 7); + label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(33, 15); + label12.TabIndex = 32; + label12.Text = "Find:"; // // SearchTextBox // - this.SearchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SearchTextBox.Location = new System.Drawing.Point(44, 3); - this.SearchTextBox.Name = "SearchTextBox"; - this.SearchTextBox.Size = new System.Drawing.Size(412, 20); - this.SearchTextBox.TabIndex = 33; - this.SearchTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SearchTextBox_KeyDown); + SearchTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SearchTextBox.Location = new System.Drawing.Point(51, 3); + SearchTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchTextBox.Name = "SearchTextBox"; + SearchTextBox.Size = new System.Drawing.Size(480, 23); + SearchTextBox.TabIndex = 33; + SearchTextBox.KeyDown += SearchTextBox_KeyDown; // // SearchButton // - this.SearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SearchButton.Location = new System.Drawing.Point(570, 2); - this.SearchButton.Name = "SearchButton"; - this.SearchButton.Size = new System.Drawing.Size(68, 23); - this.SearchButton.TabIndex = 34; - this.SearchButton.Text = "Search"; - this.SearchButton.UseVisualStyleBackColor = true; - this.SearchButton.Click += new System.EventHandler(this.SearchButton_Click); + SearchButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SearchButton.Location = new System.Drawing.Point(665, 2); + SearchButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchButton.Name = "SearchButton"; + SearchButton.Size = new System.Drawing.Size(79, 27); + SearchButton.TabIndex = 34; + SearchButton.Text = "Search"; + SearchButton.UseVisualStyleBackColor = true; + SearchButton.Click += SearchButton_Click; // // SearchResultsGrid // - this.SearchResultsGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SearchResultsGrid.HelpVisible = false; - this.SearchResultsGrid.Location = new System.Drawing.Point(3, 31); - this.SearchResultsGrid.Name = "SearchResultsGrid"; - this.SearchResultsGrid.Size = new System.Drawing.Size(822, 423); - this.SearchResultsGrid.TabIndex = 1; + SearchResultsGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SearchResultsGrid.HelpVisible = false; + SearchResultsGrid.Location = new System.Drawing.Point(4, 36); + SearchResultsGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SearchResultsGrid.Name = "SearchResultsGrid"; + SearchResultsGrid.Size = new System.Drawing.Size(959, 488); + SearchResultsGrid.TabIndex = 1; // // SynthsTabPage // - this.SynthsTabPage.Controls.Add(this.SynthStopButton); - this.SynthsTabPage.Controls.Add(this.label3); - this.SynthsTabPage.Controls.Add(this.label2); - this.SynthsTabPage.Controls.Add(this.SynthVariablesTextBox); - this.SynthsTabPage.Controls.Add(this.SynthOutputsTextBox); - this.SynthsTabPage.Controls.Add(this.SynthBufferChart); - this.SynthsTabPage.Controls.Add(this.SynthPlayButton); - this.SynthsTabPage.Controls.Add(this.SynthCopyXMLButton); - this.SynthsTabPage.Controls.Add(this.label1); - this.SynthsTabPage.Controls.Add(this.SynthsComboBox); - this.SynthsTabPage.Controls.Add(this.SynthTextBox); - this.SynthsTabPage.Location = new System.Drawing.Point(4, 22); - this.SynthsTabPage.Name = "SynthsTabPage"; - this.SynthsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.SynthsTabPage.Size = new System.Drawing.Size(831, 460); - this.SynthsTabPage.TabIndex = 4; - this.SynthsTabPage.Text = "Synths"; - this.SynthsTabPage.UseVisualStyleBackColor = true; + SynthsTabPage.Controls.Add(SynthStopButton); + SynthsTabPage.Controls.Add(label3); + SynthsTabPage.Controls.Add(label2); + SynthsTabPage.Controls.Add(SynthVariablesTextBox); + SynthsTabPage.Controls.Add(SynthOutputsTextBox); + SynthsTabPage.Controls.Add(SynthPlayButton); + SynthsTabPage.Controls.Add(SynthCopyXMLButton); + SynthsTabPage.Controls.Add(label1); + SynthsTabPage.Controls.Add(SynthsComboBox); + SynthsTabPage.Controls.Add(SynthTextBox); + SynthsTabPage.Location = new System.Drawing.Point(4, 24); + SynthsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthsTabPage.Name = "SynthsTabPage"; + SynthsTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthsTabPage.Size = new System.Drawing.Size(971, 533); + SynthsTabPage.TabIndex = 4; + SynthsTabPage.Text = "Synths"; + SynthsTabPage.UseVisualStyleBackColor = true; // // SynthStopButton // - this.SynthStopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SynthStopButton.Enabled = false; - this.SynthStopButton.Location = new System.Drawing.Point(724, 2); - this.SynthStopButton.Name = "SynthStopButton"; - this.SynthStopButton.Size = new System.Drawing.Size(104, 23); - this.SynthStopButton.TabIndex = 43; - this.SynthStopButton.Text = "Stop"; - this.SynthStopButton.UseVisualStyleBackColor = true; - this.SynthStopButton.Click += new System.EventHandler(this.SynthStopButton_Click); + SynthStopButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SynthStopButton.Enabled = false; + SynthStopButton.Location = new System.Drawing.Point(845, 2); + SynthStopButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthStopButton.Name = "SynthStopButton"; + SynthStopButton.Size = new System.Drawing.Size(121, 27); + SynthStopButton.TabIndex = 43; + SynthStopButton.Text = "Stop"; + SynthStopButton.UseVisualStyleBackColor = true; + SynthStopButton.Click += SynthStopButton_Click; // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(8, 59); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(53, 13); - this.label3.TabIndex = 42; - this.label3.Text = "Variables:"; + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(9, 68); + label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(56, 15); + label3.TabIndex = 42; + label3.Text = "Variables:"; // // label2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(8, 33); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(47, 13); - this.label2.TabIndex = 41; - this.label2.Text = "Outputs:"; + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(9, 38); + label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(53, 15); + label2.TabIndex = 41; + label2.Text = "Outputs:"; // // SynthVariablesTextBox // - this.SynthVariablesTextBox.Location = new System.Drawing.Point(64, 56); - this.SynthVariablesTextBox.Multiline = true; - this.SynthVariablesTextBox.Name = "SynthVariablesTextBox"; - this.SynthVariablesTextBox.Size = new System.Drawing.Size(293, 87); - this.SynthVariablesTextBox.TabIndex = 40; - this.SynthVariablesTextBox.TextChanged += new System.EventHandler(this.SynthVariablesTextBox_TextChanged); + SynthVariablesTextBox.Location = new System.Drawing.Point(75, 65); + SynthVariablesTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthVariablesTextBox.Multiline = true; + SynthVariablesTextBox.Name = "SynthVariablesTextBox"; + SynthVariablesTextBox.Size = new System.Drawing.Size(341, 100); + SynthVariablesTextBox.TabIndex = 40; + SynthVariablesTextBox.TextChanged += SynthVariablesTextBox_TextChanged; // // SynthOutputsTextBox // - this.SynthOutputsTextBox.Location = new System.Drawing.Point(64, 30); - this.SynthOutputsTextBox.Name = "SynthOutputsTextBox"; - this.SynthOutputsTextBox.Size = new System.Drawing.Size(293, 20); - this.SynthOutputsTextBox.TabIndex = 39; - this.SynthOutputsTextBox.TextChanged += new System.EventHandler(this.SynthOutputsTextBox_TextChanged); - // - // SynthBufferChart - // - this.SynthBufferChart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - chartArea1.Name = "ChartArea1"; - this.SynthBufferChart.ChartAreas.Add(chartArea1); - legend1.Name = "Legend1"; - this.SynthBufferChart.Legends.Add(legend1); - this.SynthBufferChart.Location = new System.Drawing.Point(363, 31); - this.SynthBufferChart.Name = "SynthBufferChart"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.IsXValueIndexed = true; - series1.Legend = "Legend1"; - series1.Name = "Buffer"; - this.SynthBufferChart.Series.Add(series1); - this.SynthBufferChart.Size = new System.Drawing.Size(460, 112); - this.SynthBufferChart.TabIndex = 38; - this.SynthBufferChart.Text = "chart1"; + SynthOutputsTextBox.Location = new System.Drawing.Point(75, 35); + SynthOutputsTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthOutputsTextBox.Name = "SynthOutputsTextBox"; + SynthOutputsTextBox.Size = new System.Drawing.Size(341, 23); + SynthOutputsTextBox.TabIndex = 39; + SynthOutputsTextBox.TextChanged += SynthOutputsTextBox_TextChanged; // // SynthPlayButton // - this.SynthPlayButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SynthPlayButton.Location = new System.Drawing.Point(615, 2); - this.SynthPlayButton.Name = "SynthPlayButton"; - this.SynthPlayButton.Size = new System.Drawing.Size(104, 23); - this.SynthPlayButton.TabIndex = 37; - this.SynthPlayButton.Text = "Play"; - this.SynthPlayButton.UseVisualStyleBackColor = true; - this.SynthPlayButton.Click += new System.EventHandler(this.SynthPlayButton_Click); + SynthPlayButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SynthPlayButton.Location = new System.Drawing.Point(718, 2); + SynthPlayButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthPlayButton.Name = "SynthPlayButton"; + SynthPlayButton.Size = new System.Drawing.Size(121, 27); + SynthPlayButton.TabIndex = 37; + SynthPlayButton.Text = "Play"; + SynthPlayButton.UseVisualStyleBackColor = true; + SynthPlayButton.Click += SynthPlayButton_Click; // // SynthCopyXMLButton // - this.SynthCopyXMLButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SynthCopyXMLButton.Location = new System.Drawing.Point(463, 2); - this.SynthCopyXMLButton.Name = "SynthCopyXMLButton"; - this.SynthCopyXMLButton.Size = new System.Drawing.Size(146, 23); - this.SynthCopyXMLButton.TabIndex = 35; - this.SynthCopyXMLButton.Text = "Copy XML to clipboard"; - this.SynthCopyXMLButton.UseVisualStyleBackColor = true; - this.SynthCopyXMLButton.Click += new System.EventHandler(this.SynthCopyXMLButton_Click); + SynthCopyXMLButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + SynthCopyXMLButton.Location = new System.Drawing.Point(540, 2); + SynthCopyXMLButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthCopyXMLButton.Name = "SynthCopyXMLButton"; + SynthCopyXMLButton.Size = new System.Drawing.Size(170, 27); + SynthCopyXMLButton.TabIndex = 35; + SynthCopyXMLButton.Text = "Copy XML to clipboard"; + SynthCopyXMLButton.UseVisualStyleBackColor = true; + SynthCopyXMLButton.Click += SynthCopyXMLButton_Click; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(8, 6); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(37, 13); - this.label1.TabIndex = 33; - this.label1.Text = "Synth:"; + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(9, 7); + label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(40, 15); + label1.TabIndex = 33; + label1.Text = "Synth:"; // // SynthsComboBox // - this.SynthsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SynthsComboBox.FormattingEnabled = true; - this.SynthsComboBox.Location = new System.Drawing.Point(64, 3); - this.SynthsComboBox.Name = "SynthsComboBox"; - this.SynthsComboBox.Size = new System.Drawing.Size(393, 21); - this.SynthsComboBox.TabIndex = 4; - this.SynthsComboBox.SelectedIndexChanged += new System.EventHandler(this.SynthsComboBox_SelectedIndexChanged); + SynthsComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SynthsComboBox.FormattingEnabled = true; + SynthsComboBox.Location = new System.Drawing.Point(75, 3); + SynthsComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthsComboBox.Name = "SynthsComboBox"; + SynthsComboBox.Size = new System.Drawing.Size(458, 23); + SynthsComboBox.TabIndex = 4; + SynthsComboBox.SelectedIndexChanged += SynthsComboBox_SelectedIndexChanged; // // SynthTextBox // - this.SynthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SynthTextBox.AutoCompleteBracketsList = new char[] { - '(', - ')', - '{', - '}', - '[', - ']', - '\"', - '\"', - '\'', - '\''}; - this.SynthTextBox.AutoIndentChars = false; - this.SynthTextBox.AutoIndentCharsPatterns = ""; - this.SynthTextBox.AutoIndentExistingLines = false; - this.SynthTextBox.AutoScrollMinSize = new System.Drawing.Size(27, 14); - this.SynthTextBox.BackBrush = null; - this.SynthTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.SynthTextBox.CharHeight = 14; - this.SynthTextBox.CharWidth = 8; - this.SynthTextBox.CommentPrefix = null; - this.SynthTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; - this.SynthTextBox.DelayedEventsInterval = 1; - this.SynthTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.SynthTextBox.IsReplaceMode = false; - this.SynthTextBox.Language = FastColoredTextBoxNS.Language.XML; - this.SynthTextBox.LeftBracket = '<'; - this.SynthTextBox.LeftBracket2 = '('; - this.SynthTextBox.Location = new System.Drawing.Point(3, 149); - this.SynthTextBox.Name = "SynthTextBox"; - this.SynthTextBox.Paddings = new System.Windows.Forms.Padding(0); - this.SynthTextBox.RightBracket = '>'; - this.SynthTextBox.RightBracket2 = ')'; - this.SynthTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); - this.SynthTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("SynthTextBox.ServiceColors"))); - this.SynthTextBox.Size = new System.Drawing.Size(825, 308); - this.SynthTextBox.TabIndex = 3; - this.SynthTextBox.Zoom = 100; - this.SynthTextBox.TextChangedDelayed += new System.EventHandler(this.SynthTextBox_TextChangedDelayed); + SynthTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SynthTextBox.AutoCompleteBracketsList = new char[] { '(', ')', '{', '}', '[', ']', '"', '"', '\'', '\'' }; + SynthTextBox.AutoIndentChars = false; + SynthTextBox.AutoIndentCharsPatterns = ""; + SynthTextBox.AutoIndentExistingLines = false; + SynthTextBox.AutoScrollMinSize = new System.Drawing.Size(2, 14); + SynthTextBox.BackBrush = null; + SynthTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + SynthTextBox.CharHeight = 14; + SynthTextBox.CharWidth = 8; + SynthTextBox.CommentPrefix = null; + SynthTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; + SynthTextBox.DelayedEventsInterval = 1; + SynthTextBox.DisabledColor = System.Drawing.Color.FromArgb(100, 180, 180, 180); + SynthTextBox.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + SynthTextBox.IsReplaceMode = false; + SynthTextBox.Language = FastColoredTextBoxNS.Language.XML; + SynthTextBox.LeftBracket = '<'; + SynthTextBox.LeftBracket2 = '('; + SynthTextBox.Location = new System.Drawing.Point(4, 172); + SynthTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SynthTextBox.Name = "SynthTextBox"; + SynthTextBox.Paddings = new System.Windows.Forms.Padding(0); + SynthTextBox.RightBracket = '>'; + SynthTextBox.RightBracket2 = ')'; + SynthTextBox.SelectionColor = System.Drawing.Color.FromArgb(60, 0, 0, 255); + SynthTextBox.ServiceColors = (FastColoredTextBoxNS.ServiceColors)resources.GetObject("SynthTextBox.ServiceColors"); + SynthTextBox.Size = new System.Drawing.Size(962, 355); + SynthTextBox.TabIndex = 3; + SynthTextBox.Zoom = 100; + SynthTextBox.TextChangedDelayed += SynthTextBox_TextChangedDelayed; // // MainToolbar // - this.MainToolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.NewButton, - this.OpenButton, - this.SaveButton}); - this.MainToolbar.Location = new System.Drawing.Point(0, 24); - this.MainToolbar.Name = "MainToolbar"; - this.MainToolbar.Size = new System.Drawing.Size(839, 25); - this.MainToolbar.TabIndex = 9; - this.MainToolbar.Text = "Main Toolbar"; + MainToolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { NewButton, OpenButton, SaveButton }); + MainToolbar.Location = new System.Drawing.Point(0, 24); + MainToolbar.Name = "MainToolbar"; + MainToolbar.Size = new System.Drawing.Size(979, 25); + MainToolbar.TabIndex = 9; + MainToolbar.Text = "Main Toolbar"; // // NewButton // - this.NewButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.NewButton.Image = ((System.Drawing.Image)(resources.GetObject("NewButton.Image"))); - this.NewButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.NewButton.Name = "NewButton"; - this.NewButton.Size = new System.Drawing.Size(32, 22); - this.NewButton.Text = "New..."; - this.NewButton.ButtonClick += new System.EventHandler(this.NewButton_ButtonClick); + NewButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + NewButton.Image = (System.Drawing.Image)resources.GetObject("NewButton.Image"); + NewButton.ImageTransparentColor = System.Drawing.Color.Magenta; + NewButton.Name = "NewButton"; + NewButton.Size = new System.Drawing.Size(32, 22); + NewButton.Text = "New..."; + NewButton.ButtonClick += NewButton_ButtonClick; // // OpenButton // - this.OpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.OpenButton.Image = ((System.Drawing.Image)(resources.GetObject("OpenButton.Image"))); - this.OpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.OpenButton.Name = "OpenButton"; - this.OpenButton.Size = new System.Drawing.Size(32, 22); - this.OpenButton.Text = "Open..."; - this.OpenButton.ButtonClick += new System.EventHandler(this.OpenButton_ButtonClick); + OpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + OpenButton.Image = (System.Drawing.Image)resources.GetObject("OpenButton.Image"); + OpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; + OpenButton.Name = "OpenButton"; + OpenButton.Size = new System.Drawing.Size(32, 22); + OpenButton.Text = "Open..."; + OpenButton.ButtonClick += OpenButton_ButtonClick; // // SaveButton // - this.SaveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.SaveButton.Image = ((System.Drawing.Image)(resources.GetObject("SaveButton.Image"))); - this.SaveButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.SaveButton.Name = "SaveButton"; - this.SaveButton.Size = new System.Drawing.Size(32, 22); - this.SaveButton.Text = "Save"; - this.SaveButton.ButtonClick += new System.EventHandler(this.SaveButton_ButtonClick); + SaveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + SaveButton.Image = (System.Drawing.Image)resources.GetObject("SaveButton.Image"); + SaveButton.ImageTransparentColor = System.Drawing.Color.Magenta; + SaveButton.Name = "SaveButton"; + SaveButton.Size = new System.Drawing.Size(32, 22); + SaveButton.Text = "Save"; + SaveButton.ButtonClick += SaveButton_ButtonClick; // // MainStatusStrip // - this.MainStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.StatusLabel}); - this.MainStatusStrip.Location = new System.Drawing.Point(0, 535); - this.MainStatusStrip.Name = "MainStatusStrip"; - this.MainStatusStrip.Size = new System.Drawing.Size(839, 22); - this.MainStatusStrip.TabIndex = 7; - this.MainStatusStrip.Text = "Main Status Strip"; + MainStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { StatusLabel }); + MainStatusStrip.Location = new System.Drawing.Point(0, 621); + MainStatusStrip.Name = "MainStatusStrip"; + MainStatusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0); + MainStatusStrip.Size = new System.Drawing.Size(979, 22); + MainStatusStrip.TabIndex = 7; + MainStatusStrip.Text = "Main Status Strip"; // // StatusLabel // - this.StatusLabel.Name = "StatusLabel"; - this.StatusLabel.Size = new System.Drawing.Size(824, 17); - this.StatusLabel.Spring = true; - this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + StatusLabel.Name = "StatusLabel"; + StatusLabel.Size = new System.Drawing.Size(962, 17); + StatusLabel.Spring = true; + StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // MainMenu // - this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileMenu, - this.EditMenu, - this.ViewMenu}); - this.MainMenu.Location = new System.Drawing.Point(0, 0); - this.MainMenu.Name = "MainMenu"; - this.MainMenu.Size = new System.Drawing.Size(839, 24); - this.MainMenu.TabIndex = 8; - this.MainMenu.Text = "Main Menu"; + MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { FileMenu, EditMenu, ViewMenu }); + MainMenu.Location = new System.Drawing.Point(0, 0); + MainMenu.Name = "MainMenu"; + MainMenu.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2); + MainMenu.Size = new System.Drawing.Size(979, 24); + MainMenu.TabIndex = 8; + MainMenu.Text = "Main Menu"; // // FileMenu // - this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileNewMenu, - this.FileOpenMenu, - this.FileSaveMenu, - this.FileSaveAsMenu, - this.toolStripSeparator1, - this.FileCloseMenu}); - this.FileMenu.Name = "FileMenu"; - this.FileMenu.Size = new System.Drawing.Size(37, 20); - this.FileMenu.Text = "File"; + FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { FileNewMenu, FileOpenMenu, FileSaveMenu, FileSaveAsMenu, toolStripSeparator1, FileCloseMenu }); + FileMenu.Name = "FileMenu"; + FileMenu.Size = new System.Drawing.Size(37, 20); + FileMenu.Text = "File"; // // FileNewMenu // - this.FileNewMenu.Name = "FileNewMenu"; - this.FileNewMenu.Size = new System.Drawing.Size(145, 22); - this.FileNewMenu.Text = "New"; - this.FileNewMenu.Click += new System.EventHandler(this.FileNewMenu_Click); + FileNewMenu.Name = "FileNewMenu"; + FileNewMenu.Size = new System.Drawing.Size(145, 22); + FileNewMenu.Text = "New"; + FileNewMenu.Click += FileNewMenu_Click; // // FileOpenMenu // - this.FileOpenMenu.Name = "FileOpenMenu"; - this.FileOpenMenu.Size = new System.Drawing.Size(145, 22); - this.FileOpenMenu.Text = "Open..."; - this.FileOpenMenu.Click += new System.EventHandler(this.FileOpenMenu_Click); + FileOpenMenu.Name = "FileOpenMenu"; + FileOpenMenu.Size = new System.Drawing.Size(145, 22); + FileOpenMenu.Text = "Open..."; + FileOpenMenu.Click += FileOpenMenu_Click; // // FileSaveMenu // - this.FileSaveMenu.Name = "FileSaveMenu"; - this.FileSaveMenu.Size = new System.Drawing.Size(145, 22); - this.FileSaveMenu.Text = "Save"; - this.FileSaveMenu.Click += new System.EventHandler(this.FileSaveMenu_Click); + FileSaveMenu.Name = "FileSaveMenu"; + FileSaveMenu.Size = new System.Drawing.Size(145, 22); + FileSaveMenu.Text = "Save"; + FileSaveMenu.Click += FileSaveMenu_Click; // // FileSaveAsMenu // - this.FileSaveAsMenu.Name = "FileSaveAsMenu"; - this.FileSaveAsMenu.Size = new System.Drawing.Size(145, 22); - this.FileSaveAsMenu.Text = "Save As..."; - this.FileSaveAsMenu.Click += new System.EventHandler(this.FileSaveAsMenu_Click); + FileSaveAsMenu.Name = "FileSaveAsMenu"; + FileSaveAsMenu.Size = new System.Drawing.Size(145, 22); + FileSaveAsMenu.Text = "Save As..."; + FileSaveAsMenu.Click += FileSaveAsMenu_Click; // // toolStripSeparator1 // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(142, 6); + toolStripSeparator1.Name = "toolStripSeparator1"; + toolStripSeparator1.Size = new System.Drawing.Size(142, 6); // // FileCloseMenu // - this.FileCloseMenu.Name = "FileCloseMenu"; - this.FileCloseMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this.FileCloseMenu.Size = new System.Drawing.Size(145, 22); - this.FileCloseMenu.Text = "Close"; - this.FileCloseMenu.Click += new System.EventHandler(this.FileCloseMenu_Click); + FileCloseMenu.Name = "FileCloseMenu"; + FileCloseMenu.ShortcutKeys = System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4; + FileCloseMenu.Size = new System.Drawing.Size(145, 22); + FileCloseMenu.Text = "Close"; + FileCloseMenu.Click += FileCloseMenu_Click; // // EditMenu // - this.EditMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.wIPToolStripMenuItem}); - this.EditMenu.Enabled = false; - this.EditMenu.Name = "EditMenu"; - this.EditMenu.Size = new System.Drawing.Size(39, 20); - this.EditMenu.Text = "Edit"; + EditMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { wIPToolStripMenuItem }); + EditMenu.Enabled = false; + EditMenu.Name = "EditMenu"; + EditMenu.Size = new System.Drawing.Size(39, 20); + EditMenu.Text = "Edit"; // // wIPToolStripMenuItem // - this.wIPToolStripMenuItem.Name = "wIPToolStripMenuItem"; - this.wIPToolStripMenuItem.Size = new System.Drawing.Size(106, 22); - this.wIPToolStripMenuItem.Text = "[WIP!]"; + wIPToolStripMenuItem.Name = "wIPToolStripMenuItem"; + wIPToolStripMenuItem.Size = new System.Drawing.Size(106, 22); + wIPToolStripMenuItem.Text = "[WIP!]"; // // ViewMenu // - this.ViewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.wIPToolStripMenuItem1}); - this.ViewMenu.Enabled = false; - this.ViewMenu.Name = "ViewMenu"; - this.ViewMenu.Size = new System.Drawing.Size(44, 20); - this.ViewMenu.Text = "View"; + ViewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { wIPToolStripMenuItem1 }); + ViewMenu.Enabled = false; + ViewMenu.Name = "ViewMenu"; + ViewMenu.Size = new System.Drawing.Size(44, 20); + ViewMenu.Text = "View"; // // wIPToolStripMenuItem1 // - this.wIPToolStripMenuItem1.Name = "wIPToolStripMenuItem1"; - this.wIPToolStripMenuItem1.Size = new System.Drawing.Size(106, 22); - this.wIPToolStripMenuItem1.Text = "[WIP!]"; + wIPToolStripMenuItem1.Name = "wIPToolStripMenuItem1"; + wIPToolStripMenuItem1.Size = new System.Drawing.Size(106, 22); + wIPToolStripMenuItem1.Text = "[WIP!]"; // // OpenFileDialog // - this.OpenFileDialog.Filter = "XML files|*.xml|All files|*.*"; + OpenFileDialog.Filter = "XML files|*.xml|All files|*.*"; // // SaveFileDialog // - this.SaveFileDialog.Filter = "XML files|*.xml|All files|*.*"; + SaveFileDialog.Filter = "XML files|*.xml|All files|*.*"; // // RelForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(839, 557); - this.Controls.Add(this.MainTabControl); - this.Controls.Add(this.MainToolbar); - this.Controls.Add(this.MainStatusStrip); - this.Controls.Add(this.MainMenu); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "RelForm"; - this.Text = "Audio dat.rel Editor - CodeWalker by dexyfex"; - this.MainTabControl.ResumeLayout(false); - this.XmlTabPage.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.XmlTextBox)).EndInit(); - this.DetailsTabPage.ResumeLayout(false); - this.NameTableTabPage.ResumeLayout(false); - this.NameTableTabPage.PerformLayout(); - this.SearchTabPage.ResumeLayout(false); - this.SearchTabPage.PerformLayout(); - this.SynthsTabPage.ResumeLayout(false); - this.SynthsTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SynthBufferChart)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.SynthTextBox)).EndInit(); - this.MainToolbar.ResumeLayout(false); - this.MainToolbar.PerformLayout(); - this.MainStatusStrip.ResumeLayout(false); - this.MainStatusStrip.PerformLayout(); - this.MainMenu.ResumeLayout(false); - this.MainMenu.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(979, 643); + Controls.Add(MainTabControl); + Controls.Add(MainToolbar); + Controls.Add(MainStatusStrip); + Controls.Add(MainMenu); + Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "RelForm"; + Text = "Audio dat.rel Editor - CodeWalker by dexyfex"; + MainTabControl.ResumeLayout(false); + XmlTabPage.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)XmlTextBox).EndInit(); + DetailsTabPage.ResumeLayout(false); + NameTableTabPage.ResumeLayout(false); + NameTableTabPage.PerformLayout(); + SearchTabPage.ResumeLayout(false); + SearchTabPage.PerformLayout(); + SynthsTabPage.ResumeLayout(false); + SynthsTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)SynthTextBox).EndInit(); + MainToolbar.ResumeLayout(false); + MainToolbar.PerformLayout(); + MainStatusStrip.ResumeLayout(false); + MainStatusStrip.PerformLayout(); + MainMenu.ResumeLayout(false); + MainMenu.PerformLayout(); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -704,7 +658,7 @@ private FastColoredTextBoxNS.FastColoredTextBox SynthTextBox; private System.Windows.Forms.Button SynthCopyXMLButton; private System.Windows.Forms.Button SynthPlayButton; - private System.Windows.Forms.DataVisualization.Charting.Chart SynthBufferChart; + //private System.Windows.Forms.DataVisualization.Charting.Chart SynthBufferChart; private System.Windows.Forms.TextBox SynthOutputsTextBox; private System.Windows.Forms.TextBox SynthVariablesTextBox; private System.Windows.Forms.Label label3; diff --git a/CodeWalker/Forms/RelForm.cs b/CodeWalker/Forms/RelForm.cs index df4adfe..9cf0fe0 100644 --- a/CodeWalker/Forms/RelForm.cs +++ b/CodeWalker/Forms/RelForm.cs @@ -12,7 +12,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -using System.Windows.Forms.DataVisualization.Charting; +//using System.Windows.Forms.DataVisualization.Charting; using System.Xml; using Range = FastColoredTextBoxNS.Range; using TextStyle = FastColoredTextBoxNS.TextStyle; @@ -168,7 +168,7 @@ namespace CodeWalker.Forms } else { - sb.AppendLine("0x" + h.ToString("X").PadLeft(8, '0')); + sb.AppendLine("0x" + h.ToString("X8")); } } sb.AppendLine(); @@ -203,13 +203,12 @@ namespace CodeWalker.Forms private bool SaveRel(XmlDocument doc) { - if (!(ExploreForm.Instance?.EditMode ?? false)) return false; + if (!(ExploreForm.Instance?.EditMode ?? false)) + return false; - byte[] data = null; + byte[] data; -#if !DEBUG try -#endif { switch (metaFormat) { @@ -227,14 +226,13 @@ namespace CodeWalker.Forms break; } } -#if !DEBUG catch (Exception ex) { MessageBox.Show("Exception encountered!\r\n" + ex.ToString(), "Cannot convert XML"); return false; } -#endif - if (data == null) + + if (data.Length == 0) { MessageBox.Show("Schema not supported. (Unspecified error - data was null!)", "Cannot convert XML"); return false; @@ -255,8 +253,6 @@ namespace CodeWalker.Forms if (!(ExploreForm.EnsureRpfValidEncryption(rpfFileEntry.File))) return false; var newentry = RpfFile.CreateFile(rpfFileEntry.Parent, rpfFileEntry.Name, data); - if (newentry != rpfFileEntry) - { } rpfFileEntry = newentry; ExploreForm.RefreshMainListViewInvoke(); //update the file details in explorer... @@ -327,7 +323,8 @@ namespace CodeWalker.Forms } private void NewDocument() { - if (!CloseDocument()) return; + if (!CloseDocument()) + return; FileName = "New.xml"; rpfFileEntry = null; @@ -336,13 +333,16 @@ namespace CodeWalker.Forms } private void OpenDocument() { - if (OpenFileDialog.ShowDialog() != DialogResult.OK) return; + if (OpenFileDialog.ShowDialog() != DialogResult.OK) + return; - if (!CloseDocument()) return; + if (!CloseDocument()) + return; var fn = OpenFileDialog.FileName; - if (!File.Exists(fn)) return; //couldn't find file? + if (!File.Exists(fn)) + return; //couldn't find file? Xml = File.ReadAllText(fn); @@ -377,10 +377,14 @@ namespace CodeWalker.Forms saveAs = true; } - if (string.IsNullOrEmpty(FileName)) saveAs = true; - if (string.IsNullOrEmpty(FilePath)) saveAs = true; - else if (FilePath.StartsWith(GTAFolder.CurrentGTAFolder, StringComparison.OrdinalIgnoreCase)) saveAs = true; - if (!File.Exists(FilePath)) saveAs = true; + if (string.IsNullOrEmpty(FileName)) + saveAs = true; + if (string.IsNullOrEmpty(FilePath)) + saveAs = true; + else if (FilePath.StartsWith(GTAFolder.CurrentGTAFolder, StringComparison.OrdinalIgnoreCase)) + saveAs = true; + if (!File.Exists(FilePath)) + saveAs = true; var fn = FilePath; if (saveAs) @@ -504,20 +508,20 @@ namespace CodeWalker.Forms { SearchResultsGrid.SelectedObject = null; - if (CurrentFile?.RelDatasSorted == null) return; + if (CurrentFile?.RelDatas == null || CurrentFile.RelDatas.Length == 0) + return; bool textsearch = SearchTextRadio.Checked; var text = SearchTextBox.Text; - uint hash = 0; - uint hashl = 0; - if (!uint.TryParse(text, out hash))//don't re-hash hashes + uint hashl; + if (!uint.TryParse(text, out uint hash))//don't re-hash hashes { hash = JenkHash.GenHash(text); - JenkIndex.Ensure(text); + JenkIndex.Ensure(text, hash); hashl = JenkHash.GenHashLower(text); - JenkIndex.EnsureLower(text); + JenkIndex.Ensure(text, hashl); } else { @@ -715,16 +719,16 @@ namespace CodeWalker.Forms } else { -//#if !DEBUG + //#if !DEBUG try { -//#endif + //#endif if (synthesizer == null) { synthesizer = new Synthesizer(); synthesizer.Stopped += (t, _) => { - BeginInvoke((Action)(() => + BeginInvoke((() => { SynthPlayButton.Enabled = true; SynthStopButton.Enabled = false; @@ -739,37 +743,37 @@ namespace CodeWalker.Forms Array.Copy(synthesizer.Buffers[i], buffersCopy[i], synthesizer.Buffers[i].Length); } - BeginInvoke((Action)(() => + BeginInvoke((() => { //for (int i = 0; i < buffersCopy.Length; i++) int i = synthesizer.Synth.OutputsIndices[0]; try { - var series = SynthBufferChart.Series.FindByName($"B{i}"); - if (series != null) - { - series.Points.Clear(); - foreach (var v in buffersCopy[i]) - series.Points.AddY(Math.Max(Math.Min(v, 2.0f), -2.0f));//make sure crazy accidental values don't crash it later - } + //var series = SynthBufferChart.Series.FindByName($"B{i}"); + //if (series != null) + //{ + // series.Points.Clear(); + // foreach (var v in buffersCopy[i]) + // series.Points.AddY(Math.Max(Math.Min(v, 2.0f), -2.0f));//make sure crazy accidental values don't crash it later + //} } catch { } })); }; } - SynthBufferChart.Series.Clear(); - for (int i = 0; i < newSynth.BuffersCount; i++) - { - var series = SynthBufferChart.Series.Add($"B{i}"); - series.IsXValueIndexed = true; - series.ChartType = SeriesChartType.FastLine; - } + //SynthBufferChart.Series.Clear(); + //for (int i = 0; i < newSynth.BuffersCount; i++) + //{ + // var series = SynthBufferChart.Series.Add($"B{i}"); + // series.IsXValueIndexed = true; + // series.ChartType = SeriesChartType.FastLine; + //} SynthPlayButton.Enabled = false; SynthStopButton.Enabled = true; synthesizer.Play(newSynth); -//#if !DEBUG + //#if !DEBUG } catch (Exception ex) { @@ -777,7 +781,7 @@ namespace CodeWalker.Forms SynthStopButton.Enabled = false; StatusLabel.Text = $"Synthesizer error: {ex}"; } -//#endif + //#endif } } diff --git a/CodeWalker/Forms/RelForm.resx b/CodeWalker/Forms/RelForm.resx index cbdfdac..18ff938 100644 --- a/CodeWalker/Forms/RelForm.resx +++ b/CodeWalker/Forms/RelForm.resx @@ -1,17 +1,17 @@  - @@ -117,40 +117,40 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdGYXN0Q29sb3JlZFRleHRCb3gsIFZlcnNpb249Mi4xNi4yNC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWZiOGFhMTJiOTk0ZWY2MWIMAwAAAFFTeXN0 - ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu - PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACJGYXN0Q29sb3JlZFRleHRCb3hOUy5TZXJ2aWNlQ29sb3JzBgAA - ACg8Q29sbGFwc2VNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxDb2xsYXBzZU1hcmtlckJh - Y2tDb2xvcj5rX19CYWNraW5nRmllbGQqPENvbGxhcHNlTWFya2VyQm9yZGVyQ29sb3I+a19fQmFja2lu - Z0ZpZWxkJjxFeHBhbmRNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkJjxFeHBhbmRNYXJrZXJC - YWNrQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxFeHBhbmRNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5n - RmllbGQEBAQEBAQUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAA - ABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5E - cmF3aW5nLkNvbG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAACAAAABfz///8UU3lzdGVtLkRy - YXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAACgAAAAAA - AAAAlgABAAH7/////P///woAAAAAAAAAAKQAAQAB+v////z///8KAAAAAAAAAACWAAEAAfn////8//// - CgAAAAAAAAAATgABAAH4/////P///woAAAAAAAAAAKQAAQAB9/////z///8KAAAAAAAAAACWAAEACw== - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdGYXN0Q29sb3JlZFRleHRCb3gsIFZlcnNpb249Mi4xNi4yNC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWZiOGFhMTJiOTk0ZWY2MWIMAwAAAFFTeXN0 - ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu - PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACJGYXN0Q29sb3JlZFRleHRCb3hOUy5TZXJ2aWNlQ29sb3JzBgAA - ACg8Q29sbGFwc2VNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxDb2xsYXBzZU1hcmtlckJh - Y2tDb2xvcj5rX19CYWNraW5nRmllbGQqPENvbGxhcHNlTWFya2VyQm9yZGVyQ29sb3I+a19fQmFja2lu - Z0ZpZWxkJjxFeHBhbmRNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkJjxFeHBhbmRNYXJrZXJC - YWNrQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxFeHBhbmRNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5n - RmllbGQEBAQEBAQUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAA - ABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5E - cmF3aW5nLkNvbG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAACAAAABfz///8UU3lzdGVtLkRy - YXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAACgAAAAAA - AAAAlgABAAH7/////P///woAAAAAAAAAAKQAAQAB+v////z///8KAAAAAAAAAACWAAEAAfn////8//// - CgAAAAAAAAAATgABAAH4/////P///woAAAAAAAAAAKQAAQAB9/////z///8KAAAAAAAAAACWAAEACw== + AAEAAAD/////AQAAAAAAAAAMAgAAAERGYXN0Q29sb3JlZFRleHRCb3gsIEN1bHR1cmU9bmV1dHJhbCwg + UHVibGljS2V5VG9rZW49ZmI4YWExMmI5OTRlZjYxYgwDAAAAUVN5c3RlbS5EcmF3aW5nLCBWZXJzaW9u + PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYQUB + AAAAIkZhc3RDb2xvcmVkVGV4dEJveE5TLlNlcnZpY2VDb2xvcnMGAAAAKDxDb2xsYXBzZU1hcmtlckZv + cmVDb2xvcj5rX19CYWNraW5nRmllbGQoPENvbGxhcHNlTWFya2VyQmFja0NvbG9yPmtfX0JhY2tpbmdG + aWVsZCo8Q29sbGFwc2VNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5nRmllbGQmPEV4cGFuZE1hcmtl + ckZvcmVDb2xvcj5rX19CYWNraW5nRmllbGQmPEV4cGFuZE1hcmtlckJhY2tDb2xvcj5rX19CYWNraW5n + RmllbGQoPEV4cGFuZE1hcmtlckJvcmRlckNvbG9yPmtfX0JhY2tpbmdGaWVsZAQEBAQEBBRTeXN0ZW0u + RHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNv + bG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5 + c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAIAAAAF/P///xRTeXN0ZW0uRHJhd2luZy5Db2xvcgQAAAAEbmFt + ZQV2YWx1ZQprbm93bkNvbG9yBXN0YXRlAQAAAAkHBwMAAAAKAAAAAAAAAACWAAEAAfv////8////CgAA + AAAAAAAApAABAAH6/////P///woAAAAAAAAAAJYAAQAB+f////z///8KAAAAAAAAAABOAAEAAfj////8 + ////CgAAAAAAAAAApAABAAH3/////P///woAAAAAAAAAAJYAAQAL + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAERGYXN0Q29sb3JlZFRleHRCb3gsIEN1bHR1cmU9bmV1dHJhbCwg + UHVibGljS2V5VG9rZW49ZmI4YWExMmI5OTRlZjYxYgwDAAAAUVN5c3RlbS5EcmF3aW5nLCBWZXJzaW9u + PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYQUB + AAAAIkZhc3RDb2xvcmVkVGV4dEJveE5TLlNlcnZpY2VDb2xvcnMGAAAAKDxDb2xsYXBzZU1hcmtlckZv + cmVDb2xvcj5rX19CYWNraW5nRmllbGQoPENvbGxhcHNlTWFya2VyQmFja0NvbG9yPmtfX0JhY2tpbmdG + aWVsZCo8Q29sbGFwc2VNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5nRmllbGQmPEV4cGFuZE1hcmtl + ckZvcmVDb2xvcj5rX19CYWNraW5nRmllbGQmPEV4cGFuZE1hcmtlckJhY2tDb2xvcj5rX19CYWNraW5n + RmllbGQoPEV4cGFuZE1hcmtlckJvcmRlckNvbG9yPmtfX0JhY2tpbmdGaWVsZAQEBAQEBBRTeXN0ZW0u + RHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNv + bG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5 + c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAIAAAAF/P///xRTeXN0ZW0uRHJhd2luZy5Db2xvcgQAAAAEbmFt + ZQV2YWx1ZQprbm93bkNvbG9yBXN0YXRlAQAAAAkHBwMAAAAKAAAAAAAAAACWAAEAAfv////8////CgAA + AAAAAAAApAABAAH6/////P///woAAAAAAAAAAJYAAQAB+f////z///8KAAAAAAAAAABOAAEAAfj////8 + ////CgAAAAAAAAAApAABAAH3/////P///woAAAAAAAAAAJYAAQAL diff --git a/CodeWalker/Forms/TextForm.cs b/CodeWalker/Forms/TextForm.cs index 75dce17..f6c38b9 100644 --- a/CodeWalker/Forms/TextForm.cs +++ b/CodeWalker/Forms/TextForm.cs @@ -92,7 +92,7 @@ namespace CodeWalker.Forms private void UpdateFormTitle() { - Text = fileName + " - " + fileType.ToString() + " Editor - CodeWalker by dexyfex"; + Text = $"{fileName} - {fileType} Editor - CodeWalker by dexyfex"; } private void UpdateTextBoxFromData() diff --git a/CodeWalker/Forms/YtdForm.cs b/CodeWalker/Forms/YtdForm.cs index dd5cbad..ac7b84d 100644 --- a/CodeWalker/Forms/YtdForm.cs +++ b/CodeWalker/Forms/YtdForm.cs @@ -152,8 +152,8 @@ namespace CodeWalker.Forms { int cmip = Math.Min(Math.Max(mip, 0), tex.Levels - 1); byte[] pixels = DDSIO.GetPixels(tex, cmip); - int w = tex.Width >> cmip; - int h = tex.Height >> cmip; + int w = Math.Max(tex.Width >> cmip, 1); + int h = Math.Max(tex.Height >> cmip, 1); //Image bmp = Image.FromStream(new MemoryStream(pixels)); @@ -188,6 +188,7 @@ namespace CodeWalker.Forms { UpdateStatus("Error reading texture mip: " + ex.ToString()); SelTexturePictureBox.Image = null; + Console.WriteLine(ex); } UpdateZoom(); diff --git a/CodeWalker/GameFiles/GameFileCacheFactory.cs b/CodeWalker/GameFiles/GameFileCacheFactory.cs index cf52ee1..54bde04 100644 --- a/CodeWalker/GameFiles/GameFileCacheFactory.cs +++ b/CodeWalker/GameFiles/GameFileCacheFactory.cs @@ -26,11 +26,6 @@ namespace CodeWalker.GameFiles return _instance; } } - public static GameFileCache GetInstance() - { - return Instance; - } - } } \ No newline at end of file diff --git a/CodeWalker/GameFiles/TextureFormats.cs b/CodeWalker/GameFiles/TextureFormats.cs index 7afbe4e..3378757 100644 --- a/CodeWalker/GameFiles/TextureFormats.cs +++ b/CodeWalker/GameFiles/TextureFormats.cs @@ -31,6 +31,7 @@ namespace CodeWalker.GameFiles case TextureFormat.D3DFMT_L8: format = Format.R8_UNorm; break; case TextureFormat.D3DFMT_A8R8G8B8: format = Format.B8G8R8A8_UNorm; break; case TextureFormat.D3DFMT_X8R8G8B8: format = Format.B8G8R8X8_UNorm; break; + case TextureFormat.D3DFMT_A16R16G16B16: format = Format.R16G16B16A16_UNorm; break; } return format; } @@ -54,6 +55,7 @@ namespace CodeWalker.GameFiles case TextureFormat.D3DFMT_L8: return 8;// R8_UNorm case TextureFormat.D3DFMT_A8R8G8B8: return 32;// B8G8R8A8_UNorm case TextureFormat.D3DFMT_X8R8G8B8: return 32;// B8G8R8X8_UNorm + case TextureFormat.D3DFMT_A16R16G16B16: return 32; default: return 0; } diff --git a/CodeWalker/PedsForm.Designer.cs b/CodeWalker/PedsForm.Designer.cs index 57c3f4c..c501991 100644 --- a/CodeWalker/PedsForm.Designer.cs +++ b/CodeWalker/PedsForm.Designer.cs @@ -28,1092 +28,1391 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PedsForm)); - this.ConsoleTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.ToolsPanelShowButton = new System.Windows.Forms.Button(); - this.ToolsPanelHideButton = new System.Windows.Forms.Button(); - this.ToolsDragPanel = new System.Windows.Forms.Panel(); - this.ConsolePanel = new System.Windows.Forms.Panel(); - this.HDTexturesCheckBox = new System.Windows.Forms.CheckBox(); - this.SkeletonsCheckBox = new System.Windows.Forms.CheckBox(); - this.TimeOfDayLabel = new System.Windows.Forms.Label(); - this.ToolsOptionsTabPage = new System.Windows.Forms.TabPage(); - this.label19 = new System.Windows.Forms.Label(); - this.TimeOfDayTrackBar = new System.Windows.Forms.TrackBar(); - this.ControlLightDirCheckBox = new System.Windows.Forms.CheckBox(); - this.ShowCollisionMeshesCheckBox = new System.Windows.Forms.CheckBox(); - this.GridCheckBox = new System.Windows.Forms.CheckBox(); - this.GridCountComboBox = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.GridSizeComboBox = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.StatusBarCheckBox = new System.Windows.Forms.CheckBox(); - this.ErrorConsoleCheckBox = new System.Windows.Forms.CheckBox(); - this.HDRRenderingCheckBox = new System.Windows.Forms.CheckBox(); - this.SkydomeCheckBox = new System.Windows.Forms.CheckBox(); - this.ShadowsCheckBox = new System.Windows.Forms.CheckBox(); - this.WireframeCheckBox = new System.Windows.Forms.CheckBox(); - this.RenderModeComboBox = new System.Windows.Forms.ComboBox(); - this.label11 = new System.Windows.Forms.Label(); - this.TextureSamplerComboBox = new System.Windows.Forms.ComboBox(); - this.TextureCoordsComboBox = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); - this.AnisotropicFilteringCheckBox = new System.Windows.Forms.CheckBox(); - this.label14 = new System.Windows.Forms.Label(); - this.DetailsPropertyGrid = new CodeWalker.WinForms.ReadOnlyPropertyGrid(); - this.ToolsDetailsTabPage = new System.Windows.Forms.TabPage(); - this.TextureViewerButton = new System.Windows.Forms.Button(); - this.TexturesTreeView = new CodeWalker.WinForms.TreeViewFix(); - this.ToolsTexturesTabPage = new System.Windows.Forms.TabPage(); - this.ModelsTreeView = new CodeWalker.WinForms.TreeViewFix(); - this.StatusStrip = new System.Windows.Forms.StatusStrip(); - this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.MousedLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.StatsLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.ToolsModelsTabPage = new System.Windows.Forms.TabPage(); - this.label3 = new System.Windows.Forms.Label(); - this.PedNameComboBox = new System.Windows.Forms.ComboBox(); - this.StatsUpdateTimer = new System.Windows.Forms.Timer(this.components); - this.ToolsPedTabPage = new System.Windows.Forms.TabPage(); - this.EnableRootMotionCheckBox = new System.Windows.Forms.CheckBox(); - this.label23 = new System.Windows.Forms.Label(); - this.label22 = new System.Windows.Forms.Label(); - this.ClipComboBox = new System.Windows.Forms.ComboBox(); - this.label21 = new System.Windows.Forms.Label(); - this.ClipDictComboBox = new System.Windows.Forms.ComboBox(); - this.label20 = new System.Windows.Forms.Label(); - this.CompJbibComboBox = new System.Windows.Forms.ComboBox(); - this.label18 = new System.Windows.Forms.Label(); - this.CompDeclComboBox = new System.Windows.Forms.ComboBox(); - this.label17 = new System.Windows.Forms.Label(); - this.CompTaskComboBox = new System.Windows.Forms.ComboBox(); - this.label16 = new System.Windows.Forms.Label(); - this.CompAccsComboBox = new System.Windows.Forms.ComboBox(); - this.label15 = new System.Windows.Forms.Label(); - this.CompTeefComboBox = new System.Windows.Forms.ComboBox(); - this.label13 = new System.Windows.Forms.Label(); - this.CompFeetComboBox = new System.Windows.Forms.ComboBox(); - this.label12 = new System.Windows.Forms.Label(); - this.CompHandComboBox = new System.Windows.Forms.ComboBox(); - this.label9 = new System.Windows.Forms.Label(); - this.CompLowrComboBox = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); - this.CompUpprComboBox = new System.Windows.Forms.ComboBox(); - this.label7 = new System.Windows.Forms.Label(); - this.CompHairComboBox = new System.Windows.Forms.ComboBox(); - this.label6 = new System.Windows.Forms.Label(); - this.CompBerdComboBox = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.CompHeadComboBox = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.ToolsTabControl = new System.Windows.Forms.TabControl(); - this.ToolsPanel = new System.Windows.Forms.Panel(); - this.ConsolePanel.SuspendLayout(); - this.ToolsOptionsTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).BeginInit(); - this.ToolsDetailsTabPage.SuspendLayout(); - this.ToolsTexturesTabPage.SuspendLayout(); - this.StatusStrip.SuspendLayout(); - this.ToolsModelsTabPage.SuspendLayout(); - this.ToolsPedTabPage.SuspendLayout(); - this.ToolsTabControl.SuspendLayout(); - this.ToolsPanel.SuspendLayout(); - this.SuspendLayout(); + ConsoleTextBox = new WinForms.TextBoxFix(); + ToolsPanelShowButton = new System.Windows.Forms.Button(); + ToolsPanelHideButton = new System.Windows.Forms.Button(); + ToolsDragPanel = new System.Windows.Forms.Panel(); + ConsolePanel = new System.Windows.Forms.Panel(); + HDTexturesCheckBox = new System.Windows.Forms.CheckBox(); + SkeletonsCheckBox = new System.Windows.Forms.CheckBox(); + TimeOfDayLabel = new System.Windows.Forms.Label(); + ToolsOptionsTabPage = new System.Windows.Forms.TabPage(); + label19 = new System.Windows.Forms.Label(); + TimeOfDayTrackBar = new System.Windows.Forms.TrackBar(); + ControlLightDirCheckBox = new System.Windows.Forms.CheckBox(); + ShowCollisionMeshesCheckBox = new System.Windows.Forms.CheckBox(); + GridCheckBox = new System.Windows.Forms.CheckBox(); + GridCountComboBox = new System.Windows.Forms.ComboBox(); + label2 = new System.Windows.Forms.Label(); + GridSizeComboBox = new System.Windows.Forms.ComboBox(); + label1 = new System.Windows.Forms.Label(); + StatusBarCheckBox = new System.Windows.Forms.CheckBox(); + ErrorConsoleCheckBox = new System.Windows.Forms.CheckBox(); + HDRRenderingCheckBox = new System.Windows.Forms.CheckBox(); + SkydomeCheckBox = new System.Windows.Forms.CheckBox(); + ShadowsCheckBox = new System.Windows.Forms.CheckBox(); + WireframeCheckBox = new System.Windows.Forms.CheckBox(); + RenderModeComboBox = new System.Windows.Forms.ComboBox(); + label11 = new System.Windows.Forms.Label(); + TextureSamplerComboBox = new System.Windows.Forms.ComboBox(); + TextureCoordsComboBox = new System.Windows.Forms.ComboBox(); + label10 = new System.Windows.Forms.Label(); + AnisotropicFilteringCheckBox = new System.Windows.Forms.CheckBox(); + label14 = new System.Windows.Forms.Label(); + DetailsPropertyGrid = new WinForms.ReadOnlyPropertyGrid(); + ToolsDetailsTabPage = new System.Windows.Forms.TabPage(); + TextureViewerButton = new System.Windows.Forms.Button(); + TexturesTreeView = new WinForms.TreeViewFix(); + ToolsTexturesTabPage = new System.Windows.Forms.TabPage(); + ModelsTreeView = new WinForms.TreeViewFix(); + StatusStrip = new System.Windows.Forms.StatusStrip(); + StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + MousedLabel = new System.Windows.Forms.ToolStripStatusLabel(); + StatsLabel = new System.Windows.Forms.ToolStripStatusLabel(); + ToolsModelsTabPage = new System.Windows.Forms.TabPage(); + label3 = new System.Windows.Forms.Label(); + PedNameComboBox = new System.Windows.Forms.ComboBox(); + StatsUpdateTimer = new System.Windows.Forms.Timer(components); + ToolsPedTabPage = new System.Windows.Forms.TabPage(); + tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + label5 = new System.Windows.Forms.Label(); + CompHeadComboBox = new System.Windows.Forms.ComboBox(); + label6 = new System.Windows.Forms.Label(); + CompBerdComboBox = new System.Windows.Forms.ComboBox(); + label7 = new System.Windows.Forms.Label(); + CompHairComboBox = new System.Windows.Forms.ComboBox(); + label8 = new System.Windows.Forms.Label(); + CompUpprComboBox = new System.Windows.Forms.ComboBox(); + CompJbibComboBox = new System.Windows.Forms.ComboBox(); + label20 = new System.Windows.Forms.Label(); + label9 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + CompDeclComboBox = new System.Windows.Forms.ComboBox(); + label18 = new System.Windows.Forms.Label(); + label13 = new System.Windows.Forms.Label(); + label15 = new System.Windows.Forms.Label(); + CompTaskComboBox = new System.Windows.Forms.ComboBox(); + label17 = new System.Windows.Forms.Label(); + CompLowrComboBox = new System.Windows.Forms.ComboBox(); + CompHandComboBox = new System.Windows.Forms.ComboBox(); + CompAccsComboBox = new System.Windows.Forms.ComboBox(); + label16 = new System.Windows.Forms.Label(); + CompFeetComboBox = new System.Windows.Forms.ComboBox(); + CompTeefComboBox = new System.Windows.Forms.ComboBox(); + CompBerdTexture = new System.Windows.Forms.ComboBox(); + CompHeadTexture = new System.Windows.Forms.ComboBox(); + CompHairTexture = new System.Windows.Forms.ComboBox(); + CompUpprTexture = new System.Windows.Forms.ComboBox(); + CompLowrTexture = new System.Windows.Forms.ComboBox(); + CompHandTexture = new System.Windows.Forms.ComboBox(); + CompFeetTexture = new System.Windows.Forms.ComboBox(); + CompTeefTexture = new System.Windows.Forms.ComboBox(); + CompAccsTexture = new System.Windows.Forms.ComboBox(); + CompTaskTexture = new System.Windows.Forms.ComboBox(); + CompDeclTexture = new System.Windows.Forms.ComboBox(); + CompJbibTexture = new System.Windows.Forms.ComboBox(); + label24 = new System.Windows.Forms.Label(); + YmtNameComboBox = new System.Windows.Forms.ComboBox(); + EnableRootMotionCheckBox = new System.Windows.Forms.CheckBox(); + label23 = new System.Windows.Forms.Label(); + label22 = new System.Windows.Forms.Label(); + ClipComboBox = new System.Windows.Forms.ComboBox(); + label21 = new System.Windows.Forms.Label(); + ClipDictComboBox = new System.Windows.Forms.ComboBox(); + label4 = new System.Windows.Forms.Label(); + ToolsTabControl = new System.Windows.Forms.TabControl(); + ToolsPanel = new System.Windows.Forms.Panel(); + ConsolePanel.SuspendLayout(); + ToolsOptionsTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)TimeOfDayTrackBar).BeginInit(); + ToolsDetailsTabPage.SuspendLayout(); + ToolsTexturesTabPage.SuspendLayout(); + StatusStrip.SuspendLayout(); + ToolsModelsTabPage.SuspendLayout(); + ToolsPedTabPage.SuspendLayout(); + tableLayoutPanel1.SuspendLayout(); + ToolsTabControl.SuspendLayout(); + ToolsPanel.SuspendLayout(); + SuspendLayout(); // // ConsoleTextBox // - this.ConsoleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ConsoleTextBox.Location = new System.Drawing.Point(3, 3); - this.ConsoleTextBox.Multiline = true; - this.ConsoleTextBox.Name = "ConsoleTextBox"; - this.ConsoleTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.ConsoleTextBox.Size = new System.Drawing.Size(695, 95); - this.ConsoleTextBox.TabIndex = 0; + ConsoleTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ConsoleTextBox.Location = new System.Drawing.Point(4, 3); + ConsoleTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ConsoleTextBox.Multiline = true; + ConsoleTextBox.Name = "ConsoleTextBox"; + ConsoleTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + ConsoleTextBox.Size = new System.Drawing.Size(786, 109); + ConsoleTextBox.TabIndex = 0; // // ToolsPanelShowButton // - this.ToolsPanelShowButton.Location = new System.Drawing.Point(15, 15); - this.ToolsPanelShowButton.Name = "ToolsPanelShowButton"; - this.ToolsPanelShowButton.Size = new System.Drawing.Size(30, 23); - this.ToolsPanelShowButton.TabIndex = 8; - this.ToolsPanelShowButton.Text = ">>"; - this.ToolsPanelShowButton.UseVisualStyleBackColor = true; - this.ToolsPanelShowButton.Click += new System.EventHandler(this.ToolsPanelShowButton_Click); + ToolsPanelShowButton.Location = new System.Drawing.Point(18, 17); + ToolsPanelShowButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanelShowButton.Name = "ToolsPanelShowButton"; + ToolsPanelShowButton.Size = new System.Drawing.Size(35, 27); + ToolsPanelShowButton.TabIndex = 8; + ToolsPanelShowButton.Text = ">>"; + ToolsPanelShowButton.UseVisualStyleBackColor = true; + ToolsPanelShowButton.Click += ToolsPanelShowButton_Click; // // ToolsPanelHideButton // - this.ToolsPanelHideButton.Location = new System.Drawing.Point(3, 3); - this.ToolsPanelHideButton.Name = "ToolsPanelHideButton"; - this.ToolsPanelHideButton.Size = new System.Drawing.Size(30, 23); - this.ToolsPanelHideButton.TabIndex = 0; - this.ToolsPanelHideButton.Text = "<<"; - this.ToolsPanelHideButton.UseVisualStyleBackColor = true; - this.ToolsPanelHideButton.Click += new System.EventHandler(this.ToolsPanelHideButton_Click); + ToolsPanelHideButton.Location = new System.Drawing.Point(4, 3); + ToolsPanelHideButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanelHideButton.Name = "ToolsPanelHideButton"; + ToolsPanelHideButton.Size = new System.Drawing.Size(35, 27); + ToolsPanelHideButton.TabIndex = 0; + ToolsPanelHideButton.Text = "<<"; + ToolsPanelHideButton.UseVisualStyleBackColor = true; + ToolsPanelHideButton.Click += ToolsPanelHideButton_Click; // // ToolsDragPanel // - this.ToolsDragPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsDragPanel.Cursor = System.Windows.Forms.Cursors.VSplit; - this.ToolsDragPanel.Location = new System.Drawing.Point(249, 0); - this.ToolsDragPanel.Name = "ToolsDragPanel"; - this.ToolsDragPanel.Size = new System.Drawing.Size(4, 666); - this.ToolsDragPanel.TabIndex = 17; - this.ToolsDragPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseDown); - this.ToolsDragPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseMove); - this.ToolsDragPanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseUp); + ToolsDragPanel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + ToolsDragPanel.Cursor = System.Windows.Forms.Cursors.VSplit; + ToolsDragPanel.Location = new System.Drawing.Point(318, 0); + ToolsDragPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsDragPanel.Name = "ToolsDragPanel"; + ToolsDragPanel.Size = new System.Drawing.Size(5, 768); + ToolsDragPanel.TabIndex = 17; + ToolsDragPanel.MouseDown += ToolsDragPanel_MouseDown; + ToolsDragPanel.MouseMove += ToolsDragPanel_MouseMove; + ToolsDragPanel.MouseUp += ToolsDragPanel_MouseUp; // // ConsolePanel // - this.ConsolePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ConsolePanel.BackColor = System.Drawing.SystemColors.Control; - this.ConsolePanel.Controls.Add(this.ConsoleTextBox); - this.ConsolePanel.Location = new System.Drawing.Point(271, 577); - this.ConsolePanel.Name = "ConsolePanel"; - this.ConsolePanel.Size = new System.Drawing.Size(701, 101); - this.ConsolePanel.TabIndex = 9; - this.ConsolePanel.Visible = false; + ConsolePanel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ConsolePanel.BackColor = System.Drawing.SystemColors.Control; + ConsolePanel.Controls.Add(ConsoleTextBox); + ConsolePanel.Location = new System.Drawing.Point(340, 666); + ConsolePanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ConsolePanel.Name = "ConsolePanel"; + ConsolePanel.Size = new System.Drawing.Size(794, 117); + ConsolePanel.TabIndex = 9; + ConsolePanel.Visible = false; // // HDTexturesCheckBox // - this.HDTexturesCheckBox.AutoSize = true; - this.HDTexturesCheckBox.Checked = true; - this.HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.HDTexturesCheckBox.Location = new System.Drawing.Point(19, 242); - this.HDTexturesCheckBox.Name = "HDTexturesCheckBox"; - this.HDTexturesCheckBox.Size = new System.Drawing.Size(82, 17); - this.HDTexturesCheckBox.TabIndex = 10; - this.HDTexturesCheckBox.Text = "HD textures"; - this.HDTexturesCheckBox.UseVisualStyleBackColor = true; - this.HDTexturesCheckBox.CheckedChanged += new System.EventHandler(this.HDTexturesCheckBox_CheckedChanged); + HDTexturesCheckBox.AutoSize = true; + HDTexturesCheckBox.Checked = true; + HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + HDTexturesCheckBox.Location = new System.Drawing.Point(22, 279); + HDTexturesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDTexturesCheckBox.Name = "HDTexturesCheckBox"; + HDTexturesCheckBox.Size = new System.Drawing.Size(88, 19); + HDTexturesCheckBox.TabIndex = 10; + HDTexturesCheckBox.Text = "HD textures"; + HDTexturesCheckBox.UseVisualStyleBackColor = true; + HDTexturesCheckBox.CheckedChanged += HDTexturesCheckBox_CheckedChanged; // // SkeletonsCheckBox // - this.SkeletonsCheckBox.AutoSize = true; - this.SkeletonsCheckBox.Location = new System.Drawing.Point(19, 444); - this.SkeletonsCheckBox.Name = "SkeletonsCheckBox"; - this.SkeletonsCheckBox.Size = new System.Drawing.Size(103, 17); - this.SkeletonsCheckBox.TabIndex = 22; - this.SkeletonsCheckBox.Text = "Show Skeletons"; - this.SkeletonsCheckBox.UseVisualStyleBackColor = true; - this.SkeletonsCheckBox.CheckedChanged += new System.EventHandler(this.SkeletonsCheckBox_CheckedChanged); + SkeletonsCheckBox.AutoSize = true; + SkeletonsCheckBox.Location = new System.Drawing.Point(22, 512); + SkeletonsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SkeletonsCheckBox.Name = "SkeletonsCheckBox"; + SkeletonsCheckBox.Size = new System.Drawing.Size(108, 19); + SkeletonsCheckBox.TabIndex = 22; + SkeletonsCheckBox.Text = "Show Skeletons"; + SkeletonsCheckBox.UseVisualStyleBackColor = true; + SkeletonsCheckBox.CheckedChanged += SkeletonsCheckBox_CheckedChanged; // // TimeOfDayLabel // - this.TimeOfDayLabel.AutoSize = true; - this.TimeOfDayLabel.Location = new System.Drawing.Point(78, 109); - this.TimeOfDayLabel.Name = "TimeOfDayLabel"; - this.TimeOfDayLabel.Size = new System.Drawing.Size(34, 13); - this.TimeOfDayLabel.TabIndex = 5; - this.TimeOfDayLabel.Text = "12:00"; + TimeOfDayLabel.AutoSize = true; + TimeOfDayLabel.Location = new System.Drawing.Point(91, 126); + TimeOfDayLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + TimeOfDayLabel.Name = "TimeOfDayLabel"; + TimeOfDayLabel.Size = new System.Drawing.Size(34, 15); + TimeOfDayLabel.TabIndex = 5; + TimeOfDayLabel.Text = "12:00"; // // ToolsOptionsTabPage // - this.ToolsOptionsTabPage.Controls.Add(this.HDTexturesCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.SkeletonsCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.TimeOfDayLabel); - this.ToolsOptionsTabPage.Controls.Add(this.label19); - this.ToolsOptionsTabPage.Controls.Add(this.TimeOfDayTrackBar); - this.ToolsOptionsTabPage.Controls.Add(this.ControlLightDirCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.ShowCollisionMeshesCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.GridCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.GridCountComboBox); - this.ToolsOptionsTabPage.Controls.Add(this.label2); - this.ToolsOptionsTabPage.Controls.Add(this.GridSizeComboBox); - this.ToolsOptionsTabPage.Controls.Add(this.label1); - this.ToolsOptionsTabPage.Controls.Add(this.StatusBarCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.ErrorConsoleCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.HDRRenderingCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.SkydomeCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.ShadowsCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.WireframeCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.RenderModeComboBox); - this.ToolsOptionsTabPage.Controls.Add(this.label11); - this.ToolsOptionsTabPage.Controls.Add(this.TextureSamplerComboBox); - this.ToolsOptionsTabPage.Controls.Add(this.TextureCoordsComboBox); - this.ToolsOptionsTabPage.Controls.Add(this.label10); - this.ToolsOptionsTabPage.Controls.Add(this.AnisotropicFilteringCheckBox); - this.ToolsOptionsTabPage.Controls.Add(this.label14); - this.ToolsOptionsTabPage.Location = new System.Drawing.Point(4, 22); - this.ToolsOptionsTabPage.Name = "ToolsOptionsTabPage"; - this.ToolsOptionsTabPage.Size = new System.Drawing.Size(239, 607); - this.ToolsOptionsTabPage.TabIndex = 3; - this.ToolsOptionsTabPage.Text = "Options"; - this.ToolsOptionsTabPage.UseVisualStyleBackColor = true; + ToolsOptionsTabPage.Controls.Add(HDTexturesCheckBox); + ToolsOptionsTabPage.Controls.Add(SkeletonsCheckBox); + ToolsOptionsTabPage.Controls.Add(TimeOfDayLabel); + ToolsOptionsTabPage.Controls.Add(label19); + ToolsOptionsTabPage.Controls.Add(TimeOfDayTrackBar); + ToolsOptionsTabPage.Controls.Add(ControlLightDirCheckBox); + ToolsOptionsTabPage.Controls.Add(ShowCollisionMeshesCheckBox); + ToolsOptionsTabPage.Controls.Add(GridCheckBox); + ToolsOptionsTabPage.Controls.Add(GridCountComboBox); + ToolsOptionsTabPage.Controls.Add(label2); + ToolsOptionsTabPage.Controls.Add(GridSizeComboBox); + ToolsOptionsTabPage.Controls.Add(label1); + ToolsOptionsTabPage.Controls.Add(StatusBarCheckBox); + ToolsOptionsTabPage.Controls.Add(ErrorConsoleCheckBox); + ToolsOptionsTabPage.Controls.Add(HDRRenderingCheckBox); + ToolsOptionsTabPage.Controls.Add(SkydomeCheckBox); + ToolsOptionsTabPage.Controls.Add(ShadowsCheckBox); + ToolsOptionsTabPage.Controls.Add(WireframeCheckBox); + ToolsOptionsTabPage.Controls.Add(RenderModeComboBox); + ToolsOptionsTabPage.Controls.Add(label11); + ToolsOptionsTabPage.Controls.Add(TextureSamplerComboBox); + ToolsOptionsTabPage.Controls.Add(TextureCoordsComboBox); + ToolsOptionsTabPage.Controls.Add(label10); + ToolsOptionsTabPage.Controls.Add(AnisotropicFilteringCheckBox); + ToolsOptionsTabPage.Controls.Add(label14); + ToolsOptionsTabPage.Location = new System.Drawing.Point(4, 24); + ToolsOptionsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsOptionsTabPage.Name = "ToolsOptionsTabPage"; + ToolsOptionsTabPage.Size = new System.Drawing.Size(308, 702); + ToolsOptionsTabPage.TabIndex = 3; + ToolsOptionsTabPage.Text = "Options"; + ToolsOptionsTabPage.UseVisualStyleBackColor = true; // // label19 // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(7, 109); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(65, 13); - this.label19.TabIndex = 4; - this.label19.Text = "Time of day:"; + label19.AutoSize = true; + label19.Location = new System.Drawing.Point(8, 126); + label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label19.Name = "label19"; + label19.Size = new System.Drawing.Size(72, 15); + label19.TabIndex = 4; + label19.Text = "Time of day:"; // // TimeOfDayTrackBar // - this.TimeOfDayTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TimeOfDayTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.TimeOfDayTrackBar.LargeChange = 60; - this.TimeOfDayTrackBar.Location = new System.Drawing.Point(9, 125); - this.TimeOfDayTrackBar.Maximum = 1440; - this.TimeOfDayTrackBar.Name = "TimeOfDayTrackBar"; - this.TimeOfDayTrackBar.Size = new System.Drawing.Size(222, 45); - this.TimeOfDayTrackBar.TabIndex = 6; - this.TimeOfDayTrackBar.TickFrequency = 60; - this.TimeOfDayTrackBar.Value = 720; - this.TimeOfDayTrackBar.Scroll += new System.EventHandler(this.TimeOfDayTrackBar_Scroll); + TimeOfDayTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + TimeOfDayTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + TimeOfDayTrackBar.LargeChange = 60; + TimeOfDayTrackBar.Location = new System.Drawing.Point(10, 144); + TimeOfDayTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeOfDayTrackBar.Maximum = 1440; + TimeOfDayTrackBar.Name = "TimeOfDayTrackBar"; + TimeOfDayTrackBar.Size = new System.Drawing.Size(259, 45); + TimeOfDayTrackBar.TabIndex = 6; + TimeOfDayTrackBar.TickFrequency = 60; + TimeOfDayTrackBar.Value = 720; + TimeOfDayTrackBar.Scroll += TimeOfDayTrackBar_Scroll; // // ControlLightDirCheckBox // - this.ControlLightDirCheckBox.AutoSize = true; - this.ControlLightDirCheckBox.Location = new System.Drawing.Point(19, 83); - this.ControlLightDirCheckBox.Name = "ControlLightDirCheckBox"; - this.ControlLightDirCheckBox.Size = new System.Drawing.Size(124, 17); - this.ControlLightDirCheckBox.TabIndex = 3; - this.ControlLightDirCheckBox.Text = "Control light direction"; - this.ControlLightDirCheckBox.UseVisualStyleBackColor = true; - this.ControlLightDirCheckBox.CheckedChanged += new System.EventHandler(this.ControlLightDirCheckBox_CheckedChanged); + ControlLightDirCheckBox.AutoSize = true; + ControlLightDirCheckBox.Location = new System.Drawing.Point(22, 96); + ControlLightDirCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ControlLightDirCheckBox.Name = "ControlLightDirCheckBox"; + ControlLightDirCheckBox.Size = new System.Drawing.Size(143, 19); + ControlLightDirCheckBox.TabIndex = 3; + ControlLightDirCheckBox.Text = "Control light direction"; + ControlLightDirCheckBox.UseVisualStyleBackColor = true; + ControlLightDirCheckBox.CheckedChanged += ControlLightDirCheckBox_CheckedChanged; // // ShowCollisionMeshesCheckBox // - this.ShowCollisionMeshesCheckBox.AutoSize = true; - this.ShowCollisionMeshesCheckBox.Location = new System.Drawing.Point(19, 173); - this.ShowCollisionMeshesCheckBox.Name = "ShowCollisionMeshesCheckBox"; - this.ShowCollisionMeshesCheckBox.Size = new System.Drawing.Size(132, 17); - this.ShowCollisionMeshesCheckBox.TabIndex = 7; - this.ShowCollisionMeshesCheckBox.Text = "Show collision meshes"; - this.ShowCollisionMeshesCheckBox.UseVisualStyleBackColor = true; - this.ShowCollisionMeshesCheckBox.CheckedChanged += new System.EventHandler(this.ShowCollisionMeshesCheckBox_CheckedChanged); + ShowCollisionMeshesCheckBox.AutoSize = true; + ShowCollisionMeshesCheckBox.Location = new System.Drawing.Point(22, 200); + ShowCollisionMeshesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShowCollisionMeshesCheckBox.Name = "ShowCollisionMeshesCheckBox"; + ShowCollisionMeshesCheckBox.Size = new System.Drawing.Size(145, 19); + ShowCollisionMeshesCheckBox.TabIndex = 7; + ShowCollisionMeshesCheckBox.Text = "Show collision meshes"; + ShowCollisionMeshesCheckBox.UseVisualStyleBackColor = true; + ShowCollisionMeshesCheckBox.CheckedChanged += ShowCollisionMeshesCheckBox_CheckedChanged; // // GridCheckBox // - this.GridCheckBox.AutoSize = true; - this.GridCheckBox.Location = new System.Drawing.Point(19, 364); - this.GridCheckBox.Name = "GridCheckBox"; - this.GridCheckBox.Size = new System.Drawing.Size(45, 17); - this.GridCheckBox.TabIndex = 17; - this.GridCheckBox.Text = "Grid"; - this.GridCheckBox.UseVisualStyleBackColor = true; - this.GridCheckBox.CheckedChanged += new System.EventHandler(this.GridCheckBox_CheckedChanged); + GridCheckBox.AutoSize = true; + GridCheckBox.Location = new System.Drawing.Point(22, 420); + GridCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + GridCheckBox.Name = "GridCheckBox"; + GridCheckBox.Size = new System.Drawing.Size(48, 19); + GridCheckBox.TabIndex = 17; + GridCheckBox.Text = "Grid"; + GridCheckBox.UseVisualStyleBackColor = true; + GridCheckBox.CheckedChanged += GridCheckBox_CheckedChanged; // // GridCountComboBox // - this.GridCountComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.GridCountComboBox.FormattingEnabled = true; - this.GridCountComboBox.Items.AddRange(new object[] { - "20", - "40", - "60", - "100"}); - this.GridCountComboBox.Location = new System.Drawing.Point(83, 411); - this.GridCountComboBox.Name = "GridCountComboBox"; - this.GridCountComboBox.Size = new System.Drawing.Size(114, 21); - this.GridCountComboBox.TabIndex = 21; - this.GridCountComboBox.SelectedIndexChanged += new System.EventHandler(this.GridCountComboBox_SelectedIndexChanged); + GridCountComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + GridCountComboBox.FormattingEnabled = true; + GridCountComboBox.Items.AddRange(new object[] { "20", "40", "60", "100" }); + GridCountComboBox.Location = new System.Drawing.Point(97, 474); + GridCountComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + GridCountComboBox.Name = "GridCountComboBox"; + GridCountComboBox.Size = new System.Drawing.Size(132, 23); + GridCountComboBox.TabIndex = 21; + GridCountComboBox.SelectedIndexChanged += GridCountComboBox_SelectedIndexChanged; // // label2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(7, 414); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(59, 13); - this.label2.TabIndex = 20; - this.label2.Text = "Grid count:"; + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(8, 478); + label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(66, 15); + label2.TabIndex = 20; + label2.Text = "Grid count:"; // // GridSizeComboBox // - this.GridSizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.GridSizeComboBox.FormattingEnabled = true; - this.GridSizeComboBox.Items.AddRange(new object[] { - "0.1", - "1.0", - "10", - "100"}); - this.GridSizeComboBox.Location = new System.Drawing.Point(83, 384); - this.GridSizeComboBox.Name = "GridSizeComboBox"; - this.GridSizeComboBox.Size = new System.Drawing.Size(114, 21); - this.GridSizeComboBox.TabIndex = 19; - this.GridSizeComboBox.SelectedIndexChanged += new System.EventHandler(this.GridSizeComboBox_SelectedIndexChanged); + GridSizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + GridSizeComboBox.FormattingEnabled = true; + GridSizeComboBox.Items.AddRange(new object[] { "0.1", "1.0", "10", "100" }); + GridSizeComboBox.Location = new System.Drawing.Point(97, 443); + GridSizeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + GridSizeComboBox.Name = "GridSizeComboBox"; + GridSizeComboBox.Size = new System.Drawing.Size(132, 23); + GridSizeComboBox.TabIndex = 19; + GridSizeComboBox.SelectedIndexChanged += GridSizeComboBox_SelectedIndexChanged; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(7, 387); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(70, 13); - this.label1.TabIndex = 18; - this.label1.Text = "Grid unit size:"; + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(8, 447); + label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(78, 15); + label1.TabIndex = 18; + label1.Text = "Grid unit size:"; // // StatusBarCheckBox // - this.StatusBarCheckBox.AutoSize = true; - this.StatusBarCheckBox.Checked = true; - this.StatusBarCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.StatusBarCheckBox.Location = new System.Drawing.Point(19, 480); - this.StatusBarCheckBox.Name = "StatusBarCheckBox"; - this.StatusBarCheckBox.Size = new System.Drawing.Size(74, 17); - this.StatusBarCheckBox.TabIndex = 23; - this.StatusBarCheckBox.Text = "Status bar"; - this.StatusBarCheckBox.UseVisualStyleBackColor = true; - this.StatusBarCheckBox.CheckedChanged += new System.EventHandler(this.StatusBarCheckBox_CheckedChanged); + StatusBarCheckBox.AutoSize = true; + StatusBarCheckBox.Checked = true; + StatusBarCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + StatusBarCheckBox.Location = new System.Drawing.Point(22, 554); + StatusBarCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + StatusBarCheckBox.Name = "StatusBarCheckBox"; + StatusBarCheckBox.Size = new System.Drawing.Size(78, 19); + StatusBarCheckBox.TabIndex = 23; + StatusBarCheckBox.Text = "Status bar"; + StatusBarCheckBox.UseVisualStyleBackColor = true; + StatusBarCheckBox.CheckedChanged += StatusBarCheckBox_CheckedChanged; // // ErrorConsoleCheckBox // - this.ErrorConsoleCheckBox.AutoSize = true; - this.ErrorConsoleCheckBox.Location = new System.Drawing.Point(105, 480); - this.ErrorConsoleCheckBox.Name = "ErrorConsoleCheckBox"; - this.ErrorConsoleCheckBox.Size = new System.Drawing.Size(88, 17); - this.ErrorConsoleCheckBox.TabIndex = 24; - this.ErrorConsoleCheckBox.Text = "Error console"; - this.ErrorConsoleCheckBox.UseVisualStyleBackColor = true; - this.ErrorConsoleCheckBox.CheckedChanged += new System.EventHandler(this.ErrorConsoleCheckBox_CheckedChanged); + ErrorConsoleCheckBox.AutoSize = true; + ErrorConsoleCheckBox.Location = new System.Drawing.Point(122, 554); + ErrorConsoleCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ErrorConsoleCheckBox.Name = "ErrorConsoleCheckBox"; + ErrorConsoleCheckBox.Size = new System.Drawing.Size(95, 19); + ErrorConsoleCheckBox.TabIndex = 24; + ErrorConsoleCheckBox.Text = "Error console"; + ErrorConsoleCheckBox.UseVisualStyleBackColor = true; + ErrorConsoleCheckBox.CheckedChanged += ErrorConsoleCheckBox_CheckedChanged; // // HDRRenderingCheckBox // - this.HDRRenderingCheckBox.AutoSize = true; - this.HDRRenderingCheckBox.Checked = true; - this.HDRRenderingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.HDRRenderingCheckBox.Location = new System.Drawing.Point(19, 14); - this.HDRRenderingCheckBox.Name = "HDRRenderingCheckBox"; - this.HDRRenderingCheckBox.Size = new System.Drawing.Size(97, 17); - this.HDRRenderingCheckBox.TabIndex = 0; - this.HDRRenderingCheckBox.Text = "HDR rendering"; - this.HDRRenderingCheckBox.UseVisualStyleBackColor = true; - this.HDRRenderingCheckBox.CheckedChanged += new System.EventHandler(this.HDRRenderingCheckBox_CheckedChanged); + HDRRenderingCheckBox.AutoSize = true; + HDRRenderingCheckBox.Checked = true; + HDRRenderingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + HDRRenderingCheckBox.Location = new System.Drawing.Point(22, 16); + HDRRenderingCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDRRenderingCheckBox.Name = "HDRRenderingCheckBox"; + HDRRenderingCheckBox.Size = new System.Drawing.Size(104, 19); + HDRRenderingCheckBox.TabIndex = 0; + HDRRenderingCheckBox.Text = "HDR rendering"; + HDRRenderingCheckBox.UseVisualStyleBackColor = true; + HDRRenderingCheckBox.CheckedChanged += HDRRenderingCheckBox_CheckedChanged; // // SkydomeCheckBox // - this.SkydomeCheckBox.AutoSize = true; - this.SkydomeCheckBox.Location = new System.Drawing.Point(19, 60); - this.SkydomeCheckBox.Name = "SkydomeCheckBox"; - this.SkydomeCheckBox.Size = new System.Drawing.Size(70, 17); - this.SkydomeCheckBox.TabIndex = 2; - this.SkydomeCheckBox.Text = "Skydome"; - this.SkydomeCheckBox.UseVisualStyleBackColor = true; - this.SkydomeCheckBox.CheckedChanged += new System.EventHandler(this.SkydomeCheckBox_CheckedChanged); + SkydomeCheckBox.AutoSize = true; + SkydomeCheckBox.Location = new System.Drawing.Point(22, 69); + SkydomeCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SkydomeCheckBox.Name = "SkydomeCheckBox"; + SkydomeCheckBox.Size = new System.Drawing.Size(75, 19); + SkydomeCheckBox.TabIndex = 2; + SkydomeCheckBox.Text = "Skydome"; + SkydomeCheckBox.UseVisualStyleBackColor = true; + SkydomeCheckBox.CheckedChanged += SkydomeCheckBox_CheckedChanged; // // ShadowsCheckBox // - this.ShadowsCheckBox.AutoSize = true; - this.ShadowsCheckBox.Checked = true; - this.ShadowsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.ShadowsCheckBox.Location = new System.Drawing.Point(19, 37); - this.ShadowsCheckBox.Name = "ShadowsCheckBox"; - this.ShadowsCheckBox.Size = new System.Drawing.Size(70, 17); - this.ShadowsCheckBox.TabIndex = 1; - this.ShadowsCheckBox.Text = "Shadows"; - this.ShadowsCheckBox.UseVisualStyleBackColor = true; - this.ShadowsCheckBox.CheckedChanged += new System.EventHandler(this.ShadowsCheckBox_CheckedChanged); + ShadowsCheckBox.AutoSize = true; + ShadowsCheckBox.Checked = true; + ShadowsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + ShadowsCheckBox.Location = new System.Drawing.Point(22, 43); + ShadowsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShadowsCheckBox.Name = "ShadowsCheckBox"; + ShadowsCheckBox.Size = new System.Drawing.Size(73, 19); + ShadowsCheckBox.TabIndex = 1; + ShadowsCheckBox.Text = "Shadows"; + ShadowsCheckBox.UseVisualStyleBackColor = true; + ShadowsCheckBox.CheckedChanged += ShadowsCheckBox_CheckedChanged; // // WireframeCheckBox // - this.WireframeCheckBox.AutoSize = true; - this.WireframeCheckBox.Location = new System.Drawing.Point(19, 196); - this.WireframeCheckBox.Name = "WireframeCheckBox"; - this.WireframeCheckBox.Size = new System.Drawing.Size(74, 17); - this.WireframeCheckBox.TabIndex = 8; - this.WireframeCheckBox.Text = "Wireframe"; - this.WireframeCheckBox.UseVisualStyleBackColor = true; - this.WireframeCheckBox.CheckedChanged += new System.EventHandler(this.WireframeCheckBox_CheckedChanged); + WireframeCheckBox.AutoSize = true; + WireframeCheckBox.Location = new System.Drawing.Point(22, 226); + WireframeCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WireframeCheckBox.Name = "WireframeCheckBox"; + WireframeCheckBox.Size = new System.Drawing.Size(81, 19); + WireframeCheckBox.TabIndex = 8; + WireframeCheckBox.Text = "Wireframe"; + WireframeCheckBox.UseVisualStyleBackColor = true; + WireframeCheckBox.CheckedChanged += WireframeCheckBox_CheckedChanged; // // RenderModeComboBox // - this.RenderModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.RenderModeComboBox.FormattingEnabled = true; - this.RenderModeComboBox.Items.AddRange(new object[] { - "Default", - "Single texture", - "Vertex normals", - "Vertex tangents", - "Vertex colour 1", - "Vertex colour 2", - "Texture coord 1", - "Texture coord 2", - "Texture coord 3"}); - this.RenderModeComboBox.Location = new System.Drawing.Point(83, 274); - this.RenderModeComboBox.Name = "RenderModeComboBox"; - this.RenderModeComboBox.Size = new System.Drawing.Size(114, 21); - this.RenderModeComboBox.TabIndex = 12; - this.RenderModeComboBox.SelectedIndexChanged += new System.EventHandler(this.RenderModeComboBox_SelectedIndexChanged); + RenderModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + RenderModeComboBox.FormattingEnabled = true; + RenderModeComboBox.Items.AddRange(new object[] { "Default", "Single texture", "Vertex normals", "Vertex tangents", "Vertex colour 1", "Vertex colour 2", "Texture coord 1", "Texture coord 2", "Texture coord 3" }); + RenderModeComboBox.Location = new System.Drawing.Point(97, 316); + RenderModeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + RenderModeComboBox.Name = "RenderModeComboBox"; + RenderModeComboBox.Size = new System.Drawing.Size(132, 23); + RenderModeComboBox.TabIndex = 12; + RenderModeComboBox.SelectedIndexChanged += RenderModeComboBox_SelectedIndexChanged; // // label11 // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(7, 304); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(67, 13); - this.label11.TabIndex = 13; - this.label11.Text = "Tex sampler:"; + label11.AutoSize = true; + label11.Location = new System.Drawing.Point(8, 351); + label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(72, 15); + label11.TabIndex = 13; + label11.Text = "Tex sampler:"; // // TextureSamplerComboBox // - this.TextureSamplerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.TextureSamplerComboBox.Enabled = false; - this.TextureSamplerComboBox.FormattingEnabled = true; - this.TextureSamplerComboBox.Location = new System.Drawing.Point(83, 301); - this.TextureSamplerComboBox.Name = "TextureSamplerComboBox"; - this.TextureSamplerComboBox.Size = new System.Drawing.Size(114, 21); - this.TextureSamplerComboBox.TabIndex = 14; - this.TextureSamplerComboBox.SelectedIndexChanged += new System.EventHandler(this.TextureSamplerComboBox_SelectedIndexChanged); + TextureSamplerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + TextureSamplerComboBox.Enabled = false; + TextureSamplerComboBox.FormattingEnabled = true; + TextureSamplerComboBox.Location = new System.Drawing.Point(97, 347); + TextureSamplerComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureSamplerComboBox.Name = "TextureSamplerComboBox"; + TextureSamplerComboBox.Size = new System.Drawing.Size(132, 23); + TextureSamplerComboBox.TabIndex = 14; + TextureSamplerComboBox.SelectedIndexChanged += TextureSamplerComboBox_SelectedIndexChanged; // // TextureCoordsComboBox // - this.TextureCoordsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.TextureCoordsComboBox.Enabled = false; - this.TextureCoordsComboBox.FormattingEnabled = true; - this.TextureCoordsComboBox.Items.AddRange(new object[] { - "Texture coord 1", - "Texture coord 2", - "Texture coord 3"}); - this.TextureCoordsComboBox.Location = new System.Drawing.Point(83, 328); - this.TextureCoordsComboBox.Name = "TextureCoordsComboBox"; - this.TextureCoordsComboBox.Size = new System.Drawing.Size(114, 21); - this.TextureCoordsComboBox.TabIndex = 16; - this.TextureCoordsComboBox.SelectedIndexChanged += new System.EventHandler(this.TextureCoordsComboBox_SelectedIndexChanged); + TextureCoordsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + TextureCoordsComboBox.Enabled = false; + TextureCoordsComboBox.FormattingEnabled = true; + TextureCoordsComboBox.Items.AddRange(new object[] { "Texture coord 1", "Texture coord 2", "Texture coord 3" }); + TextureCoordsComboBox.Location = new System.Drawing.Point(97, 378); + TextureCoordsComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureCoordsComboBox.Name = "TextureCoordsComboBox"; + TextureCoordsComboBox.Size = new System.Drawing.Size(132, 23); + TextureCoordsComboBox.TabIndex = 16; + TextureCoordsComboBox.SelectedIndexChanged += TextureCoordsComboBox_SelectedIndexChanged; // // label10 // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(7, 277); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(74, 13); - this.label10.TabIndex = 11; - this.label10.Text = "Render mode:"; + label10.AutoSize = true; + label10.Location = new System.Drawing.Point(8, 320); + label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(81, 15); + label10.TabIndex = 11; + label10.Text = "Render mode:"; // // AnisotropicFilteringCheckBox // - this.AnisotropicFilteringCheckBox.AutoSize = true; - this.AnisotropicFilteringCheckBox.Checked = true; - this.AnisotropicFilteringCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.AnisotropicFilteringCheckBox.Location = new System.Drawing.Point(19, 219); - this.AnisotropicFilteringCheckBox.Name = "AnisotropicFilteringCheckBox"; - this.AnisotropicFilteringCheckBox.Size = new System.Drawing.Size(114, 17); - this.AnisotropicFilteringCheckBox.TabIndex = 9; - this.AnisotropicFilteringCheckBox.Text = "Anisotropic filtering"; - this.AnisotropicFilteringCheckBox.UseVisualStyleBackColor = true; - this.AnisotropicFilteringCheckBox.CheckedChanged += new System.EventHandler(this.AnisotropicFilteringCheckBox_CheckedChanged); + AnisotropicFilteringCheckBox.AutoSize = true; + AnisotropicFilteringCheckBox.Checked = true; + AnisotropicFilteringCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + AnisotropicFilteringCheckBox.Location = new System.Drawing.Point(22, 253); + AnisotropicFilteringCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AnisotropicFilteringCheckBox.Name = "AnisotropicFilteringCheckBox"; + AnisotropicFilteringCheckBox.Size = new System.Drawing.Size(131, 19); + AnisotropicFilteringCheckBox.TabIndex = 9; + AnisotropicFilteringCheckBox.Text = "Anisotropic filtering"; + AnisotropicFilteringCheckBox.UseVisualStyleBackColor = true; + AnisotropicFilteringCheckBox.CheckedChanged += AnisotropicFilteringCheckBox_CheckedChanged; // // label14 // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(7, 331); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(63, 13); - this.label14.TabIndex = 15; - this.label14.Text = "Tex coords:"; + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(8, 382); + label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(66, 15); + label14.TabIndex = 15; + label14.Text = "Tex coords:"; // // DetailsPropertyGrid // - this.DetailsPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.DetailsPropertyGrid.HelpVisible = false; - this.DetailsPropertyGrid.Location = new System.Drawing.Point(0, 3); - this.DetailsPropertyGrid.Name = "DetailsPropertyGrid"; - this.DetailsPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; - this.DetailsPropertyGrid.ReadOnly = true; - this.DetailsPropertyGrid.Size = new System.Drawing.Size(239, 604); - this.DetailsPropertyGrid.TabIndex = 1; - this.DetailsPropertyGrid.ToolbarVisible = false; + DetailsPropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + DetailsPropertyGrid.HelpVisible = false; + DetailsPropertyGrid.Location = new System.Drawing.Point(0, 3); + DetailsPropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DetailsPropertyGrid.Name = "DetailsPropertyGrid"; + DetailsPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; + DetailsPropertyGrid.ReadOnly = true; + DetailsPropertyGrid.Size = new System.Drawing.Size(279, 697); + DetailsPropertyGrid.TabIndex = 1; + DetailsPropertyGrid.ToolbarVisible = false; // // ToolsDetailsTabPage // - this.ToolsDetailsTabPage.Controls.Add(this.DetailsPropertyGrid); - this.ToolsDetailsTabPage.Location = new System.Drawing.Point(4, 22); - this.ToolsDetailsTabPage.Name = "ToolsDetailsTabPage"; - this.ToolsDetailsTabPage.Size = new System.Drawing.Size(239, 607); - this.ToolsDetailsTabPage.TabIndex = 2; - this.ToolsDetailsTabPage.Text = "Details"; - this.ToolsDetailsTabPage.UseVisualStyleBackColor = true; + ToolsDetailsTabPage.Controls.Add(DetailsPropertyGrid); + ToolsDetailsTabPage.Location = new System.Drawing.Point(4, 24); + ToolsDetailsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsDetailsTabPage.Name = "ToolsDetailsTabPage"; + ToolsDetailsTabPage.Size = new System.Drawing.Size(308, 702); + ToolsDetailsTabPage.TabIndex = 2; + ToolsDetailsTabPage.Text = "Details"; + ToolsDetailsTabPage.UseVisualStyleBackColor = true; // // TextureViewerButton // - this.TextureViewerButton.Location = new System.Drawing.Point(6, 6); - this.TextureViewerButton.Name = "TextureViewerButton"; - this.TextureViewerButton.Size = new System.Drawing.Size(113, 23); - this.TextureViewerButton.TabIndex = 2; - this.TextureViewerButton.Text = "Open texture viewer"; - this.TextureViewerButton.UseVisualStyleBackColor = true; - this.TextureViewerButton.Click += new System.EventHandler(this.TextureViewerButton_Click); + TextureViewerButton.Location = new System.Drawing.Point(7, 7); + TextureViewerButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureViewerButton.Name = "TextureViewerButton"; + TextureViewerButton.Size = new System.Drawing.Size(132, 27); + TextureViewerButton.TabIndex = 2; + TextureViewerButton.Text = "Open texture viewer"; + TextureViewerButton.UseVisualStyleBackColor = true; + TextureViewerButton.Click += TextureViewerButton_Click; // // TexturesTreeView // - this.TexturesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TexturesTreeView.Location = new System.Drawing.Point(0, 34); - this.TexturesTreeView.Name = "TexturesTreeView"; - this.TexturesTreeView.ShowRootLines = false; - this.TexturesTreeView.Size = new System.Drawing.Size(239, 573); - this.TexturesTreeView.TabIndex = 1; + TexturesTreeView.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + TexturesTreeView.Location = new System.Drawing.Point(0, 39); + TexturesTreeView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TexturesTreeView.Name = "TexturesTreeView"; + TexturesTreeView.ShowRootLines = false; + TexturesTreeView.Size = new System.Drawing.Size(278, 661); + TexturesTreeView.TabIndex = 1; // // ToolsTexturesTabPage // - this.ToolsTexturesTabPage.Controls.Add(this.TextureViewerButton); - this.ToolsTexturesTabPage.Controls.Add(this.TexturesTreeView); - this.ToolsTexturesTabPage.Location = new System.Drawing.Point(4, 22); - this.ToolsTexturesTabPage.Name = "ToolsTexturesTabPage"; - this.ToolsTexturesTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ToolsTexturesTabPage.Size = new System.Drawing.Size(239, 607); - this.ToolsTexturesTabPage.TabIndex = 1; - this.ToolsTexturesTabPage.Text = "Textures"; - this.ToolsTexturesTabPage.UseVisualStyleBackColor = true; + ToolsTexturesTabPage.Controls.Add(TextureViewerButton); + ToolsTexturesTabPage.Controls.Add(TexturesTreeView); + ToolsTexturesTabPage.Location = new System.Drawing.Point(4, 24); + ToolsTexturesTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsTexturesTabPage.Name = "ToolsTexturesTabPage"; + ToolsTexturesTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsTexturesTabPage.Size = new System.Drawing.Size(308, 702); + ToolsTexturesTabPage.TabIndex = 1; + ToolsTexturesTabPage.Text = "Textures"; + ToolsTexturesTabPage.UseVisualStyleBackColor = true; // // ModelsTreeView // - this.ModelsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ModelsTreeView.CheckBoxes = true; - this.ModelsTreeView.Location = new System.Drawing.Point(0, 3); - this.ModelsTreeView.Name = "ModelsTreeView"; - this.ModelsTreeView.ShowRootLines = false; - this.ModelsTreeView.Size = new System.Drawing.Size(239, 604); - this.ModelsTreeView.TabIndex = 2; - this.ModelsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.ModelsTreeView_AfterCheck); - this.ModelsTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ModelsTreeView_NodeMouseDoubleClick); - this.ModelsTreeView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ModelsTreeView_KeyPress); + ModelsTreeView.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ModelsTreeView.CheckBoxes = true; + ModelsTreeView.Location = new System.Drawing.Point(0, 3); + ModelsTreeView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ModelsTreeView.Name = "ModelsTreeView"; + ModelsTreeView.ShowRootLines = false; + ModelsTreeView.Size = new System.Drawing.Size(278, 696); + ModelsTreeView.TabIndex = 2; + ModelsTreeView.AfterCheck += ModelsTreeView_AfterCheck; + ModelsTreeView.NodeMouseDoubleClick += ModelsTreeView_NodeMouseDoubleClick; + ModelsTreeView.KeyPress += ModelsTreeView_KeyPress; // // StatusStrip // - this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.StatusLabel, - this.MousedLabel, - this.StatsLabel}); - this.StatusStrip.Location = new System.Drawing.Point(0, 689); - this.StatusStrip.Name = "StatusStrip"; - this.StatusStrip.Size = new System.Drawing.Size(984, 22); - this.StatusStrip.TabIndex = 6; - this.StatusStrip.Text = "statusStrip1"; + StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { StatusLabel, MousedLabel, StatsLabel }); + StatusStrip.Location = new System.Drawing.Point(0, 798); + StatusStrip.Name = "StatusStrip"; + StatusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0); + StatusStrip.Size = new System.Drawing.Size(1148, 22); + StatusStrip.TabIndex = 6; + StatusStrip.Text = "statusStrip1"; // // StatusLabel // - this.StatusLabel.BackColor = System.Drawing.SystemColors.Control; - this.StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.StatusLabel.Name = "StatusLabel"; - this.StatusLabel.Size = new System.Drawing.Size(878, 17); - this.StatusLabel.Spring = true; - this.StatusLabel.Text = "Initialising"; - this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + StatusLabel.BackColor = System.Drawing.SystemColors.Control; + StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + StatusLabel.Name = "StatusLabel"; + StatusLabel.Size = new System.Drawing.Size(1040, 17); + StatusLabel.Spring = true; + StatusLabel.Text = "Initialising"; + StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // MousedLabel // - this.MousedLabel.BackColor = System.Drawing.SystemColors.Control; - this.MousedLabel.Name = "MousedLabel"; - this.MousedLabel.Size = new System.Drawing.Size(16, 17); - this.MousedLabel.Text = " "; + MousedLabel.BackColor = System.Drawing.SystemColors.Control; + MousedLabel.Name = "MousedLabel"; + MousedLabel.Size = new System.Drawing.Size(16, 17); + MousedLabel.Text = " "; // // StatsLabel // - this.StatsLabel.BackColor = System.Drawing.SystemColors.Control; - this.StatsLabel.Name = "StatsLabel"; - this.StatsLabel.Size = new System.Drawing.Size(75, 17); - this.StatsLabel.Text = "0 geometries"; + StatsLabel.BackColor = System.Drawing.SystemColors.Control; + StatsLabel.Name = "StatsLabel"; + StatsLabel.Size = new System.Drawing.Size(75, 17); + StatsLabel.Text = "0 geometries"; // // ToolsModelsTabPage // - this.ToolsModelsTabPage.Controls.Add(this.ModelsTreeView); - this.ToolsModelsTabPage.Location = new System.Drawing.Point(4, 22); - this.ToolsModelsTabPage.Name = "ToolsModelsTabPage"; - this.ToolsModelsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ToolsModelsTabPage.Size = new System.Drawing.Size(239, 607); - this.ToolsModelsTabPage.TabIndex = 0; - this.ToolsModelsTabPage.Text = "Models"; - this.ToolsModelsTabPage.UseVisualStyleBackColor = true; + ToolsModelsTabPage.Controls.Add(ModelsTreeView); + ToolsModelsTabPage.Location = new System.Drawing.Point(4, 24); + ToolsModelsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsModelsTabPage.Name = "ToolsModelsTabPage"; + ToolsModelsTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsModelsTabPage.Size = new System.Drawing.Size(308, 702); + ToolsModelsTabPage.TabIndex = 0; + ToolsModelsTabPage.Text = "Models"; + ToolsModelsTabPage.UseVisualStyleBackColor = true; // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 11); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(29, 13); - this.label3.TabIndex = 1; - this.label3.Text = "Ped:"; + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(4, 13); + label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(30, 15); + label3.TabIndex = 1; + label3.Text = "Ped:"; // // PedNameComboBox // - this.PedNameComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.PedNameComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.PedNameComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.PedNameComboBox.FormattingEnabled = true; - this.PedNameComboBox.Location = new System.Drawing.Point(54, 8); - this.PedNameComboBox.Name = "PedNameComboBox"; - this.PedNameComboBox.Size = new System.Drawing.Size(182, 21); - this.PedNameComboBox.TabIndex = 0; - this.PedNameComboBox.SelectedIndexChanged += new System.EventHandler(this.PedNameComboBox_SelectedIndexChanged); + PedNameComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + PedNameComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + PedNameComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + PedNameComboBox.FormattingEnabled = true; + PedNameComboBox.Location = new System.Drawing.Point(55, 9); + PedNameComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PedNameComboBox.Name = "PedNameComboBox"; + PedNameComboBox.Size = new System.Drawing.Size(175, 23); + PedNameComboBox.TabIndex = 0; + PedNameComboBox.SelectedIndexChanged += PedNameComboBox_SelectedIndexChanged; // // StatsUpdateTimer // - this.StatsUpdateTimer.Enabled = true; - this.StatsUpdateTimer.Interval = 500; - this.StatsUpdateTimer.Tick += new System.EventHandler(this.StatsUpdateTimer_Tick); + StatsUpdateTimer.Enabled = true; + StatsUpdateTimer.Interval = 500; + StatsUpdateTimer.Tick += StatsUpdateTimer_Tick; // // ToolsPedTabPage // - this.ToolsPedTabPage.Controls.Add(this.EnableRootMotionCheckBox); - this.ToolsPedTabPage.Controls.Add(this.label23); - this.ToolsPedTabPage.Controls.Add(this.label22); - this.ToolsPedTabPage.Controls.Add(this.ClipComboBox); - this.ToolsPedTabPage.Controls.Add(this.label21); - this.ToolsPedTabPage.Controls.Add(this.ClipDictComboBox); - this.ToolsPedTabPage.Controls.Add(this.label20); - this.ToolsPedTabPage.Controls.Add(this.CompJbibComboBox); - this.ToolsPedTabPage.Controls.Add(this.label18); - this.ToolsPedTabPage.Controls.Add(this.CompDeclComboBox); - this.ToolsPedTabPage.Controls.Add(this.label17); - this.ToolsPedTabPage.Controls.Add(this.CompTaskComboBox); - this.ToolsPedTabPage.Controls.Add(this.label16); - this.ToolsPedTabPage.Controls.Add(this.CompAccsComboBox); - this.ToolsPedTabPage.Controls.Add(this.label15); - this.ToolsPedTabPage.Controls.Add(this.CompTeefComboBox); - this.ToolsPedTabPage.Controls.Add(this.label13); - this.ToolsPedTabPage.Controls.Add(this.CompFeetComboBox); - this.ToolsPedTabPage.Controls.Add(this.label12); - this.ToolsPedTabPage.Controls.Add(this.CompHandComboBox); - this.ToolsPedTabPage.Controls.Add(this.label9); - this.ToolsPedTabPage.Controls.Add(this.CompLowrComboBox); - this.ToolsPedTabPage.Controls.Add(this.label8); - this.ToolsPedTabPage.Controls.Add(this.CompUpprComboBox); - this.ToolsPedTabPage.Controls.Add(this.label7); - this.ToolsPedTabPage.Controls.Add(this.CompHairComboBox); - this.ToolsPedTabPage.Controls.Add(this.label6); - this.ToolsPedTabPage.Controls.Add(this.CompBerdComboBox); - this.ToolsPedTabPage.Controls.Add(this.label5); - this.ToolsPedTabPage.Controls.Add(this.CompHeadComboBox); - this.ToolsPedTabPage.Controls.Add(this.label4); - this.ToolsPedTabPage.Controls.Add(this.label3); - this.ToolsPedTabPage.Controls.Add(this.PedNameComboBox); - this.ToolsPedTabPage.Location = new System.Drawing.Point(4, 22); - this.ToolsPedTabPage.Name = "ToolsPedTabPage"; - this.ToolsPedTabPage.Size = new System.Drawing.Size(239, 607); - this.ToolsPedTabPage.TabIndex = 4; - this.ToolsPedTabPage.Text = "Ped"; - this.ToolsPedTabPage.UseVisualStyleBackColor = true; + ToolsPedTabPage.AutoScroll = true; + ToolsPedTabPage.Controls.Add(tableLayoutPanel1); + ToolsPedTabPage.Controls.Add(label24); + ToolsPedTabPage.Controls.Add(YmtNameComboBox); + ToolsPedTabPage.Controls.Add(EnableRootMotionCheckBox); + ToolsPedTabPage.Controls.Add(label23); + ToolsPedTabPage.Controls.Add(label22); + ToolsPedTabPage.Controls.Add(ClipComboBox); + ToolsPedTabPage.Controls.Add(label21); + ToolsPedTabPage.Controls.Add(ClipDictComboBox); + ToolsPedTabPage.Controls.Add(label4); + ToolsPedTabPage.Controls.Add(label3); + ToolsPedTabPage.Controls.Add(PedNameComboBox); + ToolsPedTabPage.Location = new System.Drawing.Point(4, 24); + ToolsPedTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPedTabPage.Name = "ToolsPedTabPage"; + ToolsPedTabPage.Size = new System.Drawing.Size(308, 702); + ToolsPedTabPage.TabIndex = 4; + ToolsPedTabPage.Text = "Ped"; + ToolsPedTabPage.UseVisualStyleBackColor = true; // - // EnableRootMotionCheckBox + // tableLayoutPanel1 // - this.EnableRootMotionCheckBox.AutoSize = true; - this.EnableRootMotionCheckBox.Location = new System.Drawing.Point(54, 503); - this.EnableRootMotionCheckBox.Name = "EnableRootMotionCheckBox"; - this.EnableRootMotionCheckBox.Size = new System.Drawing.Size(114, 17); - this.EnableRootMotionCheckBox.TabIndex = 32; - this.EnableRootMotionCheckBox.Text = "Enable root motion"; - this.EnableRootMotionCheckBox.UseVisualStyleBackColor = true; - this.EnableRootMotionCheckBox.CheckedChanged += new System.EventHandler(this.EnableRootMotionCheckBox_CheckedChanged); - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(3, 422); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(56, 13); - this.label23.TabIndex = 31; - this.label23.Text = "Animation:"; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(24, 472); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(27, 13); - this.label22.TabIndex = 30; - this.label22.Text = "Clip:"; - // - // ClipComboBox - // - this.ClipComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ClipComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.ClipComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.ClipComboBox.FormattingEnabled = true; - this.ClipComboBox.Location = new System.Drawing.Point(54, 469); - this.ClipComboBox.Name = "ClipComboBox"; - this.ClipComboBox.Size = new System.Drawing.Size(182, 21); - this.ClipComboBox.TabIndex = 29; - this.ClipComboBox.TextChanged += new System.EventHandler(this.ClipComboBox_TextChanged); - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(2, 445); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(49, 13); - this.label21.TabIndex = 28; - this.label21.Text = "Clip Dict:"; - // - // ClipDictComboBox - // - this.ClipDictComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ClipDictComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.ClipDictComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.ClipDictComboBox.FormattingEnabled = true; - this.ClipDictComboBox.Location = new System.Drawing.Point(54, 442); - this.ClipDictComboBox.Name = "ClipDictComboBox"; - this.ClipDictComboBox.Size = new System.Drawing.Size(182, 21); - this.ClipDictComboBox.TabIndex = 27; - this.ClipDictComboBox.TextChanged += new System.EventHandler(this.ClipDictComboBox_TextChanged); - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(22, 373); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(29, 13); - this.label20.TabIndex = 26; - this.label20.Text = "Jbib:"; - // - // CompJbibComboBox - // - this.CompJbibComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompJbibComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompJbibComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompJbibComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompJbibComboBox.FormattingEnabled = true; - this.CompJbibComboBox.Location = new System.Drawing.Point(54, 370); - this.CompJbibComboBox.Name = "CompJbibComboBox"; - this.CompJbibComboBox.Size = new System.Drawing.Size(182, 21); - this.CompJbibComboBox.TabIndex = 25; - this.CompJbibComboBox.SelectedIndexChanged += new System.EventHandler(this.CompJbibComboBox_SelectedIndexChanged); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(19, 346); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(32, 13); - this.label18.TabIndex = 24; - this.label18.Text = "Decl:"; - // - // CompDeclComboBox - // - this.CompDeclComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompDeclComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompDeclComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompDeclComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompDeclComboBox.FormattingEnabled = true; - this.CompDeclComboBox.Location = new System.Drawing.Point(54, 343); - this.CompDeclComboBox.Name = "CompDeclComboBox"; - this.CompDeclComboBox.Size = new System.Drawing.Size(182, 21); - this.CompDeclComboBox.TabIndex = 23; - this.CompDeclComboBox.SelectedIndexChanged += new System.EventHandler(this.CompDeclComboBox_SelectedIndexChanged); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(17, 319); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(34, 13); - this.label17.TabIndex = 22; - this.label17.Text = "Task:"; - // - // CompTaskComboBox - // - this.CompTaskComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompTaskComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompTaskComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompTaskComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompTaskComboBox.FormattingEnabled = true; - this.CompTaskComboBox.Location = new System.Drawing.Point(54, 316); - this.CompTaskComboBox.Name = "CompTaskComboBox"; - this.CompTaskComboBox.Size = new System.Drawing.Size(182, 21); - this.CompTaskComboBox.TabIndex = 21; - this.CompTaskComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTaskComboBox_SelectedIndexChanged); - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(17, 292); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(34, 13); - this.label16.TabIndex = 20; - this.label16.Text = "Accs:"; - // - // CompAccsComboBox - // - this.CompAccsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompAccsComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompAccsComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompAccsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompAccsComboBox.FormattingEnabled = true; - this.CompAccsComboBox.Location = new System.Drawing.Point(54, 289); - this.CompAccsComboBox.Name = "CompAccsComboBox"; - this.CompAccsComboBox.Size = new System.Drawing.Size(182, 21); - this.CompAccsComboBox.TabIndex = 19; - this.CompAccsComboBox.SelectedIndexChanged += new System.EventHandler(this.CompAccsComboBox_SelectedIndexChanged); - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(19, 265); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(32, 13); - this.label15.TabIndex = 18; - this.label15.Text = "Teef:"; - // - // CompTeefComboBox - // - this.CompTeefComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompTeefComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompTeefComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompTeefComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompTeefComboBox.FormattingEnabled = true; - this.CompTeefComboBox.Location = new System.Drawing.Point(54, 262); - this.CompTeefComboBox.Name = "CompTeefComboBox"; - this.CompTeefComboBox.Size = new System.Drawing.Size(182, 21); - this.CompTeefComboBox.TabIndex = 17; - this.CompTeefComboBox.SelectedIndexChanged += new System.EventHandler(this.CompTeefComboBox_SelectedIndexChanged); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(20, 238); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(31, 13); - this.label13.TabIndex = 16; - this.label13.Text = "Feet:"; - // - // CompFeetComboBox - // - this.CompFeetComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompFeetComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompFeetComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompFeetComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompFeetComboBox.FormattingEnabled = true; - this.CompFeetComboBox.Location = new System.Drawing.Point(54, 235); - this.CompFeetComboBox.Name = "CompFeetComboBox"; - this.CompFeetComboBox.Size = new System.Drawing.Size(182, 21); - this.CompFeetComboBox.TabIndex = 15; - this.CompFeetComboBox.SelectedIndexChanged += new System.EventHandler(this.CompFeetComboBox_SelectedIndexChanged); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(15, 211); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(36, 13); - this.label12.TabIndex = 14; - this.label12.Text = "Hand:"; - // - // CompHandComboBox - // - this.CompHandComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompHandComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompHandComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompHandComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompHandComboBox.FormattingEnabled = true; - this.CompHandComboBox.Location = new System.Drawing.Point(54, 208); - this.CompHandComboBox.Name = "CompHandComboBox"; - this.CompHandComboBox.Size = new System.Drawing.Size(182, 21); - this.CompHandComboBox.TabIndex = 13; - this.CompHandComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHandComboBox_SelectedIndexChanged); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(18, 184); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(33, 13); - this.label9.TabIndex = 12; - this.label9.Text = "Lowr:"; - // - // CompLowrComboBox - // - this.CompLowrComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompLowrComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompLowrComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompLowrComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompLowrComboBox.FormattingEnabled = true; - this.CompLowrComboBox.Location = new System.Drawing.Point(54, 181); - this.CompLowrComboBox.Name = "CompLowrComboBox"; - this.CompLowrComboBox.Size = new System.Drawing.Size(182, 21); - this.CompLowrComboBox.TabIndex = 11; - this.CompLowrComboBox.SelectedIndexChanged += new System.EventHandler(this.CompLowrComboBox_SelectedIndexChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(18, 157); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(33, 13); - this.label8.TabIndex = 10; - this.label8.Text = "Uppr:"; - // - // CompUpprComboBox - // - this.CompUpprComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompUpprComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompUpprComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompUpprComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompUpprComboBox.FormattingEnabled = true; - this.CompUpprComboBox.Location = new System.Drawing.Point(54, 154); - this.CompUpprComboBox.Name = "CompUpprComboBox"; - this.CompUpprComboBox.Size = new System.Drawing.Size(182, 21); - this.CompUpprComboBox.TabIndex = 9; - this.CompUpprComboBox.SelectedIndexChanged += new System.EventHandler(this.CompUpprComboBox_SelectedIndexChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(22, 130); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(29, 13); - this.label7.TabIndex = 8; - this.label7.Text = "Hair:"; - // - // CompHairComboBox - // - this.CompHairComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompHairComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompHairComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompHairComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompHairComboBox.FormattingEnabled = true; - this.CompHairComboBox.Location = new System.Drawing.Point(54, 127); - this.CompHairComboBox.Name = "CompHairComboBox"; - this.CompHairComboBox.Size = new System.Drawing.Size(182, 21); - this.CompHairComboBox.TabIndex = 7; - this.CompHairComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHairComboBox_SelectedIndexChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(19, 103); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(32, 13); - this.label6.TabIndex = 6; - this.label6.Text = "Berd:"; - // - // CompBerdComboBox - // - this.CompBerdComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompBerdComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompBerdComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompBerdComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompBerdComboBox.FormattingEnabled = true; - this.CompBerdComboBox.Location = new System.Drawing.Point(54, 100); - this.CompBerdComboBox.Name = "CompBerdComboBox"; - this.CompBerdComboBox.Size = new System.Drawing.Size(182, 21); - this.CompBerdComboBox.TabIndex = 5; - this.CompBerdComboBox.SelectedIndexChanged += new System.EventHandler(this.CompBerdComboBox_SelectedIndexChanged); + tableLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + tableLayoutPanel1.AutoSize = true; + tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + tableLayoutPanel1.ColumnCount = 2; + tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); + tableLayoutPanel1.Controls.Add(CompHeadComboBox, 1, 0); + tableLayoutPanel1.Controls.Add(label6, 0, 2); + tableLayoutPanel1.Controls.Add(CompBerdComboBox, 1, 2); + tableLayoutPanel1.Controls.Add(label7, 0, 4); + tableLayoutPanel1.Controls.Add(CompHairComboBox, 1, 4); + tableLayoutPanel1.Controls.Add(label8, 0, 6); + tableLayoutPanel1.Controls.Add(CompUpprComboBox, 1, 6); + tableLayoutPanel1.Controls.Add(CompJbibComboBox, 1, 22); + tableLayoutPanel1.Controls.Add(label20, 0, 22); + tableLayoutPanel1.Controls.Add(label9, 0, 8); + tableLayoutPanel1.Controls.Add(label12, 0, 10); + tableLayoutPanel1.Controls.Add(CompDeclComboBox, 1, 20); + tableLayoutPanel1.Controls.Add(label18, 0, 20); + tableLayoutPanel1.Controls.Add(label13, 0, 12); + tableLayoutPanel1.Controls.Add(label15, 0, 14); + tableLayoutPanel1.Controls.Add(CompTaskComboBox, 1, 18); + tableLayoutPanel1.Controls.Add(label17, 0, 18); + tableLayoutPanel1.Controls.Add(CompLowrComboBox, 1, 8); + tableLayoutPanel1.Controls.Add(CompHandComboBox, 1, 10); + tableLayoutPanel1.Controls.Add(CompAccsComboBox, 1, 16); + tableLayoutPanel1.Controls.Add(label16, 0, 16); + tableLayoutPanel1.Controls.Add(CompFeetComboBox, 1, 12); + tableLayoutPanel1.Controls.Add(CompTeefComboBox, 1, 14); + tableLayoutPanel1.Controls.Add(CompBerdTexture, 1, 3); + tableLayoutPanel1.Controls.Add(CompHeadTexture, 1, 1); + tableLayoutPanel1.Controls.Add(CompHairTexture, 1, 5); + tableLayoutPanel1.Controls.Add(CompUpprTexture, 1, 7); + tableLayoutPanel1.Controls.Add(CompLowrTexture, 1, 9); + tableLayoutPanel1.Controls.Add(CompHandTexture, 1, 11); + tableLayoutPanel1.Controls.Add(CompFeetTexture, 1, 13); + tableLayoutPanel1.Controls.Add(CompTeefTexture, 1, 15); + tableLayoutPanel1.Controls.Add(CompAccsTexture, 1, 17); + tableLayoutPanel1.Controls.Add(CompTaskTexture, 1, 19); + tableLayoutPanel1.Controls.Add(CompDeclTexture, 1, 21); + tableLayoutPanel1.Controls.Add(CompJbibTexture, 1, 23); + tableLayoutPanel1.Controls.Add(label5, 0, 0); + tableLayoutPanel1.Location = new System.Drawing.Point(4, 105); + tableLayoutPanel1.Name = "tableLayoutPanel1"; + tableLayoutPanel1.RowCount = 24; + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + tableLayoutPanel1.Size = new System.Drawing.Size(235, 672); + tableLayoutPanel1.TabIndex = 35; // // label5 // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(15, 76); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(36, 13); - this.label5.TabIndex = 4; - this.label5.Text = "Head:"; + label5.Anchor = System.Windows.Forms.AnchorStyles.None; + label5.AutoEllipsis = true; + label5.Location = new System.Drawing.Point(4, 6); + label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(38, 15); + label5.TabIndex = 4; + label5.Text = "Head:"; + label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // CompHeadComboBox // - this.CompHeadComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CompHeadComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.CompHeadComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.CompHeadComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CompHeadComboBox.FormattingEnabled = true; - this.CompHeadComboBox.Location = new System.Drawing.Point(54, 73); - this.CompHeadComboBox.Name = "CompHeadComboBox"; - this.CompHeadComboBox.Size = new System.Drawing.Size(182, 21); - this.CompHeadComboBox.TabIndex = 3; - this.CompHeadComboBox.SelectedIndexChanged += new System.EventHandler(this.CompHeadComboBox_SelectedIndexChanged); + CompHeadComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHeadComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHeadComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHeadComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHeadComboBox.Location = new System.Drawing.Point(51, 3); + CompHeadComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHeadComboBox.Name = "CompHeadComboBox"; + CompHeadComboBox.Size = new System.Drawing.Size(180, 23); + CompHeadComboBox.TabIndex = 3; + CompHeadComboBox.SelectedIndexChanged += CompHeadComboBox_SelectedIndexChanged; + // + // label6 + // + label6.Anchor = System.Windows.Forms.AnchorStyles.None; + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(6, 62); + label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(34, 15); + label6.TabIndex = 6; + label6.Text = "Berd:"; + // + // CompBerdComboBox + // + CompBerdComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompBerdComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompBerdComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompBerdComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompBerdComboBox.FormattingEnabled = true; + CompBerdComboBox.Location = new System.Drawing.Point(51, 59); + CompBerdComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompBerdComboBox.Name = "CompBerdComboBox"; + CompBerdComboBox.Size = new System.Drawing.Size(180, 23); + CompBerdComboBox.TabIndex = 5; + CompBerdComboBox.SelectedIndexChanged += CompBerdComboBox_SelectedIndexChanged; + // + // label7 + // + label7.Anchor = System.Windows.Forms.AnchorStyles.None; + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(7, 118); + label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(32, 15); + label7.TabIndex = 8; + label7.Text = "Hair:"; + // + // CompHairComboBox + // + CompHairComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHairComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHairComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHairComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHairComboBox.FormattingEnabled = true; + CompHairComboBox.Location = new System.Drawing.Point(51, 115); + CompHairComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHairComboBox.Name = "CompHairComboBox"; + CompHairComboBox.Size = new System.Drawing.Size(180, 23); + CompHairComboBox.TabIndex = 7; + CompHairComboBox.SelectedIndexChanged += CompHairComboBox_SelectedIndexChanged; + // + // label8 + // + label8.Anchor = System.Windows.Forms.AnchorStyles.None; + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(5, 174); + label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(36, 15); + label8.TabIndex = 10; + label8.Text = "Uppr:"; + // + // CompUpprComboBox + // + CompUpprComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompUpprComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompUpprComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompUpprComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompUpprComboBox.FormattingEnabled = true; + CompUpprComboBox.Location = new System.Drawing.Point(51, 171); + CompUpprComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompUpprComboBox.Name = "CompUpprComboBox"; + CompUpprComboBox.Size = new System.Drawing.Size(180, 23); + CompUpprComboBox.TabIndex = 9; + CompUpprComboBox.SelectedIndexChanged += CompUpprComboBox_SelectedIndexChanged; + // + // CompJbibComboBox + // + CompJbibComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompJbibComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompJbibComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompJbibComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompJbibComboBox.FormattingEnabled = true; + CompJbibComboBox.Location = new System.Drawing.Point(51, 619); + CompJbibComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompJbibComboBox.Name = "CompJbibComboBox"; + CompJbibComboBox.Size = new System.Drawing.Size(180, 23); + CompJbibComboBox.TabIndex = 25; + CompJbibComboBox.SelectedIndexChanged += CompJbibComboBox_SelectedIndexChanged; + // + // label20 + // + label20.Anchor = System.Windows.Forms.AnchorStyles.None; + label20.AutoSize = true; + label20.Location = new System.Drawing.Point(8, 622); + label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label20.Name = "label20"; + label20.Size = new System.Drawing.Size(31, 15); + label20.TabIndex = 26; + label20.Text = "Jbib:"; + // + // label9 + // + label9.Anchor = System.Windows.Forms.AnchorStyles.None; + label9.AutoSize = true; + label9.Location = new System.Drawing.Point(5, 230); + label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(36, 15); + label9.TabIndex = 12; + label9.Text = "Lowr:"; + // + // label12 + // + label12.Anchor = System.Windows.Forms.AnchorStyles.None; + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(4, 286); + label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(39, 15); + label12.TabIndex = 14; + label12.Text = "Hand:"; + // + // CompDeclComboBox + // + CompDeclComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompDeclComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompDeclComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompDeclComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompDeclComboBox.FormattingEnabled = true; + CompDeclComboBox.Location = new System.Drawing.Point(51, 563); + CompDeclComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompDeclComboBox.Name = "CompDeclComboBox"; + CompDeclComboBox.Size = new System.Drawing.Size(180, 23); + CompDeclComboBox.TabIndex = 23; + CompDeclComboBox.SelectedIndexChanged += CompDeclComboBox_SelectedIndexChanged; + // + // label18 + // + label18.Anchor = System.Windows.Forms.AnchorStyles.None; + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(7, 566); + label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(33, 15); + label18.TabIndex = 24; + label18.Text = "Decl:"; + // + // label13 + // + label13.Anchor = System.Windows.Forms.AnchorStyles.None; + label13.AutoSize = true; + label13.Location = new System.Drawing.Point(7, 342); + label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label13.Name = "label13"; + label13.Size = new System.Drawing.Size(32, 15); + label13.TabIndex = 16; + label13.Text = "Feet:"; + // + // label15 + // + label15.Anchor = System.Windows.Forms.AnchorStyles.None; + label15.AutoSize = true; + label15.Location = new System.Drawing.Point(8, 398); + label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label15.Name = "label15"; + label15.Size = new System.Drawing.Size(31, 15); + label15.TabIndex = 18; + label15.Text = "Teef:"; + // + // CompTaskComboBox + // + CompTaskComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompTaskComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompTaskComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompTaskComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompTaskComboBox.FormattingEnabled = true; + CompTaskComboBox.Location = new System.Drawing.Point(51, 507); + CompTaskComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompTaskComboBox.Name = "CompTaskComboBox"; + CompTaskComboBox.Size = new System.Drawing.Size(180, 23); + CompTaskComboBox.TabIndex = 21; + CompTaskComboBox.SelectedIndexChanged += CompTaskComboBox_SelectedIndexChanged; + // + // label17 + // + label17.Anchor = System.Windows.Forms.AnchorStyles.None; + label17.AutoSize = true; + label17.Location = new System.Drawing.Point(7, 510); + label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label17.Name = "label17"; + label17.Size = new System.Drawing.Size(32, 15); + label17.TabIndex = 22; + label17.Text = "Task:"; + // + // CompLowrComboBox + // + CompLowrComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompLowrComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompLowrComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompLowrComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompLowrComboBox.FormattingEnabled = true; + CompLowrComboBox.Location = new System.Drawing.Point(51, 227); + CompLowrComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompLowrComboBox.Name = "CompLowrComboBox"; + CompLowrComboBox.Size = new System.Drawing.Size(180, 23); + CompLowrComboBox.TabIndex = 11; + CompLowrComboBox.SelectedIndexChanged += CompLowrComboBox_SelectedIndexChanged; + // + // CompHandComboBox + // + CompHandComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHandComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHandComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHandComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHandComboBox.FormattingEnabled = true; + CompHandComboBox.Location = new System.Drawing.Point(51, 283); + CompHandComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHandComboBox.Name = "CompHandComboBox"; + CompHandComboBox.Size = new System.Drawing.Size(180, 23); + CompHandComboBox.TabIndex = 13; + CompHandComboBox.SelectedIndexChanged += CompHandComboBox_SelectedIndexChanged; + // + // CompAccsComboBox + // + CompAccsComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompAccsComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompAccsComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompAccsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompAccsComboBox.FormattingEnabled = true; + CompAccsComboBox.Location = new System.Drawing.Point(51, 451); + CompAccsComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompAccsComboBox.Name = "CompAccsComboBox"; + CompAccsComboBox.Size = new System.Drawing.Size(180, 23); + CompAccsComboBox.TabIndex = 19; + CompAccsComboBox.SelectedIndexChanged += CompAccsComboBox_SelectedIndexChanged; + // + // label16 + // + label16.Anchor = System.Windows.Forms.AnchorStyles.None; + label16.AutoSize = true; + label16.Location = new System.Drawing.Point(6, 454); + label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label16.Name = "label16"; + label16.Size = new System.Drawing.Size(35, 15); + label16.TabIndex = 20; + label16.Text = "Accs:"; + // + // CompFeetComboBox + // + CompFeetComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompFeetComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompFeetComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompFeetComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompFeetComboBox.FormattingEnabled = true; + CompFeetComboBox.Location = new System.Drawing.Point(51, 339); + CompFeetComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompFeetComboBox.Name = "CompFeetComboBox"; + CompFeetComboBox.Size = new System.Drawing.Size(180, 23); + CompFeetComboBox.TabIndex = 15; + CompFeetComboBox.SelectedIndexChanged += CompFeetComboBox_SelectedIndexChanged; + // + // CompTeefComboBox + // + CompTeefComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompTeefComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompTeefComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompTeefComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompTeefComboBox.FormattingEnabled = true; + CompTeefComboBox.Location = new System.Drawing.Point(51, 395); + CompTeefComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompTeefComboBox.Name = "CompTeefComboBox"; + CompTeefComboBox.Size = new System.Drawing.Size(180, 23); + CompTeefComboBox.TabIndex = 17; + CompTeefComboBox.SelectedIndexChanged += CompTeefComboBox_SelectedIndexChanged; + // + // CompBerdTexture + // + CompBerdTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompBerdTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompBerdTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompBerdTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompBerdTexture.FormattingEnabled = true; + CompBerdTexture.Location = new System.Drawing.Point(51, 87); + CompBerdTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompBerdTexture.Name = "CompBerdTexture"; + CompBerdTexture.Size = new System.Drawing.Size(180, 23); + CompBerdTexture.TabIndex = 29; + CompBerdTexture.SelectedIndexChanged += CompBerdTexture_SelectedIndexChanged; + // + // CompHeadTexture + // + CompHeadTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHeadTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHeadTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHeadTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHeadTexture.FormattingEnabled = true; + CompHeadTexture.Location = new System.Drawing.Point(51, 31); + CompHeadTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHeadTexture.Name = "CompHeadTexture"; + CompHeadTexture.Size = new System.Drawing.Size(180, 23); + CompHeadTexture.TabIndex = 30; + CompHeadTexture.SelectedIndexChanged += CompHeadTexture_SelectedIndexChanged; + // + // CompHairTexture + // + CompHairTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHairTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHairTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHairTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHairTexture.FormattingEnabled = true; + CompHairTexture.Location = new System.Drawing.Point(51, 143); + CompHairTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHairTexture.Name = "CompHairTexture"; + CompHairTexture.Size = new System.Drawing.Size(180, 23); + CompHairTexture.TabIndex = 31; + CompHairTexture.SelectedIndexChanged += CompHairTexture_SelectedIndexChanged; + // + // CompUpprTexture + // + CompUpprTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompUpprTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompUpprTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompUpprTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompUpprTexture.FormattingEnabled = true; + CompUpprTexture.Location = new System.Drawing.Point(51, 199); + CompUpprTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompUpprTexture.Name = "CompUpprTexture"; + CompUpprTexture.Size = new System.Drawing.Size(180, 23); + CompUpprTexture.TabIndex = 32; + CompUpprTexture.SelectedIndexChanged += CompUpprTexture_SelectedIndexChanged; + // + // CompLowrTexture + // + CompLowrTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompLowrTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompLowrTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompLowrTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompLowrTexture.FormattingEnabled = true; + CompLowrTexture.Location = new System.Drawing.Point(51, 255); + CompLowrTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompLowrTexture.Name = "CompLowrTexture"; + CompLowrTexture.Size = new System.Drawing.Size(180, 23); + CompLowrTexture.TabIndex = 33; + CompLowrTexture.SelectedIndexChanged += CompLowrTexture_SelectedIndexChanged; + // + // CompHandTexture + // + CompHandTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompHandTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompHandTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompHandTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompHandTexture.FormattingEnabled = true; + CompHandTexture.Location = new System.Drawing.Point(51, 311); + CompHandTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompHandTexture.Name = "CompHandTexture"; + CompHandTexture.Size = new System.Drawing.Size(180, 23); + CompHandTexture.TabIndex = 34; + CompHandTexture.SelectedIndexChanged += CompHandTexture_SelectedIndexChanged; + // + // CompFeetTexture + // + CompFeetTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompFeetTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompFeetTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompFeetTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompFeetTexture.FormattingEnabled = true; + CompFeetTexture.Location = new System.Drawing.Point(51, 367); + CompFeetTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompFeetTexture.Name = "CompFeetTexture"; + CompFeetTexture.Size = new System.Drawing.Size(180, 23); + CompFeetTexture.TabIndex = 35; + CompFeetTexture.SelectedIndexChanged += CompFeetTexture_SelectedIndexChanged; + // + // CompTeefTexture + // + CompTeefTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompTeefTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompTeefTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompTeefTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompTeefTexture.FormattingEnabled = true; + CompTeefTexture.Location = new System.Drawing.Point(51, 423); + CompTeefTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompTeefTexture.Name = "CompTeefTexture"; + CompTeefTexture.Size = new System.Drawing.Size(180, 23); + CompTeefTexture.TabIndex = 36; + CompTeefTexture.SelectedIndexChanged += CompTeefTexture_SelectedIndexChanged; + // + // CompAccsTexture + // + CompAccsTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompAccsTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompAccsTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompAccsTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompAccsTexture.FormattingEnabled = true; + CompAccsTexture.Location = new System.Drawing.Point(51, 479); + CompAccsTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompAccsTexture.Name = "CompAccsTexture"; + CompAccsTexture.Size = new System.Drawing.Size(180, 23); + CompAccsTexture.TabIndex = 37; + CompAccsTexture.SelectedIndexChanged += CompAccsTexture_SelectedIndexChanged; + // + // CompTaskTexture + // + CompTaskTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompTaskTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompTaskTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompTaskTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompTaskTexture.FormattingEnabled = true; + CompTaskTexture.Location = new System.Drawing.Point(51, 535); + CompTaskTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompTaskTexture.Name = "CompTaskTexture"; + CompTaskTexture.Size = new System.Drawing.Size(180, 23); + CompTaskTexture.TabIndex = 38; + CompTaskTexture.SelectedIndexChanged += CompTaskTexture_SelectedIndexChanged; + // + // CompDeclTexture + // + CompDeclTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompDeclTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompDeclTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompDeclTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompDeclTexture.FormattingEnabled = true; + CompDeclTexture.Location = new System.Drawing.Point(51, 591); + CompDeclTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompDeclTexture.Name = "CompDeclTexture"; + CompDeclTexture.Size = new System.Drawing.Size(180, 23); + CompDeclTexture.TabIndex = 39; + CompDeclTexture.SelectedIndexChanged += CompDeclTexture_SelectedIndexChanged; + // + // CompJbibTexture + // + CompJbibTexture.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CompJbibTexture.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + CompJbibTexture.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + CompJbibTexture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CompJbibTexture.FormattingEnabled = true; + CompJbibTexture.Location = new System.Drawing.Point(51, 647); + CompJbibTexture.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CompJbibTexture.Name = "CompJbibTexture"; + CompJbibTexture.Size = new System.Drawing.Size(180, 23); + CompJbibTexture.TabIndex = 40; + CompJbibTexture.SelectedIndexChanged += CompJbibTexture_SelectedIndexChanged; + // + // label24 + // + label24.AutoSize = true; + label24.Location = new System.Drawing.Point(4, 41); + label24.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label24.Name = "label24"; + label24.Size = new System.Drawing.Size(31, 15); + label24.TabIndex = 34; + label24.Text = "Ymt:"; + label24.Click += label24_Click; + // + // YmtNameComboBox + // + YmtNameComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + YmtNameComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + YmtNameComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + YmtNameComboBox.FormattingEnabled = true; + YmtNameComboBox.Location = new System.Drawing.Point(55, 38); + YmtNameComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + YmtNameComboBox.Name = "YmtNameComboBox"; + YmtNameComboBox.Size = new System.Drawing.Size(158, 23); + YmtNameComboBox.TabIndex = 33; + YmtNameComboBox.SelectionChangeCommitted += YmtNameCombaBox_SelectedIndexChanged; + // + // EnableRootMotionCheckBox + // + EnableRootMotionCheckBox.AutoSize = true; + EnableRootMotionCheckBox.Location = new System.Drawing.Point(63, 889); + EnableRootMotionCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + EnableRootMotionCheckBox.Name = "EnableRootMotionCheckBox"; + EnableRootMotionCheckBox.Size = new System.Drawing.Size(128, 19); + EnableRootMotionCheckBox.TabIndex = 32; + EnableRootMotionCheckBox.Text = "Enable root motion"; + EnableRootMotionCheckBox.UseVisualStyleBackColor = true; + EnableRootMotionCheckBox.CheckedChanged += EnableRootMotionCheckBox_CheckedChanged; + // + // label23 + // + label23.AutoSize = true; + label23.Location = new System.Drawing.Point(4, 812); + label23.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label23.Name = "label23"; + label23.Size = new System.Drawing.Size(66, 15); + label23.TabIndex = 31; + label23.Text = "Animation:"; + // + // label22 + // + label22.AutoSize = true; + label22.Location = new System.Drawing.Point(24, 863); + label22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label22.Name = "label22"; + label22.Size = new System.Drawing.Size(31, 15); + label22.TabIndex = 30; + label22.Text = "Clip:"; + // + // ClipComboBox + // + ClipComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ClipComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + ClipComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + ClipComboBox.FormattingEnabled = true; + ClipComboBox.Location = new System.Drawing.Point(63, 860); + ClipComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ClipComboBox.Name = "ClipComboBox"; + ClipComboBox.Size = new System.Drawing.Size(163, 23); + ClipComboBox.TabIndex = 29; + ClipComboBox.TextChanged += ClipComboBox_TextChanged; + // + // label21 + // + label21.AutoSize = true; + label21.Location = new System.Drawing.Point(4, 833); + label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label21.Name = "label21"; + label21.Size = new System.Drawing.Size(55, 15); + label21.TabIndex = 28; + label21.Text = "Clip Dict:"; + // + // ClipDictComboBox + // + ClipDictComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ClipDictComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + ClipDictComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + ClipDictComboBox.FormattingEnabled = true; + ClipDictComboBox.Location = new System.Drawing.Point(63, 830); + ClipDictComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ClipDictComboBox.Name = "ClipDictComboBox"; + ClipDictComboBox.Size = new System.Drawing.Size(163, 23); + ClipDictComboBox.TabIndex = 27; + ClipDictComboBox.TextChanged += ClipDictComboBox_TextChanged; // // label4 // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 53); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(69, 13); - this.label4.TabIndex = 2; - this.label4.Text = "Components:"; + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(4, 87); + label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(79, 15); + label4.TabIndex = 2; + label4.Text = "Components:"; // // ToolsTabControl // - this.ToolsTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsTabControl.Controls.Add(this.ToolsPedTabPage); - this.ToolsTabControl.Controls.Add(this.ToolsModelsTabPage); - this.ToolsTabControl.Controls.Add(this.ToolsTexturesTabPage); - this.ToolsTabControl.Controls.Add(this.ToolsDetailsTabPage); - this.ToolsTabControl.Controls.Add(this.ToolsOptionsTabPage); - this.ToolsTabControl.Location = new System.Drawing.Point(2, 30); - this.ToolsTabControl.Name = "ToolsTabControl"; - this.ToolsTabControl.SelectedIndex = 0; - this.ToolsTabControl.Size = new System.Drawing.Size(247, 633); - this.ToolsTabControl.TabIndex = 1; + ToolsTabControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ToolsTabControl.Controls.Add(ToolsPedTabPage); + ToolsTabControl.Controls.Add(ToolsModelsTabPage); + ToolsTabControl.Controls.Add(ToolsTexturesTabPage); + ToolsTabControl.Controls.Add(ToolsDetailsTabPage); + ToolsTabControl.Controls.Add(ToolsOptionsTabPage); + ToolsTabControl.Location = new System.Drawing.Point(2, 35); + ToolsTabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsTabControl.Name = "ToolsTabControl"; + ToolsTabControl.SelectedIndex = 0; + ToolsTabControl.Size = new System.Drawing.Size(316, 730); + ToolsTabControl.TabIndex = 1; // // ToolsPanel // - this.ToolsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.ToolsPanel.BackColor = System.Drawing.SystemColors.ControlDark; - this.ToolsPanel.Controls.Add(this.ToolsTabControl); - this.ToolsPanel.Controls.Add(this.ToolsPanelHideButton); - this.ToolsPanel.Controls.Add(this.ToolsDragPanel); - this.ToolsPanel.Location = new System.Drawing.Point(12, 12); - this.ToolsPanel.Name = "ToolsPanel"; - this.ToolsPanel.Size = new System.Drawing.Size(252, 666); - this.ToolsPanel.TabIndex = 7; - this.ToolsPanel.Visible = false; + ToolsPanel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ToolsPanel.BackColor = System.Drawing.SystemColors.ControlDark; + ToolsPanel.Controls.Add(ToolsTabControl); + ToolsPanel.Controls.Add(ToolsPanelHideButton); + ToolsPanel.Controls.Add(ToolsDragPanel); + ToolsPanel.Location = new System.Drawing.Point(14, 14); + ToolsPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanel.Name = "ToolsPanel"; + ToolsPanel.Size = new System.Drawing.Size(322, 768); + ToolsPanel.TabIndex = 7; + ToolsPanel.Visible = false; // // PedsForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.MidnightBlue; - this.ClientSize = new System.Drawing.Size(984, 711); - this.Controls.Add(this.ConsolePanel); - this.Controls.Add(this.StatusStrip); - this.Controls.Add(this.ToolsPanel); - this.Controls.Add(this.ToolsPanelShowButton); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.KeyPreview = true; - this.Name = "PedsForm"; - this.Text = "Ped Viewer - CodeWalker by dexyfex"; - this.Deactivate += new System.EventHandler(this.PedsForm_Deactivate); - this.Load += new System.EventHandler(this.PedsForm_Load); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PedsForm_KeyDown); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.PedsForm_KeyUp); - this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PedsForm_MouseDown); - this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PedsForm_MouseMove); - this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.PedsForm_MouseUp); - this.ConsolePanel.ResumeLayout(false); - this.ConsolePanel.PerformLayout(); - this.ToolsOptionsTabPage.ResumeLayout(false); - this.ToolsOptionsTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).EndInit(); - this.ToolsDetailsTabPage.ResumeLayout(false); - this.ToolsTexturesTabPage.ResumeLayout(false); - this.StatusStrip.ResumeLayout(false); - this.StatusStrip.PerformLayout(); - this.ToolsModelsTabPage.ResumeLayout(false); - this.ToolsPedTabPage.ResumeLayout(false); - this.ToolsPedTabPage.PerformLayout(); - this.ToolsTabControl.ResumeLayout(false); - this.ToolsPanel.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + BackColor = System.Drawing.Color.MidnightBlue; + ClientSize = new System.Drawing.Size(1148, 820); + Controls.Add(ConsolePanel); + Controls.Add(StatusStrip); + Controls.Add(ToolsPanel); + Controls.Add(ToolsPanelShowButton); + Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); + KeyPreview = true; + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "PedsForm"; + Text = "Ped Viewer - CodeWalker by dexyfex"; + Deactivate += PedsForm_Deactivate; + Load += PedsForm_Load; + KeyDown += PedsForm_KeyDown; + KeyUp += PedsForm_KeyUp; + MouseDown += PedsForm_MouseDown; + MouseMove += PedsForm_MouseMove; + MouseUp += PedsForm_MouseUp; + ConsolePanel.ResumeLayout(false); + ConsolePanel.PerformLayout(); + ToolsOptionsTabPage.ResumeLayout(false); + ToolsOptionsTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)TimeOfDayTrackBar).EndInit(); + ToolsDetailsTabPage.ResumeLayout(false); + ToolsTexturesTabPage.ResumeLayout(false); + StatusStrip.ResumeLayout(false); + StatusStrip.PerformLayout(); + ToolsModelsTabPage.ResumeLayout(false); + ToolsPedTabPage.ResumeLayout(false); + ToolsPedTabPage.PerformLayout(); + tableLayoutPanel1.ResumeLayout(false); + tableLayoutPanel1.PerformLayout(); + ToolsTabControl.ResumeLayout(false); + ToolsPanel.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -1197,5 +1496,20 @@ private System.Windows.Forms.ComboBox ClipDictComboBox; private System.Windows.Forms.Label label23; private System.Windows.Forms.CheckBox EnableRootMotionCheckBox; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.ComboBox YmtNameComboBox; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.ComboBox CompBerdTexture; + private System.Windows.Forms.ComboBox CompHeadTexture; + private System.Windows.Forms.ComboBox CompHairTexture; + private System.Windows.Forms.ComboBox CompUpprTexture; + private System.Windows.Forms.ComboBox CompLowrTexture; + private System.Windows.Forms.ComboBox CompHandTexture; + private System.Windows.Forms.ComboBox CompFeetTexture; + private System.Windows.Forms.ComboBox CompTeefTexture; + private System.Windows.Forms.ComboBox CompAccsTexture; + private System.Windows.Forms.ComboBox CompTaskTexture; + private System.Windows.Forms.ComboBox CompDeclTexture; + private System.Windows.Forms.ComboBox CompJbibTexture; } } \ No newline at end of file diff --git a/CodeWalker/PedsForm.cs b/CodeWalker/PedsForm.cs index e90e8f2..574a793 100644 --- a/CodeWalker/PedsForm.cs +++ b/CodeWalker/PedsForm.cs @@ -10,12 +10,16 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics.Arm; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using System.Xml.Linq; using Color = SharpDX.Color; namespace CodeWalker @@ -25,7 +29,6 @@ namespace CodeWalker public Form Form { get { return this; } } //for DXForm/DXManager use public Renderer Renderer { get; set; } - public object RenderSyncRoot { get { return Renderer.RenderSyncRoot; } } public bool Pauserendering { get; set; } volatile bool formopen = false; @@ -52,7 +55,7 @@ namespace CodeWalker System.Drawing.Point MouseLastPoint; - public GameFileCache GameFileCache { get; } = GameFileCacheFactory.GetInstance(); + public GameFileCache GameFileCache => GameFileCacheFactory.Instance; InputManager Input = new InputManager(); @@ -80,42 +83,73 @@ namespace CodeWalker Ped SelectedPed = new Ped(); + public class ComponentComboBoxesContainer + { + public int Index = 0; + public required ComboBox DrawableBox; + public required ComboBox TextureBox; + + [SetsRequiredMembers] + public ComponentComboBoxesContainer(ComboBox drawableBox, ComboBox textureBox) + { + DrawableBox = drawableBox; + TextureBox = textureBox; + } + } + + ComboBox[] ComponentComboBoxesOld = null; + + ComponentComboBoxesContainer[] ComponentComboBoxes = null; - ComboBox[] ComponentComboBoxes = null; public class ComponentComboItem { public MCPVDrawblData DrawableData { get; set; } public int AlternativeIndex { get; set; } - public int TextureIndex { get; set; } - public ComponentComboItem(MCPVDrawblData drawableData, int altIndex = 0, int textureIndex = -1) + public MetaHash DlcName => DrawableData?.Owner.Owner.Data.dlcName ?? default; + public int Index { get; set; } + + public string DrawableName => DrawableData?.GetDrawableName(AlternativeIndex) ?? "error"; + + public ComponentComboItem(MCPVDrawblData drawableData, int altIndex = 0, int index = 0) { DrawableData = drawableData; AlternativeIndex = altIndex; - TextureIndex = textureIndex; + Index = index; } + public override string ToString() { - if (DrawableData == null) return TextureIndex.ToString(); + if (DrawableData == null) + return $"[{Index}] {AlternativeIndex}"; var itemname = DrawableData.GetDrawableName(AlternativeIndex); - if (DrawableData.TexData?.Length > 0) return itemname + " + " + DrawableData.GetTextureSuffix(TextureIndex); - return itemname; - } - public string DrawableName - { - get - { - return DrawableData?.GetDrawableName(AlternativeIndex) ?? "error"; - } - } - public string TextureName - { - get - { - return DrawableData?.GetTextureName(TextureIndex); - } + if (DrawableData.TexData?.Length > 0) + return $"[{Index}] {DlcName}^{itemname}"; + return $"[{Index}] {itemname}{DlcName}"; } } + public class ComponentTextureItem : ComponentComboItem + { + public int TextureIndex { get; set; } + + public string TextureName => DrawableData?.GetTextureName(TextureIndex); + + public ComponentTextureItem(MCPVDrawblData drawableData, int altIndex = 0, int textureIndex = -1) : base(drawableData, altIndex) + { + TextureIndex = textureIndex; + } + + public override string ToString() + { + if (DrawableData == null) + return TextureIndex.ToString(); + + if (DrawableData.TexData?.Length > 0) + return TextureName; + + return TextureIndex.ToString(); + } + } public PedsForm() @@ -123,6 +157,22 @@ namespace CodeWalker InitializeComponent(); ComponentComboBoxes = new[] + { + new ComponentComboBoxesContainer(CompHeadComboBox, CompHeadTexture), + new ComponentComboBoxesContainer(CompBerdComboBox, CompBerdTexture), + new ComponentComboBoxesContainer(CompHairComboBox, CompHairTexture), + new ComponentComboBoxesContainer(CompUpprComboBox, CompUpprTexture), + new ComponentComboBoxesContainer(CompLowrComboBox, CompLowrTexture), + new ComponentComboBoxesContainer(CompHandComboBox, CompHandTexture), + new ComponentComboBoxesContainer(CompFeetComboBox, CompFeetTexture), + new ComponentComboBoxesContainer(CompTeefComboBox, CompTeefTexture), + new ComponentComboBoxesContainer(CompAccsComboBox, CompAccsTexture), + new ComponentComboBoxesContainer(CompTaskComboBox, CompTaskTexture), + new ComponentComboBoxesContainer(CompDeclComboBox, CompDeclTexture), + new ComponentComboBoxesContainer(CompJbibComboBox, CompJbibTexture), + }; + + ComponentComboBoxesOld = new[] { CompHeadComboBox, CompBerdComboBox, @@ -184,7 +234,7 @@ namespace CodeWalker camera.TargetRotation.X = 1.0f * (float)Math.PI; camera.CurrentRotation.X = 1.0f * (float)Math.PI; - Renderer.shaders.deferred = false; //no point using this here yet + Renderer.Shaders.deferred = false; //no point using this here yet LoadSettings(); @@ -197,7 +247,7 @@ namespace CodeWalker frametimer.Start(); } - public void CleanupScene() + public async ValueTask CleanupScene() { formopen = false; @@ -206,7 +256,7 @@ namespace CodeWalker int count = 0; while (running && (count < 5000)) //wait for the content thread to exit gracefully { - Thread.Sleep(1); + await Task.Delay(1); count++; } } @@ -224,7 +274,7 @@ namespace CodeWalker GameFileCache.BeginFrame(); - if (!Monitor.TryEnter(Renderer.RenderSyncRoot, 50)) + if (!await Renderer.RenderSyncRoot.WaitAsync(50)) { return; } //couldn't get a lock, try again next time @@ -277,7 +327,7 @@ namespace CodeWalker } finally { - Monitor.Exit(Renderer.RenderSyncRoot); + Renderer.RenderSyncRoot.Release(); } //UpdateMarkerSelectionPanelInvoke(); @@ -337,7 +387,7 @@ namespace CodeWalker } - private void ContentThread() + private async ValueTask ContentThread() { try { @@ -366,7 +416,7 @@ namespace CodeWalker GameFileCache.LoadArchetypes = false;//to speed things up a little GameFileCache.BuildExtendedJenkIndex = false;//to speed things up a little GameFileCache.DoFullStringIndex = true;//to get all global text from DLC... - GameFileCache.Init(UpdateStatus, LogError, force: false); + await GameFileCache.InitAsync(UpdateStatus, LogError, force: false); } //UpdateDlcListComboBox(gameFileCache.DlcNameList); @@ -387,14 +437,15 @@ namespace CodeWalker //UpdateStatus("Ready"); - Task.Run(async () => { + Task.Run(async () => + { while (formopen && !IsDisposed) //renderer content loop { bool rcItemsPending = Renderer.ContentThreadProc(); if (!rcItemsPending) { - await Task.Delay(ActiveForm == null ? 50 : 1).ConfigureAwait(false); + await Task.Delay(ActiveForm == null ? 50 : 2).ConfigureAwait(false); } } }); @@ -407,14 +458,14 @@ namespace CodeWalker if (!fcItemsPending) { - await Task.Delay(ActiveForm == null ? 50 : 1).ConfigureAwait(false); + await Task.Delay(ActiveForm == null ? 50 : 2).ConfigureAwait(false); } } running = false; }); } - catch(Exception ex) + catch (Exception ex) { Console.WriteLine($"Exception occured in PedsForm::ContentThread.\n{ex}"); } @@ -476,14 +527,16 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void LogError(string text) { @@ -491,17 +544,20 @@ namespace CodeWalker { if (InvokeRequired) { - Invoke(new Action(() => { LogError(text); })); + Invoke(LogError, text); } else { //TODO: error logging.. ConsoleTextBox.AppendText(text + "\r\n"); + Console.WriteLine(text); //StatusLabel.Text = text; //MessageBox.Show(text); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -523,7 +579,7 @@ namespace CodeWalker { //move the camera to a default place where the given sphere is fully visible. - rad = Math.Max(0.01f, rad*0.1f); + rad = Math.Max(0.01f, rad * 0.1f); camera.FollowEntity.Position = pos; camera.TargetDistance = rad * 1.2f; @@ -545,6 +601,7 @@ namespace CodeWalker var dnode = ModelsTreeView.Nodes.Add(name); dnode.Tag = drawable; dnode.Checked = check; + UpdateDrawFlags(drawable, check); AddDrawableModelsTreeNodes(drawable.DrawableModels?.High, "High Detail", true, dnode, tnode); AddDrawableModelsTreeNodes(drawable.DrawableModels?.Med, "Medium Detail", false, dnode, tnode); @@ -555,7 +612,8 @@ namespace CodeWalker } private void AddDrawableModelsTreeNodes(DrawableModel[] models, string prefix, bool check, TreeNode parentDrawableNode = null, TreeNode parentTextureNode = null) { - if (models == null) return; + if (models is null || models.Length == 0) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -566,17 +624,14 @@ namespace CodeWalker var mnode = tnc.Add(mprefix + " " + model.ToString()); mnode.Tag = model; mnode.Checked = check; + UpdateDrawFlags(model, check); var ttnc = (parentTextureNode != null) ? parentTextureNode.Nodes : TexturesTreeView.Nodes; var tmnode = ttnc.Add(mprefix + " " + model.ToString()); tmnode.Tag = model; - if (!check) - { - Renderer.SelectionModelDrawFlags[model] = false; - } - - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { @@ -584,11 +639,12 @@ namespace CodeWalker var gnode = mnode.Nodes.Add(gname); gnode.Tag = geom; gnode.Checked = true;// check; + UpdateDrawFlags(geom, true); var tgnode = tmnode.Nodes.Add(gname); tgnode.Tag = geom; - if ((geom.Shader != null) && (geom.Shader.ParametersList != null) && (geom.Shader.ParametersList.Hashes != null)) + if (geom.Shader?.ParametersList?.Hashes is not null) { var pl = geom.Shader.ParametersList; var h = pl.Hashes; @@ -597,14 +653,12 @@ namespace CodeWalker { var hash = pl.Hashes[ip]; var parm = pl.Parameters[ip]; - var tex = parm.Data as TextureBase; - if (tex != null) + if (parm.Data is TextureBase tex) { - var t = tex as Texture; var tstr = tex.Name.Trim(); - if (t != null) + if (tex is Texture t) { - tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height); + tstr = $"{tex.Name} ({t.Width}x{t.Height}, embedded)"; } var tnode = tgnode.Nodes.Add(hash.ToString().Trim() + ": " + tstr); tnode.Tag = tex; @@ -619,67 +673,74 @@ namespace CodeWalker tmnode.Expand(); } } + + private void UpdateDrawFlags(DrawableModel model, bool rem) + { + using (Renderer.RenderSyncRoot.WaitDisposable()) + { + if (rem) + { + Renderer.SelectionModelDrawFlags.Remove(model); + } + else + { + Renderer.SelectionModelDrawFlags[model] = false; + } + } + } + + private void UpdateDrawFlags(DrawableGeometry geom, bool rem) + { + using (Renderer.RenderSyncRoot.WaitDisposable()) + { + if (rem) + { + Renderer.SelectionGeometryDrawFlags.Remove(geom); + } + else + { + Renderer.SelectionGeometryDrawFlags[geom] = false; + } + } + } + + private void UpdateDrawFlags(DrawableBase drwbl, bool rem) + { + using (Renderer.RenderSyncRoot.WaitDisposable()) + { + if (rem) + { + Renderer.SelectionDrawableDrawFlags.Remove(drwbl); + } + else + { + Renderer.SelectionDrawableDrawFlags[drwbl] = false; + } + } + } + private void UpdateSelectionDrawFlags(TreeNode node) { - //update the selection draw flags depending on tag and checked/unchecked - var drwbl = node.Tag as DrawableBase; - var model = node.Tag as DrawableModel; - var geom = node.Tag as DrawableGeometry; - bool rem = node.Checked; - lock (Renderer.RenderSyncRoot) + if (node.Tag is DrawableBase drwbl) { - if (drwbl != null) - { - if (rem) - { - if (Renderer.SelectionDrawableDrawFlags.ContainsKey(drwbl)) - { - Renderer.SelectionDrawableDrawFlags.Remove(drwbl); - } - } - else - { - Renderer.SelectionDrawableDrawFlags[drwbl] = false; - } - } - if (model != null) - { - if (rem) - { - if (Renderer.SelectionModelDrawFlags.ContainsKey(model)) - { - Renderer.SelectionModelDrawFlags.Remove(model); - } - } - else - { - Renderer.SelectionModelDrawFlags[model] = false; - } - } - if (geom != null) - { - if (rem) - { - if (Renderer.SelectionGeometryDrawFlags.ContainsKey(geom)) - { - Renderer.SelectionGeometryDrawFlags.Remove(geom); - } - } - else - { - Renderer.SelectionGeometryDrawFlags[geom] = false; - } - } - //updateArchetypeStatus = true; + UpdateDrawFlags(drwbl, node.Checked); + } + else if (node.Tag is DrawableModel model) + { + UpdateDrawFlags(model, node.Checked); + } + else if (node.Tag is DrawableGeometry geom) + { + UpdateDrawFlags(geom, node.Checked); } } - private void UpdateGlobalPedsUI() + private async void UpdateGlobalPedsUI() { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateGlobalPedsUI(); })); + BeginInvoke(UpdateGlobalPedsUI); } else { @@ -692,7 +753,7 @@ namespace CodeWalker List ycdlist = new List(); foreach (var ycde in ycds) { - ycdlist.Add(ycde.ShortName); + ycdlist.Add(ycde.ShortName.ToString()); } ClipDictComboBox.AutoCompleteCustomSource.AddRange(ycdlist.ToArray()); ClipDictComboBox.Text = ""; @@ -700,6 +761,10 @@ namespace CodeWalker PedNameComboBox.Items.Clear(); + if (GameFileCache.PedsInitDict is null) + { + await GameFileCache.InitPeds(true); + } var peds = GameFileCache.PedsInitDict.Values.ToList(); peds.Sort((a, b) => { return a.Name.CompareTo(b.Name); }); foreach (var ped in peds) @@ -708,7 +773,7 @@ namespace CodeWalker } if (peds.Count > 0) { - var ind = PedNameComboBox.FindString("A_F_Y_Beach_01"); // //A_C_Pug + var ind = PedNameComboBox.FindString("MP_M_Freemode_01"); // //A_C_Pug PedNameComboBox.SelectedIndex = Math.Max(ind, 0); //PedNameComboBox.SelectedIndex = 0; } @@ -733,7 +798,8 @@ namespace CodeWalker TexturesTreeView.Nodes.Clear(); TexturesTreeView.ShowRootLines = true; - if (SelectedPed == null) return; + if (SelectedPed is null) + return; for (int i = 0; i < 12; i++) @@ -741,9 +807,11 @@ namespace CodeWalker var drawable = SelectedPed.Drawables[i]; var drawablename = SelectedPed.DrawableNames[i]; - if (drawable != null) + if (drawable is not null) { AddDrawableTreeNode(drawable, drawablename, true); + + PopulateCompComboTextures(ComponentComboBoxes[i]); } } @@ -754,39 +822,96 @@ namespace CodeWalker public async ValueTask LoadPedAsync() { + SuspendLayout(); var pedname = PedNameComboBox.Text; - var pedhash = JenkHash.GenHash(pedname.ToLowerInvariant()); + var pedhash = JenkHash.GenHashLower(pedname); var pedchange = SelectedPed.NameHash != pedhash; for (int i = 0; i < 12; i++) { - ClearCombo(ComponentComboBoxes[i]); + ClearCombo(ComponentComboBoxesOld[i]); } DetailsPropertyGrid.SelectedObject = null; - await SelectedPed.InitAsync(pedname, GameFileCache); + Console.WriteLine($"{YmtNameComboBox.SelectedItem}: {YmtNameComboBox.SelectedItem?.GetType()}"); + MetaHash? selectedDlc = null; + if (YmtNameComboBox.SelectedItem is MetaHash metaHash) + { + selectedDlc = metaHash; + } + PedFile? pedFile = YmtNameComboBox.SelectedItem as PedFile; + + await SelectedPed.InitAsync(pedname, GameFileCache, selectedDlc); + + YmtNameComboBox.Items.Clear(); + YmtNameComboBox.Items.AddRange(SelectedPed.Dlcs.Select(p => (object)p).ToArray()); + + YmtNameComboBox.SelectedItem = SelectedPed.Ymt; LoadModel(SelectedPed.Yft, pedchange); - - var vi = SelectedPed.Ymt?.VariationInfo; - if (vi != null) + if (SelectedPed.Ymts?.Count > 0) { - for (int i = 0; i < 12; i++) + foreach (var comboBox in ComponentComboBoxes) { - PopulateCompCombo(ComponentComboBoxes[i], vi.GetComponentData(i)); + comboBox.DrawableBox.BeginUpdate(); + comboBox.TextureBox.BeginUpdate(); + comboBox.Index = 0; + } + try + { + foreach (var ymt in SelectedPed.Ymts) + { + var vi = ymt.VariationInfo; + if (vi is not null) + { + for (int i = 0; i < 12; i++) + { + PopulateCompCombo(ComponentComboBoxes[i], vi.GetComponentData(i)); + } + } + } + } + finally + { + foreach (var comboBox in ComponentComboBoxes) + { + if (comboBox.DrawableBox.Items.Count > 1) + { + comboBox.DrawableBox.SelectedIndex = 1; + } + if (comboBox.TextureBox.Items.Count > 1) + { + comboBox.TextureBox.SelectedIndex = 0; + } + } + foreach (var comboBox in ComponentComboBoxes) + { + comboBox.DrawableBox.EndUpdate(); + comboBox.TextureBox.EndUpdate(); + } } } + //var vi = SelectedPed.Ymt?.VariationInfo; + //if (vi != null) + //{ + // for (int i = 0; i < 12; i++) + // { + // PopulateCompCombo(ComponentComboBoxes[i], vi.GetComponentData(i)); + // } + //} + ClipDictComboBox.Text = SelectedPed.InitData?.ClipDictionaryName ?? ""; ClipComboBox.Text = "idle"; + UpdateModelsUI(); + ResumeLayout(true); DetailsPropertyGrid.SelectedObject = SelectedPed; - - UpdateModelsUI(); - + DetailsPropertyGrid.Invalidate(); + DetailsPropertyGrid.Update(); } public void LoadModel(YftFile yft, bool movecamera = true) @@ -813,40 +938,69 @@ namespace CodeWalker c.Items.Add(""); c.Text = string.Empty; } - private void PopulateCompCombo(ComboBox c, MCPVComponentData compData) + + private void PopulateCompComboTextures(ComponentComboBoxesContainer c) + { + if (c.DrawableBox.SelectedItem is not ComponentComboItem selectedDrawable || selectedDrawable.DrawableData is null) + return; + + if (c.TextureBox.SelectedItem is ComponentTextureItem selectedTexture) + { + if (selectedTexture.DrawableData == selectedDrawable.DrawableData) + { + return; + } + } + + c.TextureBox.BeginUpdate(); + + c.TextureBox.Items.Clear(); + + var item = selectedDrawable.DrawableData; + + if (item.TexData?.Length > 0) + { + for (int tex = 0; tex < item.TexData.Length; tex++) + { + c.TextureBox.Items.Add(new ComponentTextureItem(item, selectedDrawable.AlternativeIndex, tex)); + } + } + + c.TextureBox.SelectedIndex = 0; + + c.TextureBox.EndUpdate(); + } + + private void PopulateCompCombo(ComponentComboBoxesContainer c, MCPVComponentData compData) { if (compData?.DrawblData3 == null) return; foreach (var item in compData.DrawblData3) { for (int alt = 0; alt <= item.NumAlternatives; alt++) { - if (item.TexData?.Length > 0) - { - for (int tex = 0; tex < item.TexData.Length; tex++) - { - c.Items.Add(new ComponentComboItem(item, alt, tex)); - } - } - else - { - c.Items.Add(new ComponentComboItem(item)); - } + c.DrawableBox.Items.Add(new ComponentComboItem(item, alt, c.Index)); + //if (item.TexData?.Length > 0) + //{ + // for (int tex = 0; tex < item.TexData.Length; tex++) + // { + // c.TextureBox.Items.Add(new ComponentTextureItem(item, alt, tex)); + // } + //} } - } - if (compData.DrawblData3.Length > 0) - { - c.SelectedIndex = 1; + c.Index++; } } - private async ValueTask SetComponentDrawableAsync(int index, object comboObj) + private async ValueTask SetComponentDrawableAsync(int index) { - - var comboItem = comboObj as ComponentComboItem; + var comboBoxes = ComponentComboBoxes[index]; + var comboItem = comboBoxes.DrawableBox.SelectedItem as ComponentComboItem; + var textureItem = comboBoxes.TextureBox.SelectedItem as ComponentTextureItem; var name = comboItem?.DrawableName; - var tex = comboItem?.TextureName; + var tex = textureItem?.TextureName; + var dlc = comboItem?.DlcName ?? 0; - await SelectedPed.SetComponentDrawableAsync(index, name, tex, GameFileCache); + await SelectedPed.SetComponentDrawableAsync(index, name, tex, dlc, GameFileCache); UpdateModelsUI(); } @@ -1356,7 +1510,7 @@ namespace CodeWalker private void ModelsTreeView_AfterCheck(object sender, TreeViewEventArgs e) { - if (e.Node != null) + if (e.Node is not null) { UpdateSelectionDrawFlags(e.Node); } @@ -1378,17 +1532,33 @@ namespace CodeWalker private void HDRRenderingCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + + Renderer.RenderSyncRoot.Wait(); + try { - Renderer.shaders.hdr = HDRRenderingCheckBox.Checked; + Renderer.Shaders.hdr = HDRRenderingCheckBox.Checked; + } + finally + { + Renderer.RenderSyncRoot.Release(); } } private void ShadowsCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + + Renderer.RenderSyncRoot.Wait(); + try { - Renderer.shaders.shadows = ShadowsCheckBox.Checked; + Renderer.Shaders.shadows = ShadowsCheckBox.Checked; + } + finally + { + Renderer.RenderSyncRoot.Release(); } } @@ -1408,7 +1578,7 @@ namespace CodeWalker int v = TimeOfDayTrackBar.Value; float fh = v / 60.0f; UpdateTimeOfDayLabel(); - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Renderer.timeofday = fh; timecycle.SetTime(Renderer.timeofday); @@ -1423,12 +1593,12 @@ namespace CodeWalker private void WireframeCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.wireframe = WireframeCheckBox.Checked; + Renderer.Shaders.wireframe = WireframeCheckBox.Checked; } private void AnisotropicFilteringCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; + Renderer.Shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; } private void HDTexturesCheckBox_CheckedChanged(object sender, EventArgs e) @@ -1444,42 +1614,42 @@ namespace CodeWalker { default: case "Default": - Renderer.shaders.RenderMode = WorldRenderMode.Default; + Renderer.Shaders.RenderMode = WorldRenderMode.Default; break; case "Single texture": - Renderer.shaders.RenderMode = WorldRenderMode.SingleTexture; + Renderer.Shaders.RenderMode = WorldRenderMode.SingleTexture; TextureSamplerComboBox.Enabled = true; TextureCoordsComboBox.Enabled = true; break; case "Vertex normals": - Renderer.shaders.RenderMode = WorldRenderMode.VertexNormals; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexNormals; break; case "Vertex tangents": - Renderer.shaders.RenderMode = WorldRenderMode.VertexTangents; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexTangents; break; case "Vertex colour 1": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 1; break; case "Vertex colour 2": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 2; break; case "Vertex colour 3": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 3; break; case "Texture coord 1": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 1; break; case "Texture coord 2": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 2; break; case "Texture coord 3": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 3; break; } } @@ -1488,7 +1658,7 @@ namespace CodeWalker { if (TextureSamplerComboBox.SelectedItem is ShaderParamNames) { - Renderer.shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; + Renderer.Shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; } } @@ -1498,13 +1668,13 @@ namespace CodeWalker { default: case "Texture coord 1": - Renderer.shaders.RenderTextureSamplerCoord = 1; + Renderer.Shaders.RenderTextureSamplerCoord = 1; break; case "Texture coord 2": - Renderer.shaders.RenderTextureSamplerCoord = 2; + Renderer.Shaders.RenderTextureSamplerCoord = 2; break; case "Texture coord 3": - Renderer.shaders.RenderTextureSamplerCoord = 3; + Renderer.Shaders.RenderTextureSamplerCoord = 3; break; } } @@ -1583,69 +1753,82 @@ namespace CodeWalker private async void PedNameComboBox_SelectedIndexChanged(object sender, EventArgs e) { - if (!GameFileCache.IsInited) return; + if (!GameFileCache.IsInited) + { + return; + } + + await LoadPedAsync(); + } + + private async void YmtNameCombaBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (!GameFileCache.IsInited) + { + return; + } await LoadPedAsync(); } private async void CompHeadComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(0, CompHeadComboBox.SelectedItem); + await SetComponentDrawableAsync(0); } private async void CompBerdComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(1, CompBerdComboBox.SelectedItem); + await SetComponentDrawableAsync(1); } private async void CompHairComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(2, CompHairComboBox.SelectedItem); + await SetComponentDrawableAsync(2); } private async void CompUpprComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(3, CompUpprComboBox.SelectedItem); + await SetComponentDrawableAsync(3); } private async void CompLowrComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(4, CompLowrComboBox.SelectedItem); + await SetComponentDrawableAsync(4); } private async void CompHandComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(5, CompHandComboBox.SelectedItem); + await SetComponentDrawableAsync(5); } private async void CompFeetComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(6, CompFeetComboBox.SelectedItem); + await SetComponentDrawableAsync(6); } private async void CompTeefComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(7, CompTeefComboBox.SelectedItem); + await SetComponentDrawableAsync(7); } private async void CompAccsComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(8, CompAccsComboBox.SelectedItem); + await SetComponentDrawableAsync(8); } private async void CompTaskComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(9, CompTaskComboBox.SelectedItem); + await SetComponentDrawableAsync(9); } private async void CompDeclComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(10, CompDeclComboBox.SelectedItem); + await SetComponentDrawableAsync(10); } private async void CompJbibComboBox_SelectedIndexChanged(object sender, EventArgs e) { - await SetComponentDrawableAsync(11, CompJbibComboBox.SelectedItem); + await SetComponentDrawableAsync(11); } private void ClipDictComboBox_TextChanged(object sender, EventArgs e) @@ -1662,5 +1845,70 @@ namespace CodeWalker { SelectedPed.EnableRootMotion = EnableRootMotionCheckBox.Checked; } + + private void label24_Click(object sender, EventArgs e) + { + + } + + private async void CompHeadTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(0); + } + + private async void CompBerdTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(1); + } + + private async void CompHairTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(2); + } + + private async void CompUpprTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(3); + } + + private async void CompLowrTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(4); + } + + private async void CompHandTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(5); + } + + private async void CompFeetTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(6); + } + + private async void CompTeefTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(7); + } + + private async void CompAccsTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(8); + } + + private async void CompTaskTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(9); + } + + private async void CompDeclTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(10); + } + + private async void CompJbibTexture_SelectedIndexChanged(object sender, EventArgs e) + { + await SetComponentDrawableAsync(11); + } } } diff --git a/CodeWalker/PedsForm.resx b/CodeWalker/PedsForm.resx index 6d73dea..c38b0b7 100644 --- a/CodeWalker/PedsForm.resx +++ b/CodeWalker/PedsForm.resx @@ -1,17 +1,17 @@  - diff --git a/CodeWalker/Program.cs b/CodeWalker/Program.cs index feb85de..de2a471 100644 --- a/CodeWalker/Program.cs +++ b/CodeWalker/Program.cs @@ -5,6 +5,7 @@ using CodeWalker.Properties; using CodeWalker.Utils; using System; using System.Collections.Generic; +using System.Configuration; using System.Diagnostics; using System.Globalization; using System.IO; @@ -17,7 +18,7 @@ using System.Windows.Forms; using System.Windows.Shell; namespace CodeWalker; -static class Program +public static class Program { /// /// The main entry point for the application. @@ -25,16 +26,18 @@ static class Program [STAThread] static void Main(string[] args) { - Task.Run(() => + ConsoleWindow.Hide(); + _ = Task.Run(() => { CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; - ConsoleWindow.Hide(); + Application.ThreadException += (object sender, ThreadExceptionEventArgs e) => { Console.WriteLine($"Unhandeled exception occured: {e.Exception}"); }; }); + LoadConfig(); bool menumode = false; bool explorermode = false; bool projectmode = false; @@ -81,7 +84,7 @@ static class Program } } - Task.Run(EnsureJumpList); + EnsureJumpList(); //Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); @@ -108,7 +111,7 @@ static class Program { var form = new ExploreForm(); var namedPipe = new NamedPipe(form); - namedPipe.Init(); + namedPipe.StartServer(); Application.Run(form); } } @@ -122,7 +125,11 @@ static class Program } else if (pedsmode) { - Application.Run(new PedsForm()); + if (!NamedPipe.TrySendMessageToOtherProcess("peds-mode")) + { + var form = new PedsForm(); + Application.Run(form); + } } else if (path != null) { @@ -147,7 +154,7 @@ static class Program { var form = new WorldForm(); var namedPipe = new NamedPipe(form); - namedPipe.Init(); + namedPipe.StartServer(); Application.Run(form); } #if !DEBUG @@ -155,18 +162,59 @@ static class Program catch (Exception ex) { MessageBox.Show("An unexpected error was encountered!\n" + ex.ToString()); + Console.WriteLine(ex); //this can happen if folder wasn't chosen, or in some other catastrophic error. meh. } #endif } + public static void LoadConfig() + { + using var _ = new DisposableTimer("LoadConfig"); + string configPath = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath; + if (!File.Exists(configPath)) + { + Console.WriteLine("Upgrading config"); + //Existing user config does not exist, so load settings from previous assembly + Settings.Default.Upgrade(); + Settings.Default.Reload(); + Settings.Default.Save(); + } + //if (Settings.Default.UpgradeRequired) + //{ + //Console.WriteLine($"Upgrading config {Settings.Default.UpgradeRequired}"); + //Settings.Default.SettingsSaving += (sender, args) => + //{ + // Console.WriteLine($"Saving settings {Settings.Default.UpgradeRequired}"); + //}; + //Settings.Default.PropertyChanged += (sender, args) => + //{ + // Console.WriteLine($"Property {args.PropertyName} Changed {Settings.Default[args.PropertyName]}"); + //}; + //Settings.Default.SettingChanging += (sender, args) => + //{ + // Console.WriteLine($"Settings Changing {args.SettingName} from {Settings.Default[args.SettingName]} to {args.NewValue}"); + //}; + // Settings.Default.Upgrade(); + // Console.WriteLine(Settings.Default.UpgradeRequired); + // Settings.Default.UpgradeRequired = true; + // Settings.Default.UpgradeRequired = false; + // Settings.Default.Save(); + //} + } static void EnsureJumpList() { - if (Settings.Default.JumpListInitialised) return; + if (Settings.Default.JumpListInitialised) + { + Console.WriteLine("Jump list already initialized"); + return; + } try { + Console.WriteLine("Initializing jump list"); + Application.OleRequired(); var cwpath = Assembly.GetEntryAssembly().Location; var cwdir = Path.GetDirectoryName(cwpath); @@ -220,7 +268,7 @@ static class Program } catch (Exception ex) { - Console.WriteLine($"Initializing console failed {ex}"); + Console.WriteLine($"Initializing jump list failed {ex}"); } } } \ No newline at end of file diff --git a/CodeWalker/Project/MenyooXml.cs b/CodeWalker/Project/MenyooXml.cs index ec7830d..83d09fb 100644 --- a/CodeWalker/Project/MenyooXml.cs +++ b/CodeWalker/Project/MenyooXml.cs @@ -120,9 +120,6 @@ namespace CodeWalker.Project public void Init(XmlNode node) { - - XmlElement enode = node as XmlElement; - var hashstr = Xml.GetChildInnerText(node, "ModelHash"); if (hashstr.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) hashstr = hashstr.Substring(2); ModelHash = Convert.ToUInt32(hashstr, 16); @@ -133,7 +130,7 @@ namespace CodeWalker.Project HashName = Xml.GetChildInnerText(node, "HashName"); InitialHandle = Xml.GetChildIntInnerText(node, "InitialHandle"); - if (enode != null) + if (node is XmlElement enode) { var objprops = Xml.GetChild(enode, "ObjectProperties"); ObjectProperties = new List(); diff --git a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs b/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs index 306913c..9f61177 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs @@ -1,4 +1,5 @@ using CodeWalker.GameFiles; +using Collections.Pooled; using System; using System.Collections.Generic; using System.ComponentModel; @@ -122,14 +123,13 @@ namespace CodeWalker.Project.Panels var hashstrs = HashesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (hashstrs?.Length > 0) { - var hashlist = new List(); + using var hashlist = new PooledList(); foreach (var hashstr in hashstrs) { - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + if (!uint.TryParse(hashstr, out var hash))//don't re-hash hashes { hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); + JenkIndex.Ensure(hashstr, hash); } hashlist.Add(hash); } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs b/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs index 4f4e9f2..9f0e53c 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs @@ -43,7 +43,7 @@ namespace CodeWalker.Project.Panels private void UpdateUI() { - if (CurrentEmitter?.AudioEmitter == null) + if (CurrentEmitter?.AudioEmitter is null) { AddToProjectButton.Enabled = false; DeleteButton.Enabled = false; @@ -144,8 +144,10 @@ namespace CodeWalker.Project.Panels private void NameTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; uint hash = 0; string name = NameTextBox.Text; @@ -168,8 +170,10 @@ namespace CodeWalker.Project.Panels private void PositionTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; var vec = FloatUtil.ParseVector3String(PositionTextBox.Text); if (CurrentEmitter.AudioEmitter.Position != vec) @@ -191,8 +195,10 @@ namespace CodeWalker.Project.Panels private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; float rad = FloatUtil.Parse(InnerRadiusTextBox.Text); if (CurrentEmitter.AudioEmitter.InnerRadius != rad) @@ -205,8 +211,10 @@ namespace CodeWalker.Project.Panels private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; float rad = FloatUtil.Parse(OuterRadiusTextBox.Text); if (CurrentEmitter.AudioEmitter.OuterRadius != rad) @@ -219,8 +227,10 @@ namespace CodeWalker.Project.Panels private void ChildSoundTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; uint hash = 0; string name = ChildSoundTextBox.Text; @@ -241,8 +251,10 @@ namespace CodeWalker.Project.Panels private void CategoryTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter is null) + return; uint hash = 0; string name = CategoryTextBox.Text; @@ -263,8 +275,10 @@ namespace CodeWalker.Project.Panels private void Unk01TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; float unk = FloatUtil.Parse(Unk01TextBox.Text); if (CurrentEmitter.AudioEmitter.Unk01 != unk) @@ -277,8 +291,10 @@ namespace CodeWalker.Project.Panels private void StartTimeUpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; ushort unk = (ushort)StartTimeUpDown.Value; if (CurrentEmitter.AudioEmitter.StartTime != unk) @@ -291,8 +307,10 @@ namespace CodeWalker.Project.Panels private void EndTimeUpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; ushort unk = (ushort)EndTimeUpDown.Value; if (CurrentEmitter.AudioEmitter.EndTime != unk) @@ -305,8 +323,10 @@ namespace CodeWalker.Project.Panels private void FrequencyUpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; ushort unk = (ushort)FrequencyUpDown.Value; if (CurrentEmitter.AudioEmitter.Frequency.Value != unk) @@ -319,8 +339,10 @@ namespace CodeWalker.Project.Panels private void Unk07UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; ushort unk = (ushort)Unk07UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk07.Value != unk) @@ -333,8 +355,10 @@ namespace CodeWalker.Project.Panels private void Unk08UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk08UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk08.Value != unk) @@ -347,8 +371,10 @@ namespace CodeWalker.Project.Panels private void Unk09UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk09UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk09.Value != unk) @@ -361,8 +387,10 @@ namespace CodeWalker.Project.Panels private void Unk10UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk10UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk10.Value != unk) @@ -375,8 +403,10 @@ namespace CodeWalker.Project.Panels private void Unk11UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk11UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk11.Value != unk) @@ -389,8 +419,10 @@ namespace CodeWalker.Project.Panels private void Unk12UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk12UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk12.Value != unk) @@ -403,8 +435,10 @@ namespace CodeWalker.Project.Panels private void Unk13UpDown_ValueChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; byte unk = (byte)Unk13UpDown.Value; if (CurrentEmitter.AudioEmitter.Unk13.Value != unk) @@ -417,8 +451,10 @@ namespace CodeWalker.Project.Panels private void Flags0TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -434,8 +470,10 @@ namespace CodeWalker.Project.Panels private void Flags1TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -451,8 +489,10 @@ namespace CodeWalker.Project.Panels private void Flags2TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -468,8 +508,10 @@ namespace CodeWalker.Project.Panels private void Flags3TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags3TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -485,8 +527,10 @@ namespace CodeWalker.Project.Panels private void Flags4TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags4TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -502,8 +546,10 @@ namespace CodeWalker.Project.Panels private void Flags5TextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; uint flags = 0; if (uint.TryParse(Flags5TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) @@ -519,8 +565,10 @@ namespace CodeWalker.Project.Panels private void VariablesTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (populatingui) + return; + if (CurrentEmitter?.AudioEmitter == null) + return; var paramstrs = VariablesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (paramstrs?.Length > 0) @@ -531,7 +579,6 @@ namespace CodeWalker.Project.Panels var paramvals = paramstr.Split(','); if (paramvals?.Length == 3) { - var param = new Dat151AmbientRule.Variable(); var hashstr = paramvals[0].Trim(); var valstr = paramvals[1].Trim(); var flgstr = paramvals[2].Trim(); @@ -543,9 +590,12 @@ namespace CodeWalker.Project.Panels } uint flags = 0; uint.TryParse(flgstr, out flags); - param.Name = hash; - param.Value = FloatUtil.Parse(valstr); - param.Flags = flags; + var param = new Dat151AmbientRule.Variable + { + Name = hash, + Value = FloatUtil.Parse(valstr), + Flags = flags, + }; paramlist.Add(param); } } @@ -559,15 +609,17 @@ namespace CodeWalker.Project.Panels private void GoToButton_Click(object sender, EventArgs e) { - if (CurrentEmitter == null) return; - if (ProjectForm.WorldForm == null) return; + if (CurrentEmitter == null) + return; + if (ProjectForm.WorldForm == null) + return; ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PlaybackZoneSize); } - private void AddToProjectButton_Click(object sender, EventArgs e) + private async void AddToProjectButton_Click(object sender, EventArgs e) { ProjectForm.SetProjectItem(CurrentEmitter); - ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile); + await ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile); } private void DeleteButton_Click(object sender, EventArgs e) diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.cs b/CodeWalker/Project/Panels/EditAudioZonePanel.cs index ac11e26..01f5585 100644 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.cs +++ b/CodeWalker/Project/Panels/EditAudioZonePanel.cs @@ -568,8 +568,11 @@ namespace CodeWalker.Project.Panels private void DependentAmbiencesTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; + if (populatingui) + return; + if (CurrentZone?.AudioZone == null) + return; + var paramstrs = DependentAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (paramstrs?.Length > 0) @@ -609,10 +612,10 @@ namespace CodeWalker.Project.Panels ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PlaybackZoneSize); } - private void AddToProjectButton_Click(object sender, EventArgs e) + private async void AddToProjectButton_Click(object sender, EventArgs e) { ProjectForm.SetProjectItem(CurrentZone); - ProjectForm.AddAudioFileToProject(CurrentZone.RelFile); + await ProjectForm.AddAudioFileToProject(CurrentZone.RelFile); } private void DeleteButton_Click(object sender, EventArgs e) diff --git a/CodeWalker/Project/Panels/EditMultiPanel.cs b/CodeWalker/Project/Panels/EditMultiPanel.cs index cfd05e3..6c46e51 100644 --- a/CodeWalker/Project/Panels/EditMultiPanel.cs +++ b/CodeWalker/Project/Panels/EditMultiPanel.cs @@ -41,8 +41,10 @@ namespace CodeWalker.Project.Panels private void LoadItems() { - MultiItem = new MapSelection(); - MultiItem.WorldForm = ProjectForm.WorldForm; + MultiItem = new MapSelection() + { + WorldForm = ProjectForm.WorldForm + }; MultiItem.Clear(); MultiItem.SetMultipleSelectionItems(Items); diff --git a/CodeWalker/Project/Panels/EditProjectManifestPanel.cs b/CodeWalker/Project/Panels/EditProjectManifestPanel.cs index 45f009a..35cd332 100644 --- a/CodeWalker/Project/Panels/EditProjectManifestPanel.cs +++ b/CodeWalker/Project/Panels/EditProjectManifestPanel.cs @@ -71,10 +71,10 @@ namespace CodeWalker.Project.Panels sb.AppendLine(" "); - var getYtypName = new Func((ytyp) => + var getYtypName = new Func((ytyp) => { var ytypname = ytyp?.RpfFileEntry?.Name; - if (ytyp != null) + if (ytyp is not null) { if (string.IsNullOrEmpty(ytypname)) { @@ -108,7 +108,7 @@ namespace CodeWalker.Project.Panels mapdeps.Clear(); bool ismilo = false; - if (ymap.AllEntities != null) + if (ymap.AllEntities is not null) { foreach (var ent in ymap.AllEntities) { @@ -122,7 +122,7 @@ namespace CodeWalker.Project.Panels if (ent.IsMlo) { ismilo = true; - if (ent.MloInstance?.Entities != null) + if (ent.MloInstance?.Entities != null && ent.MloInstance.Entities.Length > 0) { Dictionary typdepdict; if (!typdeps.TryGetValue(ytypname, out typdepdict)) @@ -144,7 +144,7 @@ namespace CodeWalker.Project.Panels } } - if (ymap.GrassInstanceBatches != null) + if (ymap.GrassInstanceBatches != null && ymap.GrassInstanceBatches.Length > 0) { foreach (var batch in ymap.GrassInstanceBatches) { @@ -182,15 +182,14 @@ namespace CodeWalker.Project.Panels sb.AppendLine(" "); } - if ((CurrentProjectFile.YtypFiles.Count > 0) && (ProjectForm?.GameFileCache != null)) + if (CurrentProjectFile.YtypFiles.Count > 0 && ProjectForm.GameFileCache is not null) { foreach (var ytyp in CurrentProjectFile.YtypFiles) { var ytypname = getYtypName(ytyp); foreach (var archm in ytyp.AllArchetypes) { - var mloa = archm as MloArchetype; - if (mloa != null) + if (archm is MloArchetype mloa) { interiors.Add(mloa.Name); Dictionary typdepdict; @@ -207,7 +206,7 @@ namespace CodeWalker.Project.Panels var arch = ProjectForm.GameFileCache.GetArchetype(archname); var iytyp = arch?.Ytyp; var iytypname = getYtypName(iytyp); - if ((iytyp != null) && (iytypname != ytypname)) + if (iytyp is not null && iytypname != ytypname) { typdepdict[iytypname] = iytyp; } diff --git a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs index 3b47cbd..1837c4c 100644 --- a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs +++ b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs @@ -131,13 +131,16 @@ namespace CodeWalker.Project.Panels { return; } var stypes = types.GetScenarioTypeRefs(); - if (stypes == null) return; + if (stypes.Length == 0) + return; var pmsets = types.GetPedModelSets(); - if (pmsets == null) return; + if (pmsets.Length == 0) + return; var vmsets = types.GetVehicleModelSets(); - if (vmsets == null) return; + if (vmsets.Length == 0) + return; ScenarioPointTypeComboBox.Items.Clear(); ScenarioPointTypeComboBox.Items.Add(""); @@ -1191,8 +1194,7 @@ namespace CodeWalker.Project.Panels private void ScenarioEntityPointsListBox_DoubleClick(object sender, EventArgs e) { - var item = ScenarioEntityPointsListBox.SelectedItem as MCExtensionDefSpawnPoint; - if (item == null) return; + if (ScenarioEntityPointsListBox.SelectedItem is not MCExtensionDefSpawnPoint item) return; var nodes = CurrentScenario?.ScenarioRegion?.Nodes; if (nodes == null) return; @@ -2035,8 +2037,7 @@ namespace CodeWalker.Project.Panels private void ScenarioClusterPointsListBox_DoubleClick(object sender, EventArgs e) { - var item = ScenarioClusterPointsListBox.SelectedItem as MCScenarioPoint; - if (item == null) return; + if (ScenarioClusterPointsListBox.SelectedItem is not MCScenarioPoint item) return; var nodes = CurrentScenario?.ScenarioRegion?.Nodes; if (nodes == null) return; diff --git a/CodeWalker/Project/Panels/EditYmapGrassPanel.cs b/CodeWalker/Project/Panels/EditYmapGrassPanel.cs index fd5a5f8..6b2105e 100644 --- a/CodeWalker/Project/Panels/EditYmapGrassPanel.cs +++ b/CodeWalker/Project/Panels/EditYmapGrassPanel.cs @@ -203,7 +203,7 @@ namespace CodeWalker.Project.Panels if (d == DialogResult.No) return; - lock (ProjectForm.WorldForm.RenderSyncRoot) + using (ProjectForm.WorldForm.RenderSyncRoot.WaitDisposable()) { var newBatches = CurrentBatch?.OptimizeInstances(CurrentBatch, (float)OptmizationThresholdNumericUpDown.Value); if (newBatches == null || newBatches.Length <= 0) return; @@ -243,7 +243,7 @@ namespace CodeWalker.Project.Panels var wf = ProjectForm.WorldForm; if (wf == null) return; - lock (wf.RenderSyncRoot) + using (wf.RenderSyncRoot.WaitDisposable()) { CurrentBatch.CreateInstancesAtMouse( CurrentBatch, @@ -269,7 +269,8 @@ namespace CodeWalker.Project.Panels private SpaceRayIntersectResult SpawnRayFunc(Vector3 spawnPos) { - var res = ProjectForm.WorldForm.Raycast(new Ray(spawnPos, -Vector3.UnitZ)); + var ray = new Ray(spawnPos, -Vector3.UnitZ); + var res = ProjectForm.WorldForm.Raycast(ref ray); return res; } diff --git a/CodeWalker/Project/Panels/EditYmapPanel.cs b/CodeWalker/Project/Panels/EditYmapPanel.cs index d82fa9a..6f4968b 100644 --- a/CodeWalker/Project/Panels/EditYmapPanel.cs +++ b/CodeWalker/Project/Panels/EditYmapPanel.cs @@ -92,32 +92,37 @@ namespace CodeWalker.Project.Panels else { populatingui = true; - var md = Ymap.CMapData; - if (md.name.Hash == 0) + try { - string name = Path.GetFileNameWithoutExtension(Ymap.Name); - JenkIndex.Ensure(name); - md.name = new MetaHash(JenkHash.GenHash(name)); + var md = Ymap.CMapData; + if (md.name.Hash == 0) + { + string name = Path.GetFileNameWithoutExtension(Ymap.Name); + JenkIndex.Ensure(name); + md.name = new MetaHash(JenkHash.GenHash(name)); + } + + var project = ProjectForm?.CurrentProjectFile; + + YmapNameTextBox.Text = md.name.ToString(); + YmapNameHashLabel.Text = "Hash: " + md.name.Hash.ToString(); + YmapParentTextBox.Text = md.parent.ToString(); + YmapParentHashLabel.Text = "Hash: " + md.parent.Hash.ToString(); + YmapEntitiesExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMin); + YmapEntitiesExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMax); + YmapStreamingExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMin); + YmapStreamingExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMax); + YmapFileLocationTextBox.Text = Ymap.RpfFileEntry?.Path ?? Ymap.FilePath; + YmapProjectPathTextBox.Text = (project != null) ? project.GetRelativePath(Ymap.FilePath) : Ymap.FilePath; + + UpdateYmapFlagsUI(true, true); + + UpdateYmapPhysicsDictionariesUI(); + } + finally + { + populatingui = false; } - - var project = ProjectForm?.CurrentProjectFile; - - YmapNameTextBox.Text = md.name.ToString(); - YmapNameHashLabel.Text = "Hash: " + md.name.Hash.ToString(); - YmapParentTextBox.Text = md.parent.ToString(); - YmapParentHashLabel.Text = "Hash: " + md.parent.Hash.ToString(); - YmapEntitiesExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMin); - YmapEntitiesExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMax); - YmapStreamingExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMin); - YmapStreamingExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMax); - YmapFileLocationTextBox.Text = Ymap.RpfFileEntry?.Path ?? Ymap.FilePath; - YmapProjectPathTextBox.Text = (project != null) ? project.GetRelativePath(Ymap.FilePath) : Ymap.FilePath; - - UpdateYmapFlagsUI(true, true); - - UpdateYmapPhysicsDictionariesUI(); - - populatingui = false; ////struct CMapData: //MetaHash name { get; set; } //8 8: Hash: 0: name @@ -147,7 +152,8 @@ namespace CodeWalker.Project.Panels private void UpdateYmapFlagsUI(bool updateCheckboxes, bool updateTextboxes) { - if (Ymap == null) return; + if (Ymap == null) + return; var md = Ymap.CMapData; var flags = md.flags; @@ -179,7 +185,7 @@ namespace CodeWalker.Project.Panels private void UpdateYmapPhysicsDictionariesUI() { - if ((Ymap == null) || (Ymap.physicsDictionaries == null)) + if (Ymap?.physicsDictionaries == null || Ymap.physicsDictionaries.Length == 0) { YmapPhysicsDictionariesTextBox.Text = string.Empty; } @@ -202,8 +208,10 @@ namespace CodeWalker.Project.Panels private void SetYmapPhysicsDictionariesFromTextbox() { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; List hashes = new List(); @@ -235,8 +243,10 @@ namespace CodeWalker.Project.Panels private void SetYmapFlagsFromCheckBoxes() { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; uint flags = 0; uint contentFlags = 0; @@ -272,14 +282,22 @@ namespace CodeWalker.Project.Panels } populatingui = true; - UpdateYmapFlagsUI(false, true); //update textbox - populatingui = false; + try + { + UpdateYmapFlagsUI(false, true); //update textbox + } + finally + { + populatingui = false; + } } private void SetYmapFlagsFromTextBoxes() { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; uint flags = 0; uint contentFlags = 0; @@ -301,14 +319,22 @@ namespace CodeWalker.Project.Panels } populatingui = true; - UpdateYmapFlagsUI(true, false); //update checkboxes - populatingui = false; + try + { + UpdateYmapFlagsUI(true, false); //update checkboxes + } + finally + { + populatingui = false; + } } private void CalcYmapFlags() { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; lock (ProjectForm.ProjectSyncRoot) { @@ -319,14 +345,21 @@ namespace CodeWalker.Project.Panels } populatingui = true; - UpdateYmapFlagsUI(true, true); //update checkboxes and textboxes - populatingui = false; + try + { + UpdateYmapFlagsUI(true, true); //update checkboxes and textboxes + } finally + { + populatingui = false; + } } private void CalcYmapExtents() { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; lock (ProjectForm.ProjectSyncRoot) { @@ -337,18 +370,24 @@ namespace CodeWalker.Project.Panels } populatingui = true; - var md = Ymap.CMapData; - YmapEntitiesExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMin); - YmapEntitiesExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMax); - YmapStreamingExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMin); - YmapStreamingExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMax); - populatingui = false; + try + { + var md = Ymap.CMapData; + YmapEntitiesExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMin); + YmapEntitiesExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.entitiesExtentsMax); + YmapStreamingExtentsMinTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMin); + YmapStreamingExtentsMaxTextBox.Text = FloatUtil.GetVector3String(md.streamingExtentsMax); + } finally + { + populatingui = false; + } } private void YmapNameTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; + if (populatingui) + return; uint hash = 0; string name = YmapNameTextBox.Text; if (!uint.TryParse(name, out hash))//don't re-hash hashes @@ -492,8 +531,10 @@ namespace CodeWalker.Project.Panels private void YmapEntitiesExtentsMinTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; Vector3 v = FloatUtil.ParseVector3String(YmapEntitiesExtentsMinTextBox.Text); lock (ProjectForm.ProjectSyncRoot) { @@ -507,8 +548,10 @@ namespace CodeWalker.Project.Panels private void YmapEntitiesExtentsMaxTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; Vector3 v = FloatUtil.ParseVector3String(YmapEntitiesExtentsMaxTextBox.Text); lock (ProjectForm.ProjectSyncRoot) { @@ -522,8 +565,10 @@ namespace CodeWalker.Project.Panels private void YmapStreamingExtentsMinTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; Vector3 v = FloatUtil.ParseVector3String(YmapStreamingExtentsMinTextBox.Text); lock (ProjectForm.ProjectSyncRoot) { @@ -537,8 +582,10 @@ namespace CodeWalker.Project.Panels private void YmapStreamingExtentsMaxTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (Ymap == null) return; + if (populatingui) + return; + if (Ymap == null) + return; Vector3 v = FloatUtil.ParseVector3String(YmapStreamingExtentsMaxTextBox.Text); lock (ProjectForm.ProjectSyncRoot) { diff --git a/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs b/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs index cbbbea6..c556614 100644 --- a/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs @@ -29,590 +29,539 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYtypArchetypePanel)); - this.BaseArchetypeTabPage = new System.Windows.Forms.TabPage(); - this.ArchetypeDeleteButton = new System.Windows.Forms.Button(); - this.label13 = new System.Windows.Forms.Label(); - this.BSRadiusTextBox = new System.Windows.Forms.TextBox(); - this.BSCenterTextBox = new System.Windows.Forms.TextBox(); - this.BBMaxTextBox = new System.Windows.Forms.TextBox(); - this.BBMinTextBox = new System.Windows.Forms.TextBox(); - this.ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); - this.ArchetypeFlagsTextBox = new System.Windows.Forms.TextBox(); - this.PhysicsDictionaryTextBox = new System.Windows.Forms.TextBox(); - this.ClipDictionaryTextBox = new System.Windows.Forms.TextBox(); - this.AssetNameTextBox = new System.Windows.Forms.TextBox(); - this.TextureDictTextBox = new System.Windows.Forms.TextBox(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.PhysicsDictHashLabel = new System.Windows.Forms.Label(); - this.TextureDictHashLabel = new System.Windows.Forms.Label(); - this.EntityFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label14 = new System.Windows.Forms.Label(); - this.SpecialAttributeNumericUpDown = new System.Windows.Forms.NumericUpDown(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.AssetTypeComboBox = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.HDTextureDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); - this.label3 = new System.Windows.Forms.Label(); - this.LodDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.TabControl = new System.Windows.Forms.TabControl(); - this.MloArchetypeTabPage = new System.Windows.Forms.TabPage(); - this.TimeArchetypeTabPage = new System.Windows.Forms.TabPage(); - this.TimeFlagsTextBox = new System.Windows.Forms.TextBox(); - this.TimeFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label15 = new System.Windows.Forms.Label(); - this.MloUpdatePortalCountsButton = new System.Windows.Forms.Button(); - this.BaseArchetypeTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SpecialAttributeNumericUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.HDTextureDistNumericUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.LodDistNumericUpDown)).BeginInit(); - this.TabControl.SuspendLayout(); - this.MloArchetypeTabPage.SuspendLayout(); - this.TimeArchetypeTabPage.SuspendLayout(); - this.SuspendLayout(); + BaseArchetypeTabPage = new System.Windows.Forms.TabPage(); + ArchetypeDeleteButton = new System.Windows.Forms.Button(); + label13 = new System.Windows.Forms.Label(); + BSRadiusTextBox = new System.Windows.Forms.TextBox(); + BSCenterTextBox = new System.Windows.Forms.TextBox(); + BBMaxTextBox = new System.Windows.Forms.TextBox(); + BBMinTextBox = new System.Windows.Forms.TextBox(); + ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); + ArchetypeFlagsTextBox = new System.Windows.Forms.TextBox(); + PhysicsDictionaryTextBox = new System.Windows.Forms.TextBox(); + ClipDictionaryTextBox = new System.Windows.Forms.TextBox(); + AssetNameTextBox = new System.Windows.Forms.TextBox(); + TextureDictTextBox = new System.Windows.Forms.TextBox(); + label12 = new System.Windows.Forms.Label(); + label11 = new System.Windows.Forms.Label(); + label5 = new System.Windows.Forms.Label(); + PhysicsDictHashLabel = new System.Windows.Forms.Label(); + TextureDictHashLabel = new System.Windows.Forms.Label(); + EntityFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); + label14 = new System.Windows.Forms.Label(); + SpecialAttributeNumericUpDown = new System.Windows.Forms.NumericUpDown(); + label10 = new System.Windows.Forms.Label(); + label9 = new System.Windows.Forms.Label(); + AssetTypeComboBox = new System.Windows.Forms.ComboBox(); + label8 = new System.Windows.Forms.Label(); + label7 = new System.Windows.Forms.Label(); + label6 = new System.Windows.Forms.Label(); + label4 = new System.Windows.Forms.Label(); + HDTextureDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); + label3 = new System.Windows.Forms.Label(); + LodDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); + label2 = new System.Windows.Forms.Label(); + label1 = new System.Windows.Forms.Label(); + TabControl = new System.Windows.Forms.TabControl(); + MloArchetypeTabPage = new System.Windows.Forms.TabPage(); + MloUpdatePortalCountsButton = new System.Windows.Forms.Button(); + TimeArchetypeTabPage = new System.Windows.Forms.TabPage(); + TimeFlagsTextBox = new System.Windows.Forms.TextBox(); + TimeFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); + label15 = new System.Windows.Forms.Label(); + BaseArchetypeTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)SpecialAttributeNumericUpDown).BeginInit(); + ((System.ComponentModel.ISupportInitialize)HDTextureDistNumericUpDown).BeginInit(); + ((System.ComponentModel.ISupportInitialize)LodDistNumericUpDown).BeginInit(); + TabControl.SuspendLayout(); + MloArchetypeTabPage.SuspendLayout(); + TimeArchetypeTabPage.SuspendLayout(); + SuspendLayout(); // // BaseArchetypeTabPage // - this.BaseArchetypeTabPage.Controls.Add(this.ArchetypeDeleteButton); - this.BaseArchetypeTabPage.Controls.Add(this.label13); - this.BaseArchetypeTabPage.Controls.Add(this.BSRadiusTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.BSCenterTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.BBMaxTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.BBMinTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.ArchetypeNameTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.ArchetypeFlagsTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.PhysicsDictionaryTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.ClipDictionaryTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.AssetNameTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.TextureDictTextBox); - this.BaseArchetypeTabPage.Controls.Add(this.label12); - this.BaseArchetypeTabPage.Controls.Add(this.label11); - this.BaseArchetypeTabPage.Controls.Add(this.label5); - this.BaseArchetypeTabPage.Controls.Add(this.PhysicsDictHashLabel); - this.BaseArchetypeTabPage.Controls.Add(this.TextureDictHashLabel); - this.BaseArchetypeTabPage.Controls.Add(this.EntityFlagsCheckedListBox); - this.BaseArchetypeTabPage.Controls.Add(this.label14); - this.BaseArchetypeTabPage.Controls.Add(this.SpecialAttributeNumericUpDown); - this.BaseArchetypeTabPage.Controls.Add(this.label10); - this.BaseArchetypeTabPage.Controls.Add(this.label9); - this.BaseArchetypeTabPage.Controls.Add(this.AssetTypeComboBox); - this.BaseArchetypeTabPage.Controls.Add(this.label8); - this.BaseArchetypeTabPage.Controls.Add(this.label7); - this.BaseArchetypeTabPage.Controls.Add(this.label6); - this.BaseArchetypeTabPage.Controls.Add(this.label4); - this.BaseArchetypeTabPage.Controls.Add(this.HDTextureDistNumericUpDown); - this.BaseArchetypeTabPage.Controls.Add(this.label3); - this.BaseArchetypeTabPage.Controls.Add(this.LodDistNumericUpDown); - this.BaseArchetypeTabPage.Controls.Add(this.label2); - this.BaseArchetypeTabPage.Controls.Add(this.label1); - this.BaseArchetypeTabPage.Location = new System.Drawing.Point(4, 22); - this.BaseArchetypeTabPage.Name = "BaseArchetypeTabPage"; - this.BaseArchetypeTabPage.Padding = new System.Windows.Forms.Padding(3); - this.BaseArchetypeTabPage.Size = new System.Drawing.Size(631, 479); - this.BaseArchetypeTabPage.TabIndex = 0; - this.BaseArchetypeTabPage.Text = "Base Archetype Def"; - this.BaseArchetypeTabPage.UseVisualStyleBackColor = true; + BaseArchetypeTabPage.Controls.Add(ArchetypeDeleteButton); + BaseArchetypeTabPage.Controls.Add(label13); + BaseArchetypeTabPage.Controls.Add(BSRadiusTextBox); + BaseArchetypeTabPage.Controls.Add(BSCenterTextBox); + BaseArchetypeTabPage.Controls.Add(BBMaxTextBox); + BaseArchetypeTabPage.Controls.Add(BBMinTextBox); + BaseArchetypeTabPage.Controls.Add(ArchetypeNameTextBox); + BaseArchetypeTabPage.Controls.Add(ArchetypeFlagsTextBox); + BaseArchetypeTabPage.Controls.Add(PhysicsDictionaryTextBox); + BaseArchetypeTabPage.Controls.Add(ClipDictionaryTextBox); + BaseArchetypeTabPage.Controls.Add(AssetNameTextBox); + BaseArchetypeTabPage.Controls.Add(TextureDictTextBox); + BaseArchetypeTabPage.Controls.Add(label12); + BaseArchetypeTabPage.Controls.Add(label11); + BaseArchetypeTabPage.Controls.Add(label5); + BaseArchetypeTabPage.Controls.Add(PhysicsDictHashLabel); + BaseArchetypeTabPage.Controls.Add(TextureDictHashLabel); + BaseArchetypeTabPage.Controls.Add(EntityFlagsCheckedListBox); + BaseArchetypeTabPage.Controls.Add(label14); + BaseArchetypeTabPage.Controls.Add(SpecialAttributeNumericUpDown); + BaseArchetypeTabPage.Controls.Add(label10); + BaseArchetypeTabPage.Controls.Add(label9); + BaseArchetypeTabPage.Controls.Add(AssetTypeComboBox); + BaseArchetypeTabPage.Controls.Add(label8); + BaseArchetypeTabPage.Controls.Add(label7); + BaseArchetypeTabPage.Controls.Add(label6); + BaseArchetypeTabPage.Controls.Add(label4); + BaseArchetypeTabPage.Controls.Add(HDTextureDistNumericUpDown); + BaseArchetypeTabPage.Controls.Add(label3); + BaseArchetypeTabPage.Controls.Add(LodDistNumericUpDown); + BaseArchetypeTabPage.Controls.Add(label2); + BaseArchetypeTabPage.Controls.Add(label1); + BaseArchetypeTabPage.Location = new System.Drawing.Point(4, 24); + BaseArchetypeTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BaseArchetypeTabPage.Name = "BaseArchetypeTabPage"; + BaseArchetypeTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + BaseArchetypeTabPage.Size = new System.Drawing.Size(738, 555); + BaseArchetypeTabPage.TabIndex = 0; + BaseArchetypeTabPage.Text = "Base Archetype Def"; + BaseArchetypeTabPage.UseVisualStyleBackColor = true; // // ArchetypeDeleteButton // - this.ArchetypeDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ArchetypeDeleteButton.Location = new System.Drawing.Point(110, 439); - this.ArchetypeDeleteButton.Name = "ArchetypeDeleteButton"; - this.ArchetypeDeleteButton.Size = new System.Drawing.Size(126, 23); - this.ArchetypeDeleteButton.TabIndex = 79; - this.ArchetypeDeleteButton.Text = "Delete Archetype"; - this.ArchetypeDeleteButton.UseVisualStyleBackColor = true; - this.ArchetypeDeleteButton.Click += new System.EventHandler(this.DeleteArchetypeButton_Click); + ArchetypeDeleteButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ArchetypeDeleteButton.Location = new System.Drawing.Point(128, 507); + ArchetypeDeleteButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ArchetypeDeleteButton.Name = "ArchetypeDeleteButton"; + ArchetypeDeleteButton.Size = new System.Drawing.Size(147, 27); + ArchetypeDeleteButton.TabIndex = 79; + ArchetypeDeleteButton.Text = "Delete Archetype"; + ArchetypeDeleteButton.UseVisualStyleBackColor = true; + ArchetypeDeleteButton.Click += DeleteArchetypeButton_Click; // // label13 // - this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(8, 405); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(57, 13); - this.label13.TabIndex = 78; - this.label13.Text = "BSRadius:"; + label13.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + label13.AutoSize = true; + label13.Location = new System.Drawing.Point(9, 467); + label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label13.Name = "label13"; + label13.Size = new System.Drawing.Size(58, 15); + label13.TabIndex = 78; + label13.Text = "BSRadius:"; // // BSRadiusTextBox // - this.BSRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.BSRadiusTextBox.Location = new System.Drawing.Point(71, 402); - this.BSRadiusTextBox.Name = "BSRadiusTextBox"; - this.BSRadiusTextBox.Size = new System.Drawing.Size(552, 20); - this.BSRadiusTextBox.TabIndex = 77; - this.BSRadiusTextBox.TextChanged += new System.EventHandler(this.BSRadiusTextBox_TextChanged); + BSRadiusTextBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + BSRadiusTextBox.Location = new System.Drawing.Point(83, 464); + BSRadiusTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BSRadiusTextBox.Name = "BSRadiusTextBox"; + BSRadiusTextBox.Size = new System.Drawing.Size(643, 23); + BSRadiusTextBox.TabIndex = 77; + BSRadiusTextBox.TextChanged += BSRadiusTextBox_TextChanged; // // BSCenterTextBox // - this.BSCenterTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.BSCenterTextBox.Location = new System.Drawing.Point(71, 376); - this.BSCenterTextBox.Name = "BSCenterTextBox"; - this.BSCenterTextBox.Size = new System.Drawing.Size(552, 20); - this.BSCenterTextBox.TabIndex = 75; - this.BSCenterTextBox.TextChanged += new System.EventHandler(this.BSCenterTextBox_TextChanged); + BSCenterTextBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + BSCenterTextBox.Location = new System.Drawing.Point(83, 434); + BSCenterTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BSCenterTextBox.Name = "BSCenterTextBox"; + BSCenterTextBox.Size = new System.Drawing.Size(643, 23); + BSCenterTextBox.TabIndex = 75; + BSCenterTextBox.TextChanged += BSCenterTextBox_TextChanged; // // BBMaxTextBox // - this.BBMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.BBMaxTextBox.Location = new System.Drawing.Point(71, 350); - this.BBMaxTextBox.Name = "BBMaxTextBox"; - this.BBMaxTextBox.Size = new System.Drawing.Size(552, 20); - this.BBMaxTextBox.TabIndex = 73; - this.BBMaxTextBox.TextChanged += new System.EventHandler(this.BBMaxTextBox_TextChanged); + BBMaxTextBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + BBMaxTextBox.Location = new System.Drawing.Point(83, 404); + BBMaxTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BBMaxTextBox.Name = "BBMaxTextBox"; + BBMaxTextBox.Size = new System.Drawing.Size(643, 23); + BBMaxTextBox.TabIndex = 73; + BBMaxTextBox.TextChanged += BBMaxTextBox_TextChanged; // // BBMinTextBox // - this.BBMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.BBMinTextBox.Location = new System.Drawing.Point(71, 324); - this.BBMinTextBox.Name = "BBMinTextBox"; - this.BBMinTextBox.Size = new System.Drawing.Size(552, 20); - this.BBMinTextBox.TabIndex = 71; - this.BBMinTextBox.TextChanged += new System.EventHandler(this.BBMinTextBox_TextChanged); + BBMinTextBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + BBMinTextBox.Location = new System.Drawing.Point(83, 374); + BBMinTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BBMinTextBox.Name = "BBMinTextBox"; + BBMinTextBox.Size = new System.Drawing.Size(643, 23); + BBMinTextBox.TabIndex = 71; + BBMinTextBox.TextChanged += BBMinTextBox_TextChanged; // // ArchetypeNameTextBox // - this.ArchetypeNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ArchetypeNameTextBox.Location = new System.Drawing.Point(110, 9); - this.ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; - this.ArchetypeNameTextBox.Size = new System.Drawing.Size(247, 20); - this.ArchetypeNameTextBox.TabIndex = 70; - this.ArchetypeNameTextBox.TextChanged += new System.EventHandler(this.ArchetypeNameTextBox_TextChanged); + ArchetypeNameTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ArchetypeNameTextBox.Location = new System.Drawing.Point(128, 10); + ArchetypeNameTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; + ArchetypeNameTextBox.Size = new System.Drawing.Size(288, 23); + ArchetypeNameTextBox.TabIndex = 70; + ArchetypeNameTextBox.TextChanged += ArchetypeNameTextBox_TextChanged; // // ArchetypeFlagsTextBox // - this.ArchetypeFlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ArchetypeFlagsTextBox.Location = new System.Drawing.Point(476, 12); - this.ArchetypeFlagsTextBox.Name = "ArchetypeFlagsTextBox"; - this.ArchetypeFlagsTextBox.Size = new System.Drawing.Size(147, 20); - this.ArchetypeFlagsTextBox.TabIndex = 66; - this.ArchetypeFlagsTextBox.TextChanged += new System.EventHandler(this.ArchetypeFlagsTextBox_TextChanged); + ArchetypeFlagsTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + ArchetypeFlagsTextBox.Location = new System.Drawing.Point(555, 14); + ArchetypeFlagsTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ArchetypeFlagsTextBox.Name = "ArchetypeFlagsTextBox"; + ArchetypeFlagsTextBox.Size = new System.Drawing.Size(171, 23); + ArchetypeFlagsTextBox.TabIndex = 66; + ArchetypeFlagsTextBox.TextChanged += ArchetypeFlagsTextBox_TextChanged; // // PhysicsDictionaryTextBox // - this.PhysicsDictionaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.PhysicsDictionaryTextBox.Location = new System.Drawing.Point(110, 191); - this.PhysicsDictionaryTextBox.Name = "PhysicsDictionaryTextBox"; - this.PhysicsDictionaryTextBox.Size = new System.Drawing.Size(206, 20); - this.PhysicsDictionaryTextBox.TabIndex = 60; - this.PhysicsDictionaryTextBox.TextChanged += new System.EventHandler(this.PhysicsDictionaryTextBox_TextChanged); + PhysicsDictionaryTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + PhysicsDictionaryTextBox.Location = new System.Drawing.Point(128, 220); + PhysicsDictionaryTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PhysicsDictionaryTextBox.Name = "PhysicsDictionaryTextBox"; + PhysicsDictionaryTextBox.Size = new System.Drawing.Size(240, 23); + PhysicsDictionaryTextBox.TabIndex = 60; + PhysicsDictionaryTextBox.TextChanged += PhysicsDictionaryTextBox_TextChanged; // // ClipDictionaryTextBox // - this.ClipDictionaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ClipDictionaryTextBox.Location = new System.Drawing.Point(110, 165); - this.ClipDictionaryTextBox.Name = "ClipDictionaryTextBox"; - this.ClipDictionaryTextBox.Size = new System.Drawing.Size(247, 20); - this.ClipDictionaryTextBox.TabIndex = 58; - this.ClipDictionaryTextBox.TextChanged += new System.EventHandler(this.ClipDictionaryTextBox_TextChanged); + ClipDictionaryTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ClipDictionaryTextBox.Location = new System.Drawing.Point(128, 190); + ClipDictionaryTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ClipDictionaryTextBox.Name = "ClipDictionaryTextBox"; + ClipDictionaryTextBox.Size = new System.Drawing.Size(288, 23); + ClipDictionaryTextBox.TabIndex = 58; + ClipDictionaryTextBox.TextChanged += ClipDictionaryTextBox_TextChanged; // // AssetNameTextBox // - this.AssetNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.AssetNameTextBox.Location = new System.Drawing.Point(110, 35); - this.AssetNameTextBox.Name = "AssetNameTextBox"; - this.AssetNameTextBox.Size = new System.Drawing.Size(247, 20); - this.AssetNameTextBox.TabIndex = 56; - this.AssetNameTextBox.TextChanged += new System.EventHandler(this.AssetNameTextBox_TextChanged); + AssetNameTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + AssetNameTextBox.Location = new System.Drawing.Point(128, 40); + AssetNameTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AssetNameTextBox.Name = "AssetNameTextBox"; + AssetNameTextBox.Size = new System.Drawing.Size(288, 23); + AssetNameTextBox.TabIndex = 56; + AssetNameTextBox.TextChanged += AssetNameTextBox_TextChanged; // // TextureDictTextBox // - this.TextureDictTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TextureDictTextBox.Location = new System.Drawing.Point(110, 139); - this.TextureDictTextBox.Name = "TextureDictTextBox"; - this.TextureDictTextBox.Size = new System.Drawing.Size(206, 20); - this.TextureDictTextBox.TabIndex = 54; - this.TextureDictTextBox.TextChanged += new System.EventHandler(this.TextureDictTextBox_TextChanged); + TextureDictTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + TextureDictTextBox.Location = new System.Drawing.Point(128, 160); + TextureDictTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureDictTextBox.Name = "TextureDictTextBox"; + TextureDictTextBox.Size = new System.Drawing.Size(240, 23); + TextureDictTextBox.TabIndex = 54; + TextureDictTextBox.TextChanged += TextureDictTextBox_TextChanged; // // label12 // - this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(8, 379); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(55, 13); - this.label12.TabIndex = 76; - this.label12.Text = "BSCenter:"; + label12.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(9, 437); + label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(58, 15); + label12.TabIndex = 76; + label12.Text = "BSCenter:"; // // label11 // - this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(19, 353); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(44, 13); - this.label11.TabIndex = 74; - this.label11.Text = "BBMax:"; + label11.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + label11.AutoSize = true; + label11.Location = new System.Drawing.Point(22, 407); + label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(47, 15); + label11.TabIndex = 74; + label11.Text = "BBMax:"; // // label5 // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(24, 327); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(41, 13); - this.label5.TabIndex = 72; - this.label5.Text = "BBMin:"; + label5.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(28, 377); + label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(45, 15); + label5.TabIndex = 72; + label5.Text = "BBMin:"; // // PhysicsDictHashLabel // - this.PhysicsDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.PhysicsDictHashLabel.AutoSize = true; - this.PhysicsDictHashLabel.Location = new System.Drawing.Point(322, 194); - this.PhysicsDictHashLabel.Name = "PhysicsDictHashLabel"; - this.PhysicsDictHashLabel.Size = new System.Drawing.Size(35, 13); - this.PhysicsDictHashLabel.TabIndex = 69; - this.PhysicsDictHashLabel.Text = "Hash:"; + PhysicsDictHashLabel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + PhysicsDictHashLabel.AutoSize = true; + PhysicsDictHashLabel.Location = new System.Drawing.Point(376, 224); + PhysicsDictHashLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + PhysicsDictHashLabel.Name = "PhysicsDictHashLabel"; + PhysicsDictHashLabel.Size = new System.Drawing.Size(37, 15); + PhysicsDictHashLabel.TabIndex = 69; + PhysicsDictHashLabel.Text = "Hash:"; // // TextureDictHashLabel // - this.TextureDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TextureDictHashLabel.AutoSize = true; - this.TextureDictHashLabel.Location = new System.Drawing.Point(322, 142); - this.TextureDictHashLabel.Name = "TextureDictHashLabel"; - this.TextureDictHashLabel.Size = new System.Drawing.Size(35, 13); - this.TextureDictHashLabel.TabIndex = 68; - this.TextureDictHashLabel.Text = "Hash:"; + TextureDictHashLabel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + TextureDictHashLabel.AutoSize = true; + TextureDictHashLabel.Location = new System.Drawing.Point(376, 164); + TextureDictHashLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + TextureDictHashLabel.Name = "TextureDictHashLabel"; + TextureDictHashLabel.Size = new System.Drawing.Size(37, 15); + TextureDictHashLabel.TabIndex = 68; + TextureDictHashLabel.Text = "Hash:"; // // EntityFlagsCheckedListBox // - this.EntityFlagsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityFlagsCheckedListBox.CheckOnClick = true; - this.EntityFlagsCheckedListBox.FormattingEnabled = true; - this.EntityFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - Unk01", - "2 - Unk02", - "4 - Unk03", - "8 - Unk04", - "16 - Unk05", - "32 - Static", - "64 - Disable alpha sorting", - "128 - Instance", - "256 - Unk09", - "512 - Bone anims (YCD)", - "1024 - UV anims (YCD)", - "2048 - Unk12", - "4096 - Unk13", - "8192 - Object won\'t cast shadow", - "16384 - Unk15", - "32768 - Unk16", - "65536 - Double-sided rendering", - "131072 - Dynamic", - "262144 - Unk19", - "524288 - Dynamic anims (YCD)", - "1048576 - Unk21", - "2097152 - Unk22", - "4194304 - Unk23", - "8388608 - Unk24", - "16777216 - Unk25", - "33554432 - Unk26", - "67108864 - Enables special atribute for door archetypes", - "134217728 - Unk28", - "268435456 - Disable red vertex channel", - "536870912 - Disable green vertex channel", - "1073741824 - Disable blue vertex channel", - "2147483648 - Disable alpha vertex channel"}); - this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(441, 38); - this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox"; - this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(182, 274); - this.EntityFlagsCheckedListBox.TabIndex = 67; - this.EntityFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ArchetypeFlagsCheckedListBox_ItemCheck); + EntityFlagsCheckedListBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + EntityFlagsCheckedListBox.CheckOnClick = true; + EntityFlagsCheckedListBox.FormattingEnabled = true; + EntityFlagsCheckedListBox.Items.AddRange(new object[] { "1 - Unk01", "2 - Unk02", "4 - Unk03", "8 - Unk04", "16 - Unk05", "32 - Static", "64 - Disable alpha sorting", "128 - Instance", "256 - Unk09", "512 - Bone anims (YCD)", "1024 - UV anims (YCD)", "2048 - Unk12", "4096 - Unk13", "8192 - Object won't cast shadow", "16384 - Unk15", "32768 - Unk16", "65536 - Double-sided rendering", "131072 - Dynamic", "262144 - Unk19", "524288 - Dynamic anims (YCD)", "1048576 - Unk21", "2097152 - Unk22", "4194304 - Unk23", "8388608 - Unk24", "16777216 - Unk25", "33554432 - Unk26", "67108864 - Enables special atribute for door archetypes", "134217728 - Unk28", "268435456 - Disable red vertex channel", "536870912 - Disable green vertex channel", "1073741824 - Disable blue vertex channel", "2147483648 - Disable alpha vertex channel" }); + EntityFlagsCheckedListBox.Location = new System.Drawing.Point(514, 44); + EntityFlagsCheckedListBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox"; + EntityFlagsCheckedListBox.Size = new System.Drawing.Size(212, 310); + EntityFlagsCheckedListBox.TabIndex = 67; + EntityFlagsCheckedListBox.ItemCheck += ArchetypeFlagsCheckedListBox_ItemCheck; // // label14 // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(419, 15); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(35, 13); - this.label14.TabIndex = 65; - this.label14.Text = "Flags:"; + label14.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(489, 17); + label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(37, 15); + label14.TabIndex = 65; + label14.Text = "Flags:"; // // SpecialAttributeNumericUpDown // - this.SpecialAttributeNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SpecialAttributeNumericUpDown.Location = new System.Drawing.Point(110, 113); - this.SpecialAttributeNumericUpDown.Maximum = new decimal(new int[] { - 9999999, - 0, - 0, - 0}); - this.SpecialAttributeNumericUpDown.Name = "SpecialAttributeNumericUpDown"; - this.SpecialAttributeNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.SpecialAttributeNumericUpDown.TabIndex = 64; - this.SpecialAttributeNumericUpDown.ValueChanged += new System.EventHandler(this.SpecialAttributeNumericUpDown_ValueChanged); + SpecialAttributeNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SpecialAttributeNumericUpDown.Location = new System.Drawing.Point(128, 130); + SpecialAttributeNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SpecialAttributeNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, 0, 0 }); + SpecialAttributeNumericUpDown.Name = "SpecialAttributeNumericUpDown"; + SpecialAttributeNumericUpDown.Size = new System.Drawing.Size(288, 23); + SpecialAttributeNumericUpDown.TabIndex = 64; + SpecialAttributeNumericUpDown.ValueChanged += SpecialAttributeNumericUpDown_ValueChanged; // // label10 // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(17, 115); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(87, 13); - this.label10.TabIndex = 63; - this.label10.Text = "Special Attribute:"; + label10.AutoSize = true; + label10.Location = new System.Drawing.Point(20, 133); + label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(97, 15); + label10.TabIndex = 63; + label10.Text = "Special Attribute:"; // // label9 // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(41, 220); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(63, 13); - this.label9.TabIndex = 62; - this.label9.Text = "Asset Type:"; + label9.AutoSize = true; + label9.Location = new System.Drawing.Point(48, 254); + label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(65, 15); + label9.TabIndex = 62; + label9.Text = "Asset Type:"; // // AssetTypeComboBox // - this.AssetTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.AssetTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.AssetTypeComboBox.FormattingEnabled = true; - this.AssetTypeComboBox.Location = new System.Drawing.Point(110, 217); - this.AssetTypeComboBox.Name = "AssetTypeComboBox"; - this.AssetTypeComboBox.Size = new System.Drawing.Size(247, 21); - this.AssetTypeComboBox.TabIndex = 61; + AssetTypeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + AssetTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + AssetTypeComboBox.FormattingEnabled = true; + AssetTypeComboBox.Location = new System.Drawing.Point(128, 250); + AssetTypeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AssetTypeComboBox.Name = "AssetTypeComboBox"; + AssetTypeComboBox.Size = new System.Drawing.Size(288, 23); + AssetTypeComboBox.TabIndex = 61; // // label8 // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(8, 194); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(96, 13); - this.label8.TabIndex = 59; - this.label8.Text = "Physics Dictionary:"; + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(9, 224); + label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(106, 15); + label8.TabIndex = 59; + label8.Text = "Physics Dictionary:"; // // label7 // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(27, 168); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(77, 13); - this.label7.TabIndex = 57; - this.label7.Text = "Clip Dictionary:"; + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(31, 194); + label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(88, 15); + label7.TabIndex = 57; + label7.Text = "Clip Dictionary:"; // // label6 // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(37, 38); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(67, 13); - this.label6.TabIndex = 55; - this.label6.Text = "Asset Name:"; + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(43, 44); + label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(73, 15); + label6.TabIndex = 55; + label6.Text = "Asset Name:"; // // label4 // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(8, 142); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(96, 13); - this.label4.TabIndex = 53; - this.label4.Text = "Texture Dictionary:"; + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(9, 164); + label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(105, 15); + label4.TabIndex = 53; + label4.Text = "Texture Dictionary:"; // // HDTextureDistNumericUpDown // - this.HDTextureDistNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.HDTextureDistNumericUpDown.DecimalPlaces = 8; - this.HDTextureDistNumericUpDown.Location = new System.Drawing.Point(110, 87); - this.HDTextureDistNumericUpDown.Maximum = new decimal(new int[] { - 9999999, - 0, - 0, - 0}); - this.HDTextureDistNumericUpDown.Name = "HDTextureDistNumericUpDown"; - this.HDTextureDistNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.HDTextureDistNumericUpDown.TabIndex = 52; - this.HDTextureDistNumericUpDown.ValueChanged += new System.EventHandler(this.HDTextureDistNumericUpDown_ValueChanged); + HDTextureDistNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + HDTextureDistNumericUpDown.DecimalPlaces = 2; + HDTextureDistNumericUpDown.Location = new System.Drawing.Point(128, 100); + HDTextureDistNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDTextureDistNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, 0, 0 }); + HDTextureDistNumericUpDown.Name = "HDTextureDistNumericUpDown"; + HDTextureDistNumericUpDown.Size = new System.Drawing.Size(288, 23); + HDTextureDistNumericUpDown.TabIndex = 52; + HDTextureDistNumericUpDown.ValueChanged += HDTextureDistNumericUpDown_ValueChanged; // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(18, 89); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(86, 13); - this.label3.TabIndex = 51; - this.label3.Text = "HD Texture Dist:"; + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(21, 103); + label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(91, 15); + label3.TabIndex = 51; + label3.Text = "HD Texture Dist:"; // // LodDistNumericUpDown // - this.LodDistNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.LodDistNumericUpDown.DecimalPlaces = 8; - this.LodDistNumericUpDown.Location = new System.Drawing.Point(110, 61); - this.LodDistNumericUpDown.Maximum = new decimal(new int[] { - 9999999, - 0, - 0, - 0}); - this.LodDistNumericUpDown.Name = "LodDistNumericUpDown"; - this.LodDistNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.LodDistNumericUpDown.TabIndex = 50; - this.LodDistNumericUpDown.ValueChanged += new System.EventHandler(this.LodDistNumericUpDown_ValueChanged); + LodDistNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + LodDistNumericUpDown.DecimalPlaces = 2; + LodDistNumericUpDown.Location = new System.Drawing.Point(128, 70); + LodDistNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + LodDistNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, 0, 0 }); + LodDistNumericUpDown.Name = "LodDistNumericUpDown"; + LodDistNumericUpDown.Size = new System.Drawing.Size(288, 23); + LodDistNumericUpDown.TabIndex = 50; + LodDistNumericUpDown.ValueChanged += LodDistNumericUpDown_ValueChanged; // // label2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(55, 63); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(49, 13); - this.label2.TabIndex = 49; - this.label2.Text = "Lod Dist:"; + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(64, 73); + label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(53, 15); + label2.TabIndex = 49; + label2.Text = "Lod Dist:"; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(66, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(38, 13); - this.label1.TabIndex = 48; - this.label1.Text = "Name:"; + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(77, 14); + label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(42, 15); + label1.TabIndex = 48; + label1.Text = "Name:"; // // TabControl // - this.TabControl.Controls.Add(this.BaseArchetypeTabPage); - this.TabControl.Controls.Add(this.MloArchetypeTabPage); - this.TabControl.Controls.Add(this.TimeArchetypeTabPage); - this.TabControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.TabControl.Location = new System.Drawing.Point(0, 0); - this.TabControl.Name = "TabControl"; - this.TabControl.SelectedIndex = 0; - this.TabControl.Size = new System.Drawing.Size(639, 505); - this.TabControl.TabIndex = 48; + TabControl.Controls.Add(BaseArchetypeTabPage); + TabControl.Controls.Add(MloArchetypeTabPage); + TabControl.Controls.Add(TimeArchetypeTabPage); + TabControl.Dock = System.Windows.Forms.DockStyle.Fill; + TabControl.Location = new System.Drawing.Point(0, 0); + TabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TabControl.Name = "TabControl"; + TabControl.SelectedIndex = 0; + TabControl.Size = new System.Drawing.Size(746, 583); + TabControl.TabIndex = 48; // // MloArchetypeTabPage // - this.MloArchetypeTabPage.Controls.Add(this.MloUpdatePortalCountsButton); - this.MloArchetypeTabPage.Location = new System.Drawing.Point(4, 22); - this.MloArchetypeTabPage.Name = "MloArchetypeTabPage"; - this.MloArchetypeTabPage.Padding = new System.Windows.Forms.Padding(3); - this.MloArchetypeTabPage.Size = new System.Drawing.Size(631, 479); - this.MloArchetypeTabPage.TabIndex = 1; - this.MloArchetypeTabPage.Text = "Mlo Archetype Def"; - this.MloArchetypeTabPage.UseVisualStyleBackColor = true; - // - // TimeArchetypeTabPage - // - this.TimeArchetypeTabPage.Controls.Add(this.TimeFlagsTextBox); - this.TimeArchetypeTabPage.Controls.Add(this.TimeFlagsCheckedListBox); - this.TimeArchetypeTabPage.Controls.Add(this.label15); - this.TimeArchetypeTabPage.Location = new System.Drawing.Point(4, 22); - this.TimeArchetypeTabPage.Name = "TimeArchetypeTabPage"; - this.TimeArchetypeTabPage.Size = new System.Drawing.Size(631, 479); - this.TimeArchetypeTabPage.TabIndex = 2; - this.TimeArchetypeTabPage.Text = "Time Archetype Def"; - this.TimeArchetypeTabPage.UseVisualStyleBackColor = true; - // - // TimeFlagsTextBox - // - this.TimeFlagsTextBox.Location = new System.Drawing.Point(72, 6); - this.TimeFlagsTextBox.Name = "TimeFlagsTextBox"; - this.TimeFlagsTextBox.Size = new System.Drawing.Size(147, 20); - this.TimeFlagsTextBox.TabIndex = 69; - this.TimeFlagsTextBox.TextChanged += new System.EventHandler(this.TimeFlagsTextBox_TextChanged); - // - // TimeFlagsCheckedListBox - // - this.TimeFlagsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.TimeFlagsCheckedListBox.CheckOnClick = true; - this.TimeFlagsCheckedListBox.FormattingEnabled = true; - this.TimeFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - 00:00 - 01:00", - "2 - 01:00 - 02:00", - "4 - 02:00 - 03:00", - "8 - 03:00 - 04:00", - "16 - 04:00 - 05:00", - "32 - 05:00 - 06:00", - "64 - 06:00 - 07:00", - "128 - 07:00 - 08:00", - "256 - 08:00 - 09:00", - "512 - 09:00 - 10:00", - "1024 - 10:00 - 11:00", - "2048 - 11:00 - 12:00", - "4096 - 12:00 - 13:00", - "8192 - 13:00 - 14:00", - "16384 - 14:00 - 15:00", - "32768 - 15:00 - 16:00", - "65536 - 16:00 - 17:00", - "131072 - 17:00 - 18:00", - "262144 - 18:00 - 19:00", - "524288 - 19:00 - 20:00", - "1048576 - 20:00 - 21:00", - "2097152 - 21:00 - 22:00", - "4194304 - 22:00 - 23:00", - "8388608 - 23:00 - 00:00", - "16777216 - Unk25", - "33554432 - Unk26", - "67108864 - Unk27", - "134217728 - Unk28", - "268435456 - Unk29", - "536870912 - Unk30", - "1073741824 - Unk31", - "2147483648 - Unk32"}); - this.TimeFlagsCheckedListBox.Location = new System.Drawing.Point(18, 32); - this.TimeFlagsCheckedListBox.Name = "TimeFlagsCheckedListBox"; - this.TimeFlagsCheckedListBox.Size = new System.Drawing.Size(201, 424); - this.TimeFlagsCheckedListBox.TabIndex = 70; - this.TimeFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.TimeFlagsCheckedListBox_ItemCheck); - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(5, 9); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(61, 13); - this.label15.TabIndex = 68; - this.label15.Text = "Time Flags:"; + MloArchetypeTabPage.Controls.Add(MloUpdatePortalCountsButton); + MloArchetypeTabPage.Location = new System.Drawing.Point(4, 24); + MloArchetypeTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MloArchetypeTabPage.Name = "MloArchetypeTabPage"; + MloArchetypeTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + MloArchetypeTabPage.Size = new System.Drawing.Size(738, 555); + MloArchetypeTabPage.TabIndex = 1; + MloArchetypeTabPage.Text = "Mlo Archetype Def"; + MloArchetypeTabPage.UseVisualStyleBackColor = true; // // MloUpdatePortalCountsButton // - this.MloUpdatePortalCountsButton.Location = new System.Drawing.Point(49, 35); - this.MloUpdatePortalCountsButton.Name = "MloUpdatePortalCountsButton"; - this.MloUpdatePortalCountsButton.Size = new System.Drawing.Size(153, 23); - this.MloUpdatePortalCountsButton.TabIndex = 0; - this.MloUpdatePortalCountsButton.Text = "Update Portal Counts"; - this.MloUpdatePortalCountsButton.UseVisualStyleBackColor = true; - this.MloUpdatePortalCountsButton.Click += new System.EventHandler(this.MloUpdatePortalCountsButton_Click); + MloUpdatePortalCountsButton.Location = new System.Drawing.Point(57, 40); + MloUpdatePortalCountsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MloUpdatePortalCountsButton.Name = "MloUpdatePortalCountsButton"; + MloUpdatePortalCountsButton.Size = new System.Drawing.Size(178, 27); + MloUpdatePortalCountsButton.TabIndex = 0; + MloUpdatePortalCountsButton.Text = "Update Portal Counts"; + MloUpdatePortalCountsButton.UseVisualStyleBackColor = true; + MloUpdatePortalCountsButton.Click += MloUpdatePortalCountsButton_Click; + // + // TimeArchetypeTabPage + // + TimeArchetypeTabPage.Controls.Add(TimeFlagsTextBox); + TimeArchetypeTabPage.Controls.Add(TimeFlagsCheckedListBox); + TimeArchetypeTabPage.Controls.Add(label15); + TimeArchetypeTabPage.Location = new System.Drawing.Point(4, 24); + TimeArchetypeTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeArchetypeTabPage.Name = "TimeArchetypeTabPage"; + TimeArchetypeTabPage.Size = new System.Drawing.Size(738, 555); + TimeArchetypeTabPage.TabIndex = 2; + TimeArchetypeTabPage.Text = "Time Archetype Def"; + TimeArchetypeTabPage.UseVisualStyleBackColor = true; + // + // TimeFlagsTextBox + // + TimeFlagsTextBox.Location = new System.Drawing.Point(84, 7); + TimeFlagsTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeFlagsTextBox.Name = "TimeFlagsTextBox"; + TimeFlagsTextBox.Size = new System.Drawing.Size(171, 23); + TimeFlagsTextBox.TabIndex = 69; + TimeFlagsTextBox.TextChanged += TimeFlagsTextBox_TextChanged; + // + // TimeFlagsCheckedListBox + // + TimeFlagsCheckedListBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + TimeFlagsCheckedListBox.CheckOnClick = true; + TimeFlagsCheckedListBox.FormattingEnabled = true; + TimeFlagsCheckedListBox.Items.AddRange(new object[] { "1 - 00:00 - 01:00", "2 - 01:00 - 02:00", "4 - 02:00 - 03:00", "8 - 03:00 - 04:00", "16 - 04:00 - 05:00", "32 - 05:00 - 06:00", "64 - 06:00 - 07:00", "128 - 07:00 - 08:00", "256 - 08:00 - 09:00", "512 - 09:00 - 10:00", "1024 - 10:00 - 11:00", "2048 - 11:00 - 12:00", "4096 - 12:00 - 13:00", "8192 - 13:00 - 14:00", "16384 - 14:00 - 15:00", "32768 - 15:00 - 16:00", "65536 - 16:00 - 17:00", "131072 - 17:00 - 18:00", "262144 - 18:00 - 19:00", "524288 - 19:00 - 20:00", "1048576 - 20:00 - 21:00", "2097152 - 21:00 - 22:00", "4194304 - 22:00 - 23:00", "8388608 - 23:00 - 00:00", "16777216 - Unk25", "33554432 - Unk26", "67108864 - Unk27", "134217728 - Unk28", "268435456 - Unk29", "536870912 - Unk30", "1073741824 - Unk31", "2147483648 - Unk32" }); + TimeFlagsCheckedListBox.Location = new System.Drawing.Point(21, 37); + TimeFlagsCheckedListBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeFlagsCheckedListBox.Name = "TimeFlagsCheckedListBox"; + TimeFlagsCheckedListBox.Size = new System.Drawing.Size(234, 472); + TimeFlagsCheckedListBox.TabIndex = 70; + TimeFlagsCheckedListBox.ItemCheck += TimeFlagsCheckedListBox_ItemCheck; + // + // label15 + // + label15.AutoSize = true; + label15.Location = new System.Drawing.Point(6, 10); + label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label15.Name = "label15"; + label15.Size = new System.Drawing.Size(66, 15); + label15.TabIndex = 68; + label15.Text = "Time Flags:"; // // EditYtypArchetypePanel // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(639, 505); - this.Controls.Add(this.TabControl); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(531, 458); - this.Name = "EditYtypArchetypePanel"; - this.Text = "Edit Archetype"; - this.Load += new System.EventHandler(this.EditYtypArchetypePanel_Load); - this.BaseArchetypeTabPage.ResumeLayout(false); - this.BaseArchetypeTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SpecialAttributeNumericUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.HDTextureDistNumericUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.LodDistNumericUpDown)).EndInit(); - this.TabControl.ResumeLayout(false); - this.MloArchetypeTabPage.ResumeLayout(false); - this.TimeArchetypeTabPage.ResumeLayout(false); - this.TimeArchetypeTabPage.PerformLayout(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(746, 583); + Controls.Add(TabControl); + Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MinimumSize = new System.Drawing.Size(617, 522); + Name = "EditYtypArchetypePanel"; + Text = "Edit Archetype"; + Load += EditYtypArchetypePanel_Load; + BaseArchetypeTabPage.ResumeLayout(false); + BaseArchetypeTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)SpecialAttributeNumericUpDown).EndInit(); + ((System.ComponentModel.ISupportInitialize)HDTextureDistNumericUpDown).EndInit(); + ((System.ComponentModel.ISupportInitialize)LodDistNumericUpDown).EndInit(); + TabControl.ResumeLayout(false); + MloArchetypeTabPage.ResumeLayout(false); + TimeArchetypeTabPage.ResumeLayout(false); + TimeArchetypeTabPage.PerformLayout(); + ResumeLayout(false); } #endregion diff --git a/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs b/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs index 3a9c365..a4fc100 100644 --- a/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs +++ b/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs @@ -19,14 +19,14 @@ namespace CodeWalker.Project.Panels ProjectForm = owner; } - public Archetype CurrentArchetype { get; set; } + public Archetype? CurrentArchetype { get; set; } private void EditYtypArchetypePanel_Load(object sender, EventArgs e) { AssetTypeComboBox.Items.AddRange(Enum.GetNames(typeof(rage__fwArchetypeDef__eAssetType))); } - public void SetArchetype(Archetype archetype) + public void SetArchetype(Archetype? archetype) { CurrentArchetype = archetype; Tag = archetype; @@ -46,9 +46,34 @@ namespace CodeWalker.Project.Panels ArchetypeDeleteButton.Enabled = ProjectForm.YtypExistsInProject(CurrentArchetype.Ytyp); ArchetypeNameTextBox.Text = CurrentArchetype.Name; AssetNameTextBox.Text = CurrentArchetype.AssetName; - LodDistNumericUpDown.Value = (decimal)CurrentArchetype._BaseArchetypeDef.lodDist; - HDTextureDistNumericUpDown.Value = (decimal)CurrentArchetype._BaseArchetypeDef.hdTextureDist; - SpecialAttributeNumericUpDown.Value = CurrentArchetype._BaseArchetypeDef.specialAttribute; + if ((decimal)CurrentArchetype._BaseArchetypeDef.lodDist > LodDistNumericUpDown.Maximum) + { + MessageBox.Show($"lodDist {CurrentArchetype._BaseArchetypeDef.lodDist:0.##} is higher than maximum allowed, capping it to {LodDistNumericUpDown.Maximum:0.##}"); + LodDistNumericUpDown.Value = LodDistNumericUpDown.Maximum; + } + else + { + LodDistNumericUpDown.Value = (decimal)CurrentArchetype._BaseArchetypeDef.lodDist; + } + if ((decimal)CurrentArchetype._BaseArchetypeDef.hdTextureDist > HDTextureDistNumericUpDown.Maximum) + { + MessageBox.Show($"hdTextureDist {CurrentArchetype._BaseArchetypeDef.hdTextureDist:0.##} is higher than maximum allowed, capping it to {HDTextureDistNumericUpDown.Maximum:0.##}"); + HDTextureDistNumericUpDown.Value = HDTextureDistNumericUpDown.Maximum; + } + else + { + HDTextureDistNumericUpDown.Value = (decimal)CurrentArchetype._BaseArchetypeDef.hdTextureDist; + } + if (CurrentArchetype._BaseArchetypeDef.specialAttribute > SpecialAttributeNumericUpDown.Maximum) + { + MessageBox.Show($"specialAttribute {CurrentArchetype._BaseArchetypeDef.specialAttribute} is higher than maximum allowed, capping it to {SpecialAttributeNumericUpDown.Maximum:0.##}"); + SpecialAttributeNumericUpDown.Value = SpecialAttributeNumericUpDown.Maximum; + } + else + { + SpecialAttributeNumericUpDown.Value = CurrentArchetype._BaseArchetypeDef.specialAttribute; + } + ArchetypeFlagsTextBox.Text = CurrentArchetype._BaseArchetypeDef.flags.ToString(); TextureDictTextBox.Text = CurrentArchetype._BaseArchetypeDef.textureDictionary.ToCleanString(); ClipDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.clipDictionary.ToCleanString(); @@ -80,7 +105,7 @@ namespace CodeWalker.Project.Panels TabControl.TabPages.Add(TimeArchetypeTabPage); } - TimeFlagsTextBox.Text = TimeArchetype.TimeFlags.ToString(); + TimeFlagsTextBox.Text = TimeArchetype.ActiveHours.TimeFlags.ToString(); } else TabControl.TabPages.Remove(TimeArchetypeTabPage); @@ -361,16 +386,17 @@ namespace CodeWalker.Project.Panels private void MloUpdatePortalCountsButton_Click(object sender, EventArgs e) { - var mlo = CurrentArchetype as MloArchetype; - if (mlo == null) return; + if (CurrentArchetype is not MloArchetype mlo) return; mlo.UpdatePortalCounts(); } private void TimeFlagsTextBox_TextChanged(object sender, EventArgs e) { - if (populatingui) return; - if (CurrentArchetype == null) return; + if (populatingui) + return; + if (CurrentArchetype == null) + return; if (CurrentArchetype is TimeArchetype TimeArchetype) { uint flags = 0; @@ -384,7 +410,7 @@ namespace CodeWalker.Project.Panels populatingui = false; lock (ProjectForm.ProjectSyncRoot) { - if (TimeArchetype.TimeFlags != flags) + if (TimeArchetype.ActiveHours.TimeFlags != flags) { TimeArchetype.SetTimeFlags(flags); ProjectForm.SetYtypHasChanged(true); @@ -423,7 +449,7 @@ namespace CodeWalker.Project.Panels populatingui = false; lock (ProjectForm.ProjectSyncRoot) { - if (TimeArchetype.TimeFlags != flags) + if (TimeArchetype.ActiveHours.TimeFlags != flags) { TimeArchetype.SetTimeFlags(flags); ProjectForm.SetYtypHasChanged(true); diff --git a/CodeWalker/Project/Panels/EditYtypArchetypePanel.resx b/CodeWalker/Project/Panels/EditYtypArchetypePanel.resx index 2d9a79e..3a8a20a 100644 --- a/CodeWalker/Project/Panels/EditYtypArchetypePanel.resx +++ b/CodeWalker/Project/Panels/EditYtypArchetypePanel.resx @@ -1,17 +1,17 @@  - diff --git a/CodeWalker/Project/Panels/EditYtypMloEntSetPanel.cs b/CodeWalker/Project/Panels/EditYtypMloEntSetPanel.cs index dc07e5e..cf78e2e 100644 --- a/CodeWalker/Project/Panels/EditYtypMloEntSetPanel.cs +++ b/CodeWalker/Project/Panels/EditYtypMloEntSetPanel.cs @@ -131,8 +131,7 @@ namespace CodeWalker.Project.Panels if (CurrentEntitySet == null) return; - var item = LocationsListBox.SelectedItem as LocationItem; - if (item == null) return; + if (LocationsListBox.SelectedItem is not LocationItem item) return; SelectingLocation = true; SelectedLocationEntityLabel.Text = (item.Entity != null) ? item.Entity.Name : "-"; @@ -146,8 +145,7 @@ namespace CodeWalker.Project.Panels if (SelectingLocation) return; if (CurrentEntitySet?.Locations == null) return; - var item = LocationsListBox.SelectedItem as LocationItem; - if (item == null) return; + if (LocationsListBox.SelectedItem is not LocationItem item) return; item.Location = (SelectedLocationRoomCombo.SelectedIndex >= 0) ? (uint)SelectedLocationRoomCombo.SelectedIndex : 0; diff --git a/CodeWalker/Project/Panels/GenerateLODLightsPanel.cs b/CodeWalker/Project/Panels/GenerateLODLightsPanel.cs index 8d3d947..3c59d71 100644 --- a/CodeWalker/Project/Panels/GenerateLODLightsPanel.cs +++ b/CodeWalker/Project/Panels/GenerateLODLightsPanel.cs @@ -45,14 +45,16 @@ namespace CodeWalker.Project.Panels { if (InvokeRequired) { - Invoke(new Action(() => { GenerateComplete(); })); + Invoke(GenerateComplete); } else { GenerateButton.Enabled = true; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -62,14 +64,16 @@ namespace CodeWalker.Project.Panels { if (InvokeRequired) { - Invoke(new Action(() => { UpdateStatus(text); })); + Invoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -90,17 +94,19 @@ namespace CodeWalker.Project.Panels var pname = NameTextBox.Text; - Task.Run(() => + _ = Task.Run(async () => { var lights = new List(); foreach (var ymap in projectYmaps) { - if (ymap?.AllEntities == null) continue; + if (ymap.AllEntities.Length == 0) + continue; foreach (var ent in ymap.AllEntities) { - if (ent.Archetype == null) continue; + if (ent.Archetype is null) + continue; bool waiting = false; var dwbl = gameFileCache.TryGetDrawable(ent.Archetype, out waiting); @@ -275,10 +281,10 @@ namespace CodeWalker.Project.Panels UpdateStatus("Adding new ymap files to project..."); - ProjectForm.Invoke((MethodInvoker)delegate + await ProjectForm.Invoke(async () => { - ProjectForm.AddYmapToProject(lodymap); - ProjectForm.AddYmapToProject(distymap); + await ProjectForm.AddYmapToProjectAsync(lodymap); + await ProjectForm.AddYmapToProjectAsync(distymap); }); var stats = ""; diff --git a/CodeWalker/Project/Panels/GenerateNavMeshPanel.cs b/CodeWalker/Project/Panels/GenerateNavMeshPanel.cs index dc3f258..2a8fe4f 100644 --- a/CodeWalker/Project/Panels/GenerateNavMeshPanel.cs +++ b/CodeWalker/Project/Panels/GenerateNavMeshPanel.cs @@ -133,14 +133,14 @@ namespace CodeWalker.Project.Panels { continue; } //ybn not found? if (!ybn.Loaded) //ybn not loaded yet... { - UpdateStatus("Loading ybn: " + boundsitem.Name.ToString() + " ..."); + UpdateStatus($"Loading ybn: {boundsitem.Name} ..."); int waitCount = 0; while (!ybn.Loaded) { waitCount++; if (waitCount > 10000) { - UpdateStatus("Timeout waiting for ybn " + boundsitem.Name.ToString() + " to load!"); + UpdateStatus($"Timeout waiting for ybn {boundsitem.Name} to load!"); Thread.Sleep(1000); //just to let the message display for a second... break; } @@ -170,7 +170,7 @@ namespace CodeWalker.Project.Panels var vcoffset = new Vector3(vx, vy, 0) * density; ray.Position = bmin + vcoffset; ray.Position.Z = bmax.Z + 1.0f;//start the ray at the top of the cell - var intres = space.RayIntersect(ray, float.MaxValue, layers); + var intres = space.RayIntersect(ref ray, float.MaxValue, layers); hitTestCount++; while (intres.Hit)// && (intres.HitDist > 0)) { @@ -197,7 +197,7 @@ namespace CodeWalker.Project.Panels } //continue down until no more hits..... step by 3m ray.Position.Z = intres.Position.Z - 3.0f; - intres = space.RayIntersect(ray, float.MaxValue, layers); + intres = space.RayIntersect(ref ray, float.MaxValue, layers); } vgrid.EndCell(vx, vy); } @@ -2123,7 +2123,10 @@ namespace CodeWalker.Project.Panels GenerateButton.Enabled = true; } } - catch { } + catch (Exception ex) + { + Console.WriteLine(ex); + } } @@ -2133,14 +2136,17 @@ namespace CodeWalker.Project.Panels { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch (Exception ex) + { + Console.WriteLine(ex); + } } diff --git a/CodeWalker/Project/Panels/ProjectExplorerPanel.cs b/CodeWalker/Project/Panels/ProjectExplorerPanel.cs index 5ec993f..2adf5d6 100644 --- a/CodeWalker/Project/Panels/ProjectExplorerPanel.cs +++ b/CodeWalker/Project/Panels/ProjectExplorerPanel.cs @@ -1,5 +1,6 @@ using CodeWalker.GameFiles; using CodeWalker.World; +using CommunityToolkit.HighPerformance; using System; using System.Collections.Generic; using System.ComponentModel; @@ -9,7 +10,9 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Documents; using System.Windows.Forms; +using System.Windows.Threading; using WeifenLuo.WinFormsUI.Docking; namespace CodeWalker.Project.Panels @@ -29,292 +32,315 @@ namespace CodeWalker.Project.Panels } - public void LoadProjectTree(ProjectFile projectFile) + public void LoadProjectTree(ProjectFile? projectFile) { - ProjectTreeView.Nodes.Clear(); - - CurrentProjectFile = projectFile; - if (CurrentProjectFile == null) return; - - var pcstr = CurrentProjectFile.HasChanged ? "*" : ""; - - var projnode = ProjectTreeView.Nodes.Add(pcstr + CurrentProjectFile.Name); - projnode.Tag = CurrentProjectFile; - - - if (CurrentProjectFile.YmapFiles.Count > 0) + if (InvokeRequired) { - var ymapsnode = projnode.Nodes.Add("Ymap Files"); - ymapsnode.Name = "Ymap"; - - foreach (var ymapfile in CurrentProjectFile.YmapFiles) - { - var ycstr = ymapfile.HasChanged ? "*" : ""; - string name = ymapfile.Name; - if (ymapfile.RpfFileEntry != null) - { - name = ymapfile.RpfFileEntry.Name; - } - var ymapnode = ymapsnode.Nodes.Add(ycstr + name); - ymapnode.Tag = ymapfile; - - LoadYmapTreeNodes(ymapfile, ymapnode); - - JenkIndex.EnsureBoth(name); - JenkIndex.EnsureBoth(Path.GetFileNameWithoutExtension(name)); - } - ymapsnode.Expand(); + Invoke(LoadProjectTree, projectFile); + return; } - - if (CurrentProjectFile.YtypFiles.Count > 0) + ProjectTreeView.BeginUpdate(); + ProjectTreeView.SuspendLayout(); + try { - var ytypsnode = projnode.Nodes.Add("Ytyp Files"); - ytypsnode.Name = "Ytyp"; + ProjectTreeView.Nodes.Clear(); - foreach (var ytypfile in CurrentProjectFile.YtypFiles) + CurrentProjectFile = projectFile; + if (CurrentProjectFile is null) + return; + + var pcstr = CurrentProjectFile.HasChanged ? "*" : ""; + + var projnode = ProjectTreeView.Nodes.Add(pcstr + CurrentProjectFile.Name); + projnode.Tag = CurrentProjectFile; + + + if (CurrentProjectFile.YmapFiles.Count > 0) { - var ycstr = ytypfile.HasChanged ? "*" : ""; - string name = ytypfile.Name; - if (ytypfile.RpfFileEntry != null) + var ymapsnode = projnode.Nodes.Add("Ymap Files"); + ymapsnode.Name = "Ymap"; + + foreach (var ymapfile in CurrentProjectFile.YmapFiles) { - name = ytypfile.RpfFileEntry.Name; + var ycstr = ymapfile.HasChanged ? "*" : ""; + string name = ymapfile.Name; + if (ymapfile.RpfFileEntry != null) + { + name = ymapfile.RpfFileEntry.Name; + } + var ymapnode = ymapsnode.Nodes.Add(ycstr + name); + ymapnode.Tag = ymapfile; + + LoadYmapTreeNodes(ymapfile, ymapnode); + + JenkIndex.EnsureBoth(name); + JenkIndex.EnsureBoth(Path.GetFileNameWithoutExtension(name)); } - var ytypnode = ytypsnode.Nodes.Add(ycstr + name); - ytypnode.Tag = ytypfile; - - LoadYtypTreeNodes(ytypfile, ytypnode); - - JenkIndex.EnsureBoth(name); - JenkIndex.EnsureBoth(Path.GetFileNameWithoutExtension(name)); + ymapsnode.Expand(); } - ytypsnode.Expand(); - } - if (CurrentProjectFile.YbnFiles.Count > 0) + if (CurrentProjectFile.YtypFiles.Count > 0) + { + var ytypsnode = projnode.Nodes.Add("Ytyp Files"); + ytypsnode.Name = "Ytyp"; + + foreach (var ytypfile in CurrentProjectFile.YtypFiles) + { + var ycstr = ytypfile.HasChanged ? "*" : ""; + string name = ytypfile.Name; + if (ytypfile.RpfFileEntry != null) + { + name = ytypfile.RpfFileEntry.Name; + } + var ytypnode = ytypsnode.Nodes.Add(ycstr + name); + ytypnode.Tag = ytypfile; + + LoadYtypTreeNodes(ytypfile, ytypnode); + + JenkIndex.EnsureBoth(name); + JenkIndex.EnsureBoth(Path.GetFileNameWithoutExtension(name)); + } + ytypsnode.Expand(); + } + + if (CurrentProjectFile.YbnFiles.Count > 0) + { + var ybnsnode = projnode.Nodes.Add("Ybn Files"); + ybnsnode.Name = "Ybn"; + + foreach (var ybnfile in CurrentProjectFile.YbnFiles) + { + var ycstr = ybnfile.HasChanged ? "*" : ""; + string name = ybnfile.Name; + if (ybnfile.RpfFileEntry != null) + { + name = ybnfile.RpfFileEntry.Name; + } + var yndnode = ybnsnode.Nodes.Add(ycstr + name); + yndnode.Tag = ybnfile; + + LoadYbnTreeNodes(ybnfile, yndnode); + } + ybnsnode.Expand(); + } + + if (CurrentProjectFile.YndFiles.Count > 0) + { + var yndsnode = projnode.Nodes.Add("Ynd Files"); + yndsnode.Name = "Ynd"; + + foreach (var yndfile in CurrentProjectFile.YndFiles) + { + var ycstr = yndfile.HasChanged ? "*" : ""; + string name = yndfile.Name; + if (yndfile.RpfFileEntry != null) + { + name = yndfile.RpfFileEntry.Name; + } + var yndnode = yndsnode.Nodes.Add(ycstr + name); + yndnode.Tag = yndfile; + + LoadYndTreeNodes(yndfile, yndnode); + } + yndsnode.Expand(); + } + + if (CurrentProjectFile.YnvFiles.Count > 0) + { + var ynvsnode = projnode.Nodes.Add("Ynv Files"); + ynvsnode.Name = "Ynv"; + + foreach (var ynvfile in CurrentProjectFile.YnvFiles) + { + var ycstr = ynvfile.HasChanged ? "*" : ""; + string name = ynvfile.Name; + if (ynvfile.RpfFileEntry != null) + { + name = ynvfile.RpfFileEntry.Name; + } + var ynvnode = ynvsnode.Nodes.Add(ycstr + name); + ynvnode.Tag = ynvfile; + + LoadYnvTreeNodes(ynvfile, ynvnode); + } + ynvsnode.Expand(); + } + + if (CurrentProjectFile.TrainsFiles.Count > 0) + { + var trainsnode = projnode.Nodes.Add("Trains Files"); + trainsnode.Name = "Trains"; + + foreach (var trainfile in CurrentProjectFile.TrainsFiles) + { + var tcstr = trainfile.HasChanged ? "*" : ""; + string name = trainfile.Name; + if (trainfile.RpfFileEntry != null) + { + name = trainfile.RpfFileEntry.Name; + } + var trainnode = trainsnode.Nodes.Add(tcstr + name); + trainnode.Tag = trainfile; + + LoadTrainTrackTreeNodes(trainfile, trainnode); + } + trainsnode.Expand(); + } + + if (CurrentProjectFile.ScenarioFiles.Count > 0) + { + var scenariosnode = projnode.Nodes.Add("Scenario Files"); + scenariosnode.Name = "Scenarios"; + + foreach (var scenariofile in CurrentProjectFile.ScenarioFiles) + { + var scstr = scenariofile.HasChanged ? "*" : ""; + string name = scenariofile.Name; + if (scenariofile.RpfFileEntry != null) + { + name = scenariofile.RpfFileEntry.Name; + } + var scenarionode = scenariosnode.Nodes.Add(scstr + name); + scenarionode.Tag = scenariofile; + + LoadScenarioTreeNodes(scenariofile, scenarionode); + } + scenariosnode.Expand(); + } + + if (CurrentProjectFile.AudioRelFiles.Count > 0) + { + var audiorelsnode = projnode.Nodes.Add("Audio Rel Files"); + audiorelsnode.Name = "AudioRels"; + + foreach (var audiorelfile in CurrentProjectFile.AudioRelFiles) + { + var acstr = audiorelfile.HasChanged ? "*" : ""; + string name = audiorelfile.Name; + if (audiorelfile.RpfFileEntry != null) + { + name = audiorelfile.RpfFileEntry.Name; + } + var audiorelnode = audiorelsnode.Nodes.Add(acstr + name); + audiorelnode.Tag = audiorelfile; + + LoadAudioRelTreeNodes(audiorelfile, audiorelnode); + } + audiorelsnode.Expand(); + } + + if (CurrentProjectFile.YdrFiles.Count > 0) + { + var ydrsnode = projnode.Nodes.Add("Ydr Files"); + ydrsnode.Name = "Ydr"; + + foreach (var ydrfile in CurrentProjectFile.YdrFiles) + { + var ycstr = "";// ydrfile.HasChanged ? "*" : ""; + string name = ydrfile.Name; + if (ydrfile.RpfFileEntry != null) + { + name = ydrfile.RpfFileEntry.Name; + } + var ydrnode = ydrsnode.Nodes.Add(ycstr + name); + ydrnode.Tag = ydrfile; + + //LoadYdrTreeNodes(ydrfile, ydrnode); + } + ydrsnode.Expand(); + } + + if (CurrentProjectFile.YddFiles.Count > 0) + { + var yddsnode = projnode.Nodes.Add("Ydd Files"); + yddsnode.Name = "Ydd"; + + foreach (var yddfile in CurrentProjectFile.YddFiles) + { + var ycstr = "";// yddfile.HasChanged ? "*" : ""; + string name = yddfile.Name; + if (yddfile.RpfFileEntry != null) + { + name = yddfile.RpfFileEntry.Name; + } + var yddnode = yddsnode.Nodes.Add(ycstr + name); + yddnode.Tag = yddfile; + + //LoadYddTreeNodes(yddfile, yddnode); + } + yddsnode.Expand(); + } + + if (CurrentProjectFile.YftFiles.Count > 0) + { + var yftsnode = projnode.Nodes.Add("Yft Files"); + yftsnode.Name = "Yft"; + + foreach (var yftfile in CurrentProjectFile.YftFiles) + { + var ycstr = "";// yftfile.HasChanged ? "*" : ""; + string name = yftfile.Name; + if (yftfile.RpfFileEntry != null) + { + name = yftfile.RpfFileEntry.Name; + } + var yftnode = yftsnode.Nodes.Add(ycstr + name); + yftnode.Tag = yftfile; + + //LoadYftTreeNodes(yftfile, yftnode); + } + yftsnode.Expand(); + } + + if (CurrentProjectFile.YtdFiles.Count > 0) + { + var ytdsnode = projnode.Nodes.Add("Ytd Files"); + ytdsnode.Name = "Ytd"; + + foreach (var ytdfile in CurrentProjectFile.YtdFiles) + { + var ycstr = "";// ytdfile.HasChanged ? "*" : ""; + string name = ytdfile.Name; + if (ytdfile.RpfFileEntry != null) + { + name = ytdfile.RpfFileEntry.Name; + } + var ytdnode = ytdsnode.Nodes.Add(ycstr + name); + ytdnode.Tag = ytdfile; + + //LoadYtdTreeNodes(ytdfile, ytdnode); + } + ytdsnode.Expand(); + } + + projnode.Expand(); + } + finally { - var ybnsnode = projnode.Nodes.Add("Ybn Files"); - ybnsnode.Name = "Ybn"; - - foreach (var ybnfile in CurrentProjectFile.YbnFiles) - { - var ycstr = ybnfile.HasChanged ? "*" : ""; - string name = ybnfile.Name; - if (ybnfile.RpfFileEntry != null) - { - name = ybnfile.RpfFileEntry.Name; - } - var yndnode = ybnsnode.Nodes.Add(ycstr + name); - yndnode.Tag = ybnfile; - - LoadYbnTreeNodes(ybnfile, yndnode); - } - ybnsnode.Expand(); + ProjectTreeView.EndUpdate(); + ProjectTreeView.ResumeLayout(); } - - if (CurrentProjectFile.YndFiles.Count > 0) - { - var yndsnode = projnode.Nodes.Add("Ynd Files"); - yndsnode.Name = "Ynd"; - - foreach (var yndfile in CurrentProjectFile.YndFiles) - { - var ycstr = yndfile.HasChanged ? "*" : ""; - string name = yndfile.Name; - if (yndfile.RpfFileEntry != null) - { - name = yndfile.RpfFileEntry.Name; - } - var yndnode = yndsnode.Nodes.Add(ycstr + name); - yndnode.Tag = yndfile; - - LoadYndTreeNodes(yndfile, yndnode); - } - yndsnode.Expand(); - } - - if (CurrentProjectFile.YnvFiles.Count > 0) - { - var ynvsnode = projnode.Nodes.Add("Ynv Files"); - ynvsnode.Name = "Ynv"; - - foreach (var ynvfile in CurrentProjectFile.YnvFiles) - { - var ycstr = ynvfile.HasChanged ? "*" : ""; - string name = ynvfile.Name; - if (ynvfile.RpfFileEntry != null) - { - name = ynvfile.RpfFileEntry.Name; - } - var ynvnode = ynvsnode.Nodes.Add(ycstr + name); - ynvnode.Tag = ynvfile; - - LoadYnvTreeNodes(ynvfile, ynvnode); - } - ynvsnode.Expand(); - } - - if (CurrentProjectFile.TrainsFiles.Count > 0) - { - var trainsnode = projnode.Nodes.Add("Trains Files"); - trainsnode.Name = "Trains"; - - foreach (var trainfile in CurrentProjectFile.TrainsFiles) - { - var tcstr = trainfile.HasChanged ? "*" : ""; - string name = trainfile.Name; - if (trainfile.RpfFileEntry != null) - { - name = trainfile.RpfFileEntry.Name; - } - var trainnode = trainsnode.Nodes.Add(tcstr + name); - trainnode.Tag = trainfile; - - LoadTrainTrackTreeNodes(trainfile, trainnode); - } - trainsnode.Expand(); - } - - if (CurrentProjectFile.ScenarioFiles.Count > 0) - { - var scenariosnode = projnode.Nodes.Add("Scenario Files"); - scenariosnode.Name = "Scenarios"; - - foreach (var scenariofile in CurrentProjectFile.ScenarioFiles) - { - var scstr = scenariofile.HasChanged ? "*" : ""; - string name = scenariofile.Name; - if (scenariofile.RpfFileEntry != null) - { - name = scenariofile.RpfFileEntry.Name; - } - var scenarionode = scenariosnode.Nodes.Add(scstr + name); - scenarionode.Tag = scenariofile; - - LoadScenarioTreeNodes(scenariofile, scenarionode); - } - scenariosnode.Expand(); - } - - if (CurrentProjectFile.AudioRelFiles.Count > 0) - { - var audiorelsnode = projnode.Nodes.Add("Audio Rel Files"); - audiorelsnode.Name = "AudioRels"; - - foreach (var audiorelfile in CurrentProjectFile.AudioRelFiles) - { - var acstr = audiorelfile.HasChanged ? "*" : ""; - string name = audiorelfile.Name; - if (audiorelfile.RpfFileEntry != null) - { - name = audiorelfile.RpfFileEntry.Name; - } - var audiorelnode = audiorelsnode.Nodes.Add(acstr + name); - audiorelnode.Tag = audiorelfile; - - LoadAudioRelTreeNodes(audiorelfile, audiorelnode); - } - audiorelsnode.Expand(); - } - - if (CurrentProjectFile.YdrFiles.Count > 0) - { - var ydrsnode = projnode.Nodes.Add("Ydr Files"); - ydrsnode.Name = "Ydr"; - - foreach (var ydrfile in CurrentProjectFile.YdrFiles) - { - var ycstr = "";// ydrfile.HasChanged ? "*" : ""; - string name = ydrfile.Name; - if (ydrfile.RpfFileEntry != null) - { - name = ydrfile.RpfFileEntry.Name; - } - var ydrnode = ydrsnode.Nodes.Add(ycstr + name); - ydrnode.Tag = ydrfile; - - //LoadYdrTreeNodes(ydrfile, ydrnode); - } - ydrsnode.Expand(); - } - - if (CurrentProjectFile.YddFiles.Count > 0) - { - var yddsnode = projnode.Nodes.Add("Ydd Files"); - yddsnode.Name = "Ydd"; - - foreach (var yddfile in CurrentProjectFile.YddFiles) - { - var ycstr = "";// yddfile.HasChanged ? "*" : ""; - string name = yddfile.Name; - if (yddfile.RpfFileEntry != null) - { - name = yddfile.RpfFileEntry.Name; - } - var yddnode = yddsnode.Nodes.Add(ycstr + name); - yddnode.Tag = yddfile; - - //LoadYddTreeNodes(yddfile, yddnode); - } - yddsnode.Expand(); - } - - if (CurrentProjectFile.YftFiles.Count > 0) - { - var yftsnode = projnode.Nodes.Add("Yft Files"); - yftsnode.Name = "Yft"; - - foreach (var yftfile in CurrentProjectFile.YftFiles) - { - var ycstr = "";// yftfile.HasChanged ? "*" : ""; - string name = yftfile.Name; - if (yftfile.RpfFileEntry != null) - { - name = yftfile.RpfFileEntry.Name; - } - var yftnode = yftsnode.Nodes.Add(ycstr + name); - yftnode.Tag = yftfile; - - //LoadYftTreeNodes(yftfile, yftnode); - } - yftsnode.Expand(); - } - - if (CurrentProjectFile.YtdFiles.Count > 0) - { - var ytdsnode = projnode.Nodes.Add("Ytd Files"); - ytdsnode.Name = "Ytd"; - - foreach (var ytdfile in CurrentProjectFile.YtdFiles) - { - var ycstr = "";// ytdfile.HasChanged ? "*" : ""; - string name = ytdfile.Name; - if (ytdfile.RpfFileEntry != null) - { - name = ytdfile.RpfFileEntry.Name; - } - var ytdnode = ytdsnode.Nodes.Add(ycstr + name); - ytdnode.Tag = ytdfile; - - //LoadYtdTreeNodes(ytdfile, ytdnode); - } - ytdsnode.Expand(); - } - - projnode.Expand(); - } private void LoadYmapTreeNodes(YmapFile ymap, TreeNode node) { - if (ymap == null) return; + if (ymap is null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Entities and CarGens + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Entities and CarGens + + if (InvokeRequired) + { + Invoke(LoadYmapTreeNodes, ymap, node); + return; + } node.Nodes.Clear(); - if ((ymap.AllEntities != null) && (ymap.AllEntities.Length > 0)) + if (ymap.AllEntities.Length > 0) { - var entsnode = node.Nodes.Add("Entities (" + ymap.AllEntities.Length.ToString() + ")"); + var entsnode = node.Nodes.Add($"Entities ({ymap.AllEntities.Length})"); entsnode.Name = "Entities"; entsnode.Tag = ymap; var ents = ymap.AllEntities; @@ -331,9 +357,9 @@ namespace CodeWalker.Project.Panels enode.Tag = ent; } } - if ((ymap.CarGenerators != null) && (ymap.CarGenerators.Length > 0)) + if (ymap.CarGenerators != null && ymap.CarGenerators.Length > 0) { - var cargensnode = node.Nodes.Add("Car Generators (" + ymap.CarGenerators.Length.ToString() + ")"); + var cargensnode = node.Nodes.Add($"Car Generators ({ymap.CarGenerators.Length})"); cargensnode.Name = "CarGens"; cargensnode.Tag = ymap; var cargens = ymap.CarGenerators; @@ -344,9 +370,9 @@ namespace CodeWalker.Project.Panels ccgnode.Tag = cargen; } } - if ((ymap.LODLights?.LodLights != null) && (ymap.LODLights.LodLights.Length > 0)) + if (ymap.LODLights?.LodLights != null && ymap.LODLights.LodLights.Length > 0) { - var lodlightsnode = node.Nodes.Add("LOD Lights (" + ymap.LODLights.LodLights.Length.ToString() + ")"); + var lodlightsnode = node.Nodes.Add($"LOD Lights ({ymap.LODLights.LodLights.Length})"); lodlightsnode.Name = "LodLights"; lodlightsnode.Tag = ymap; var lodlights = ymap.LODLights.LodLights; @@ -357,9 +383,9 @@ namespace CodeWalker.Project.Panels llnode.Tag = lodlight; } } - if ((ymap.BoxOccluders != null) && (ymap.BoxOccluders.Length > 0)) + if (ymap.BoxOccluders != null && ymap.BoxOccluders.Length > 0) { - var boxocclsnode = node.Nodes.Add("Box Occluders (" + ymap.BoxOccluders.Length.ToString() + ")"); + var boxocclsnode = node.Nodes.Add($"Box Occluders ({ymap.BoxOccluders.Length})"); boxocclsnode.Name = "BoxOccluders"; boxocclsnode.Tag = ymap; var boxes = ymap.BoxOccluders; @@ -370,9 +396,9 @@ namespace CodeWalker.Project.Panels boxnode.Tag = box; } } - if ((ymap.OccludeModels != null) && (ymap.OccludeModels.Length > 0)) + if (ymap.OccludeModels != null && ymap.OccludeModels.Length > 0) { - var occlmodsnode = node.Nodes.Add("Occlude Models (" + ymap.OccludeModels.Length.ToString() + ")"); + var occlmodsnode = node.Nodes.Add($"Occlude Models ({ymap.OccludeModels.Length})"); occlmodsnode.Name = "OccludeModels"; occlmodsnode.Tag = ymap; var models = ymap.OccludeModels; @@ -383,9 +409,9 @@ namespace CodeWalker.Project.Panels modnode.Tag = model; } } - if ((ymap.GrassInstanceBatches != null) && (ymap.GrassInstanceBatches.Length > 0)) + if (ymap.GrassInstanceBatches != null && ymap.GrassInstanceBatches.Length > 0) { - var grassbatchesnodes = node.Nodes.Add("Grass Batches (" + ymap.GrassInstanceBatches.Length.ToString() + ")"); + var grassbatchesnodes = node.Nodes.Add($"Grass Batches ({ymap.GrassInstanceBatches.Length})"); grassbatchesnodes.Name = "GrassBatches"; grassbatchesnodes.Tag = ymap; var grassbatches = ymap.GrassInstanceBatches; @@ -400,15 +426,23 @@ namespace CodeWalker.Project.Panels } private void LoadYtypTreeNodes(YtypFile ytyp, TreeNode node) { - if (ytyp == null) return; + if (ytyp is null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; + if (!string.IsNullOrEmpty(node.Name)) + return; + + if (InvokeRequired) + { + Invoke(LoadYtypTreeNodes, ytyp, node); + return; + } node.Nodes.Clear(); - if ((ytyp.AllArchetypes != null) && (ytyp.AllArchetypes.Length > 0)) + if (ytyp.AllArchetypes.Length > 0) { - var archetypesnode = node.Nodes.Add("Archetypes (" + ytyp.AllArchetypes.Length.ToString() + ")"); + var archetypesnode = node.Nodes.Add($"Archetypes ({ytyp.AllArchetypes.Length})"); archetypesnode.Name = "Archetypes"; archetypesnode.Tag = ytyp; var archetypes = ytyp.AllArchetypes; @@ -424,14 +458,14 @@ namespace CodeWalker.Project.Panels var entities = mlo.entities; var entsets = mlo.entitySets; var portals = mlo.portals; - if ((rooms != null) && (rooms.Length > 0)) + if (rooms is not null && rooms.Length > 0) { - var roomsnode = tarch.Nodes.Add("Rooms (" + rooms.Length.ToString() + ")"); + var roomsnode = tarch.Nodes.Add($"Rooms ({rooms.Length})"); roomsnode.Name = "Rooms"; for (int j = 0; j < rooms.Length; j++) { var room = rooms[j]; - var roomnode = roomsnode.Nodes.Add(room.Index.ToString() + ": " + room.RoomName); + var roomnode = roomsnode.Nodes.Add($"{room.Index}: {room.RoomName}"); roomnode.Tag = room; var roomentities = room.AttachedObjects; if ((roomentities != null) && (entities != null)) @@ -449,9 +483,9 @@ namespace CodeWalker.Project.Panels } } } - if ((portals != null) && (portals.Length > 0)) + if (portals != null && portals.Length > 0) { - var portalsnode = tarch.Nodes.Add("Portals (" + portals.Length.ToString() + ")"); + var portalsnode = tarch.Nodes.Add($"Portals ({portals.Length})"); portalsnode.Name = "Portals"; for (int j = 0; j < portals.Length; j++) { @@ -476,7 +510,7 @@ namespace CodeWalker.Project.Panels } if ((entsets != null) && (entsets.Length > 0)) { - var setsnode = tarch.Nodes.Add("Entity Sets (" + entsets.Length.ToString() + ")"); + var setsnode = tarch.Nodes.Add($"Entity Sets ({entsets.Length})"); setsnode.Name = "EntitySets"; for (int j = 0; j < entsets.Length; j++) { @@ -505,9 +539,17 @@ namespace CodeWalker.Project.Panels } private void LoadYbnTreeNodes(YbnFile ybn, TreeNode node) { - if (ybn == null) return; + if (ybn == null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Nodes + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Nodes + + if (InvokeRequired) + { + Invoke(LoadYbnTreeNodes, ybn, node); + return; + } node.Nodes.Clear(); @@ -519,7 +561,11 @@ namespace CodeWalker.Project.Panels } private void LoadYbnBoundsTreeNode(Bounds b, TreeNode node) { - + if (InvokeRequired) + { + Invoke(LoadYbnBoundsTreeNode, b, node); + return; + } var boundsnode = node.Nodes.Add(b.Type.ToString()); boundsnode.Tag = b; @@ -553,9 +599,17 @@ namespace CodeWalker.Project.Panels } private void LoadYndTreeNodes(YndFile ynd, TreeNode node) { - if (ynd == null) return; + if (ynd == null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Nodes + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Nodes + + if (InvokeRequired) + { + Invoke(LoadYndTreeNodes, ynd, node); + return; + } node.Nodes.Clear(); @@ -579,9 +633,17 @@ namespace CodeWalker.Project.Panels } private void LoadYnvTreeNodes(YnvFile ynv, TreeNode node)//TODO! { - if (ynv == null) return; + if (ynv == null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Polygons + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Polygons + + if (InvokeRequired) + { + Invoke(LoadYnvTreeNodes, ynv, node); + return; + } node.Nodes.Clear(); @@ -603,17 +665,25 @@ namespace CodeWalker.Project.Panels } private void LoadTrainTrackTreeNodes(TrainTrack track, TreeNode node) { - if (track == null) return; + if (track == null) + return; - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Nodes + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Nodes + + if (InvokeRequired) + { + Invoke(LoadTrainTrackTreeNodes, track, node); + return; + } node.Nodes.Clear(); - if ((track.Nodes != null) && (track.Nodes.Count > 0)) + if (track.Nodes != null && track.Nodes.Count > 0) { - var nodesnode = node.Nodes.Add("Nodes (" + track.Nodes.Count.ToString() + ")"); + var nodesnode = node.Nodes.Add($"Nodes ({track.Nodes.Count})"); nodesnode.Name = "Nodes"; nodesnode.Tag = track; var nodes = track.Nodes; @@ -628,16 +698,25 @@ namespace CodeWalker.Project.Panels } private void LoadScenarioTreeNodes(YmtFile ymt, TreeNode node) { - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Points + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Points + + if (InvokeRequired) + { + Invoke(LoadScenarioTreeNodes, ymt, node); + return; + } node.Nodes.Clear(); var region = ymt?.ScenarioRegion; - if (region == null) return; + if (region == null) + return; var nodes = region.Nodes; - if ((nodes == null) || (nodes.Count == 0)) return; + if (nodes == null || nodes.Count == 0) + return; var pointsnode = node.Nodes.Add("Points (" + nodes.Count.ToString() + ")"); pointsnode.Name = "Points"; @@ -700,12 +779,20 @@ namespace CodeWalker.Project.Panels } private void LoadAudioRelTreeNodes(RelFile rel, TreeNode node) { - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Zones, Emitters + if (!string.IsNullOrEmpty(node.Name)) + return; //named nodes are eg Zones, Emitters + + if (InvokeRequired) + { + Invoke(LoadAudioRelTreeNodes, rel, node); + return; + } node.Nodes.Clear(); - if (rel.RelDatasSorted == null) return; //nothing to see here + if (rel.RelDatas == null) + return; //nothing to see here var zones = new List(); @@ -717,29 +804,29 @@ namespace CodeWalker.Project.Panels foreach (var reldata in rel.RelDatasSorted) { - if (reldata is Dat151AmbientZone) + if (reldata is Dat151AmbientZone dat151AmbientZone) { - zones.Add(reldata as Dat151AmbientZone); + zones.Add(dat151AmbientZone); } - if (reldata is Dat151AmbientRule) + if (reldata is Dat151AmbientRule dat151AmbientRule) { - emitters.Add(reldata as Dat151AmbientRule); + emitters.Add(dat151AmbientRule); } - if (reldata is Dat151AmbientZoneList) + if (reldata is Dat151AmbientZoneList dat151AmbientZoneList) { - zonelists.Add(reldata as Dat151AmbientZoneList); + zonelists.Add(dat151AmbientZoneList); } - if (reldata is Dat151StaticEmitterList) + if (reldata is Dat151StaticEmitterList dat151StaticEmitterList) { - emitterlists.Add(reldata as Dat151StaticEmitterList); + emitterlists.Add(dat151StaticEmitterList); } - if (reldata is Dat151Interior) + if (reldata is Dat151Interior dat151Interior) { - interiors.Add(reldata as Dat151Interior); + interiors.Add(dat151Interior); } - if (reldata is Dat151InteriorRoom) + if (reldata is Dat151InteriorRoom dat151InteriorRoom) { - interiorrooms.Add(reldata as Dat151InteriorRoom); + interiorrooms.Add(dat151InteriorRoom); } } @@ -835,15 +922,23 @@ namespace CodeWalker.Project.Panels public void SetProjectHasChanged(bool changed) { - if ((ProjectTreeView.Nodes.Count > 0) && (CurrentProjectFile != null)) + if (ProjectTreeView.Nodes.Count > 0 && CurrentProjectFile != null) { - //first node is the project... - string changestr = changed ? "*" : ""; - ProjectTreeView.Nodes[0].Text = changestr + CurrentProjectFile.Name; + this.InvokeIfRequired(() => + { + //first node is the project... + string changestr = changed ? "*" : ""; + ProjectTreeView.Nodes[0].Text = changestr + CurrentProjectFile.Name; + }); } } public void SetYmapHasChanged(YmapFile ymap, bool changed) { + if (InvokeRequired) + { + Invoke(SetYmapHasChanged, ymap, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -868,6 +963,11 @@ namespace CodeWalker.Project.Panels } public void SetYtypHasChanged(YtypFile ytyp, bool changed) { + if (InvokeRequired) + { + Invoke(SetYtypHasChanged, ytyp, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -892,6 +992,11 @@ namespace CodeWalker.Project.Panels } public void SetYbnHasChanged(YbnFile ybn, bool changed) { + if (InvokeRequired) + { + Invoke(SetYbnHasChanged, ybn, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -916,6 +1021,11 @@ namespace CodeWalker.Project.Panels } public void SetYndHasChanged(YndFile ynd, bool changed) { + if (InvokeRequired) + { + Invoke(SetYndHasChanged, ynd, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -940,6 +1050,11 @@ namespace CodeWalker.Project.Panels } public void SetYnvHasChanged(YnvFile ynv, bool changed) { + if (InvokeRequired) + { + Invoke(SetYnvHasChanged, ynv, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -964,6 +1079,11 @@ namespace CodeWalker.Project.Panels } public void SetTrainTrackHasChanged(TrainTrack track, bool changed) { + if (InvokeRequired) + { + Invoke(SetTrainTrackHasChanged, track, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -988,6 +1108,11 @@ namespace CodeWalker.Project.Panels } public void SetScenarioHasChanged(YmtFile scenario, bool changed) { + if (InvokeRequired) + { + Invoke(SetScenarioHasChanged, scenario, changed); + return; + } if (ProjectTreeView.Nodes.Count > 0) { var pnode = ProjectTreeView.Nodes[0]; @@ -1057,47 +1182,56 @@ namespace CodeWalker.Project.Panels - private TreeNode GetChildTreeNode(TreeNode node, string name) + private TreeNode? GetChildTreeNode(TreeNode? node, string name) { - if (node == null) return null; + if (node is null) + return null; var nodes = node.Nodes.Find(name, false); - if ((nodes == null) || (nodes.Length != 1)) return null; + if (nodes is null || nodes.Length != 1) + return null; return nodes[0]; } - public TreeNode FindYmapTreeNode(YmapFile ymap) + public TreeNode? FindYmapTreeNode(YmapFile ymap) { - if (ProjectTreeView.Nodes.Count <= 0) return null; + if (ProjectTreeView.Nodes.Count <= 0) + return null; var projnode = ProjectTreeView.Nodes[0]; var ymapsnode = GetChildTreeNode(projnode, "Ymap"); - if (ymapsnode == null) return null; + if (ymapsnode is null) + return null; for (int i = 0; i < ymapsnode.Nodes.Count; i++) { var ymapnode = ymapsnode.Nodes[i]; - if (ymapnode.Tag == ymap) return ymapnode; + if (ymapnode.Tag == ymap) + return ymapnode; } return null; } - public TreeNode FindEntityTreeNode(YmapEntityDef ent) + public TreeNode? FindEntityTreeNode(YmapEntityDef ent) { - if (ent == null) return null; - TreeNode ymapnode = FindYmapTreeNode(ent.Ymap); - if (ymapnode == null) return null; + if (ent == null) + return null; + var ymapnode = FindYmapTreeNode(ent.Ymap); + if (ymapnode == null) + return null; var entsnode = GetChildTreeNode(ymapnode, "Entities"); - if (entsnode == null) return null; + if (entsnode == null) + return null; for (int i = 0; i < entsnode.Nodes.Count; i++) { TreeNode entnode = entsnode.Nodes[i]; - if (entnode.Tag == ent) return entnode; + if (entnode.Tag == ent) + return entnode; } return null; } - public TreeNode FindCarGenTreeNode(YmapCarGen cargen) + public TreeNode? FindCarGenTreeNode(YmapCarGen cargen) { - if (cargen == null) return null; - TreeNode ymapnode = FindYmapTreeNode(cargen.Ymap); - if (ymapnode == null) return null; + if (cargen is null) return null; + var ymapnode = FindYmapTreeNode(cargen.Ymap); + if (ymapnode is null) return null; var cargensnode = GetChildTreeNode(ymapnode, "CarGens"); - if (cargensnode == null) return null; + if (cargensnode is null) return null; for (int i = 0; i < cargensnode.Nodes.Count; i++) { TreeNode cargennode = cargensnode.Nodes[i]; @@ -1105,303 +1239,373 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindLodLightTreeNode(YmapLODLight lodlight) + public TreeNode? FindLodLightTreeNode(YmapLODLight lodlight) { - if (lodlight == null) return null; - TreeNode ymapnode = FindYmapTreeNode(lodlight.Ymap); - if (ymapnode == null) return null; + if (lodlight is null) + return null; + var ymapnode = FindYmapTreeNode(lodlight.Ymap); + if (ymapnode is null) + return null; var lodlightsnode = GetChildTreeNode(ymapnode, "LodLights"); - if (lodlightsnode == null) return null; + if (lodlightsnode is null) + return null; for (int i = 0; i < lodlightsnode.Nodes.Count; i++) { TreeNode lodlightnode = lodlightsnode.Nodes[i]; - if (lodlightnode.Tag == lodlight) return lodlightnode; + if (lodlightnode.Tag == lodlight) + return lodlightnode; } return null; } - public TreeNode FindBoxOccluderTreeNode(YmapBoxOccluder box) + public TreeNode? FindBoxOccluderTreeNode(YmapBoxOccluder box) { - if (box == null) return null; - TreeNode ymapnode = FindYmapTreeNode(box.Ymap); - if (ymapnode == null) return null; + if (box is null) + return null; + var ymapnode = FindYmapTreeNode(box.Ymap); + if (ymapnode is null) + return null; var boxesnode = GetChildTreeNode(ymapnode, "BoxOccluders"); - if (boxesnode == null) return null; + if (boxesnode is null) + return null; for (int i = 0; i < boxesnode.Nodes.Count; i++) { TreeNode boxnode = boxesnode.Nodes[i]; - if (boxnode.Tag == box) return boxnode; + if (boxnode.Tag == box) + return boxnode; } return null; } - public TreeNode FindOccludeModelTreeNode(YmapOccludeModel model) + public TreeNode? FindOccludeModelTreeNode(YmapOccludeModel model) { - if (model == null) return null; - TreeNode ymapnode = FindYmapTreeNode(model.Ymap); - if (ymapnode == null) return null; + if (model is null) + return null; + var ymapnode = FindYmapTreeNode(model.Ymap); + if (ymapnode is null) + return null; var modelsnode = GetChildTreeNode(ymapnode, "OccludeModels"); - if (modelsnode == null) return null; + if (modelsnode is null) + return null; for (int i = 0; i < modelsnode.Nodes.Count; i++) { TreeNode modelnode = modelsnode.Nodes[i]; - if (modelnode.Tag == model) return modelnode; + if (modelnode.Tag == model) + return modelnode; } return null; } - public TreeNode FindOccludeModelTriangleTreeNode(YmapOccludeModelTriangle tri) + public TreeNode? FindOccludeModelTriangleTreeNode(YmapOccludeModelTriangle tri) { - if (tri == null) return null; - TreeNode ymapnode = FindYmapTreeNode(tri.Ymap); - if (ymapnode == null) return null; + if (tri is null) + return null; + var ymapnode = FindYmapTreeNode(tri.Ymap); + if (ymapnode is null) + return null; var modelsnode = GetChildTreeNode(ymapnode, "OccludeModels"); - if (modelsnode == null) return null; + if (modelsnode is null) + return null; for (int i = 0; i < modelsnode.Nodes.Count; i++) { TreeNode modelnode = modelsnode.Nodes[i]; - if (modelnode.Tag == tri.Model) return modelnode; + if (modelnode.Tag == tri.Model) + return modelnode; } return null; } - public TreeNode FindGrassTreeNode(YmapGrassInstanceBatch batch) + public TreeNode? FindGrassTreeNode(YmapGrassInstanceBatch batch) { - if (batch == null) return null; - TreeNode ymapnode = FindYmapTreeNode(batch.Ymap); - if (ymapnode == null) return null; + if (batch is null) + return null; + var ymapnode = FindYmapTreeNode(batch.Ymap); + if (ymapnode is null) + return null; var batchnode = GetChildTreeNode(ymapnode, "GrassBatches"); - if (batchnode == null) return null; + if (batchnode is null) + return null; for (int i = 0; i < batchnode.Nodes.Count; i++) { TreeNode grassnode = batchnode.Nodes[i]; - if (grassnode.Tag == batch) return grassnode; + if (grassnode.Tag == batch) + return grassnode; } return null; } - public TreeNode FindYtypTreeNode(YtypFile ytyp) + public TreeNode? FindYtypTreeNode(YtypFile ytyp) { - if (ProjectTreeView.Nodes.Count <= 0) return null; + if (ProjectTreeView.Nodes.Count <= 0) + return null; + var projnode = ProjectTreeView.Nodes[0]; var ytypsnode = GetChildTreeNode(projnode, "Ytyp"); - if (ytypsnode == null) return null; + if (ytypsnode is null) + return null; + for (int i = 0; i < ytypsnode.Nodes.Count; i++) { var ytypnode = ytypsnode.Nodes[i]; - if (ytypnode.Tag == ytyp) return ytypnode; + if (ytypnode.Tag == ytyp) + return ytypnode; } return null; } - public TreeNode FindArchetypeTreeNode(Archetype archetype) + public TreeNode? FindArchetypeTreeNode(Archetype archetype) { - if (archetype == null) return null; + if (archetype is null) + return null; + var ytypnode = FindYtypTreeNode(archetype.Ytyp); - if (ytypnode == null) return null; + if (ytypnode is null) + return null; + var archetypenode = GetChildTreeNode(ytypnode, "Archetypes"); - if (archetypenode == null) return null; + if (archetypenode is null) + return null; + for (int i = 0; i < archetypenode.Nodes.Count; i++) { var archnode = archetypenode.Nodes[i]; - if (archnode.Tag == archetype) return archnode; + if (archnode.Tag == archetype) + return archnode; } return null; } - public TreeNode FindMloRoomTreeNode(MCMloRoomDef room) + public TreeNode? FindMloRoomTreeNode(MCMloRoomDef room) { - if (room == null) return null; + if (room is null) + return null; var mloarchetypenode = FindArchetypeTreeNode(room.OwnerMlo); - if (mloarchetypenode != null) + if (mloarchetypenode is not null) { var roomsnode = GetChildTreeNode(mloarchetypenode, "Rooms"); - if (roomsnode == null) return null; + if (roomsnode is null) + return null; for (int j = 0; j < roomsnode.Nodes.Count; j++) { var roomnode = roomsnode.Nodes[j]; - if (roomnode.Tag == room) return roomnode; + if (roomnode.Tag == room) + return roomnode; } } return null; } - public TreeNode FindMloPortalTreeNode(MCMloPortalDef portal) + public TreeNode? FindMloPortalTreeNode(MCMloPortalDef? portal) { - if (portal == null) return null; + if (portal is null) + return null; var mloarchetypenode = FindArchetypeTreeNode(portal.OwnerMlo); - if (mloarchetypenode != null) + if (mloarchetypenode is not null) { var portalsnode = GetChildTreeNode(mloarchetypenode, "Portals"); - if (portalsnode == null) return null; + if (portalsnode is null) + return null; for (int j = 0; j < portalsnode.Nodes.Count; j++) { var portalnode = portalsnode.Nodes[j]; - if (portalnode.Tag == portal) return portalnode; + if (portalnode.Tag == portal) + return portalnode; } } return null; } - public TreeNode FindMloEntitySetTreeNode(MCMloEntitySet entset) + public TreeNode? FindMloEntitySetTreeNode(MCMloEntitySet? entset) { - if (entset == null) return null; + if (entset is null) + return null; var mloarchetypenode = FindArchetypeTreeNode(entset.OwnerMlo); - if (mloarchetypenode != null) + if (mloarchetypenode is not null) { var entsetsnode = GetChildTreeNode(mloarchetypenode, "EntitySets"); - if (entsetsnode == null) return null; + if (entsetsnode is null) + return null; for (int j = 0; j < entsetsnode.Nodes.Count; j++) { var entsetnode = entsetsnode.Nodes[j]; - if (entsetnode.Tag == entset) return entsetnode; + if (entsetnode.Tag == entset) + return entsetnode; } } return null; } - public TreeNode FindMloEntityTreeNode(MCEntityDef ent) + public TreeNode? FindMloEntityTreeNode(MCEntityDef? ent) { - var entityroom = ent?.OwnerMlo?.GetEntityRoom(ent); - if (entityroom != null) + if (ent is null) + return null; + + var entityroom = ent.OwnerMlo?.GetEntityRoom(ent); + if (entityroom is not null) { var roomnode = FindMloRoomTreeNode(entityroom); - if (roomnode != null) + if (roomnode is not null) { for (var k = 0; k < roomnode.Nodes.Count; k++) { var entitynode = roomnode.Nodes[k]; - if (entitynode.Tag == ent) return entitynode; + if (entitynode.Tag == ent) + return entitynode; } } } - var entityportal = ent?.OwnerMlo?.GetEntityPortal(ent); - if (entityportal != null) + var entityportal = ent.OwnerMlo?.GetEntityPortal(ent); + if (entityportal is not null) { var portalnode = FindMloPortalTreeNode(entityportal); - if (portalnode != null) + if (portalnode is not null) { for (var k = 0; k < portalnode.Nodes.Count; k++) { var entitynode = portalnode.Nodes[k]; - if (entitynode.Tag == ent) return entitynode; + if (entitynode.Tag == ent) + return entitynode; } } } - var entityset = ent?.OwnerMlo?.GetEntitySet(ent); - if (entityset != null) + var entityset = ent.OwnerMlo?.GetEntitySet(ent); + if (entityset is not null) { var setnode = FindMloEntitySetTreeNode(entityset); - if (setnode != null) + if (setnode is not null) { for (var k = 0; k < setnode.Nodes.Count; k++) { var entitynode = setnode.Nodes[k]; - if (entitynode.Tag == ent) return entitynode; + if (entitynode.Tag == ent) + return entitynode; } } } return null; } - public TreeNode FindYbnTreeNode(YbnFile ybn) + public TreeNode? FindYbnTreeNode(YbnFile ybn) { - if (ProjectTreeView.Nodes.Count <= 0) return null; + if (ProjectTreeView.Nodes.Count <= 0) + return null; var projnode = ProjectTreeView.Nodes[0]; var ybnsnode = GetChildTreeNode(projnode, "Ybn"); - if (ybnsnode == null) return null; + if (ybnsnode == null) + return null; for (int i = 0; i < ybnsnode.Nodes.Count; i++) { var ybnnode = ybnsnode.Nodes[i]; - if (ybnnode.Tag == ybn) return ybnnode; + if (ybnnode.Tag == ybn) + return ybnnode; } return null; } - public TreeNode FindCollisionBoundsTreeNode(Bounds b) + public TreeNode? FindCollisionBoundsTreeNode(Bounds b) { - if (b == null) return null; + if (b == null) + return null; var bnode = (b.Parent != null) ? FindCollisionBoundsTreeNode(b.Parent) : FindYbnTreeNode(b.GetRootYbn()); - if (bnode == null) return null; + if (bnode == null) + return null; for (int i = 0; i < bnode.Nodes.Count; i++) { var nnode = bnode.Nodes[i]; - if (nnode.Tag == b) return nnode; + if (nnode.Tag == b) + return nnode; } return null; } - public TreeNode FindCollisionPolyTreeNode(BoundPolygon p) + public TreeNode? FindCollisionPolyTreeNode(BoundPolygon p) { - if (p == null) return null; + if (p == null) + return null; var ybnnode = FindCollisionBoundsTreeNode(p.Owner); var polynode = GetChildTreeNode(ybnnode, "EditPoly"); - if (polynode == null) return null; + if (polynode == null) + return null; polynode.Tag = p; return polynode; } - public TreeNode FindCollisionVertexTreeNode(BoundVertex v) + public TreeNode? FindCollisionVertexTreeNode(BoundVertex v) { - if (v == null) return null; + if (v == null) + return null; var ybnnode = FindCollisionBoundsTreeNode(v.Owner); var vertnode = GetChildTreeNode(ybnnode, "EditVertex"); - if (vertnode == null) return null; + if (vertnode == null) + return null; vertnode.Tag = v; return vertnode; } - public TreeNode FindYndTreeNode(YndFile ynd) + public TreeNode? FindYndTreeNode(YndFile ynd) { - if (ProjectTreeView.Nodes.Count <= 0) return null; + if (ProjectTreeView.Nodes.Count <= 0) + return null; var projnode = ProjectTreeView.Nodes[0]; var yndsnode = GetChildTreeNode(projnode, "Ynd"); - if (yndsnode == null) return null; + if (yndsnode == null) + return null; for (int i = 0; i < yndsnode.Nodes.Count; i++) { var yndnode = yndsnode.Nodes[i]; - if (yndnode.Tag == ynd) return yndnode; + if (yndnode.Tag == ynd) + return yndnode; } return null; } - public TreeNode FindPathNodeTreeNode(YndNode n) + public TreeNode? FindPathNodeTreeNode(YndNode n) { - if (n == null) return null; - TreeNode yndnode = FindYndTreeNode(n.Ynd); + if (n == null) + return null; + var yndnode = FindYndTreeNode(n.Ynd); var nodesnode = GetChildTreeNode(yndnode, "Nodes"); - if (nodesnode == null) return null; + if (nodesnode == null) + return null; for (int i = 0; i < nodesnode.Nodes.Count; i++) { TreeNode nnode = nodesnode.Nodes[i]; - if (nnode.Tag == n) return nnode; + if (nnode.Tag == n) + return nnode; } return null; } - public TreeNode FindYnvTreeNode(YnvFile ynv) + public TreeNode? FindYnvTreeNode(YnvFile ynv) { - if (ProjectTreeView.Nodes.Count <= 0) return null; + if (ProjectTreeView.Nodes.Count <= 0) + return null; var projnode = ProjectTreeView.Nodes[0]; var ynvsnode = GetChildTreeNode(projnode, "Ynv"); - if (ynvsnode == null) return null; + if (ynvsnode == null) + return null; for (int i = 0; i < ynvsnode.Nodes.Count; i++) { var yndnode = ynvsnode.Nodes[i]; - if (yndnode.Tag == ynv) return yndnode; + if (yndnode.Tag == ynv) + return yndnode; } return null; } - public TreeNode FindNavPolyTreeNode(YnvPoly p) + public TreeNode? FindNavPolyTreeNode(YnvPoly p) { - if (p == null) return null; - TreeNode ynvnode = FindYnvTreeNode(p.Ynv); + if (p == null) + return null; + var ynvnode = FindYnvTreeNode(p.Ynv); var polynode = GetChildTreeNode(ynvnode, "EditPoly"); - if (polynode == null) return null; + if (polynode == null) + return null; polynode.Tag = p; return polynode; } - public TreeNode FindNavPointTreeNode(YnvPoint p) + public TreeNode? FindNavPointTreeNode(YnvPoint p) { - if (p == null) return null; - TreeNode ynvnode = FindYnvTreeNode(p.Ynv); + if (p == null) + return null; + var ynvnode = FindYnvTreeNode(p.Ynv); var pointnode = GetChildTreeNode(ynvnode, "EditPoint"); - if (pointnode == null) return null; + if (pointnode == null) + return null; pointnode.Tag = p; return pointnode; //for (int i = 0; i < pointsnode.Nodes.Count; i++) @@ -1411,12 +1615,14 @@ namespace CodeWalker.Project.Panels //} //return null; } - public TreeNode FindNavPortalTreeNode(YnvPortal p) + public TreeNode? FindNavPortalTreeNode(YnvPortal p) { - if (p == null) return null; - TreeNode ynvnode = FindYnvTreeNode(p.Ynv); + if (p == null) + return null; + var ynvnode = FindYnvTreeNode(p.Ynv); var portalnode = GetChildTreeNode(ynvnode, "EditPortal"); - if (portalnode == null) return null; + if (portalnode == null) + return null; portalnode.Tag = p; return portalnode; //for (int i = 0; i < portalsnode.Nodes.Count; i++) @@ -1426,7 +1632,7 @@ namespace CodeWalker.Project.Panels //} //return null; } - public TreeNode FindTrainTrackTreeNode(TrainTrack track) + public TreeNode? FindTrainTrackTreeNode(TrainTrack track) { if (ProjectTreeView.Nodes.Count <= 0) return null; var projnode = ProjectTreeView.Nodes[0]; @@ -1439,7 +1645,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindTrainNodeTreeNode(TrainTrackNode n) + public TreeNode? FindTrainNodeTreeNode(TrainTrackNode n) { if (n == null) return null; TreeNode tracknode = FindTrainTrackTreeNode(n.Track); @@ -1452,7 +1658,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindScenarioTreeNode(YmtFile ymt) + public TreeNode? FindScenarioTreeNode(YmtFile ymt) { if (ProjectTreeView.Nodes.Count <= 0) return null; var projnode = ProjectTreeView.Nodes[0]; @@ -1465,7 +1671,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindScenarioNodeTreeNode(ScenarioNode p) + public TreeNode? FindScenarioNodeTreeNode(ScenarioNode p) { if (p == null) return null; TreeNode ymtnode = FindScenarioTreeNode(p.Ymt); @@ -1478,7 +1684,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioRelTreeNode(RelFile rel) + public TreeNode? FindAudioRelTreeNode(RelFile rel) { if (ProjectTreeView.Nodes.Count <= 0) return null; var projnode = ProjectTreeView.Nodes[0]; @@ -1491,7 +1697,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioZoneTreeNode(AudioPlacement zone) + public TreeNode? FindAudioZoneTreeNode(AudioPlacement zone) { if (zone == null) return null; TreeNode relnode = FindAudioRelTreeNode(zone.RelFile); @@ -1505,7 +1711,7 @@ namespace CodeWalker.Project.Panels } return zonenode; } - public TreeNode FindAudioEmitterTreeNode(AudioPlacement emitter) + public TreeNode? FindAudioEmitterTreeNode(AudioPlacement emitter) { if (emitter == null) return null; TreeNode relnode = FindAudioRelTreeNode(emitter.RelFile); @@ -1519,7 +1725,7 @@ namespace CodeWalker.Project.Panels } return zonenode; } - public TreeNode FindAudioZoneListTreeNode(Dat151AmbientZoneList list) + public TreeNode? FindAudioZoneListTreeNode(Dat151AmbientZoneList list) { if (list == null) return null; TreeNode relnode = FindAudioRelTreeNode(list.Rel); @@ -1532,7 +1738,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioEmitterListTreeNode(Dat151StaticEmitterList list) + public TreeNode? FindAudioEmitterListTreeNode(Dat151StaticEmitterList list) { if (list == null) return null; TreeNode relnode = FindAudioRelTreeNode(list.Rel); @@ -1545,7 +1751,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioInteriorTreeNode(Dat151Interior interior) + public TreeNode? FindAudioInteriorTreeNode(Dat151Interior interior) { if (interior == null) return null; TreeNode relnode = FindAudioRelTreeNode(interior.Rel); @@ -1558,7 +1764,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioInteriorRoomTreeNode(Dat151InteriorRoom room) + public TreeNode? FindAudioInteriorRoomTreeNode(Dat151InteriorRoom room) { if (room == null) return null; TreeNode relnode = FindAudioRelTreeNode(room.Rel); @@ -1582,7 +1788,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectYmapTreeNode(YmapFile ymap) { - TreeNode ymapnode = FindYmapTreeNode(ymap); + var ymapnode = FindYmapTreeNode(ymap); if (ymapnode != null) { if (ProjectTreeView.SelectedNode == ymapnode) @@ -1597,7 +1803,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectEntityTreeNode(YmapEntityDef ent) { - TreeNode entnode = FindEntityTreeNode(ent); + var entnode = FindEntityTreeNode(ent); if (entnode != null) { if (ProjectTreeView.SelectedNode == entnode) @@ -1612,7 +1818,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectCarGenTreeNode(YmapCarGen cargen) { - TreeNode cargennode = FindCarGenTreeNode(cargen); + var cargennode = FindCarGenTreeNode(cargen); if (cargennode != null) { if (ProjectTreeView.SelectedNode == cargennode) @@ -1627,7 +1833,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectLodLightTreeNode(YmapLODLight lodlight) { - TreeNode lodlightnode = FindLodLightTreeNode(lodlight); + var lodlightnode = FindLodLightTreeNode(lodlight); if (lodlightnode != null) { if (ProjectTreeView.SelectedNode == lodlightnode) @@ -1642,7 +1848,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectBoxOccluderTreeNode(YmapBoxOccluder box) { - TreeNode boxnode = FindBoxOccluderTreeNode(box); + var boxnode = FindBoxOccluderTreeNode(box); if (boxnode != null) { if (ProjectTreeView.SelectedNode == boxnode) @@ -1657,7 +1863,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectOccludeModelTreeNode(YmapOccludeModel model) { - TreeNode modelnode = FindOccludeModelTreeNode(model); + var modelnode = FindOccludeModelTreeNode(model); if (modelnode != null) { if (ProjectTreeView.SelectedNode == modelnode) @@ -1672,7 +1878,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectOccludeModelTriangleTreeNode(YmapOccludeModelTriangle tri) { - TreeNode trinode = FindOccludeModelTriangleTreeNode(tri); + var trinode = FindOccludeModelTriangleTreeNode(tri); if (trinode != null) { if (ProjectTreeView.SelectedNode == trinode) @@ -1689,7 +1895,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectGrassBatchTreeNode(YmapGrassInstanceBatch grassBatch) { - TreeNode grassNode = FindGrassTreeNode(grassBatch); + var grassNode = FindGrassTreeNode(grassBatch); if (grassNode != null) { if (ProjectTreeView.SelectedNode == grassNode) @@ -1704,7 +1910,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectMloEntityTreeNode(MCEntityDef ent) { - TreeNode entnode = FindMloEntityTreeNode(ent); + var entnode = FindMloEntityTreeNode(ent); if (entnode != null) { if (ProjectTreeView.SelectedNode == entnode) @@ -1719,7 +1925,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectMloRoomTreeNode(MCMloRoomDef room) { - TreeNode roomnode = FindMloRoomTreeNode(room); + var roomnode = FindMloRoomTreeNode(room); if (roomnode != null) { if (ProjectTreeView.SelectedNode == roomnode) @@ -1734,7 +1940,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectMloPortalTreeNode(MCMloPortalDef portal) { - TreeNode portalnode = FindMloPortalTreeNode(portal); + var portalnode = FindMloPortalTreeNode(portal); if (portalnode != null) { if (ProjectTreeView.SelectedNode == portalnode) @@ -1749,7 +1955,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectMloEntitySetTreeNode(MCMloEntitySet set) { - TreeNode setnode = FindMloEntitySetTreeNode(set); + var setnode = FindMloEntitySetTreeNode(set); if (setnode != null) { if (ProjectTreeView.SelectedNode == setnode) @@ -1764,7 +1970,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectArchetypeTreeNode(Archetype archetype) { - TreeNode archetypenode = FindArchetypeTreeNode(archetype); + var archetypenode = FindArchetypeTreeNode(archetype); if (archetypenode != null) { if (ProjectTreeView.SelectedNode == archetypenode) @@ -1779,7 +1985,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectCollisionBoundsTreeNode(Bounds bounds) { - TreeNode tnode = FindCollisionBoundsTreeNode(bounds); + var tnode = FindCollisionBoundsTreeNode(bounds); if (tnode == null) { tnode = FindYbnTreeNode(bounds?.GetRootYbn()); @@ -1798,7 +2004,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectCollisionPolyTreeNode(BoundPolygon poly) { - TreeNode tnode = FindCollisionPolyTreeNode(poly); + var tnode = FindCollisionPolyTreeNode(poly); if (tnode == null) { tnode = FindCollisionBoundsTreeNode(poly?.Owner); @@ -1821,7 +2027,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectCollisionVertexTreeNode(BoundVertex vert) { - TreeNode tnode = FindCollisionVertexTreeNode(vert); + var tnode = FindCollisionVertexTreeNode(vert); if (tnode == null) { tnode = FindCollisionBoundsTreeNode(vert?.Owner); @@ -1844,7 +2050,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectPathNodeTreeNode(YndNode node) { - TreeNode tnode = FindPathNodeTreeNode(node); + var tnode = FindPathNodeTreeNode(node); if (tnode == null) { tnode = FindYndTreeNode(node?.Ynd); @@ -1863,7 +2069,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectNavPolyTreeNode(YnvPoly poly) { - TreeNode tnode = FindNavPolyTreeNode(poly); + var tnode = FindNavPolyTreeNode(poly); if (tnode == null) { tnode = FindYnvTreeNode(poly?.Ynv); @@ -1882,7 +2088,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectNavPointTreeNode(YnvPoint point) { - TreeNode tnode = FindNavPointTreeNode(point); + var tnode = FindNavPointTreeNode(point); if (tnode == null) { tnode = FindYnvTreeNode(point?.Ynv); @@ -1901,7 +2107,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectNavPortalTreeNode(YnvPortal portal) { - TreeNode tnode = FindNavPortalTreeNode(portal); + var tnode = FindNavPortalTreeNode(portal); if (tnode == null) { tnode = FindYnvTreeNode(portal?.Ynv); @@ -1920,7 +2126,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectTrainNodeTreeNode(TrainTrackNode node) { - TreeNode tnode = FindTrainNodeTreeNode(node); + var tnode = FindTrainNodeTreeNode(node); if (tnode == null) { tnode = FindTrainTrackTreeNode(node?.Track); @@ -1939,7 +2145,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectScenarioTreeNode(YmtFile scenario) { - TreeNode tnode = FindScenarioTreeNode(scenario); + var tnode = FindScenarioTreeNode(scenario); if (tnode != null) { if (ProjectTreeView.SelectedNode == tnode) @@ -1954,7 +2160,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectScenarioNodeTreeNode(ScenarioNode node) { - TreeNode tnode = FindScenarioNodeTreeNode(node); + var tnode = FindScenarioNodeTreeNode(node); if (tnode == null) { tnode = FindScenarioTreeNode(node?.Ymt); @@ -1973,7 +2179,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioRelTreeNode(RelFile rel) { - TreeNode tnode = FindAudioRelTreeNode(rel); + var tnode = FindAudioRelTreeNode(rel); if (tnode != null) { if (ProjectTreeView.SelectedNode == tnode) @@ -1988,7 +2194,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioZoneTreeNode(AudioPlacement zone) { - TreeNode tnode = FindAudioZoneTreeNode(zone); + var tnode = FindAudioZoneTreeNode(zone); if (tnode == null) { tnode = FindAudioRelTreeNode(zone?.RelFile); @@ -2007,7 +2213,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioEmitterTreeNode(AudioPlacement emitter) { - TreeNode tnode = FindAudioEmitterTreeNode(emitter); + var tnode = FindAudioEmitterTreeNode(emitter); if (tnode == null) { tnode = FindAudioRelTreeNode(emitter?.RelFile); @@ -2026,7 +2232,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioZoneListTreeNode(Dat151AmbientZoneList list) { - TreeNode tnode = FindAudioZoneListTreeNode(list); + var tnode = FindAudioZoneListTreeNode(list); if (tnode == null) { tnode = FindAudioRelTreeNode(list?.Rel); @@ -2045,7 +2251,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioEmitterListTreeNode(Dat151StaticEmitterList list) { - TreeNode tnode = FindAudioEmitterListTreeNode(list); + var tnode = FindAudioEmitterListTreeNode(list); if (tnode == null) { tnode = FindAudioRelTreeNode(list?.Rel); @@ -2064,7 +2270,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioInteriorTreeNode(Dat151Interior interior) { - TreeNode tnode = FindAudioInteriorTreeNode(interior); + var tnode = FindAudioInteriorTreeNode(interior); if (tnode == null) { tnode = FindAudioRelTreeNode(interior?.Rel); @@ -2083,7 +2289,7 @@ namespace CodeWalker.Project.Panels } public void TrySelectAudioInteriorRoomTreeNode(Dat151InteriorRoom room) { - TreeNode tnode = FindAudioInteriorRoomTreeNode(room); + var tnode = FindAudioInteriorRoomTreeNode(room); if (tnode == null) { tnode = FindAudioRelTreeNode(room?.Rel); @@ -2104,11 +2310,12 @@ namespace CodeWalker.Project.Panels - public void UpdateYmapTreeNode(YmapFile ymap) + public async ValueTask UpdateYmapTreeNode(YmapFile ymap) { var tn = FindYmapTreeNode(ymap); if (tn != null) { + await this.SwitchToUi(); tn.Text = ymap.RpfFileEntry?.Name ?? ymap.Name; } } @@ -2117,7 +2324,10 @@ namespace CodeWalker.Project.Panels var tn = FindYtypTreeNode(ytyp); if (tn != null) { - tn.Text = ytyp.RpfFileEntry?.Name ?? ytyp.Name; + this.InvokeIfRequired(() => + { + tn.Text = ytyp.RpfFileEntry?.Name ?? ytyp.Name; + }); } } public void UpdateYbnTreeNode(YbnFile ybn) @@ -2125,7 +2335,10 @@ namespace CodeWalker.Project.Panels var tn = FindYbnTreeNode(ybn); if (tn != null) { - tn.Text = ybn.RpfFileEntry?.Name ?? ybn.Name; + this.InvokeIfRequired(() => + { + tn.Text = ybn.RpfFileEntry?.Name ?? ybn.Name; + }); } } public void UpdateYndTreeNode(YndFile ynd) @@ -2133,66 +2346,65 @@ namespace CodeWalker.Project.Panels var tn = FindYndTreeNode(ynd); if (tn != null) { - tn.Text = ynd.RpfFileEntry?.Name ?? ynd.Name; + this.InvokeIfRequired(() => + { + tn.Text = ynd.RpfFileEntry?.Name ?? ynd.Name; + }); } } - public void UpdateYnvTreeNode(YnvFile ynv) + public async ValueTask UpdateYnvTreeNode(YnvFile ynv) { var tn = FindYnvTreeNode(ynv); if (tn != null) { + await this.SwitchToUi(); tn.Text = ynv.RpfFileEntry?.Name ?? ynv.Name; } } - public void UpdateTrainTrackTreeNode(TrainTrack track) + public async ValueTask UpdateTrainTrackTreeNode(TrainTrack track) { var tn = FindTrainTrackTreeNode(track); if (tn != null) { + await this.SwitchToUi(); tn.Text = track.RpfFileEntry?.Name ?? track.Name; } } - public void UpdateScenarioTreeNode(YmtFile scenarios) + public async ValueTask UpdateScenarioTreeNode(YmtFile scenarios) { var tn = FindScenarioTreeNode(scenarios); if (tn != null) { + await this.SwitchToUi(); tn.Text = scenarios.RpfFileEntry?.Name ?? scenarios.Name; } } - public void UpdateAudioRelTreeNode(RelFile rel) + public async ValueTask UpdateAudioRelTreeNode(RelFile rel) { var tn = FindAudioRelTreeNode(rel); if (tn != null) { + await this.SwitchToUi(); tn.Text = rel.RpfFileEntry?.Name ?? rel.Name; } } - public void UpdateArchetypeTreeNode(Archetype archetype) + public async ValueTask UpdateArchetypeTreeNode(Archetype archetype) { var tn = FindArchetypeTreeNode(archetype); if (tn != null) { + await this.SwitchToUi(); tn.Text = archetype._BaseArchetypeDef.ToString(); } } public void UpdateEntityTreeNode(YmapEntityDef ent) { - if (ent == null) return; - var tn = FindEntityTreeNode(ent); - var name = ent.CEntityDef.archetypeName.ToString(); - if (tn != null) + if (ent == null) + return; + this.InvokeIfRequired(() => { - if (ProjectForm.displayentityindexes) - tn.Text = $"[{tn.Index}] {name}"; - else - tn.Text = name; - } - else - { - var instance = ent.MloParent?.MloInstance; - var mcent = instance?.TryGetArchetypeEntity(ent); - tn = FindMloEntityTreeNode(mcent); + var tn = FindEntityTreeNode(ent); + var name = ent.CEntityDef.archetypeName.ToString(); if (tn != null) { if (ProjectForm.displayentityindexes) @@ -2200,77 +2412,111 @@ namespace CodeWalker.Project.Panels else tn.Text = name; } - } + else + { + var instance = ent.MloParent?.MloInstance; + var mcent = instance?.TryGetArchetypeEntity(ent); + tn = FindMloEntityTreeNode(mcent); + if (tn != null) + { + if (ProjectForm.displayentityindexes) + tn.Text = $"[{tn.Index}] {name}"; + else + tn.Text = name; + } + } + }); } + + public void UpdateTreeNodeText(TreeNode node, string text) + { + if (InvokeRequired) + { + BeginInvoke(UpdateTreeNodeText, node, text); + return; + } + + node.Text = text; + } + public void UpdateCarGenTreeNode(YmapCarGen cargen) { var tn = FindCarGenTreeNode(cargen); - if (tn != null) + if (tn is not null) { - tn.Text = cargen.ToString(); + UpdateTreeNodeText(tn, cargen.ToString()); } } + public void UpdateLodLightTreeNode(YmapLODLight lodlight) { var tn = FindLodLightTreeNode(lodlight); - if (tn != null) + if (tn is not null) { - tn.Text = lodlight.ToString(); + UpdateTreeNodeText(tn, lodlight.ToString()); } } + public void UpdateBoxOccluderTreeNode(YmapBoxOccluder box) { var tn = FindBoxOccluderTreeNode(box); - if (tn != null) + if (tn is not null) { - tn.Text = box.ToString(); + UpdateTreeNodeText(tn, box.ToString()); } } + public void UpdateOccludeModelTreeNode(YmapOccludeModel model) { var tn = FindOccludeModelTreeNode(model); - if (tn != null) + if (tn is not null) { - tn.Text = model.ToString(); + UpdateTreeNodeText(tn, model.ToString()); } } + public void UpdatePathNodeTreeNode(YndNode node) { var tn = FindPathNodeTreeNode(node); - if (tn != null) + if (tn is not null) { - tn.Text = node._RawData.ToString(); + this.InvokeIfRequired(() => + { + tn.Text = node._RawData.ToString(); + }); } } + public void UpdateNavPolyTreeNode(YnvPoly poly) { var tn = FindNavPolyTreeNode(poly); - if (tn != null) + if (tn is not null) { } } + public void UpdateTrainNodeTreeNode(TrainTrackNode node) { var tn = FindTrainNodeTreeNode(node); - if (tn != null) + if (tn is not null) { - tn.Text = node.ToString(); + UpdateTreeNodeText(tn, node.ToString()); } } public void UpdateScenarioNodeTreeNode(ScenarioNode node) { var tn = FindScenarioNodeTreeNode(node); - if (tn != null) + if (tn is not null) { - tn.Text = node.MedTypeName + ": " + node.StringText; + UpdateTreeNodeText(tn, $"{node.MedTypeName}: {node.StringText}"); } } public void UpdateAudioZoneTreeNode(AudioPlacement zone) { var tn = FindAudioZoneTreeNode(zone); - if (tn != null) + if (tn is not null) { - tn.Text = zone.NameHash.ToString(); + UpdateTreeNodeText(tn, zone.NameHash.ToString()); } } public void UpdateAudioEmitterTreeNode(AudioPlacement emitter) @@ -2278,7 +2524,7 @@ namespace CodeWalker.Project.Panels var tn = FindAudioEmitterTreeNode(emitter); if (tn != null) { - tn.Text = emitter.NameHash.ToString(); + UpdateTreeNodeText(tn, emitter.NameHash.ToString()); } } public void UpdateAudioZoneListTreeNode(Dat151AmbientZoneList list) @@ -2286,7 +2532,7 @@ namespace CodeWalker.Project.Panels var tn = FindAudioZoneListTreeNode(list); if (tn != null) { - tn.Text = list.NameHash.ToString(); + UpdateTreeNodeText(tn, list.NameHash.ToString()); } } public void UpdateAudioEmitterListTreeNode(Dat151StaticEmitterList list) @@ -2294,7 +2540,7 @@ namespace CodeWalker.Project.Panels var tn = FindAudioEmitterListTreeNode(list); if (tn != null) { - tn.Text = list.NameHash.ToString(); + UpdateTreeNodeText(tn, list.NameHash.ToString()); } } public void UpdateAudioInteriorTreeNode(Dat151Interior interior) @@ -2302,7 +2548,7 @@ namespace CodeWalker.Project.Panels var tn = FindAudioInteriorTreeNode(interior); if (tn != null) { - tn.Text = interior.NameHash.ToString(); + UpdateTreeNodeText(tn, interior.NameHash.ToString()); } } public void UpdateAudioInteriorRoomTreeNode(Dat151InteriorRoom room) @@ -2310,81 +2556,91 @@ namespace CodeWalker.Project.Panels var tn = FindAudioInteriorRoomTreeNode(room); if (tn != null) { - tn.Text = room.NameHash.ToString(); + UpdateTreeNodeText(tn, room.NameHash.ToString()); } } - - public void RemoveEntityTreeNode(YmapEntityDef ent) { var tn = FindEntityTreeNode(ent); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Entities (" + ent.Ymap.AllEntities.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); + this.InvokeIfRequired(() => + { + tn.Parent.Text = $"Entities ({ent.Ymap.AllEntities.Length})"; + tn.Parent.Nodes.Remove(tn); + }); } } public void RemoveCarGenTreeNode(YmapCarGen cargen) { var tn = FindCarGenTreeNode(cargen); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent != null) { - tn.Parent.Text = "Car Generators (" + cargen.Ymap.CarGenerators.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); + this.InvokeIfRequired(() => + { + tn.Parent.Text = $"Car Generators ({cargen.Ymap.CarGenerators.Length})"; + tn.Parent.Nodes.Remove(tn); + }); } } public void RemoveLodLightTreeNode(YmapLODLight lodlight) { var lodlights = lodlight?.LodLights?.LodLights; var tn = FindLodLightTreeNode(lodlight); - if ((tn != null) && (tn.Parent != null) && (lodlights != null)) + if (tn?.Parent != null && lodlights is not null && lodlights.Length > 0) { - var pn = tn.Parent; - var yn = pn.Parent; - yn.Nodes.Remove(pn); - pn = yn.Nodes.Add("LOD Lights (" + (lodlights?.Length.ToString() ?? "0") + ")"); - pn.Name = "LodLights"; - pn.Tag = lodlight.LodLights.Ymap; - foreach (var ll in lodlights) + this.InvokeIfRequired(() => { - var ntn = pn.Nodes.Add(ll.ToString()); - ntn.Tag = ll; - } + var pn = tn.Parent; + var yn = pn.Parent; + yn.Nodes.Remove(pn); + pn = yn.Nodes.Add($"LOD Lights ({lodlights.Length})"); + pn.Name = "LodLights"; + pn.Tag = lodlight.LodLights.Ymap; + foreach (var ll in lodlights) + { + var ntn = pn.Nodes.Add(ll.ToString()); + ntn.Tag = ll; + } + }); } } public void RemoveBoxOccluderTreeNode(YmapBoxOccluder box) { var ymap = box?.Ymap; var tn = FindBoxOccluderTreeNode(box); - if ((tn != null) && (tn.Parent != null) && (box != null)) + if (tn?.Parent != null && box != null) { - var pn = tn.Parent; - var yn = pn.Parent; - yn.Nodes.Remove(pn); - pn = yn.Nodes.Add("Box Occluders (" + (ymap?.BoxOccluders?.Length.ToString() ?? "0") + ")"); - pn.Name = "BoxOccluders"; - pn.Tag = ymap; - if (ymap.BoxOccluders != null) + this.InvokeIfRequired(() => { - foreach (var b in ymap.BoxOccluders) + var pn = tn.Parent; + var yn = pn.Parent; + yn.Nodes.Remove(pn); + pn = yn.Nodes.Add($"Box Occluders ({ymap?.BoxOccluders?.Length ?? 0})"); + pn.Name = "BoxOccluders"; + pn.Tag = ymap; + if (ymap.BoxOccluders != null) { - var ntn = pn.Nodes.Add(b.ToString()); - ntn.Tag = b; + foreach (var b in ymap.BoxOccluders) + { + var ntn = pn.Nodes.Add(b.ToString()); + ntn.Tag = b; + } } - } + }); } } public void RemoveOccludeModelTreeNode(YmapOccludeModel model) { - var ymap = model?.Ymap; + var ymap = model.Ymap; var tn = FindOccludeModelTreeNode(model); - if ((tn != null) && (tn.Parent != null) && (model != null)) + if (tn?.Parent is not null && model is not null) { var pn = tn.Parent; var yn = pn.Parent; yn.Nodes.Remove(pn); - pn = yn.Nodes.Add("Occlude Models (" + (ymap?.OccludeModels?.Length.ToString() ?? "0") + ")"); + pn = yn.Nodes.Add($"Occlude Models ({ymap?.OccludeModels?.Length ?? 0})"); pn.Name = "OccludeModels"; pn.Tag = ymap; if (ymap.OccludeModels != null) @@ -2400,27 +2656,36 @@ namespace CodeWalker.Project.Panels public void RemoveGrassBatchTreeNode(YmapGrassInstanceBatch batch) { var tn = FindGrassTreeNode(batch); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Grass Batches (" + batch.Ymap.GrassInstanceBatches.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); + this.InvokeIfRequired(() => + { + tn.Parent.Text = $"Grass Batches ({batch.Ymap.GrassInstanceBatches.Length})"; + tn.Parent.Nodes.Remove(tn); + }); } } public void RemoveArchetypeTreeNode(Archetype archetype) { var tn = FindArchetypeTreeNode(archetype); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Archetypes (" + archetype.Ytyp.AllArchetypes.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); + this.InvokeIfRequired(() => + { + tn.Parent.Text = $"Archetypes ({archetype.Ytyp.AllArchetypes.Length})"; + tn.Parent.Nodes.Remove(tn); + }); } } public void RemoveMloEntityTreeNode(MCEntityDef ent) { var tn = FindMloEntityTreeNode(ent); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Nodes.Remove(tn); + this.InvokeIfRequired(() => + { + tn.Parent.Nodes.Remove(tn); + }); } } public void RemoveMloRoomTreeNode(MCMloRoomDef room) @@ -2428,7 +2693,7 @@ namespace CodeWalker.Project.Panels var tn = FindMloRoomTreeNode(room); if ((tn != null) && (tn.Parent != null)) { - tn.Parent.Text = "Rooms (" + (room.OwnerMlo?.rooms?.Length.ToString() ?? "0") + ")"; + tn.Parent.Text = $"Rooms ({room.OwnerMlo?.rooms?.Length ?? 0})"; tn.Parent.Nodes.Remove(tn); } } @@ -2437,23 +2702,23 @@ namespace CodeWalker.Project.Panels var tn = FindMloPortalTreeNode(portal); if ((tn != null) && (tn.Parent != null)) { - tn.Parent.Text = "Portals (" + (portal.OwnerMlo?.portals?.Length.ToString() ?? "0") + ")"; + tn.Parent.Text = $"Portals ({portal.OwnerMlo?.portals?.Length ?? 0})"; tn.Parent.Nodes.Remove(tn); } } public void RemoveMloEntitySetTreeNode(MCMloEntitySet set) { var tn = FindMloEntitySetTreeNode(set); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Entity Sets (" + (set.OwnerMlo?.entitySets?.Length.ToString() ?? "0") + ")"; + tn.Parent.Text = $"Entity Sets ({set.OwnerMlo?.entitySets?.Length ?? 0})"; tn.Parent.Nodes.Remove(tn); } } public void RemoveCollisionBoundsTreeNode(Bounds bounds) { var tn = FindCollisionBoundsTreeNode(bounds); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { tn.Parent.Nodes.Remove(tn); } @@ -2461,27 +2726,27 @@ namespace CodeWalker.Project.Panels public void RemovePathNodeTreeNode(YndNode node) { var tn = FindPathNodeTreeNode(node); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Nodes (" + node.Ynd.Nodes.Length.ToString() + ")"; + tn.Parent.Text = $"Nodes ({node.Ynd.Nodes.Length})"; tn.Parent.Nodes.Remove(tn); } } public void RemoveTrainNodeTreeNode(TrainTrackNode node) { var tn = FindTrainNodeTreeNode(node); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Nodes (" + node.Track.Nodes.Count.ToString() + ")"; + tn.Parent.Text = $"Nodes ({node.Track?.Nodes.Count ?? 0})"; tn.Parent.Nodes.Remove(tn); } } public void RemoveScenarioNodeTreeNode(ScenarioNode node) { var tn = FindScenarioNodeTreeNode(node); - if ((tn != null) && (tn.Parent != null)) + if (tn?.Parent is not null) { - tn.Parent.Text = "Points (" + (node.Ymt?.ScenarioRegion?.Nodes?.Count ?? 0).ToString() + ")"; + tn.Parent.Text = $"Points ({node.Ymt?.ScenarioRegion?.Nodes?.Count ?? 0})"; tn.Parent.Nodes.Remove(tn); } } @@ -2499,7 +2764,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Ambient Zones (" + zones.Count.ToString() + ")"; + tn.Parent.Text = $"Ambient Zones ({zones.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2517,7 +2782,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Ambient Emitters (" + emitters.Count.ToString() + ")"; + tn.Parent.Text = $"Ambient Emitters ({emitters.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2535,7 +2800,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Ambient Zone Lists (" + zonelists.Count.ToString() + ")"; + tn.Parent.Text = $"Ambient Zone Lists ({zonelists.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2553,7 +2818,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Ambient Emitter Lists (" + emitterlists.Count.ToString() + ")"; + tn.Parent.Text = $"Ambient Emitter Lists ({emitterlists.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2571,7 +2836,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Interiors (" + interiors.Count.ToString() + ")"; + tn.Parent.Text = $"Interiors ({interiors.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2589,7 +2854,7 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Interior Rooms (" + interiors.Count.ToString() + ")"; + tn.Parent.Text = $"Interior Rooms ({interiors.Count})"; tn.Parent.Nodes.Remove(tn); } } @@ -2715,10 +2980,10 @@ namespace CodeWalker.Project.Panels e.Effect = DragDropEffects.All; } - private void ProjectTreeView_DragDrop(object sender, DragEventArgs e) + private async void ProjectTreeView_DragDrop(object sender, DragEventArgs e) { string[] files = (string[]) e.Data.GetData(DataFormats.FileDrop); - ProjectForm.OpenFiles(files); + await ProjectForm.OpenFiles(files); } diff --git a/CodeWalker/Project/ProjectFile.cs b/CodeWalker/Project/ProjectFile.cs index 8f40fb7..bfda9c3 100644 --- a/CodeWalker/Project/ProjectFile.cs +++ b/CodeWalker/Project/ProjectFile.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using System.Xml; @@ -15,36 +16,36 @@ namespace CodeWalker.Project //fields stored in file public string Name { get; set; } //friendly name for this project public int Version { get; set; } - public List YmapFilenames { get; set; } = new List(); - public List YtypFilenames { get; set; } = new List(); - public List YbnFilenames { get; set; } = new List(); - public List YndFilenames { get; set; } = new List(); - public List YnvFilenames { get; set; } = new List(); - public List TrainsFilenames { get; set; } = new List(); - public List ScenarioFilenames { get; set; } = new List(); - public List AudioRelFilenames { get; set; } = new List(); - public List YdrFilenames { get; set; } = new List(); - public List YddFilenames { get; set; } = new List(); - public List YftFilenames { get; set; } = new List(); - public List YtdFilenames { get; set; } = new List(); + public HashSet YmapFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YtypFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YbnFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YndFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YnvFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet TrainsFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet ScenarioFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet AudioRelFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YdrFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YddFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YftFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public HashSet YtdFilenames { get; set; } = new HashSet(StringComparer.InvariantCultureIgnoreCase); //fields not stored public string Filename { get; set; } //filename without path public string Filepath { get; set; } //full path of the current file public bool HasChanged { get; set; } //flag for use by the UI - public List YmapFiles { get; set; } = new List(); - public List YtypFiles { get; set; } = new List(); - public List YbnFiles { get; set; } = new List(); - public List YndFiles { get; set; } = new List(); - public List YnvFiles { get; set; } = new List(); - public List TrainsFiles { get; set; } = new List(); - public List ScenarioFiles { get; set; } = new List(); - public List AudioRelFiles { get; set; } = new List(); - public List YdrFiles { get; set; } = new List(); - public List YddFiles { get; set; } = new List(); - public List YftFiles { get; set; } = new List(); - public List YtdFiles { get; set; } = new List(); + public List YmapFiles { get; } = new List(); + public List YtypFiles { get; } = new List(); + public List YbnFiles { get; } = new List(); + public List YndFiles { get; } = new List(); + public List YnvFiles { get; } = new List(); + public List TrainsFiles { get; } = new List(); + public List ScenarioFiles { get; } = new List(); + public List AudioRelFiles { get; } = new List(); + public List YdrFiles { get; } = new List(); + public List YddFiles { get; } = new List(); + public List YftFiles { get; } = new List(); + public List YtdFiles { get; } = new List(); @@ -149,12 +150,12 @@ namespace CodeWalker.Project YmapFilenames.Clear(); YmapFiles.Clear(); var ymapselem = Xml.GetChild(projelem, "YmapFilenames"); - if (ymapselem != null) + var ymapItems = ymapselem?.SelectNodes("Item"); + if (ymapItems is not null) { - foreach (var node in ymapselem.SelectNodes("Item")) + foreach (var node in ymapItems) { - XmlElement ymapel = node as XmlElement; - if (ymapel != null) + if (node is XmlElement ymapel) { AddYmapFile(ymapel.InnerText); } @@ -164,13 +165,13 @@ namespace CodeWalker.Project YtypFilenames.Clear(); YtypFiles.Clear(); - var ytypselem = Xml.GetChild(projelem, "YtypFilenames"); - if (ytypselem != null) + var ytypItems = Xml.GetChild(projelem, "YtypFilenames") + ?.SelectNodes("Item"); + if (ytypItems is not null) { - foreach (var node in ytypselem.SelectNodes("Item")) + foreach (var node in ytypItems) { - XmlElement ytypel = node as XmlElement; - if (ytypel != null) + if (node is XmlElement ytypel) { AddYtypFile(ytypel.InnerText); } @@ -180,13 +181,15 @@ namespace CodeWalker.Project YbnFilenames.Clear(); YbnFiles.Clear(); - var ybnselem = Xml.GetChild(projelem, "YbnFilenames"); - if (ybnselem != null) + + var ybnItems = Xml.GetChild(projelem, "YbnFilenames") + ?.SelectNodes("Item"); + + if (ybnItems is not null) { - foreach (var node in ybnselem.SelectNodes("Item")) + foreach (var node in ybnItems) { - XmlElement ybnel = node as XmlElement; - if (ybnel != null) + if (node is XmlElement ybnel) { AddYbnFile(ybnel.InnerText); } @@ -196,13 +199,14 @@ namespace CodeWalker.Project YndFilenames.Clear(); YndFiles.Clear(); - var yndselem = Xml.GetChild(projelem, "YndFilenames"); - if (yndselem != null) + var yndItems = Xml.GetChild(projelem, "YndFilenames") + ?.SelectNodes("Item"); + + if (yndItems is not null) { - foreach (var node in yndselem.SelectNodes("Item")) + foreach (var node in yndItems) { - XmlElement yndel = node as XmlElement; - if (yndel != null) + if (node is XmlElement yndel) { AddYndFile(yndel.InnerText); } @@ -213,13 +217,13 @@ namespace CodeWalker.Project YnvFilenames.Clear(); YnvFiles.Clear(); - var ynvselem = Xml.GetChild(projelem, "YnvFilenames"); - if (ynvselem != null) + var ynvItems = Xml.GetChild(projelem, "YnvFilenames") + ?.SelectNodes("Item"); + if (ynvItems is not null) { - foreach (var node in ynvselem.SelectNodes("Item")) + foreach (var node in ynvItems) { - XmlElement ynvel = node as XmlElement; - if (ynvel != null) + if (node is XmlElement ynvel) { AddYnvFile(ynvel.InnerText); } @@ -229,13 +233,13 @@ namespace CodeWalker.Project TrainsFilenames.Clear(); TrainsFiles.Clear(); - var trainsselem = Xml.GetChild(projelem, "TrainsFilenames"); - if (trainsselem != null) + var trainItems = Xml.GetChild(projelem, "TrainsFilenames") + ?.SelectNodes("Item"); + if (trainItems is not null) { - foreach (var node in trainsselem.SelectNodes("Item")) + foreach (var node in trainItems) { - XmlElement trainel = node as XmlElement; - if (trainel != null) + if (node is XmlElement trainel) { AddTrainsFile(trainel.InnerText); } @@ -246,13 +250,13 @@ namespace CodeWalker.Project ScenarioFilenames.Clear(); ScenarioFiles.Clear(); - var scenarioselem = Xml.GetChild(projelem, "ScenarioFilenames"); - if (scenarioselem != null) + var scenarioItems = Xml.GetChild(projelem, "ScenarioFilenames") + ?.SelectNodes("Item"); + if (scenarioItems is not null) { - foreach (var node in scenarioselem.SelectNodes("Item")) + foreach (var node in scenarioItems) { - XmlElement scenarioel = node as XmlElement; - if (scenarioel != null) + if (node is XmlElement scenarioel) { AddScenarioFile(scenarioel.InnerText); } @@ -263,13 +267,13 @@ namespace CodeWalker.Project AudioRelFilenames.Clear(); AudioRelFiles.Clear(); - var audiorelselem = Xml.GetChild(projelem, "AudioRelFilenames"); - if (audiorelselem != null) + var audiorelItems = Xml.GetChild(projelem, "AudioRelFilenames") + ?.SelectNodes("Item"); + if (audiorelItems is not null) { - foreach (var node in audiorelselem.SelectNodes("Item")) + foreach (var node in audiorelItems) { - XmlElement audiorelel = node as XmlElement; - if (audiorelel != null) + if (node is XmlElement audiorelel) { AddAudioRelFile(audiorelel.InnerText); } @@ -279,13 +283,13 @@ namespace CodeWalker.Project YdrFilenames.Clear(); YdrFiles.Clear(); - var ydrselem = Xml.GetChild(projelem, "YdrFilenames"); - if (ydrselem != null) + var ydrItems = Xml.GetChild(projelem, "YdrFilenames") + ?.SelectNodes("Item"); + if (ydrItems is not null) { - foreach (var node in ydrselem.SelectNodes("Item")) + foreach (var node in ydrItems) { - XmlElement ydrel = node as XmlElement; - if (ydrel != null) + if (node is XmlElement ydrel) { AddYdrFile(ydrel.InnerText); } @@ -295,13 +299,13 @@ namespace CodeWalker.Project YddFilenames.Clear(); YddFiles.Clear(); - var yddselem = Xml.GetChild(projelem, "YddFilenames"); - if (yddselem != null) + var yddItems = Xml.GetChild(projelem, "YddFilenames") + ?.SelectNodes("Item"); + if (yddItems is not null) { - foreach (var node in yddselem.SelectNodes("Item")) + foreach (var node in yddItems) { - XmlElement yddel = node as XmlElement; - if (yddel != null) + if (node is XmlElement yddel) { AddYddFile(yddel.InnerText); } @@ -311,13 +315,13 @@ namespace CodeWalker.Project YftFilenames.Clear(); YftFiles.Clear(); - var yftselem = Xml.GetChild(projelem, "YftFilenames"); - if (yftselem != null) + var yftItems = Xml.GetChild(projelem, "YftFilenames") + ?.SelectNodes("Item"); + if (yftItems is not null) { - foreach (var node in yftselem.SelectNodes("Item")) + foreach (var node in yftItems) { - XmlElement yftel = node as XmlElement; - if (yftel != null) + if (node is XmlElement yftel) { AddYftFile(yftel.InnerText); } @@ -327,84 +331,83 @@ namespace CodeWalker.Project YtdFilenames.Clear(); YtdFiles.Clear(); - var ytdselem = Xml.GetChild(projelem, "YtdFilenames"); - if (ytdselem != null) + var ytdItems = Xml.GetChild(projelem, "YtdFilenames") + ?.SelectNodes("Item"); + if (ytdItems is not null) { - foreach (var node in ytdselem.SelectNodes("Item")) + foreach (var node in ytdItems) { - XmlElement ytdel = node as XmlElement; - if (ytdel != null) + if (node is XmlElement ytdel) { AddYtdFile(ytdel.InnerText); } } } - } public void UpdateFilenames(string oldprojpath) { - for (int i = 0; i < YmapFilenames.Count; i++) - { - YmapFilenames[i] = GetUpdatedFilePath(YmapFilenames[i], oldprojpath); - } - for (int i = 0; i < YtypFilenames.Count; i++) - { - YtypFilenames[i] = GetUpdatedFilePath(YtypFilenames[i], oldprojpath); - } - for (int i = 0; i < YbnFilenames.Count; i++) - { - YbnFilenames[i] = GetUpdatedFilePath(YbnFilenames[i], oldprojpath); - } - for (int i = 0; i < YndFilenames.Count; i++) - { - YndFilenames[i] = GetUpdatedFilePath(YndFilenames[i], oldprojpath); - } - for (int i = 0; i < YnvFilenames.Count; i++) - { - YnvFilenames[i] = GetUpdatedFilePath(YnvFilenames[i], oldprojpath); - } - for (int i = 0; i < TrainsFilenames.Count; i++) - { - TrainsFilenames[i] = GetUpdatedFilePath(TrainsFilenames[i], oldprojpath); - } - for (int i = 0; i < ScenarioFilenames.Count; i++) - { - ScenarioFilenames[i] = GetUpdatedFilePath(ScenarioFilenames[i], oldprojpath); - } - for (int i = 0; i < AudioRelFilenames.Count; i++) - { - AudioRelFilenames[i] = GetUpdatedFilePath(AudioRelFilenames[i], oldprojpath); - } - for (int i = 0; i < YdrFilenames.Count; i++) - { - YdrFilenames[i] = GetUpdatedFilePath(YdrFilenames[i], oldprojpath); - } - for (int i = 0; i < YddFilenames.Count; i++) - { - YddFilenames[i] = GetUpdatedFilePath(YddFilenames[i], oldprojpath); - } - for (int i = 0; i < YftFilenames.Count; i++) - { - YftFilenames[i] = GetUpdatedFilePath(YftFilenames[i], oldprojpath); - } - for (int i = 0; i < YtdFilenames.Count; i++) - { - YtdFilenames[i] = GetUpdatedFilePath(YtdFilenames[i], oldprojpath); - } + YmapFilenames = YmapFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YtypFilenames = YtypFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YbnFilenames = YbnFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YndFilenames = YndFilenames + .Select(P => GetUpdatedFilePath(P, oldprojpath)) + .ToHashSet(); + + YnvFilenames = YnvFilenames + .Select(P => GetUpdatedFilePath(P, oldprojpath)) + .ToHashSet(); + + TrainsFilenames = TrainsFilenames + .Select(P => GetUpdatedFilePath(P, oldprojpath)) + .ToHashSet(); + + ScenarioFilenames = ScenarioFilenames + .Select(P => GetUpdatedFilePath(P, oldprojpath)) + .ToHashSet(); + + AudioRelFilenames = AudioRelFilenames + .Select(P => GetUpdatedFilePath(P, oldprojpath)) + .ToHashSet(); + + YdrFilenames = YdrFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YddFilenames = YddFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YftFilenames = YftFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); + + YtdFilenames = YtdFilenames + .Select(p => GetUpdatedFilePath(p, oldprojpath)) + .ToHashSet(); } public string GetUpdatedFilePath(string oldpath, string oldprojpath) { string fullpath = GetFullFilePath(oldpath, oldprojpath); - string newpath = GetRelativePath(fullpath); - return newpath; + return GetRelativePath(fullpath); } public string GetRelativePath(string filepath) { - if (filepath == null) return string.Empty; - if (Filepath == null) return filepath; + if (filepath == null) + return string.Empty; + if (Filepath == null) + return filepath; Uri fromUri; if (!Uri.TryCreate(Filepath, UriKind.RelativeOrAbsolute, out fromUri)) @@ -438,24 +441,25 @@ namespace CodeWalker.Project } public string GetFullFilePath(string relpath) { - if (string.IsNullOrEmpty(Filepath)) return relpath; + if (string.IsNullOrEmpty(Filepath)) + return relpath; string projfldr = new FileInfo(Filepath).DirectoryName + "\\"; string cpath = Path.Combine(projfldr, relpath); - string apath = Path.GetFullPath(cpath); - return apath; + return Path.GetFullPath(cpath); } public string GetFullFilePath(string relpath, string basepath) { - if (string.IsNullOrEmpty(basepath)) return relpath; + if (string.IsNullOrEmpty(basepath)) + return relpath; + string basefldr = new FileInfo(basepath).DirectoryName + "\\"; string cpath = Path.Combine(basefldr, relpath); - string apath = Path.GetFullPath(cpath); - return apath; + return Path.GetFullPath(cpath); } - public YmapFile AddYmapFile(string filename) + public YmapFile? AddYmapFile(string filename) { YmapFile ymap = new YmapFile(); ymap.RpfFileEntry = new RpfResourceFileEntry(); @@ -465,65 +469,74 @@ namespace CodeWalker.Project JenkIndex.Ensure(ymap.Name); JenkIndex.Ensure(Path.GetFileNameWithoutExtension(ymap.Name)); JenkIndex.Ensure(filename); - if (!AddYmapFile(ymap)) return null; + if (!AddYmapFile(ymap)) + return null; return ymap; } public bool AddYmapFile(YmapFile ymap) { string relpath = GetRelativePath(ymap.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ymap.Name; - if (YmapFilenames.Contains(relpath)) return false; - YmapFilenames.Add(relpath); - YmapFiles.Add(ymap); + if (string.IsNullOrEmpty(relpath)) + relpath = ymap.Name; + lock(YmapFiles) + { + if (YmapFilenames.Contains(relpath)) + return false; + YmapFilenames.Add(relpath); + YmapFiles.Add(ymap); + } + return true; } public void RemoveYmapFile(YmapFile ymap) { - if (ymap == null) return; + if (ymap == null) + return; var relpath = GetRelativePath(ymap.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ymap.Name; - YmapFiles.Remove(ymap); - YmapFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ymap.Name; + lock(YmapFiles) + { + YmapFiles.Remove(ymap); + YmapFilenames.Remove(relpath); + } + HasChanged = true; } + public bool ContainsYmap(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var ymapfn in YmapFilenames) + lock(YmapFiles) { - if (ymapfn == filename) - { - found = true; - break; - } + return YmapFilenames.Contains(filename); } - return found; } + public bool ContainsYmap(YmapFile ymap) { - foreach (var f in YmapFiles) + lock(YmapFiles) { - if (f == ymap) return true; + return YmapFiles.Contains(ymap); } - return false; } + public bool RenameYmap(string oldfilename, string newfilename) { - for (int i = 0; i < YmapFilenames.Count; i++) + lock(YmapFiles) { - if (YmapFilenames[i]?.Equals(oldfilename, StringComparison.OrdinalIgnoreCase) ?? false) + if (YmapFilenames.Remove(oldfilename)) { - YmapFilenames[i] = newfilename.ToLowerInvariant(); + YmapFilenames.Add(newfilename.ToLowerInvariant()); HasChanged = true; return true; } + + return false; } - return false; } - public YtypFile AddYtypFile(string filename) + public YtypFile? AddYtypFile(string filename) { YtypFile ytyp = new YtypFile(); ytyp.RpfFileEntry = new RpfResourceFileEntry(); @@ -533,193 +546,213 @@ namespace CodeWalker.Project JenkIndex.EnsureBoth(ytyp.Name); JenkIndex.EnsureBoth(Path.GetFileNameWithoutExtension(ytyp.Name)); JenkIndex.EnsureBoth(filename); - if (!AddYtypFile(ytyp)) return null; + if (!AddYtypFile(ytyp)) + return null; return ytyp; } public bool AddYtypFile(YtypFile ytyp) { string relpath = GetRelativePath(ytyp.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ytyp.Name; - if (YtypFilenames.Contains(relpath)) return false; - YtypFilenames.Add(relpath); - YtypFiles.Add(ytyp); + if (string.IsNullOrEmpty(relpath)) + relpath = ytyp.Name; + lock(YtypFiles) + { + if (YtypFilenames.Contains(relpath)) + return false; + + YtypFilenames.Add(relpath); + YtypFiles.Add(ytyp); + } + return true; } public void RemoveYtypFile(YtypFile ytyp) { if (ytyp == null) return; var relpath = GetRelativePath(ytyp.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ytyp.Name; - YtypFiles.Remove(ytyp); - YtypFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ytyp.Name; + lock(YtypFiles) + { + YtypFiles.Remove(ytyp); + YtypFilenames.Remove(relpath); + } HasChanged = true; } + public bool ContainsYtyp(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var ytypfn in YtypFilenames) + lock(YtypFiles) { - if (ytypfn == filename) - { - found = true; - break; - } + return YtypFilenames.Contains(filename); } - return found; } + public bool ContainsYtyp(YtypFile ytyp) { - foreach (var f in YtypFiles) + lock (YtypFiles) { - if (f == ytyp) return true; + return YtypFiles.Contains(ytyp); } - return false; } + public bool RenameYtyp(string oldfilename, string newfilename) { - for (int i = 0; i < YtypFilenames.Count; i++) + lock(YtypFiles) { - if (YtypFilenames[i]?.Equals(oldfilename, StringComparison.OrdinalIgnoreCase) ?? false) + if (YtypFilenames.Remove(oldfilename)) { - YtypFilenames[i] = newfilename.ToLowerInvariant(); + YtypFilenames.Add(newfilename); HasChanged = true; return true; } + + return false; } - return false; } - public YbnFile AddYbnFile(string filename) + public YbnFile? AddYbnFile(string filename) { YbnFile ybn = new YbnFile(); ybn.RpfFileEntry = new RpfResourceFileEntry(); ybn.RpfFileEntry.Name = Path.GetFileName(filename); ybn.FilePath = GetFullFilePath(filename); ybn.Name = ybn.RpfFileEntry.Name; - if (!AddYbnFile(ybn)) return null; + if (!AddYbnFile(ybn)) + return null; return ybn; } + public bool AddYbnFile(YbnFile ybn) { string relpath = GetRelativePath(ybn.FilePath); if (string.IsNullOrEmpty(relpath)) relpath = ybn.Name; - if (YndFilenames.Contains(relpath, StringComparer.OrdinalIgnoreCase)) return false; - YbnFilenames.Add(relpath); - YbnFiles.Add(ybn); - return true; + lock(YbnFiles) + { + if (YndFilenames.Contains(relpath)) + return false; + YbnFilenames.Add(relpath); + YbnFiles.Add(ybn); + return true; + } } + public void RemoveYbnFile(YbnFile ybn) { if (ybn == null) return; var relpath = GetRelativePath(ybn.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ybn.Name; - YbnFiles.Remove(ybn); - YbnFilenames.Remove(relpath); - HasChanged = true; + if (string.IsNullOrEmpty(relpath)) + relpath = ybn.Name; + + lock(YbnFiles) + { + YbnFiles.Remove(ybn); + YbnFilenames.Remove(relpath); + HasChanged = true; + } } + public bool ContainsYbn(string filename) { - bool found = false; - foreach (var yndfn in YbnFilenames) + lock(YbnFiles) { - if (yndfn.Equals(filename, StringComparison.OrdinalIgnoreCase)) - { - found = true; - break; - } + return YbnFilenames.Contains(filename); } - return found; } + public bool ContainsYbn(YbnFile ybn) { - foreach (var f in YbnFiles) + lock(YbnFiles) { - if (f == ybn) return true; + return YbnFiles.Contains(ybn); } - return false; } + public bool RenameYbn(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YbnFilenames.Count; i++) + lock(YbnFiles) { - if (YbnFilenames[i]?.Equals(oldfilename, StringComparison.OrdinalIgnoreCase) ?? false) + if (YbnFilenames.Remove(oldfilename)) { - YbnFilenames[i] = newfilename; + YbnFilenames.Add(newfilename.ToLowerInvariant()); HasChanged = true; return true; } + + return false; } - return false; } - public YndFile AddYndFile(string filename) + public YndFile? AddYndFile(string filename) { YndFile ynd = new YndFile(); ynd.RpfFileEntry = new RpfResourceFileEntry(); ynd.RpfFileEntry.Name = Path.GetFileName(filename); ynd.FilePath = GetFullFilePath(filename); ynd.Name = ynd.RpfFileEntry.Name; - if (!AddYndFile(ynd)) return null; + if (!AddYndFile(ynd)) + return null; return ynd; } public bool AddYndFile(YndFile ynd) { string relpath = GetRelativePath(ynd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ynd.Name; - if (YndFilenames.Contains(relpath)) return false; - YndFilenames.Add(relpath); - YndFiles.Add(ynd); + if (string.IsNullOrEmpty(relpath)) + relpath = ynd.Name; + + lock(YndFiles) + { + if (YndFilenames.Contains(relpath)) + return false; + YndFilenames.Add(relpath); + YndFiles.Add(ynd); + } return true; } - public void RemoveYndFile(YndFile ynd) + public void RemoveYndFile(YndFile? ynd) { - if (ynd == null) return; + if (ynd is null) + return; var relpath = GetRelativePath(ynd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ynd.Name; - YndFiles.Remove(ynd); - YndFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ynd.Name; + + lock(YndFiles) + { + YndFiles.Remove(ynd); + YndFilenames.Remove(relpath); + } + HasChanged = true; } public bool ContainsYnd(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var yndfn in YndFilenames) + lock(YndFiles) { - if (yndfn == filename) - { - found = true; - break; - } + return YndFilenames.Contains(filename); } - return found; } public bool ContainsYnd(YndFile ynd) { - foreach (var f in YndFiles) + lock(YndFiles) { - if (f == ynd) return true; + return YndFiles.Contains(ynd); } - return false; } public bool RenameYnd(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YndFilenames.Count; i++) + lock(YndFiles) { - if (YndFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YndFilenames.Remove(oldfilename)) { - YndFilenames[i] = newfilename; + YndFilenames.Add(newfilename); HasChanged = true; return true; } } + return false; } @@ -731,134 +764,135 @@ namespace CodeWalker.Project ynv.RpfFileEntry.Name = Path.GetFileName(filename); ynv.FilePath = GetFullFilePath(filename); ynv.Name = ynv.RpfFileEntry.Name; - if (!AddYnvFile(ynv)) return null; + if (!AddYnvFile(ynv)) + return null; return ynv; } + public bool AddYnvFile(YnvFile ynv) { string relpath = GetRelativePath(ynv.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ynv.Name; - if (YnvFilenames.Contains(relpath)) return false; - YnvFilenames.Add(relpath); - YnvFiles.Add(ynv); + if (string.IsNullOrEmpty(relpath)) + relpath = ynv.Name; + + lock(YnvFiles) + { + if (YnvFilenames.Contains(relpath)) + return false; + + YnvFilenames.Add(relpath); + YnvFiles.Add(ynv); + } + return true; } + public void RemoveYnvFile(YnvFile ynv) { if (ynv == null) return; var relpath = GetRelativePath(ynv.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ynv.Name; - YnvFiles.Remove(ynv); - YnvFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ynv.Name; + + lock(YnvFiles) + { + YnvFiles.Remove(ynv); + YnvFilenames.Remove(relpath); + } + HasChanged = true; } + public bool ContainsYnv(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var ynvfn in YnvFilenames) + lock(YnvFiles) { - if (ynvfn == filename) - { - found = true; - break; - } + return YnvFilenames.Contains(filename); } - return found; } + public bool ContainsYnv(YnvFile ynv) { - foreach (var f in YnvFiles) + lock(YnvFiles) { - if (f == ynv) return true; + return YnvFiles.Contains(ynv); } - return false; } + public bool RenameYnv(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YnvFilenames.Count; i++) + lock(YnvFiles) { - if (YnvFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YnvFilenames.Remove(oldfilename)) { - YnvFilenames[i] = newfilename; + YnvFilenames.Add(newfilename); HasChanged = true; return true; } } + + return false; } - public TrainTrack AddTrainsFile(string filename) + public TrainTrack? AddTrainsFile(string filename) { TrainTrack track = new TrainTrack(); track.RpfFileEntry = new RpfResourceFileEntry(); track.RpfFileEntry.Name = Path.GetFileName(filename); track.FilePath = GetFullFilePath(filename); track.Name = track.RpfFileEntry.Name; - if (!AddTrainsFile(track)) return null; + if (!AddTrainsFile(track)) + return null; return track; } public bool AddTrainsFile(TrainTrack track) { string relpath = GetRelativePath(track.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = track.Name; - if (TrainsFilenames.Contains(relpath)) return false; + if (string.IsNullOrEmpty(relpath)) + relpath = track.Name; + if (TrainsFilenames.Contains(relpath)) + return false; TrainsFilenames.Add(relpath); TrainsFiles.Add(track); return true; } - public void RemoveTrainsFile(TrainTrack track) + public void RemoveTrainsFile(TrainTrack? track) { - if (track == null) return; + if (track is null) + return; var relpath = GetRelativePath(track.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = track.Name; + if (string.IsNullOrEmpty(relpath)) + relpath = track.Name; TrainsFiles.Remove(track); TrainsFilenames.Remove(relpath); HasChanged = true; } public bool ContainsTrainTrack(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var trainsfn in TrainsFilenames) - { - if (trainsfn == filename) - { - found = true; - break; - } - } - return found; + return TrainsFilenames.Contains(filename); } + public bool ContainsTrainTrack(TrainTrack track) { - foreach (var f in TrainsFiles) - { - if (f == track) return true; - } - return false; + return TrainsFiles.Contains(track); } + public bool RenameTrainTrack(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < TrainsFilenames.Count; i++) + if (TrainsFilenames.Remove(oldfilename)) { - if (TrainsFilenames[i]?.ToLowerInvariant() == oldfilename) - { - TrainsFilenames[i] = newfilename; - HasChanged = true; - return true; - } + TrainsFilenames.Add(newfilename); + HasChanged = true; + return true; } + return false; } - public YmtFile AddScenarioFile(string filename) + public YmtFile? AddScenarioFile(string filename) { YmtFile scenario = new YmtFile(); scenario.RpfFileEntry = new RpfResourceFileEntry(); @@ -867,196 +901,227 @@ namespace CodeWalker.Project scenario.Name = scenario.RpfFileEntry.Name; scenario.ContentType = YmtFileContentType.ScenarioPointRegion; scenario.FileFormat = YmtFileFormat.RSC; - if (!AddScenarioFile(scenario)) return null; + if (!AddScenarioFile(scenario)) + return null; return scenario; } public bool AddScenarioFile(YmtFile ymt) { string relpath = GetRelativePath(ymt.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ymt.Name; - if (ScenarioFilenames.Contains(relpath)) return false; - ScenarioFilenames.Add(relpath); - ScenarioFiles.Add(ymt); + if (string.IsNullOrEmpty(relpath)) + relpath = ymt.Name; + + lock(ScenarioFiles) + { + if (ScenarioFilenames.Contains(relpath)) + return false; + ScenarioFilenames.Add(relpath); + ScenarioFiles.Add(ymt); + } + return true; } - public void RemoveScenarioFile(YmtFile ymt) + public void RemoveScenarioFile(YmtFile? ymt) { - if (ymt == null) return; + if (ymt is null) + return; var relpath = GetRelativePath(ymt.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ymt.Name; - ScenarioFiles.Remove(ymt); - ScenarioFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ymt.Name; + + lock(ScenarioFiles) + { + ScenarioFiles.Remove(ymt); + ScenarioFilenames.Remove(relpath); + } + HasChanged = true; } public bool ContainsScenario(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var scenariofn in ScenarioFilenames) + lock(ScenarioFiles) { - if (scenariofn == filename) - { - found = true; - break; - } + return ScenarioFilenames.Contains(filename); } - return found; } + public bool ContainsScenario(YmtFile ymt) { - foreach (var f in ScenarioFiles) + lock(ScenarioFiles) { - if (f == ymt) return true; + return ScenarioFiles.Contains(ymt); } - return false; } + public bool RenameScenario(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < ScenarioFilenames.Count; i++) + lock(ScenarioFiles) { - if (ScenarioFilenames[i]?.ToLowerInvariant() == oldfilename) + if (ScenarioFilenames.Remove(oldfilename)) { - ScenarioFilenames[i] = newfilename; + ScenarioFilenames.Add(newfilename); HasChanged = true; return true; } } + return false; } - public RelFile AddAudioRelFile(string filename) + public RelFile? AddAudioRelFile(string filename) { RelFile relfile = new RelFile(); relfile.RpfFileEntry = new RpfResourceFileEntry(); relfile.RpfFileEntry.Name = Path.GetFileName(filename); relfile.FilePath = GetFullFilePath(filename); relfile.Name = relfile.RpfFileEntry.Name; - if (!AddAudioRelFile(relfile)) return null; + if (!AddAudioRelFile(relfile)) + return null; return relfile; } + public bool AddAudioRelFile(RelFile rel) { string relpath = GetRelativePath(rel.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = rel.Name; - if (AudioRelFilenames.Contains(relpath)) return false; - AudioRelFilenames.Add(relpath); - AudioRelFiles.Add(rel); + if (string.IsNullOrEmpty(relpath)) + relpath = rel.Name; + + lock(AudioRelFiles) + { + if (AudioRelFilenames.Contains(relpath)) + return false; + AudioRelFilenames.Add(relpath); + AudioRelFiles.Add(rel); + } + return true; } - public void RemoveAudioRelFile(RelFile rel) + + public void RemoveAudioRelFile(RelFile? rel) { - if (rel == null) return; + if (rel is null) + return; var relpath = GetRelativePath(rel.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = rel.Name; - AudioRelFiles.Remove(rel); - AudioRelFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = rel.Name; + + lock(AudioRelFiles) + { + AudioRelFiles.Remove(rel); + AudioRelFilenames.Remove(relpath); + } + HasChanged = true; } + public bool ContainsAudioRel(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var audiorelfn in AudioRelFilenames) + lock(AudioRelFiles) { - if (audiorelfn == filename) - { - found = true; - break; - } + return AudioRelFilenames.Contains(filename); } - return found; } + public bool ContainsAudioRel(RelFile rel) { - foreach (var f in AudioRelFiles) + lock(AudioRelFiles) { - if (f == rel) return true; + return AudioRelFiles.Contains(rel); } - return false; } + public bool RenameAudioRel(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < AudioRelFilenames.Count; i++) + lock(AudioRelFiles) { - if (AudioRelFilenames[i]?.ToLowerInvariant() == oldfilename) + if (AudioRelFilenames.Remove(oldfilename)) { - AudioRelFilenames[i] = newfilename; + AudioRelFilenames.Add(newfilename); HasChanged = true; return true; } + return false; } - return false; } - public YdrFile AddYdrFile(string filename) + public YdrFile? AddYdrFile(string filename) { YdrFile ydr = new YdrFile(); ydr.RpfFileEntry = new RpfResourceFileEntry(); ydr.RpfFileEntry.Name = Path.GetFileName(filename); ydr.FilePath = GetFullFilePath(filename); ydr.Name = ydr.RpfFileEntry.Name; - if (!AddYdrFile(ydr)) return null; + + if (!AddYdrFile(ydr)) + return null; + return ydr; } public bool AddYdrFile(YdrFile ydr) { string relpath = GetRelativePath(ydr.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ydr.Name; - if (YdrFilenames.Contains(relpath)) return false; - YdrFilenames.Add(relpath); - YdrFiles.Add(ydr); - return true; + + if (string.IsNullOrEmpty(relpath)) + relpath = ydr.Name; + + lock(YdrFiles) + { + if (YdrFilenames.Contains(relpath)) + return false; + + YdrFilenames.Add(relpath); + YdrFiles.Add(ydr); + return true; + } } + public void RemoveYdrFile(YdrFile ydr) { - if (ydr == null) return; + if (ydr == null) + return; var relpath = GetRelativePath(ydr.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ydr.Name; - YdrFiles.Remove(ydr); - YdrFilenames.Remove(relpath); - HasChanged = true; - } - public bool ContainsYdr(string filename) - { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var ydrfn in YdrFilenames) + if (string.IsNullOrEmpty(relpath)) + relpath = ydr.Name; + + lock(YdrFiles) { - if (ydrfn == filename) + if (YdrFiles.Remove(ydr) || YdrFilenames.Remove(relpath)) { - found = true; - break; + HasChanged = true; } } - return found; } + + public bool ContainsYdr(string filename) + { + lock(YdrFiles) + { + return YdrFilenames.Contains(filename); + } + } + public bool ContainsYdr(YdrFile ydr) { - foreach (var f in YdrFiles) + lock (YdrFiles) { - if (f == ydr) return true; + return YdrFiles.Contains(ydr); } - return false; } + public bool RenameYdr(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YdrFilenames.Count; i++) + lock(YdrFiles) { - if (YdrFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YdrFilenames.Remove(oldfilename)) { - YdrFilenames[i] = newfilename; + YdrFilenames.Add(newfilename); HasChanged = true; return true; } } + return false; } @@ -1071,194 +1136,219 @@ namespace CodeWalker.Project if (!AddYddFile(ydd)) return null; return ydd; } + public bool AddYddFile(YddFile ydd) { string relpath = GetRelativePath(ydd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ydd.Name; - if (YddFilenames.Contains(relpath)) return false; - YddFilenames.Add(relpath); - YddFiles.Add(ydd); + if (string.IsNullOrEmpty(relpath)) + relpath = ydd.Name; + + lock(YddFiles) + { + if (YddFilenames.Contains(relpath)) + return false; + YddFilenames.Add(relpath); + YddFiles.Add(ydd); + } + return true; } - public void RemoveYddFile(YddFile ydd) + + public void RemoveYddFile(YddFile? ydd) { - if (ydd == null) return; + if (ydd is null) + return; var relpath = GetRelativePath(ydd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ydd.Name; - YddFiles.Remove(ydd); - YddFilenames.Remove(relpath); + if (string.IsNullOrEmpty(relpath)) + relpath = ydd.Name; + lock(YddFiles) + { + YddFiles.Remove(ydd); + YddFilenames.Remove(relpath); + } HasChanged = true; } + public bool ContainsYdd(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var yddfn in YddFilenames) + lock(YddFiles) { - if (yddfn == filename) - { - found = true; - break; - } + return YddFilenames.Contains(filename); } - return found; } + public bool ContainsYdd(YddFile ydd) { - foreach (var f in YddFiles) + lock(YddFiles) { - if (f == ydd) return true; + return YddFiles.Contains(ydd); } - return false; } + public bool RenameYdd(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YddFilenames.Count; i++) + lock(YddFiles) { - if (YddFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YddFilenames.Remove(oldfilename)) { - YddFilenames[i] = newfilename; + YddFilenames.Add(newfilename); HasChanged = true; return true; } } + return false; } - public YftFile AddYftFile(string filename) + public YftFile? AddYftFile(string filename) { YftFile yft = new YftFile(); yft.RpfFileEntry = new RpfResourceFileEntry(); yft.RpfFileEntry.Name = Path.GetFileName(filename); yft.FilePath = GetFullFilePath(filename); yft.Name = yft.RpfFileEntry.Name; - if (!AddYftFile(yft)) return null; + if (!AddYftFile(yft)) + return null; return yft; } public bool AddYftFile(YftFile yft) { string relpath = GetRelativePath(yft.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = yft.Name; - if (YftFilenames.Contains(relpath)) return false; - YftFilenames.Add(relpath); - YftFiles.Add(yft); - return true; + if (string.IsNullOrEmpty(relpath)) + relpath = yft.Name; + + lock(YftFiles) + { + if (YftFilenames.Contains(relpath)) + return false; + YftFilenames.Add(relpath); + YftFiles.Add(yft); + return true; + } } public void RemoveYftFile(YftFile yft) { - if (yft == null) return; + if (yft == null) + return; var relpath = GetRelativePath(yft.FilePath); if (string.IsNullOrEmpty(relpath)) relpath = yft.Name; - YftFiles.Remove(yft); - YftFilenames.Remove(relpath); - HasChanged = true; + + lock(YftFiles) + { + YftFiles.Remove(yft); + YftFilenames.Remove(relpath); + HasChanged = true; + } } + public bool ContainsYft(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var yftfn in YftFilenames) + lock(YftFiles) { - if (yftfn == filename) - { - found = true; - break; - } + return YftFilenames.Contains(filename); } - return found; } + public bool ContainsYft(YftFile yft) { - foreach (var f in YftFiles) + lock(YftFiles) { - if (f == yft) return true; + return YftFiles.Contains(yft); } - return false; } + public bool RenameYft(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YftFilenames.Count; i++) + lock(YftFiles) { - if (YftFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YftFilenames.Remove(oldfilename)) { - YftFilenames[i] = newfilename; + YftFilenames.Add(newfilename); HasChanged = true; return true; } + return false; } - return false; } - public YtdFile AddYtdFile(string filename) + public YtdFile? AddYtdFile(string filename) { YtdFile ytd = new YtdFile(); ytd.RpfFileEntry = new RpfResourceFileEntry(); ytd.RpfFileEntry.Name = Path.GetFileName(filename); ytd.FilePath = GetFullFilePath(filename); ytd.Name = ytd.RpfFileEntry.Name; - if (!AddYtdFile(ytd)) return null; + if (!AddYtdFile(ytd)) + return null; return ytd; } + public bool AddYtdFile(YtdFile ytd) { string relpath = GetRelativePath(ytd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ytd.Name; - if (YtdFilenames.Contains(relpath)) return false; - YtdFilenames.Add(relpath); - YtdFiles.Add(ytd); - return true; + + if (string.IsNullOrEmpty(relpath)) + relpath = ytd.Name; + + lock(YtdFiles) + { + if (YtdFilenames.Contains(relpath)) + return false; + + YtdFilenames.Add(relpath); + YtdFiles.Add(ytd); + return true; + } } + public void RemoveYtdFile(YtdFile ytd) { - if (ytd == null) return; + if (ytd == null) + return; var relpath = GetRelativePath(ytd.FilePath); - if (string.IsNullOrEmpty(relpath)) relpath = ytd.Name; - YtdFiles.Remove(ytd); - YtdFilenames.Remove(relpath); - HasChanged = true; + if (string.IsNullOrEmpty(relpath)) + relpath = ytd.Name; + + lock(YtdFiles) + { + YtdFiles.Remove(ytd); + YtdFilenames.Remove(relpath); + HasChanged = true; + } } + public bool ContainsYtd(string filename) { - bool found = false; - filename = filename.ToLowerInvariant(); - foreach (var ytdfn in YtdFilenames) + lock(YtdFiles) { - if (ytdfn == filename) - { - found = true; - break; - } + return YtdFilenames.Contains(filename); } - return found; } + public bool ContainsYtd(YtdFile ytd) { - foreach (var f in YtdFiles) + lock(YtdFiles) { - if (f == ytd) return true; + return YtdFiles.Contains(ytd); } - return false; } + public bool RenameYtd(string oldfilename, string newfilename) { - oldfilename = oldfilename.ToLowerInvariant(); - newfilename = newfilename.ToLowerInvariant(); - for (int i = 0; i < YtdFilenames.Count; i++) + lock(YtdFiles) { - if (YtdFilenames[i]?.ToLowerInvariant() == oldfilename) + if (YtdFilenames.Remove(oldfilename)) { - YtdFilenames[i] = newfilename; + YtdFilenames.Add(newfilename); HasChanged = true; return true; } + + return false; } - return false; } } diff --git a/CodeWalker/Project/ProjectForm.cs b/CodeWalker/Project/ProjectForm.cs index a27fd98..95e8a47 100644 --- a/CodeWalker/Project/ProjectForm.cs +++ b/CodeWalker/Project/ProjectForm.cs @@ -3,12 +3,14 @@ using CodeWalker.Project.Panels; using CodeWalker.Properties; using CodeWalker.Utils; using CodeWalker.World; +using CommunityToolkit.HighPerformance; using SharpDX; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.IO; using System.Linq; @@ -22,73 +24,70 @@ namespace CodeWalker.Project { public partial class ProjectForm : Form { - public WorldForm WorldForm { get; private set; } - public ThemeBase Theme { get; private set; } - public ProjectExplorerPanel ProjectExplorer { get; set; } - public ProjectPanel PreviewPanel { get; set; } - public DeleteGrassPanel DeleteGrassPanel { get; set; } + public WorldForm? WorldForm { get; private set; } + public ThemeBase? Theme { get; private set; } + public ProjectExplorerPanel? ProjectExplorer { get; set; } + public ProjectPanel? PreviewPanel { get; set; } + public DeleteGrassPanel? DeleteGrassPanel { get; set; } - public GameFileCache GameFileCache { get; private set; } + public static GameFileCache GameFileCache => GameFileCacheFactory.Instance; public RpfManager RpfMan { get; private set; } - public bool IsProjectLoaded - { - get { return CurrentProjectFile != null; } - } - public ProjectFile CurrentProjectFile; + public bool IsProjectLoaded => CurrentProjectFile != null; + public ProjectFile? CurrentProjectFile; - private MapSelection[] CurrentMulti; + private MapSelection[]? CurrentMulti; - private YmapFile CurrentYmapFile; - private YmapEntityDef CurrentEntity; - private YmapCarGen CurrentCarGen; - private YmapLODLight CurrentLodLight; - private YmapBoxOccluder CurrentBoxOccluder; - private YmapOccludeModel CurrentOccludeModel; - private YmapOccludeModelTriangle CurrentOccludeModelTri; - private YmapGrassInstanceBatch CurrentGrassBatch; + private YmapFile? CurrentYmapFile; + private YmapEntityDef? CurrentEntity; + private YmapCarGen? CurrentCarGen; + private YmapLODLight? CurrentLodLight; + private YmapBoxOccluder? CurrentBoxOccluder; + private YmapOccludeModel? CurrentOccludeModel; + private YmapOccludeModelTriangle? CurrentOccludeModelTri; + private YmapGrassInstanceBatch? CurrentGrassBatch; - private YtypFile CurrentYtypFile; - private Archetype CurrentArchetype; - private MCEntityDef CurrentMloEntity; - private MCMloRoomDef CurrentMloRoom; - private MCMloPortalDef CurrentMloPortal; - private MCMloEntitySet CurrentMloEntitySet; + private YtypFile? CurrentYtypFile; + private Archetype? CurrentArchetype; + private MCEntityDef? CurrentMloEntity; + private MCMloRoomDef? CurrentMloRoom; + private MCMloPortalDef? CurrentMloPortal; + private MCMloEntitySet? CurrentMloEntitySet; - private YndFile CurrentYndFile; - private YndNode CurrentPathNode; - private YndLink CurrentPathLink; + private YndFile? CurrentYndFile; + private YndNode? CurrentPathNode; + private YndLink? CurrentPathLink; - private YnvFile CurrentYnvFile; - private YnvPoly CurrentNavPoly; - private YnvPoint CurrentNavPoint; - private YnvPortal CurrentNavPortal; + private YnvFile? CurrentYnvFile; + private YnvPoly? CurrentNavPoly; + private YnvPoint? CurrentNavPoint; + private YnvPortal? CurrentNavPortal; - private TrainTrack CurrentTrainTrack; - private TrainTrackNode CurrentTrainNode; + private TrainTrack? CurrentTrainTrack; + private TrainTrackNode? CurrentTrainNode; - private YmtFile CurrentScenario; - private ScenarioNode CurrentScenarioNode; - private MCScenarioChainingEdge CurrentScenarioChainEdge; + private YmtFile? CurrentScenario; + private ScenarioNode? CurrentScenarioNode; + private MCScenarioChainingEdge? CurrentScenarioChainEdge; - private RelFile CurrentAudioFile; - private AudioPlacement CurrentAudioZone; - private AudioPlacement CurrentAudioEmitter; - private Dat151AmbientZoneList CurrentAudioZoneList; - private Dat151StaticEmitterList CurrentAudioEmitterList; - private Dat151Interior CurrentAudioInterior; - private Dat151InteriorRoom CurrentAudioInteriorRoom; + private RelFile? CurrentAudioFile; + private AudioPlacement? CurrentAudioZone; + private AudioPlacement? CurrentAudioEmitter; + private Dat151AmbientZoneList? CurrentAudioZoneList; + private Dat151StaticEmitterList? CurrentAudioEmitterList; + private Dat151Interior? CurrentAudioInterior; + private Dat151InteriorRoom? CurrentAudioInteriorRoom; - private YbnFile CurrentYbnFile; - private Bounds CurrentCollisionBounds; - private BoundPolygon CurrentCollisionPoly; - private BoundVertex CurrentCollisionVertex; + private YbnFile? CurrentYbnFile; + private Bounds? CurrentCollisionBounds; + private BoundPolygon? CurrentCollisionPoly; + private BoundVertex? CurrentCollisionVertex; - private YdrFile CurrentYdrFile; - private YddFile CurrentYddFile; - private YftFile CurrentYftFile; - private YtdFile CurrentYtdFile; + private YdrFile? CurrentYdrFile; + private YddFile? CurrentYddFile; + private YftFile? CurrentYftFile; + private YtdFile? CurrentYtdFile; @@ -98,14 +97,13 @@ namespace CodeWalker.Project private bool autoymapextents = true; public bool displayentityindexes = false; - private object projectsyncroot = new object(); - public object ProjectSyncRoot { get { return projectsyncroot; } } + public readonly object ProjectSyncRoot = new object(); - private Dictionary visibleybns = new Dictionary(); + private Dictionary visibleybns = new Dictionary(StringComparer.OrdinalIgnoreCase); private Dictionary visibleynds = new Dictionary(); private Dictionary visibleynvs = new Dictionary(); - private Dictionary visibletrains = new Dictionary(); - private Dictionary visiblescenarios = new Dictionary(); + private Dictionary visibletrains = new Dictionary(StringComparer.OrdinalIgnoreCase); + private Dictionary visiblescenarios = new Dictionary(StringComparer.OrdinalIgnoreCase); private Dictionary visiblemloentities = new Dictionary(); private Dictionary visibleaudiofiles = new Dictionary(); @@ -116,7 +114,7 @@ namespace CodeWalker.Project private bool ShowProjectItemInProcess = false; - public ProjectForm(WorldForm worldForm = null) + public ProjectForm(WorldForm? worldForm = null) { WorldForm = worldForm; @@ -125,14 +123,12 @@ namespace CodeWalker.Project SetTheme(Settings.Default.ProjectWindowTheme, false); ShowDefaultPanels(); - GameFileCache = GameFileCacheFactory.GetInstance(); - if (!GameFileCache.IsInited) { - Task.Run(() => + Task.Run(async () => { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); - GameFileCache.Init(UpdateStatus, UpdateError); + await GameFileCache.InitAsync(UpdateStatus, UpdateError); }); } @@ -145,7 +141,7 @@ namespace CodeWalker.Project { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { @@ -153,10 +149,14 @@ namespace CodeWalker.Project //StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void UpdateError(string text) { + Console.WriteLine(text); + return; try { if (InvokeRequired) @@ -170,11 +170,13 @@ namespace CodeWalker.Project //ErrorLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } - private void SetTheme(string themestr, bool changing = true) + private async Task SetTheme(string themestr, bool changing = true) { if (changing && (CurrentProjectFile != null)) { @@ -185,7 +187,7 @@ namespace CodeWalker.Project } - CloseProject(); + await CloseProject(); //string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.temp.config"); //MainDockPanel.SaveAsXml(configFile); @@ -247,14 +249,13 @@ namespace CodeWalker.Project } - private T FindPanel(Func findFunc) where T : ProjectPanel + private T? FindPanel(Func findFunc) where T : ProjectPanel { foreach (var pane in MainDockPanel.Panes) { foreach (var content in pane.Contents) { - var test = content as T; - if ((test != null) && findFunc(test)) + if ((content is T test) && findFunc(test)) { return test; } @@ -262,11 +263,13 @@ namespace CodeWalker.Project } return null; } + public void ShowDefaultPanels() { ShowProjectExplorer(); ShowWelcomePanel(); } + public void ShowProjectExplorer() { if ((ProjectExplorer == null) || (ProjectExplorer.IsDisposed) || (ProjectExplorer.Disposing)) @@ -284,18 +287,19 @@ namespace CodeWalker.Project } public void ShowWelcomePanel() { - ShowPreviewPanel(() => { return new WelcomePanel(); }); + ShowPreviewPanel(() => new WelcomePanel()); } - public void ShowPreviewPanel(Func createFunc, Action updateAction = null) where T : ProjectPanel + public void ShowPreviewPanel(Func createFunc, Action? updateAction = null) where T : ProjectPanel { - if ((PreviewPanel != null) && (PreviewPanel is T)) + if (PreviewPanel != null && PreviewPanel is T panel) { + PreviewPanel.Show(); PreviewPanel.BringToFront();//.Show(); - updateAction?.Invoke(PreviewPanel as T); + updateAction?.Invoke(panel); } else { - var panel = createFunc(); + panel = createFunc(); panel.HideOnClose = true; panel.SetTheme(Theme); panel.Show(MainDockPanel, DockState.Document); @@ -312,10 +316,7 @@ namespace CodeWalker.Project T found = FindPanel(findFunc); if ((found != null) && (found != PreviewPanel)) { - if (found.IsHidden) - { - found.Show(); - } + found.Show(); found.BringToFront();//.Show(); updateAction?.Invoke(found); } @@ -326,6 +327,7 @@ namespace CodeWalker.Project PromoteIfPreviewPanel(PreviewPanel); if (found != null) { + found.Show(); found.BringToFront();//.Show(); updateAction?.Invoke(found); } @@ -869,12 +871,8 @@ namespace CodeWalker.Project if (CurrentAudioZone?.AudioZone == null) CurrentAudioZone = null; if (CurrentAudioEmitter?.AudioEmitter == null) CurrentAudioEmitter = null; - - //need to create a temporary AudioPlacement wrapper for these, since AudioPlacements usually come from WorldForm - var daz = item as Dat151AmbientZone; - var dae = item as Dat151AmbientRule; - if (daz != null) CurrentAudioZone = new AudioPlacement(daz.Rel, daz); - if (dae != null) CurrentAudioEmitter = new AudioPlacement(dae.Rel, dae); + if (item is Dat151AmbientZone daz) CurrentAudioZone = new AudioPlacement(daz.Rel, daz); + if (item is Dat151AmbientRule dae) CurrentAudioEmitter = new AudioPlacement(dae.Rel, dae); @@ -1039,7 +1037,8 @@ namespace CodeWalker.Project { if (MainDockPanel.DocumentStyle == DocumentStyle.SystemMdi) { - foreach (Form form in MdiChildren) form.Close(); + foreach (Form form in MdiChildren) + form.Close(); } else { @@ -1086,9 +1085,9 @@ namespace CodeWalker.Project { if (panel == PreviewPanel) { - if (PreviewPanel != null) + if (PreviewPanel is not null) { - PreviewPanel.HideOnClose = false; + PreviewPanel.InvokeIfRequired(() => PreviewPanel.HideOnClose = false); } PreviewPanel = null; } @@ -1120,12 +1119,13 @@ namespace CodeWalker.Project return 0f; } - public void NewProject() + [MemberNotNull(nameof(CurrentProjectFile))] + public async ValueTask NewProjectAsync() { if (CurrentProjectFile != null) { ////unload current project first - CloseProject(); + await CloseProject(); } CurrentProjectFile = new ProjectFile(); @@ -1134,7 +1134,7 @@ namespace CodeWalker.Project CurrentProjectFile.HasChanged = true; LoadProjectUI(); } - public void OpenProject() + public async ValueTask OpenProject() { string file = ShowOpenDialog("CodeWalker Projects|*.cwproj", string.Empty); if (string.IsNullOrEmpty(file)) @@ -1142,7 +1142,7 @@ namespace CodeWalker.Project return; } - CloseProject(); + await CloseProject(); CurrentProjectFile = new ProjectFile(); CurrentProjectFile.Load(file); @@ -1158,11 +1158,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYmapFromFile(ymap, filename); + await LoadYmapFromFileAsync(ymap, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1175,11 +1175,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYtypFromFile(ytyp, filename); + await LoadYtypFromFileAsync(ytyp, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1192,11 +1192,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYbnFromFile(ybn, filename); + await LoadYbnFromFileAsync(ybn, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1209,11 +1209,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYndFromFile(ynd, filename); + await LoadYndFromFileAsync(ynd, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1226,11 +1226,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYnvFromFile(ynv, filename); + await LoadYnvFromFileAsync(ynv, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1243,11 +1243,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadTrainTrackFromFile(track, filename); + await LoadTrainTrackFromFileAsync(track, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1264,7 +1264,7 @@ namespace CodeWalker.Project } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1281,7 +1281,7 @@ namespace CodeWalker.Project } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1290,15 +1290,15 @@ namespace CodeWalker.Project string filename = ydr.FilePath; if (!File.Exists(filename)) { - filename = cpath + "\\" + filename; + filename = $"{cpath}\\{filename}"; } if (File.Exists(filename)) { - LoadYdrFromFile(ydr, filename); + await LoadYdrFromFile(ydr, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1311,11 +1311,11 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYddFromFile(ydd, filename); + await LoadYddFromFileAsync(ydd, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1324,15 +1324,15 @@ namespace CodeWalker.Project string filename = yft.FilePath; if (!File.Exists(filename)) { - filename = cpath + "\\" + filename; + filename = $"{cpath}\\{filename}"; } if (File.Exists(filename)) { - LoadYftFromFile(yft, filename); + await LoadYftFromFileAsync(yft, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } @@ -1345,69 +1345,70 @@ namespace CodeWalker.Project } if (File.Exists(filename)) { - LoadYtdFromFile(ytd, filename); + await LoadYtdFromFileAsync(ytd, filename); } else { - MessageBox.Show("Couldn't find file: " + filename); + MessageBox.Show($"Couldn't find file: {filename}"); } } LoadProjectUI(); } - public void CloseProject() + public async ValueTask CloseProject() { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null) + return; foreach (var ymap in CurrentProjectFile.YmapFiles) { - if ((ymap != null) && (ymap.HasChanged)) + if (ymap is not null && ymap.HasChanged) { //save the current ymap first? - if (MessageBox.Show("Would you like to save " + ymap.Name + " before closing?", "Save .ymap before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {ymap.Name} before closing?", "Save .ymap before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentYmapFile = ymap; - SaveYmap(); + await SaveYmap(); } } } foreach (var ytyp in CurrentProjectFile.YtypFiles) { - if ((ytyp != null) && (ytyp.HasChanged)) + if (ytyp is not null && ytyp.HasChanged) { //save the current ytyp first? - if (MessageBox.Show("Would you like to save " + ytyp.Name + " before closing?", "Save .ytyp before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {ytyp.Name} before closing?", "Save .ytyp before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentYtypFile = ytyp; - SaveYtyp(); + await SaveYtyp(); } } } foreach (var ybn in CurrentProjectFile.YbnFiles) { - if ((ybn != null) && (ybn.HasChanged)) + if (ybn is not null && ybn.HasChanged) { //save the current ybn first? - if (MessageBox.Show("Would you like to save " + ybn.Name + " before closing?", "Save .ybn before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {ybn.Name} before closing?", "Save .ybn before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentYbnFile = ybn; - SaveYbn(); + await SaveYbn(); } } } foreach (var ynd in CurrentProjectFile.YndFiles) { - if ((ynd != null) && (ynd.HasChanged)) + if (ynd is not null && ynd.HasChanged) { //save the current ynd first? - if (MessageBox.Show("Would you like to save " + ynd.Name + " before closing?", "Save .ynd before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {ynd.Name} before closing?", "Save .ynd before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentYndFile = ynd; - SaveYnd(); + await SaveYnd(); } } } @@ -1417,20 +1418,20 @@ namespace CodeWalker.Project if ((ynv != null) && (ynv.HasChanged)) { //save the current ynv first? - if (MessageBox.Show("Would you like to save " + ynv.Name + " before closing?", "Save .ynv before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {ynv.Name} before closing?", "Save .ynv before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentYnvFile = ynv; - SaveYnv(); + await SaveYnv(); } } } foreach (var trains in CurrentProjectFile.TrainsFiles) { - if ((trains != null) && (trains.HasChanged)) + if (trains is not null && trains.HasChanged) { //save the current trains file first? - if (MessageBox.Show("Would you like to save " + trains.Name + " before closing?", "Save trains file before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show($"Would you like to save {trains.Name} before closing?", "Save trains file before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentTrainTrack = trains; SaveTrainTrack(); @@ -1459,7 +1460,7 @@ namespace CodeWalker.Project if (MessageBox.Show("Would you like to save " + datrel.Name + " before closing?", "Save scenario file before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CurrentAudioFile = datrel; - SaveAudioFile(); + await SaveAudioFile(); } } } @@ -1470,11 +1471,11 @@ namespace CodeWalker.Project //save the current project first? if (MessageBox.Show("Would you like to save the current project before closing?", "Save project before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) { - SaveProject(); + await SaveProject(); } } - lock (projectsyncroot) + lock (ProjectSyncRoot) { CloseAllProjectItems(); @@ -1497,10 +1498,7 @@ namespace CodeWalker.Project } - if (WorldForm != null) - { - WorldForm.SelectItem(null);//make sure current selected item isn't still selected... - } + WorldForm?.SelectItem(null);//make sure current selected item isn't still selected... if (GameFileCache != null) { @@ -1509,14 +1507,16 @@ namespace CodeWalker.Project } } - public void SaveProject(bool saveas = false) + public async ValueTask SaveProject(bool saveas = false) { if (CurrentProjectFile == null) return; if (string.IsNullOrEmpty(CurrentProjectFile.Filepath) || saveas) { string fileName = ShowSaveDialog("CodeWalker Projects|*.cwproj", CurrentProjectFile.Filepath); if (string.IsNullOrEmpty(fileName)) - { return; } //user cancelled + { + return; + } //user cancelled string oldpath = CurrentProjectFile.Filepath; CurrentProjectFile.Filepath = fileName; @@ -1529,15 +1529,17 @@ namespace CodeWalker.Project SetProjectHasChanged(false); } - public void OpenFolder() + public async Task OpenFolder() { - if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) return; + if (FolderBrowserDialog.ShowDialogNew() != DialogResult.OK) + return; + var folder = FolderBrowserDialog.SelectedPath; var files = Directory.GetFiles(folder, "*", SearchOption.AllDirectories); if (files == null) return; - if (files.Length > 100) + if (files.Length > 2000) { if (MessageBox.Show("This folder contains many files, loading may take a long time!\nAre you sure you want to continue?", "Large folder warning", MessageBoxButtons.YesNo) != DialogResult.Yes) { @@ -1545,11 +1547,21 @@ namespace CodeWalker.Project } } - OpenFiles(files); + await Task.Run(async () => + { + try + { + await OpenFiles(files); + } + catch(Exception ex) + { + Console.WriteLine(ex); + } + }); } - public void OpenFiles(string[] files = null) + public async ValueTask OpenFiles(string[]? files = null) { - if (files == null) + if (files is null) { string[] filetypes = { "All supported|*.ymap;*.ytyp;*.ybn;*.ydr;*.ydd;*.yft;*.ytd;*.ynd;*.ynv;*.dat;*.ymt;*.rel", @@ -1570,60 +1582,72 @@ namespace CodeWalker.Project files = ShowOpenDialogMulti(string.Join("|", filetypes), string.Empty); } - if (files == null) return; - if (files.Length == 0) return; - if (CurrentProjectFile == null) + if (files is null) return; + if (files.Length is 0) return; + + if (CurrentProjectFile is null) { - NewProject(); + await NewProjectAsync(); } var errorFiles = new List(); - foreach (var file in files) + await Parallel.ForAsync(0, files.Length, async (i, cancellationToken) => { + var file = files[i]; try { - if (!File.Exists(file)) continue; - var fl = file.ToLowerInvariant(); - var fn = Path.GetFileName(fl); - var ext = Path.GetExtension(fl); + if (!File.Exists(file)) + return; + + var fn = Path.GetFileName(file); + var ext = Path.GetExtension(file).ToLowerInvariant(); switch (ext) { case ".ymap": var ymap = CurrentProjectFile.AddYmapFile(file); - if (ymap != null) LoadYmapFromFile(ymap, file); + if (ymap is not null) + await LoadYmapFromFileAsync(ymap, file); break; case ".ytyp": var ytyp = CurrentProjectFile.AddYtypFile(file); - if (ytyp != null) LoadYtypFromFile(ytyp, file); + if (ytyp is not null) + await LoadYtypFromFileAsync(ytyp, file); break; case ".ybn": var ybn = CurrentProjectFile.AddYbnFile(file); - if (ybn != null) LoadYbnFromFile(ybn, file); + if (ybn is not null) + await LoadYbnFromFileAsync(ybn, file); break; case ".ydr": var ydr = CurrentProjectFile.AddYdrFile(file); - if (ydr != null) LoadYdrFromFile(ydr, file); + if (ydr is not null) + await LoadYdrFromFile(ydr, file); break; case ".ydd": var ydd = CurrentProjectFile.AddYddFile(file); - if (ydd != null) LoadYddFromFile(ydd, file); + if (ydd is not null) + await LoadYddFromFileAsync(ydd, file); break; case ".yft": var yft = CurrentProjectFile.AddYftFile(file); - if (yft != null) LoadYftFromFile(yft, file); + if (yft is not null) + await LoadYftFromFileAsync(yft, file); break; case ".ytd": var ytd = CurrentProjectFile.AddYtdFile(file); - if (ytd != null) LoadYtdFromFile(ytd, file); + if (ytd is not null) + await LoadYtdFromFileAsync(ytd, file); break; case ".ynd": var ynd = CurrentProjectFile.AddYndFile(file); - if (ynd != null) LoadYndFromFile(ynd, file); + if (ynd is not null) + await LoadYndFromFileAsync(ynd, file); break; case ".ynv": var ynv = CurrentProjectFile.AddYnvFile(file); - if (ynv != null) LoadYnvFromFile(ynv, file); + if (ynv is not null) + await LoadYnvFromFileAsync(ynv, file); break; case ".ymt": var ymtdata = File.ReadAllBytes(file); @@ -1638,26 +1662,29 @@ namespace CodeWalker.Project } break; case ".dat": - if (fn.StartsWith("trains", StringComparison.OrdinalIgnoreCase)) + if (fn.StartsWith("trains", StringComparison.InvariantCultureIgnoreCase)) { var track = CurrentProjectFile.AddTrainsFile(file); - if (track != null) LoadTrainTrackFromFile(track, file); + if (track is not null) + await LoadTrainTrackFromFileAsync(track, file); } break; case ".rel": - if (fn.EndsWith(".dat151.rel", StringComparison.OrdinalIgnoreCase)) + if (fn.EndsWith(".dat151.rel", StringComparison.InvariantCultureIgnoreCase)) { var dat151 = CurrentProjectFile.AddAudioRelFile(file); - if (dat151 != null) LoadAudioRelFromFile(dat151, file); + if (dat151 != null) + LoadAudioRelFromFile(dat151, file); } break; } } - catch + catch (Exception ex) { errorFiles.Add(file); + Console.WriteLine(ex); } - } + }); SetProjectHasChanged(true); LoadProjectTree(); @@ -1669,148 +1696,133 @@ namespace CodeWalker.Project } } - public void Save(bool saveas = false) + public async ValueTask Save(bool saveas = false) { - if (CurrentYmapFile != null) + if (CurrentYmapFile is not null) { - SaveYmap(saveas); + await SaveYmap(saveas); } - else if (CurrentYtypFile != null) + else if (CurrentYtypFile is not null) { - SaveYtyp(saveas); + await SaveYtyp(saveas); } - else if (CurrentYbnFile != null) + else if (CurrentYbnFile is not null) { - SaveYbn(saveas); + await SaveYbn(saveas); } - else if (CurrentYndFile != null) + else if (CurrentYndFile is not null) { - SaveYnd(saveas); + await SaveYnd(saveas); } - else if (CurrentYnvFile != null) + else if (CurrentYnvFile is not null) { - SaveYnv(saveas); + await SaveYnv(saveas); } - else if (CurrentTrainTrack != null) + else if (CurrentTrainTrack is not null) { SaveTrainTrack(saveas); } - else if (CurrentScenario != null) + else if (CurrentScenario is not null) { SaveScenario(saveas); } - else if (CurrentAudioFile != null) + else if (CurrentAudioFile is not null) { - SaveAudioFile(saveas); + await SaveAudioFile(saveas); } - else if (CurrentProjectFile != null) + else if (CurrentProjectFile is not null) { - SaveProject(saveas); + await SaveProject(saveas); } } - public void SaveAll() + public async ValueTask SaveAll() { - if (CurrentProjectFile != null) + if (CurrentProjectFile is null) { - if (CurrentProjectFile.YmapFiles != null) - { - var cymap = CurrentYmapFile; - foreach (var ymap in CurrentProjectFile.YmapFiles) - { - CurrentYmapFile = ymap; - SaveYmap(); - } - CurrentYmapFile = cymap; - //ShowEditYmapPanel(false); - } - - if (CurrentProjectFile.YtypFiles != null) - { - var cytyp = CurrentYtypFile; - foreach (var ytyp in CurrentProjectFile.YtypFiles) - { - CurrentYtypFile = ytyp; - SaveYtyp(); - } - CurrentYtypFile = cytyp; - //ShowEditYtypPanel(false); - } - - if (CurrentProjectFile.YbnFiles != null) - { - var cybn = CurrentYbnFile; - foreach (var ybn in CurrentProjectFile.YbnFiles) - { - CurrentYbnFile = ybn; - SaveYbn(); - } - CurrentYbnFile = cybn; - //ShowEditYbnPanel(false); - } - - if (CurrentProjectFile.YndFiles != null) - { - var cynd = CurrentYndFile; - foreach (var ynd in CurrentProjectFile.YndFiles) - { - CurrentYndFile = ynd; - SaveYnd(); - } - CurrentYndFile = cynd; - //ShowEditYndPanel(false); - } - - if (CurrentProjectFile.YnvFiles != null) - { - var cynv = CurrentYnvFile; - foreach (var ynv in CurrentProjectFile.YnvFiles) - { - CurrentYnvFile = ynv; - SaveYnv(); - } - CurrentYnvFile = cynv; - //ShowEditYnvPanel(false); - } - - if (CurrentProjectFile.TrainsFiles != null) - { - var ctrack = CurrentTrainTrack; - foreach (var track in CurrentProjectFile.TrainsFiles) - { - CurrentTrainTrack = track; - SaveYnd(); - } - CurrentTrainTrack = ctrack; - //ShowEditTrainTrackPanel(false); - } - - if (CurrentProjectFile.ScenarioFiles != null) - { - var cscen = CurrentScenario; - foreach (var scen in CurrentProjectFile.ScenarioFiles) - { - CurrentScenario = scen; - SaveScenario(); - } - CurrentScenario = cscen; - //ShowEditScenarioPanel(false); - } - - if (CurrentProjectFile.AudioRelFiles != null) - { - var caudf = CurrentAudioFile; - foreach (var audf in CurrentProjectFile.AudioRelFiles) - { - CurrentAudioFile = audf; - SaveAudioFile(); - } - CurrentAudioFile = caudf; - //ShowEditAudioFilePanel(false); - } - - - SaveProject(); + return; } + + var cymap = CurrentYmapFile; + foreach (var ymap in CurrentProjectFile.YmapFiles) + { + CurrentYmapFile = ymap; + await SaveYmap(); + } + CurrentYmapFile = cymap; + //ShowEditYmapPanel(false); + + + var cytyp = CurrentYtypFile; + foreach (var ytyp in CurrentProjectFile.YtypFiles) + { + CurrentYtypFile = ytyp; + await SaveYtyp(); + } + CurrentYtypFile = cytyp; + //ShowEditYtypPanel(false); + + + var cybn = CurrentYbnFile; + foreach (var ybn in CurrentProjectFile.YbnFiles) + { + CurrentYbnFile = ybn; + await SaveYbn(); + } + CurrentYbnFile = cybn; + //ShowEditYbnPanel(false); + + + var cynd = CurrentYndFile; + foreach (var ynd in CurrentProjectFile.YndFiles) + { + CurrentYndFile = ynd; + await SaveYnd(); + } + CurrentYndFile = cynd; + //ShowEditYndPanel(false); + + + var cynv = CurrentYnvFile; + foreach (var ynv in CurrentProjectFile.YnvFiles) + { + CurrentYnvFile = ynv; + await SaveYnv(); + } + CurrentYnvFile = cynv; + //ShowEditYnvPanel(false); + + + var ctrack = CurrentTrainTrack; + foreach (var track in CurrentProjectFile.TrainsFiles) + { + CurrentTrainTrack = track; + await SaveYnd(); + } + CurrentTrainTrack = ctrack; + //ShowEditTrainTrackPanel(false); + + + var cscen = CurrentScenario; + foreach (var scen in CurrentProjectFile.ScenarioFiles) + { + CurrentScenario = scen; + SaveScenario(); + } + CurrentScenario = cscen; + //ShowEditScenarioPanel(false); + + + var caudf = CurrentAudioFile; + foreach (var audf in CurrentProjectFile.AudioRelFiles) + { + CurrentAudioFile = audf; + await SaveAudioFile(); + } + CurrentAudioFile = caudf; + //ShowEditAudioFilePanel(false); + + + await SaveProject(); } @@ -1898,11 +1910,11 @@ namespace CodeWalker.Project - public void NewYmap() + public async ValueTask NewYmap() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -1911,15 +1923,15 @@ namespace CodeWalker.Project bool filenameok = false; while (!filenameok) { - fname = "map" + testi.ToString() + ".ymap"; + fname = $"map{testi}.ymap"; filenameok = !CurrentProjectFile.ContainsYmap(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YmapFile ymap = CurrentProjectFile.AddYmapFile(fname); - if (ymap != null) + if (ymap is not null) { ymap.Loaded = true; ymap.HasChanged = true; //new ymap, flag as not saved @@ -1931,7 +1943,8 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveYmap(bool saveas = false) + + public async ValueTask SaveYmap(bool saveas = false) { if (CurrentYmapFile == null) return; string ymapname = CurrentYmapFile.Name; @@ -1949,14 +1962,14 @@ namespace CodeWalker.Project AutoUpdateYmapFlagsExtents(); byte[] data; - lock (projectsyncroot) //need to sync writes to ymap objects... + lock (ProjectSyncRoot) //need to sync writes to ymap objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) { filepath = ShowSaveDialog("Ymap files|*.ymap", filepath); if (string.IsNullOrEmpty(filepath)) - { return; } + return; } CurrentYmapFile.SetFilePath(filepath); @@ -1967,7 +1980,7 @@ namespace CodeWalker.Project if (data != null) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetYmapHasChanged(false); @@ -1998,14 +2011,17 @@ namespace CodeWalker.Project CurrentYmapFile.SaveWarnings = null;//clear it out for next time.. } } - public void AddYmapToProject(YmapFile ymap) + + public async ValueTask AddYmapToProjectAsync(YmapFile ymap) { if (ymap == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } - if (YmapExistsInProject(ymap)) return; + if (YmapExistsInProject(ymap)) + return; + if (CurrentProjectFile.AddYmapFile(ymap)) { ymap.HasChanged = true; @@ -2014,27 +2030,30 @@ namespace CodeWalker.Project } CurrentYmapFile = ymap; RefreshUI(); - if (CurrentEntity != null) + if (CurrentEntity is not null) { ProjectExplorer?.TrySelectEntityTreeNode(CurrentEntity); } - else if (CurrentCarGen != null) + else if (CurrentCarGen is not null) { ProjectExplorer?.TrySelectCarGenTreeNode(CurrentCarGen); } - else if (CurrentLodLight != null) + else if (CurrentLodLight is not null) { ProjectExplorer?.TrySelectLodLightTreeNode(CurrentLodLight); } - else if (CurrentGrassBatch != null) + else if (CurrentGrassBatch is not null) { ProjectExplorer?.TrySelectGrassBatchTreeNode(CurrentGrassBatch); } } public void RemoveYmapFromProject() { - if (CurrentYmapFile == null) return; - if (CurrentProjectFile == null) return; + if (CurrentYmapFile == null) + return; + if (CurrentProjectFile == null) + return; + GameFileCache?.RemoveProjectFile(CurrentYmapFile); CurrentProjectFile.RemoveYmapFile(CurrentYmapFile); CurrentYmapFile = null; LoadProjectTree(); @@ -2114,13 +2133,13 @@ namespace CodeWalker.Project cent.position = pos; - YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, ref cent); + YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, cent); ent.SetArchetype(GameFileCache.GetArchetype(cent.archetypeName)); if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddEntity(ent); } @@ -2176,7 +2195,7 @@ namespace CodeWalker.Project { YmapEntityDef ent = CurrentEntity; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentEntity = ent; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = ent.Ymap; @@ -2194,9 +2213,12 @@ namespace CodeWalker.Project private bool DeleteYmapEntity() { - if (CurrentEntity.Ymap != CurrentYmapFile) return false; - if (CurrentYmapFile.AllEntities == null) return false; //nothing to delete.. - if (CurrentYmapFile.RootEntities == null) return false; //nothing to delete.. + if (CurrentEntity.Ymap != CurrentYmapFile) + return false; + if (CurrentYmapFile.AllEntities == null || CurrentYmapFile.AllEntities.Length == 0) + return false; //nothing to delete.. + if (CurrentYmapFile.RootEntities == null) + return false; //nothing to delete.. if (CurrentEntity._CEntityDef.numChildren != 0) { @@ -2223,7 +2245,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveEntity(CurrentEntity); //WorldForm.SelectItem(null, null, null); @@ -2265,7 +2287,7 @@ namespace CodeWalker.Project if (CurrentYmapFile == null) return null; rage__fwGrassInstanceListDef fwBatch = new rage__fwGrassInstanceListDef(); - rage__fwGrassInstanceListDef__InstanceData[] instances = new rage__fwGrassInstanceListDef__InstanceData[0]; + rage__fwGrassInstanceListDef__InstanceData[] instances = Array.Empty(); if (copy != null) { @@ -2297,7 +2319,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddGrassBatch(batch); } @@ -2321,7 +2343,7 @@ namespace CodeWalker.Project if (!YmapExistsInProject(ymap)) { ymap.HasChanged = true; - AddYmapToProject(ymap); + AddYmapToProjectAsync(ymap); } } public void AddGrassBatchToProject() @@ -2333,7 +2355,7 @@ namespace CodeWalker.Project { var grassBatch = CurrentGrassBatch; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentGrassBatch = grassBatch; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = grassBatch.Ymap; @@ -2355,7 +2377,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveGrassBatch(CurrentGrassBatch); //WorldForm.SelectItem(null, null, null); @@ -2436,16 +2458,19 @@ namespace CodeWalker.Project return false; } - public void BulkEraseGrassInstancesAtMouse(SpaceRayIntersectResult mouseRay) => BulkEraseGrassInstancesAtMouse(mouseRay, (y) => true); - public void BulkEraseGrassInstancesAtMouse(SpaceRayIntersectResult mouseRay, Predicate ymapFilter) => BulkEraseGrassInstancesAtMouse(mouseRay, ymapFilter, (b) => true); - public void BulkEraseGrassInstancesAtMouse(SpaceRayIntersectResult mouseRay, Predicate ymapFilter, Predicate batchFilter) + public void BulkEraseGrassInstancesAtMouse(in SpaceRayIntersectResult mouseRay) => BulkEraseGrassInstancesAtMouse(mouseRay, (y) => true); + public void BulkEraseGrassInstancesAtMouse(in SpaceRayIntersectResult mouseRay, Predicate ymapFilter) => BulkEraseGrassInstancesAtMouse(mouseRay, ymapFilter, (b) => true); + public void BulkEraseGrassInstancesAtMouse(in SpaceRayIntersectResult mouseRay, Predicate ymapFilter, Predicate batchFilter) { - if (!mouseRay.Hit) return; + if (!mouseRay.Hit) + return; float radius = DeleteGrassPanel?.BrushRadius ?? 5f; var mouseSphere = new BoundingSphere(mouseRay.Position, radius); - if (WorldForm == null) return; - lock (WorldForm.RenderSyncRoot) + if (WorldForm is null) + return; + + using (WorldForm.RenderSyncRoot.WaitDisposable()) { foreach (var ymap in WorldForm.Renderer.VisibleYmaps) { @@ -2457,18 +2482,18 @@ namespace CodeWalker.Project var gb = ymap.GrassInstanceBatches[i]; if (!batchFilter(gb)) continue; - BoundingBox bbox = new BoundingBox(); - MapBox mb = new MapBox(); - mb.BBMin = gb.AABBMin; - mb.BBMax = gb.AABBMax; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + BBMin = gb.AABBMin, + BBMax = gb.AABBMax, + Orientation = Quaternion.Identity, + Scale = Vector3.One, + }; - bbox.Minimum = mb.BBMin; - bbox.Maximum = mb.BBMax; + BoundingBox bbox = new BoundingBox(mb.BBMin, mb.BBMax); // do not continue if mouse position + radius is not in this instance's bounding box - if (!bbox.Intersects(mouseSphere)) continue; + if (!bbox.Intersects(ref mouseSphere)) continue; if (gb.EraseInstancesAtMouse(gb, mouseRay, radius)) { @@ -2517,7 +2542,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddCarGen(cg); } @@ -2546,7 +2571,7 @@ namespace CodeWalker.Project { var cargen = CurrentCarGen; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentCarGen = cargen; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = cargen.Ymap; @@ -2568,7 +2593,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveCarGen(CurrentCarGen); //WorldForm.SelectItem(null, null, null); @@ -2635,7 +2660,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddLodLight(yll); } @@ -2667,13 +2692,13 @@ namespace CodeWalker.Project var lodlight = CurrentLodLight; if (lodlight.DistLodLights?.Ymap != null) { - AddYmapToProject(lodlight.DistLodLights.Ymap); + AddYmapToProjectAsync(lodlight.DistLodLights.Ymap); CurrentYmapFile.HasChanged = true; } CurrentYmapFile = lodlight.Ymap; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentLodLight = lodlight; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = lodlight.Ymap; @@ -2698,7 +2723,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveLodLight(CurrentLodLight); //WorldForm.SelectItem(null, null, null); @@ -2765,7 +2790,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddBoxOccluder(bo); } @@ -2798,7 +2823,7 @@ namespace CodeWalker.Project CurrentYmapFile = box.Ymap; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentBoxOccluder = box; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = box.Ymap; @@ -2821,7 +2846,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveBoxOccluder(CurrentBoxOccluder); //WorldForm.SelectItem(null, null, null); @@ -2883,7 +2908,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddOccludeModel(om); } @@ -2916,7 +2941,7 @@ namespace CodeWalker.Project CurrentYmapFile = model.Ymap; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentOccludeModel = model; //bug fix for some reason the treeview selects the project node here. CurrentYmapFile = model.Ymap; @@ -2925,9 +2950,12 @@ namespace CodeWalker.Project } public bool DeleteOccludeModel() { - if (CurrentYmapFile == null) return false; - if (CurrentOccludeModel == null) return false; - if (CurrentOccludeModel.Ymap != CurrentYmapFile) return false; + if (CurrentYmapFile == null) + return false; + if (CurrentOccludeModel is null) + return false; + if (CurrentOccludeModel.Ymap != CurrentYmapFile) + return false; //if (MessageBox.Show("Are you sure you want to delete this occlude model?\n" + CurrentOccludeModel.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) //{ @@ -2939,7 +2967,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveOccludeModel(CurrentOccludeModel); //WorldForm.SelectItem(null, null, null); @@ -3001,7 +3029,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddOccludeModelTriangle(ot); } @@ -3035,7 +3063,7 @@ namespace CodeWalker.Project CurrentYmapFile = tri.Ymap; CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + AddYmapToProjectAsync(CurrentYmapFile); CurrentOccludeModelTri = tri; //bug fix for some reason the treeview selects the project node here. CurrentOccludeModel = tri.Model; @@ -3059,7 +3087,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYmapFile.RemoveOccludeModelTriangle(CurrentOccludeModelTri); //WorldForm.SelectItem(null, null, null); @@ -3100,7 +3128,7 @@ namespace CodeWalker.Project { if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } var xmlpath = ShowOpenDialog("XML Files|*.xml", string.Empty); @@ -3182,7 +3210,7 @@ namespace CodeWalker.Project if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddCarGen(cg); } @@ -3214,13 +3242,13 @@ namespace CodeWalker.Project cent.tintValue = tint; } - YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, ref cent); + YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, cent); ent.SetArchetype(GameFileCache.GetArchetype(cent.archetypeName)); if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { CurrentYmapFile.AddEntity(ent); } @@ -3261,25 +3289,26 @@ namespace CodeWalker.Project - public void NewYtyp() + public async ValueTask NewYtyp() { - if (CurrentProjectFile == null) + if (CurrentProjectFile is null) { - NewProject(); + await NewProjectAsync(); } - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null) + return; int testi = 1; string fname = string.Empty; bool filenameok = false; while (!filenameok) { - fname = "types" + testi.ToString() + ".ytyp"; + fname = $"types{testi}.ytyp"; filenameok = !CurrentProjectFile.ContainsYtyp(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YtypFile ytyp = CurrentProjectFile.AddYtypFile(fname); if (ytyp != null) @@ -3293,9 +3322,10 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveYtyp(bool saveas = false) + public async ValueTask SaveYtyp(bool saveas = false) { - if (CurrentYtypFile == null) return; + if (CurrentYtypFile == null) + return; string ytypname = CurrentYtypFile.Name; string filepath = CurrentYtypFile.FilePath; if (string.IsNullOrEmpty(filepath)) @@ -3310,7 +3340,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to ytyp objects... + lock (ProjectSyncRoot) //need to sync writes to ytyp objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -3332,16 +3362,16 @@ namespace CodeWalker.Project } - if (data != null) + if (data is not null) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetYtypHasChanged(false); if (saveas) { - if (CurrentProjectFile != null) + if (CurrentProjectFile is not null) { string origpath = CurrentProjectFile.GetRelativePath(origfile); string newpath = CurrentProjectFile.GetRelativePath(CurrentYtypFile.FilePath); @@ -3357,7 +3387,7 @@ namespace CodeWalker.Project SetCurrentSaveItem(); } - if (CurrentYtypFile.SaveWarnings != null) + if (CurrentYtypFile.SaveWarnings is not null) { string w = string.Join("\n", CurrentYtypFile.SaveWarnings); MessageBox.Show(CurrentYtypFile.SaveWarnings.Count.ToString() + " warnings were generated while saving the ytyp:\n" + w); @@ -3366,26 +3396,32 @@ namespace CodeWalker.Project } public void AddYtypToProject(YtypFile ytyp) { - if (ytyp == null) return; - if (CurrentProjectFile == null) + if (ytyp is null) + return; + if (CurrentProjectFile is null) { - NewProject(); + NewProjectAsync(); } - if (YtypExistsInProject(ytyp)) return; + if (YtypExistsInProject(ytyp)) + return; + if (CurrentProjectFile.AddYtypFile(ytyp)) { ytyp.HasChanged = true; CurrentProjectFile.HasChanged = true; LoadProjectTree(); } + CurrentYtypFile = ytyp; RefreshUI(); AddProjectArchetypes(ytyp); } public void RemoveYtypFromProject() { - if (CurrentYtypFile == null) return; - if (CurrentProjectFile == null) return; + if (CurrentYtypFile is null) + return; + if (CurrentProjectFile is null) + return; RemoveProjectArchetypes(CurrentYtypFile); CurrentProjectFile.RemoveYtypFile(CurrentYtypFile); CurrentYtypFile = null; @@ -3394,14 +3430,17 @@ namespace CodeWalker.Project } public bool YtypExistsInProject(YtypFile ytyp) { - if (ytyp == null) return false; - if (CurrentProjectFile == null) return false; + if (ytyp is null) + return false; + if (CurrentProjectFile is null) + return false; return CurrentProjectFile.ContainsYtyp(ytyp); } public Archetype NewArchetype(Archetype copy = null) { - if (CurrentYtypFile == null) return null; + if (CurrentYtypFile == null) + return null; var archetype = CurrentYtypFile.AddArchetype(); var archetypeDef = archetype._BaseArchetypeDef; if (copy == null) @@ -3411,7 +3450,7 @@ namespace CodeWalker.Project } if (copy != null) { - archetype.Init(CurrentYtypFile, ref copy._BaseArchetypeDef); + archetype.Init(CurrentYtypFile, in copy._BaseArchetypeDef); } archetype._BaseArchetypeDef = archetypeDef; @@ -3561,14 +3600,14 @@ namespace CodeWalker.Project cent.rotation = rot.ToVector4(); var createindex = mloArch.entities.Length; - var ment = new MCEntityDef(ref cent, mloArch); + var ment = new MCEntityDef(in cent, mloArch); var outEnt = mloInstance.CreateYmapEntity(mloInstance.Owner, ment, createindex); try { if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { mloArch.AddEntity(outEnt, roomIndex, portalIndex, entsetIndex); mloInstance.AddEntity(outEnt); @@ -3585,6 +3624,7 @@ namespace CodeWalker.Project catch (Exception e) { MessageBox.Show(this, e.Message, "Create MLO Entity Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + Console.WriteLine(e); return null; } @@ -3667,11 +3707,6 @@ namespace CodeWalker.Project mlo.AddPortal(portal); - var mloInstance = TryGetMloInstance(mlo); - if (mloInstance != null) - { - } - LoadProjectTree(); ProjectExplorer?.TrySelectMloPortalTreeNode(portal); CurrentMloPortal = portal; @@ -3682,7 +3717,8 @@ namespace CodeWalker.Project public MCMloEntitySet NewMloEntitySet(MCMloEntitySet copy = null) { var mlo = CurrentMloRoom?.OwnerMlo ?? CurrentMloPortal?.OwnerMlo ?? CurrentMloEntitySet?.OwnerMlo ?? (CurrentEntity?.MloParent.Archetype as MloArchetype) ?? (CurrentArchetype as MloArchetype); - if (mlo == null) return null; + if (mlo == null) + return null; if (copy == null) { @@ -3711,7 +3747,7 @@ namespace CodeWalker.Project LoadProjectTree(); ProjectExplorer?.TrySelectMloEntitySetTreeNode(set); CurrentMloEntitySet = set; - CurrentYtypFile = set?.OwnerMlo?.Ytyp; + CurrentYtypFile = set.OwnerMlo?.Ytyp; return set; } @@ -3728,7 +3764,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentArchetype.Ytyp.RemoveArchetype(CurrentArchetype); //WorldForm.SelectItem(null, null, null); @@ -3797,7 +3833,7 @@ namespace CodeWalker.Project { if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { mloArchetype.RemoveEntity(delent); mloInstance.DeleteEntity(delent); @@ -3919,7 +3955,8 @@ namespace CodeWalker.Project private void AddProjectArchetypes(YtypFile ytyp) { - if (ytyp?.AllArchetypes == null) return; + if (ytyp is null) + return; foreach (var arch in ytyp.AllArchetypes) { AddProjectArchetype(arch); @@ -3927,14 +3964,15 @@ namespace CodeWalker.Project } private void AddProjectArchetype(Archetype arch) { - lock (projectsyncroot) + lock (ProjectSyncRoot) { GameFileCache.AddProjectArchetype(arch); } } private void RemoveProjectArchetypes(YtypFile ytyp) { - if (ytyp?.AllArchetypes == null) return; + if (ytyp is null) + return; foreach (var arch in ytyp.AllArchetypes) { RemoveProjectArchetype(arch); @@ -3942,7 +3980,7 @@ namespace CodeWalker.Project } private void RemoveProjectArchetype(Archetype arch) { - lock (projectsyncroot) + lock (ProjectSyncRoot) { GameFileCache.RemoveProjectArchetype(arch); } @@ -3954,11 +3992,11 @@ namespace CodeWalker.Project - public void NewYbn() + public async ValueTask NewYbn() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -3972,7 +4010,7 @@ namespace CodeWalker.Project testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YbnFile ybn = CurrentProjectFile.AddYbnFile(fname); if (ybn != null) @@ -3986,10 +4024,13 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveYbn(bool saveas = false) + public async ValueTask SaveYbn(bool saveas = false) { - if ((CurrentYbnFile == null) && (CurrentCollisionBounds != null)) CurrentYbnFile = CurrentCollisionBounds.GetRootYbn(); - if (CurrentYbnFile == null) return; + if ((CurrentYbnFile == null) && (CurrentCollisionBounds != null)) + CurrentYbnFile = CurrentCollisionBounds.GetRootYbn(); + + if (CurrentYbnFile == null) + return; string ybnname = CurrentYbnFile.Name; @@ -4006,7 +4047,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to ybn objects... + lock (ProjectSyncRoot) //need to sync writes to ybn objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -4029,7 +4070,7 @@ namespace CodeWalker.Project if (data != null) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetYbnHasChanged(false); @@ -4057,7 +4098,7 @@ namespace CodeWalker.Project if (ybn == null) return; if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (YbnExistsInProject(ybn)) return; if (CurrentProjectFile.AddYbnFile(ybn)) @@ -4246,7 +4287,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { if (parent != null) { @@ -4303,8 +4344,7 @@ namespace CodeWalker.Project public BoundPolygon NewCollisionPoly(BoundPolygonType type, BoundPolygon copy = null, bool copyPosition = false, bool selectNew = true) { - var bgeom = CurrentCollisionBounds as BoundGeometry; - if (bgeom == null) return null; + if (CurrentCollisionBounds is not BoundGeometry bgeom) return null; var poly = bgeom.AddPolygon(type); @@ -4313,11 +4353,6 @@ namespace CodeWalker.Project var pcap = poly as BoundPolygonCapsule; var pbox = poly as BoundPolygonBox; var pcyl = poly as BoundPolygonCylinder; - var ctri = copy as BoundPolygonTriangle; - var csph = copy as BoundPolygonSphere; - var ccap = copy as BoundPolygonCapsule; - var cbox = copy as BoundPolygonBox; - var ccyl = copy as BoundPolygonCylinder; if (ptri != null) { @@ -4333,7 +4368,7 @@ namespace CodeWalker.Project switch (type) { case BoundPolygonType.Triangle: - if ((ptri != null) && (ctri != null)) + if ((ptri != null) && (copy is BoundPolygonTriangle ctri)) { ptri.vertFlag1 = ctri.vertFlag1; ptri.vertFlag2 = ctri.vertFlag2; @@ -4341,24 +4376,24 @@ namespace CodeWalker.Project } break; case BoundPolygonType.Sphere: - if ((psph != null) && (csph != null)) + if ((psph != null) && (copy is BoundPolygonSphere csph)) { psph.sphereRadius = csph.sphereRadius; } break; case BoundPolygonType.Capsule: - if ((pcap != null) && (ccap != null)) + if ((pcap != null) && (copy is BoundPolygonCapsule ccap)) { pcap.capsuleRadius = ccap.capsuleRadius; } break; case BoundPolygonType.Box: - if ((pbox != null) && (cbox != null)) + if ((pbox != null) && (copy is BoundPolygonBox cbox)) { } break; case BoundPolygonType.Cylinder: - if ((pcyl != null) && (ccyl != null)) + if ((pcyl != null) && (copy is BoundPolygonCylinder ccyl)) { pcyl.cylinderRadius = ccyl.cylinderRadius; } @@ -4459,7 +4494,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentCollisionPoly.Owner.DeletePolygon(CurrentCollisionPoly); //WorldForm.SelectItem(null, null, null); @@ -4539,7 +4574,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentCollisionVertex.Owner.DeleteVertex(CurrentCollisionVertex.Index); //WorldForm.SelectItem(null, null, null); @@ -4580,11 +4615,11 @@ namespace CodeWalker.Project - public void NewYnd() + public async ValueTask NewYnd() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -4593,12 +4628,12 @@ namespace CodeWalker.Project bool filenameok = false; while (!filenameok) { - fname = "nodes" + testi.ToString() + ".ynd"; + fname = $"nodes{testi}.ynd"; filenameok = !CurrentProjectFile.ContainsYnd(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YndFile ynd = CurrentProjectFile.AddYndFile(fname); if (ynd != null) @@ -4615,7 +4650,7 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveYnd(bool saveas = false) + public async ValueTask SaveYnd(bool saveas = false) { if ((CurrentYndFile == null) && (CurrentPathNode != null)) CurrentYndFile = CurrentPathNode.Ynd; if (CurrentYndFile == null) return; @@ -4634,7 +4669,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to ynd objects... + lock (ProjectSyncRoot) //need to sync writes to ynd objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -4657,7 +4692,7 @@ namespace CodeWalker.Project if (data != null) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetYndHasChanged(false); @@ -4685,7 +4720,7 @@ namespace CodeWalker.Project if (ynd == null) return; if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (YndExistsInProject(ynd)) return; if (CurrentProjectFile.AddYndFile(ynd)) @@ -4809,10 +4844,10 @@ namespace CodeWalker.Project //} bool res = false; - YndFile[] affectedFiles = new YndFile[0]; + YndFile[] affectedFiles = Array.Empty(); if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentYndFile.RemoveYndNode(WorldForm.Space, CurrentPathNode, true, out affectedFiles); @@ -4867,25 +4902,26 @@ namespace CodeWalker.Project - public void NewYnv() + public async ValueTask NewYnv() { - if (CurrentProjectFile == null) + if (CurrentProjectFile is null) { - NewProject(); + await NewProjectAsync(); } - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null) + return; int testi = 1; string fname = string.Empty; bool filenameok = false; while (!filenameok) { - fname = "navmesh" + testi.ToString() + ".ynv"; + fname = $"navmesh{testi}.ynv"; filenameok = !CurrentProjectFile.ContainsYnv(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YnvFile ynv = CurrentProjectFile.AddYnvFile(fname); if (ynv != null) @@ -4902,10 +4938,14 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveYnv(bool saveas = false) + public async ValueTask SaveYnv(bool saveas = false) { - if ((CurrentYnvFile == null) && (CurrentNavPoly != null)) CurrentYnvFile = CurrentNavPoly.Ynv; - if (CurrentYnvFile == null) return; + if (CurrentYnvFile is null && CurrentNavPoly is not null) + CurrentYnvFile = CurrentNavPoly.Ynv; + + if (CurrentYnvFile is null) + return; + string ynvname = CurrentYnvFile.Name; string filepath = CurrentYnvFile.FilePath; if (string.IsNullOrEmpty(filepath)) @@ -4920,7 +4960,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to ynv objects... + lock (ProjectSyncRoot) //need to sync writes to ynv objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -4943,7 +4983,7 @@ namespace CodeWalker.Project if (data != null) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetYnvHasChanged(false); @@ -4970,7 +5010,7 @@ namespace CodeWalker.Project if (ynv == null) return; if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (YnvExistsInProject(ynv)) return; if (CurrentProjectFile.AddYnvFile(ynv)) @@ -5048,11 +5088,11 @@ namespace CodeWalker.Project - public void NewTrainTrack() + public async ValueTask NewTrainTrack() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -5066,7 +5106,7 @@ namespace CodeWalker.Project testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { TrainTrack track = CurrentProjectFile.AddTrainsFile(fname); if (track != null) @@ -5101,7 +5141,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to objects... + lock (ProjectSyncRoot) //need to sync writes to objects... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -5152,7 +5192,7 @@ namespace CodeWalker.Project if (track == null) return; if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (TrainTrackExistsInProject(track)) return; if (CurrentProjectFile.AddTrainsFile(track)) @@ -5240,7 +5280,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentTrainTrack.RemoveNode(CurrentTrainNode); @@ -5285,11 +5325,11 @@ namespace CodeWalker.Project - public void NewScenario() + public async ValueTask NewScenario() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -5298,12 +5338,12 @@ namespace CodeWalker.Project bool filenameok = false; while (!filenameok) { - fname = "scenario" + testi.ToString() + ".ymt"; + fname = $"scenario{testi}.ymt"; filenameok = !CurrentProjectFile.ContainsScenario(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { YmtFile ymt = CurrentProjectFile.AddScenarioFile(fname); if (ymt != null) @@ -5349,7 +5389,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to scenario... + lock (ProjectSyncRoot) //need to sync writes to scenario... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -5372,7 +5412,7 @@ namespace CodeWalker.Project } - if (data != null) + if (data is not null && data.Length > 0) { File.WriteAllBytes(filepath, data); } @@ -5398,10 +5438,11 @@ namespace CodeWalker.Project } public void AddScenarioToProject(YmtFile ymt) { - if (ymt == null) return; - if (CurrentProjectFile == null) + if (ymt is null) + return; + if (CurrentProjectFile is null) { - NewProject(); + NewProjectAsync(); } if (ScenarioExistsInProject(ymt)) return; if (CurrentProjectFile.AddScenarioFile(ymt)) @@ -5489,7 +5530,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentScenario.ScenarioRegion.RemoveNode(CurrentScenarioNode); } @@ -6270,11 +6311,11 @@ namespace CodeWalker.Project - public void NewAudioFile() + public async ValueTask NewAudioFile() { if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (CurrentProjectFile == null) return; @@ -6283,12 +6324,12 @@ namespace CodeWalker.Project bool filenameok = false; while (!filenameok) { - fname = "dlc" + testi.ToString() + "_game.dat151.rel"; + fname = $"dlc{testi}_game.dat151.rel"; filenameok = !CurrentProjectFile.ContainsAudioRel(fname); testi++; } - lock (projectsyncroot) + lock (ProjectSyncRoot) { RelFile rel = CurrentProjectFile.AddAudioRelFile(fname); if (rel != null) @@ -6302,9 +6343,10 @@ namespace CodeWalker.Project LoadProjectTree(); } - public void SaveAudioFile(bool saveas = false) + public async Task SaveAudioFile(bool saveas = false) { - if (CurrentAudioFile == null) return; + if (CurrentAudioFile == null) + return; string relname = CurrentAudioFile.Name; string filepath = CurrentAudioFile.FilePath; if (string.IsNullOrEmpty(filepath)) @@ -6319,7 +6361,7 @@ namespace CodeWalker.Project byte[] data; - lock (projectsyncroot) //need to sync writes to scenario... + lock (ProjectSyncRoot) //need to sync writes to scenario... { saveas = saveas || string.IsNullOrEmpty(filepath); if (saveas) @@ -6340,9 +6382,9 @@ namespace CodeWalker.Project data = CurrentAudioFile.Save(); } - if (data != null) + if (data is not null && data.Length > 0) { - File.WriteAllBytes(filepath, data); + await File.WriteAllBytesAsync(filepath, data); } SetAudioFileHasChanged(false); @@ -6364,14 +6406,16 @@ namespace CodeWalker.Project SetCurrentSaveItem(); } } - public void AddAudioFileToProject(RelFile rel) + public async ValueTask AddAudioFileToProject(RelFile rel) { - if (rel == null) return; + if (rel == null) + return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } - if (AudioFileExistsInProject(rel)) return; + if (AudioFileExistsInProject(rel)) + return; if (CurrentProjectFile.AddAudioRelFile(rel)) { rel.HasChanged = true; @@ -6391,8 +6435,10 @@ namespace CodeWalker.Project } public void RemoveAudioFileFromProject() { - if (CurrentAudioFile == null) return; - if (CurrentProjectFile == null) return; + if (CurrentAudioFile == null) + return; + if (CurrentProjectFile == null) + return; CurrentProjectFile.RemoveAudioRelFile(CurrentAudioFile); CurrentAudioFile = null; LoadProjectTree(); @@ -6400,8 +6446,10 @@ namespace CodeWalker.Project } public bool AudioFileExistsInProject(RelFile rel) { - if (rel == null) return false; - if (CurrentProjectFile == null) return false; + if (rel == null) + return false; + if (CurrentProjectFile == null) + return false; return CurrentProjectFile.ContainsAudioRel(rel); } @@ -6480,10 +6528,12 @@ namespace CodeWalker.Project } public bool DeleteAudioZone() { - if (CurrentAudioZone?.RelFile != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. - if (CurrentAudioZone?.AudioZone == null) return false; + if (CurrentAudioZone?.RelFile != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. + if (CurrentAudioZone?.AudioZone == null) + return false; //if (MessageBox.Show("Are you sure you want to delete this audio zone?\n" + CurrentAudioZone.GetNameString() + "\n" + CurrentAudioZone.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6494,7 +6544,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioZone.AudioZone); @@ -6596,10 +6646,12 @@ namespace CodeWalker.Project } public bool DeleteAudioEmitter() { - if (CurrentAudioEmitter?.RelFile != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. - if (CurrentAudioEmitter?.AudioEmitter == null) return false; + if (CurrentAudioEmitter?.RelFile != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. + if (CurrentAudioEmitter?.AudioEmitter == null) + return false; //if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioEmitter.GetNameString() + "\n" + CurrentAudioEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6610,7 +6662,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitter.AudioEmitter); @@ -6670,9 +6722,10 @@ namespace CodeWalker.Project } public bool DeleteAudioZoneList() { - if (CurrentAudioZoneList?.Rel != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. + if (CurrentAudioZoneList?.Rel != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. //if (MessageBox.Show("Are you sure you want to delete this audio zone list?\n" + CurrentAudioZoneList.GetNameString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6683,7 +6736,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioZoneList); //WorldForm.SelectItem(null, null, null); @@ -6737,9 +6790,10 @@ namespace CodeWalker.Project } public bool DeleteAudioEmitterList() { - if (CurrentAudioEmitterList?.Rel != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. + if (CurrentAudioEmitterList?.Rel != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. //if (MessageBox.Show("Are you sure you want to delete this audio emitter list?\n" + CurrentAudioEmitterList.GetNameString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6750,7 +6804,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitterList); //WorldForm.SelectItem(null, null, null); @@ -6806,9 +6860,10 @@ namespace CodeWalker.Project } public bool DeleteAudioInterior() { - if (CurrentAudioInterior?.Rel != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. + if (CurrentAudioInterior?.Rel != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. if (MessageBox.Show("Are you sure you want to delete this audio interior?\n" + CurrentAudioInterior.GetNameString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6819,7 +6874,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioInterior); //WorldForm.SelectItem(null, null, null); @@ -6877,9 +6932,10 @@ namespace CodeWalker.Project } public bool DeleteAudioInteriorRoom() { - if (CurrentAudioInteriorRoom?.Rel != CurrentAudioFile) return false; - if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. - if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. + if (CurrentAudioInteriorRoom?.Rel != CurrentAudioFile) + return false; + if (CurrentAudioFile?.RelDatas == null || CurrentAudioFile.RelDatas.Length == 0) + return false; //nothing to delete.. if (MessageBox.Show("Are you sure you want to delete this audio interior room?\n" + CurrentAudioInteriorRoom.GetNameString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6890,7 +6946,7 @@ namespace CodeWalker.Project bool res = false; if (WorldForm != null) { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + using (WorldForm.RenderSyncRoot.WaitDisposable()) //don't try to do this while rendering... { res = CurrentAudioFile.RemoveRelData(CurrentAudioInteriorRoom); //WorldForm.SelectItem(null, null, null); @@ -6928,12 +6984,12 @@ namespace CodeWalker.Project - public void AddYdrToProject(YdrFile ydr) + public async ValueTask AddYdrToProject(YdrFile ydr) { if (ydr == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (YdrExistsInProject(ydr)) return; if (CurrentProjectFile.AddYdrFile(ydr)) @@ -6964,14 +7020,15 @@ namespace CodeWalker.Project } - public void AddYddToProject(YddFile ydd) + public async ValueTask AddYddToProject(YddFile ydd) { if (ydd == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } - if (YddExistsInProject(ydd)) return; + if (YddExistsInProject(ydd)) + return; if (CurrentProjectFile.AddYddFile(ydd)) { //ydd.HasChanged = true; @@ -6984,8 +7041,10 @@ namespace CodeWalker.Project } public void RemoveYddFromProject() { - if (CurrentYddFile == null) return; - if (CurrentProjectFile == null) return; + if (CurrentYddFile == null) + return; + if (CurrentProjectFile == null) + return; GameFileCache?.RemoveProjectFile(CurrentYddFile); CurrentProjectFile.RemoveYddFile(CurrentYddFile); CurrentYddFile = null; @@ -7000,12 +7059,12 @@ namespace CodeWalker.Project } - public void AddYftToProject(YftFile yft) + public async ValueTask AddYftToProject(YftFile yft) { if (yft == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (YftExistsInProject(yft)) return; if (CurrentProjectFile.AddYftFile(yft)) @@ -7020,8 +7079,10 @@ namespace CodeWalker.Project } public void RemoveYftFromProject() { - if (CurrentYftFile == null) return; - if (CurrentProjectFile == null) return; + if (CurrentYftFile == null) + return; + if (CurrentProjectFile == null) + return; GameFileCache?.RemoveProjectFile(CurrentYftFile); CurrentProjectFile.RemoveYftFile(CurrentYftFile); CurrentYftFile = null; @@ -7030,20 +7091,23 @@ namespace CodeWalker.Project } public bool YftExistsInProject(YftFile yft) { - if (yft == null) return false; - if (CurrentProjectFile == null) return false; + if (yft == null) + return false; + if (CurrentProjectFile == null) + return false; return CurrentProjectFile.ContainsYft(yft); } - public void AddYtdToProject(YtdFile ytd) + public async ValueTask AddYtdToProject(YtdFile ytd) { if (ytd == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } - if (YtdExistsInProject(ytd)) return; + if (YtdExistsInProject(ytd)) + return; if (CurrentProjectFile.AddYtdFile(ytd)) { //ytd.HasChanged = true; @@ -7089,55 +7153,64 @@ namespace CodeWalker.Project ymaps.Clear(); //remove all the gtav ymaps. } - lock (projectsyncroot) + if (CurrentProjectFile is null) + return; + + if (!renderitems || CurrentProjectFile is null) + return; + if (CurrentProjectFile.YmapFiles.Count == 0 && CurrentProjectFile.YtypFiles.Count == 0) { - if (CurrentProjectFile == null) return; - var hasymapytyp = ((CurrentProjectFile.YmapFiles.Count > 0) || (CurrentProjectFile.YtypFiles.Count > 0)); - if (renderitems && hasymapytyp) + return; + } + + lock (ProjectSyncRoot) + { + lock(CurrentProjectFile.YmapFiles) { - for (int i = 0; i < CurrentProjectFile.YmapFiles.Count; i++) + foreach (var ymap in CurrentProjectFile.YmapFiles.AsSpan()) { - var ymap = CurrentProjectFile.YmapFiles[i]; if (ymap.Loaded) { ymaps[ymap.RpfFileEntry.ShortNameHash] = ymap; } } + } - if (DateTime.Now - LastProjectCheck < TimeSpan.FromSeconds(1)) + //if (DateTime.Now - LastProjectCheck < TimeSpan.FromSeconds(1)) + //{ + // return; + //} + + LastProjectCheck = DateTime.Now; + + visiblemloentities.Clear(); + foreach (var ymap in ymaps.Values)//TODO: improve performance + { + foreach (var ent in ymap.AllEntities) { - return; + Archetype? arch = GameFileCache.GetArchetype(ent._CEntityDef.archetypeName); + if (arch is not null) + { + if (ent.Archetype != arch) + { + ent.SetArchetype(arch); //swap archetype to project one... + if (ent.IsMlo) + { + ent.MloInstance.InitYmapEntityArchetypes(GameFileCache); + } + } + } + else + { + //Console.WriteLine($"Couldn't find archetype {ent._CEntityDef.archetypeName} for project ymap {ymap.Name}"); + } } - LastProjectCheck = DateTime.Now; - - visiblemloentities.Clear(); - foreach (var ymap in ymaps.Values)//TODO: improve performance + foreach(var mloDef in ymap.MloEntities) { - if (ymap.AllEntities != null)//THIS IS TERRIBLE! EATING ALL FPS - { - foreach (var ent in ymap.AllEntities)//WHYYYY - maybe only do this after loading/editing ytyp! - { - Archetype arch = GameFileCache.GetArchetype(ent._CEntityDef.archetypeName); - if ((arch != null) && (ent.Archetype != arch)) - { - ent.SetArchetype(arch); //swap archetype to project one... - if (ent.IsMlo) - { - ent.MloInstance.InitYmapEntityArchetypes(GameFileCache); - } - } - - } - } - if (ymap.MloEntities != null) - { - foreach (var mloDef in ymap.MloEntities) - { - if (mloDef.Archetype == null) continue; // archetype was changed from an mlo to a regular archetype - visiblemloentities[mloDef.Archetype._BaseArchetypeDef.name] = mloDef; - } - } + if (mloDef.Archetype is null) + continue; // archetype was changed from an mlo to a regular archetype + visiblemloentities[mloDef.Archetype._BaseArchetypeDef.name] = mloDef; } } } @@ -7149,25 +7222,28 @@ namespace CodeWalker.Project ybns.Clear(); } - lock (projectsyncroot) - { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null || CurrentProjectFile.YbnFiles.Count == 0) + return; + lock (ProjectSyncRoot) + { visibleybns.Clear(); - for (int i = 0; i < ybns.Count; i++) + + foreach(var ybn in ybns.AsSpan()) { - var ybn = ybns[i]; visibleybns[ybn.Name] = ybn; } - for (int i = 0; i < CurrentProjectFile.YbnFiles.Count; i++) + lock(CurrentProjectFile.YbnFiles) { - var ybn = CurrentProjectFile.YbnFiles[i]; - if (ybn.Loaded) + foreach (var ybn in CurrentProjectFile.YbnFiles.AsSpan()) { - if (!visiblemloentities.ContainsKey((ybn.RpfFileEntry != null) ? ybn.RpfFileEntry.ShortNameHash : 0)) + if (ybn.Loaded) { - visibleybns[ybn.Name] = ybn; + if (!visiblemloentities.ContainsKey(ybn.RpfFileEntry?.ShortNameHash ?? 0)) + { + visibleybns[ybn.Name] = ybn; + } } } } @@ -7181,34 +7257,35 @@ namespace CodeWalker.Project //messy way to gather the interior ybns! + projectybns.Clear(); - for (int i = 0; i < CurrentProjectFile.YbnFiles.Count; i++) + lock (CurrentProjectFile.YbnFiles) { - var ybn = CurrentProjectFile.YbnFiles[i]; - if (ybn.Loaded) + foreach (var ybn in CurrentProjectFile.YbnFiles.AsSpan()) { - projectybns[ybn.RpfFileEntry?.ShortNameHash ?? JenkHash.GenHash(ybn.Name)] = ybn; + if (ybn.Loaded) + { + projectybns[ybn.RpfFileEntry?.ShortNameHash ?? JenkHash.GenHash(ybn.Name)] = ybn; + } } } interiorslist.Clear(); interiorslist.AddRange(interiors.Keys); - for (int i = 0; i < interiorslist.Count; i++) + + foreach(var mlo in interiorslist.AsSpan()) { - var mlo = interiorslist[i]; var hash = mlo._CEntityDef.archetypeName; - if (projectybns.TryGetValue(hash, out YbnFile ybn)) + if (projectybns.TryGetValue(hash, out var ybn)) { - if ((ybn != null) && (ybn.Loaded)) + if (ybn is not null && ybn.Loaded) { interiors[mlo] = ybn; } } } - - } - } + public void GetVisibleYnds(Camera camera, List ynds) { if (hidegtavmap) @@ -7216,26 +7293,30 @@ namespace CodeWalker.Project ynds.Clear(); } - lock (projectsyncroot) - { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null || CurrentProjectFile.YndFiles.Count == 0) + return; + lock (ProjectSyncRoot) + { visibleynds.Clear(); - for (int i = 0; i < ynds.Count; i++) + + foreach(var ynd in ynds.AsSpan()) { - var ynd = ynds[i]; visibleynds[ynd.AreaID] = ynd; } - for (int i = 0; i < CurrentProjectFile.YndFiles.Count; i++) + lock(CurrentProjectFile.YndFiles) { - var ynd = CurrentProjectFile.YndFiles[i]; - if (ynd.Loaded) + foreach(var ynd in CurrentProjectFile.YndFiles.AsSpan()) { - visibleynds[ynd.AreaID] = ynd; + if (ynd.Loaded) + { + visibleynds[ynd.AreaID] = ynd; + } } } + ynds.Clear(); foreach (var ynd in visibleynds.Values) { @@ -7251,10 +7332,11 @@ namespace CodeWalker.Project ynvs.Clear(); } - lock (projectsyncroot) - { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null || CurrentProjectFile.YnvFiles.Count == 0) + return; + lock (ProjectSyncRoot) + { visibleynvs.Clear(); for (int i = 0; i < ynvs.Count; i++) { @@ -7262,15 +7344,18 @@ namespace CodeWalker.Project visibleynvs[ynv.AreaID] = ynv; } - for (int i = 0; i < CurrentProjectFile.YnvFiles.Count; i++) + lock(CurrentProjectFile.YnvFiles) { - var ynv = CurrentProjectFile.YnvFiles[i]; - if (ynv.Loaded) + foreach(var ynv in CurrentProjectFile.YnvFiles.AsSpan()) { - visibleynvs[ynv.AreaID] = ynv; + if (ynv.Loaded) + { + visibleynvs[ynv.AreaID] = ynv; + } } } + ynvs.Clear(); foreach (var ynv in visibleynvs.Values) { @@ -7286,11 +7371,11 @@ namespace CodeWalker.Project tracks.Clear(); } + if (CurrentProjectFile is null || CurrentProjectFile.TrainsFiles.Count == 0) + return; - lock (projectsyncroot) + lock (ProjectSyncRoot) { - if (CurrentProjectFile == null) return; - visibletrains.Clear(); for (int i = 0; i < tracks.Count; i++) { @@ -7298,15 +7383,18 @@ namespace CodeWalker.Project visibletrains[track.Name] = track; } - for (int i = 0; i < CurrentProjectFile.TrainsFiles.Count; i++) + lock(CurrentProjectFile.TrainsFiles) { - var track = CurrentProjectFile.TrainsFiles[i]; - if (track.Loaded) + foreach(var track in CurrentProjectFile.TrainsFiles) { - visibletrains[track.Name] = track; + if (track.Loaded) + { + visibletrains[track.Name] = track; + } } } + tracks.Clear(); foreach (var track in visibletrains.Values) { @@ -7322,24 +7410,26 @@ namespace CodeWalker.Project ymts.Clear(); } + if (CurrentProjectFile is null || CurrentProjectFile.ScenarioFiles.Count == 0) + return; - lock (projectsyncroot) + lock (ProjectSyncRoot) { - if (CurrentProjectFile == null) return; - visiblescenarios.Clear(); - for (int i = 0; i < ymts.Count; i++) + + foreach(var ymt in ymts.AsSpan()) { - var ymt = ymts[i]; visiblescenarios[ymt.Name] = ymt; } - for (int i = 0; i < CurrentProjectFile.ScenarioFiles.Count; i++) + lock(CurrentProjectFile.ScenarioFiles) { - var scenario = CurrentProjectFile.ScenarioFiles[i]; - if (scenario.Loaded) + foreach (var scenario in CurrentProjectFile.ScenarioFiles.AsSpan()) { - visiblescenarios[scenario.Name] = scenario; + if (scenario.Loaded) + { + visiblescenarios[scenario.Name] = scenario; + } } } @@ -7358,23 +7448,26 @@ namespace CodeWalker.Project rels.Clear(); } - lock (projectsyncroot) - { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null || CurrentProjectFile.AudioRelFiles.Count == 0) + return; + lock (ProjectSyncRoot) + { visibleaudiofiles.Clear(); - for (int i = 0; i < rels.Count; i++) + + foreach(var rel in rels.AsSpan()) { - var rel = rels[i]; visibleaudiofiles[rel.RpfFileEntry.NameHash] = rel; } - for (int i = 0; i < CurrentProjectFile.AudioRelFiles.Count; i++) + lock(CurrentProjectFile.AudioRelFiles) { - var rel = CurrentProjectFile.AudioRelFiles[i]; - if (rel.Loaded) + foreach (var rel in CurrentProjectFile.AudioRelFiles.AsSpan()) { - visibleaudiofiles[rel.RpfFileEntry.NameHash] = rel; + if (rel.Loaded) + { + visibleaudiofiles[rel.RpfFileEntry.NameHash] = rel; + } } } @@ -7411,7 +7504,7 @@ namespace CodeWalker.Project } - lock (projectsyncroot) + lock (ProjectSyncRoot) { if (renderitems && (CurrentProjectFile != null)) { @@ -7468,12 +7561,22 @@ namespace CodeWalker.Project public MloInstanceData TryGetMloInstance(MloArchetype arch) { - lock (projectsyncroot) + lock (ProjectSyncRoot) { - if (arch == null) return null; + if (arch == null) + { + return null; + } MetaHash name = arch._BaseArchetypeDef.name; - if (name == 0) return null; - if (!visiblemloentities.ContainsKey(name)) return null; + if (name == 0) + { + return null; + } + if (!visiblemloentities.ContainsKey(name)) + { + MessageBox.Show($"Couldn't find MloInstance from Archetype {arch.Name} ({arch.AssetName}), is the placement ymap missing?"); + return null; + } return visiblemloentities[name]?.MloInstance; } } @@ -7485,7 +7588,7 @@ namespace CodeWalker.Project { if (InvokeRequired) { - BeginInvoke(new Action(() => { OnWorldSelectionChanged(sel); })); + BeginInvoke(OnWorldSelectionChanged, sel); } else { @@ -7683,8 +7786,11 @@ namespace CodeWalker.Project CurrentScenarioNode = scenariond; CurrentScenarioChainEdge = scenarioedge; CurrentAudioFile = audiofile; - CurrentAudioZone = (audiopl?.AudioZone != null) ? audiopl : null; - CurrentAudioEmitter = (audiopl?.AudioEmitter != null) ? audiopl : null; + if (audiopl is not null) + { + CurrentAudioZone = (audiopl.AudioZone is not null) ? audiopl : null; + CurrentAudioEmitter = (audiopl.AudioEmitter is not null) ? audiopl : null; + } CurrentAudioZoneList = null; CurrentAudioEmitterList = null; CurrentYdrFile = null; @@ -7702,13 +7808,13 @@ namespace CodeWalker.Project } catch { } } - public void OnWorldSelectionModified(MapSelection sel) + public async ValueTask OnWorldSelectionModified(MapSelection sel) { try { if (InvokeRequired) { - BeginInvoke(new Action(() => { OnWorldSelectionModified(sel); })); + BeginInvoke(OnWorldSelectionModified, sel); } else { @@ -7730,23 +7836,23 @@ namespace CodeWalker.Project } else if (sel.EntityDef != null) { - OnWorldEntityModified(sel.EntityDef); + await OnWorldEntityModifiedAsync(sel.EntityDef); } else if (sel.CarGenerator != null) { - OnWorldCarGenModified(sel.CarGenerator); + await OnWorldCarGenModifiedAsync(sel.CarGenerator); } else if (sel.LodLight != null) { - OnWorldLodLightModified(sel.LodLight); + await OnWorldLodLightModifiedAsync(sel.LodLight); } else if (sel.BoxOccluder != null) { - OnWorldBoxOccluderModified(sel.BoxOccluder); + await OnWorldBoxOccluderModifiedAsync(sel.BoxOccluder); } else if (sel.OccludeModelTri != null) { - OnWorldOccludeModelTriModified(sel.OccludeModelTri); + await OnWorldOccludeModelTriModifiedAsync(sel.OccludeModelTri); } else if (sel.PathNode != null) { @@ -7774,7 +7880,7 @@ namespace CodeWalker.Project } else if (sel.Audio != null) { - OnWorldAudioPlacementModified(sel.Audio); + await OnWorldAudioPlacementModifiedAsync(sel.Audio); } } } @@ -7789,7 +7895,7 @@ namespace CodeWalker.Project } } - private void OnWorldEntityModified(YmapEntityDef ent) + private async ValueTask OnWorldEntityModifiedAsync(YmapEntityDef ent) { if ((ent.Ymap == null) && (ent.MloParent == null)) { @@ -7798,7 +7904,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (ent.MloParent == null && ent.Ymap != null) @@ -7806,7 +7912,7 @@ namespace CodeWalker.Project if (!YmapExistsInProject(ent.Ymap)) { ent.Ymap.HasChanged = true; - AddYmapToProject(ent.Ymap); + await AddYmapToProjectAsync(ent.Ymap); ProjectExplorer?.TrySelectEntityTreeNode(ent); } @@ -7860,19 +7966,19 @@ namespace CodeWalker.Project } } } - private void OnWorldCarGenModified(YmapCarGen cargen) + private async ValueTask OnWorldCarGenModifiedAsync(YmapCarGen cargen) { if (cargen?.Ymap == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (!YmapExistsInProject(cargen.Ymap)) { cargen.Ymap.HasChanged = true; - AddYmapToProject(cargen.Ymap); + await AddYmapToProjectAsync(cargen.Ymap); ProjectExplorer?.TrySelectCarGenTreeNode(cargen); } @@ -7895,24 +8001,24 @@ namespace CodeWalker.Project } } - private void OnWorldLodLightModified(YmapLODLight lodlight) + private async ValueTask OnWorldLodLightModifiedAsync(YmapLODLight lodlight) { if (lodlight?.Ymap == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (!YmapExistsInProject(lodlight.Ymap)) { if (lodlight.DistLodLights?.Ymap != null) { - AddYmapToProject(lodlight.DistLodLights.Ymap); + await AddYmapToProjectAsync(lodlight.DistLodLights.Ymap); lodlight.DistLodLights.Ymap.HasChanged = true; } lodlight.Ymap.HasChanged = true; - AddYmapToProject(lodlight.Ymap); + await AddYmapToProjectAsync(lodlight.Ymap); ProjectExplorer?.TrySelectLodLightTreeNode(lodlight); } @@ -7935,19 +8041,19 @@ namespace CodeWalker.Project } } - private void OnWorldBoxOccluderModified(YmapBoxOccluder box) + private async ValueTask OnWorldBoxOccluderModifiedAsync(YmapBoxOccluder box) { if (box?.Ymap == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (!YmapExistsInProject(box.Ymap)) { box.Ymap.HasChanged = true; - AddYmapToProject(box.Ymap); + await AddYmapToProjectAsync(box.Ymap); ProjectExplorer?.TrySelectBoxOccluderTreeNode(box); } @@ -7970,19 +8076,19 @@ namespace CodeWalker.Project } } - private void OnWorldOccludeModelTriModified(YmapOccludeModelTriangle tri) + private async ValueTask OnWorldOccludeModelTriModifiedAsync(YmapOccludeModelTriangle tri) { if (tri?.Ymap == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (!YmapExistsInProject(tri.Ymap)) { tri.Ymap.HasChanged = true; - AddYmapToProject(tri.Ymap); + await AddYmapToProjectAsync(tri.Ymap); ProjectExplorer?.TrySelectOccludeModelTriangleTreeNode(tri); } @@ -8014,7 +8120,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YbnExistsInProject(ybn)) @@ -8053,7 +8159,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YbnExistsInProject(ybn)) @@ -8092,7 +8198,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YbnExistsInProject(ybn)) @@ -8128,7 +8234,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YndExistsInProject(node.Ynd)) @@ -8169,7 +8275,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YnvExistsInProject(poly.Ynv)) @@ -8204,7 +8310,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YnvExistsInProject(point.Ynv)) @@ -8239,7 +8345,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!YnvExistsInProject(portal.Ynv)) @@ -8274,7 +8380,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!TrainTrackExistsInProject(node.Track)) @@ -8306,7 +8412,7 @@ namespace CodeWalker.Project if (CurrentProjectFile == null) { - NewProject(); + NewProjectAsync(); } if (!ScenarioExistsInProject(node.Ymt)) @@ -8333,19 +8439,19 @@ namespace CodeWalker.Project } } } - private void OnWorldAudioPlacementModified(AudioPlacement audio) + private async ValueTask OnWorldAudioPlacementModifiedAsync(AudioPlacement audio) { if (audio?.RelFile == null) return; if (CurrentProjectFile == null) { - NewProject(); + await NewProjectAsync(); } if (!AudioFileExistsInProject(audio.RelFile)) { audio.RelFile.HasChanged = true; - AddAudioFileToProject(audio.RelFile); + await AddAudioFileToProject(audio.RelFile); if (audio.AudioZone != null) { ProjectExplorer?.TrySelectAudioZoneTreeNode(audio); @@ -8393,20 +8499,24 @@ namespace CodeWalker.Project public void SetProjectHasChanged(bool changed) { - if (CurrentProjectFile == null) return; + if (CurrentProjectFile is null) + return; - CurrentProjectFile.HasChanged = changed; + this.InvokeIfRequired(() => + { + CurrentProjectFile.HasChanged = changed; - ProjectExplorer?.SetProjectHasChanged(changed); + ProjectExplorer?.SetProjectHasChanged(changed); - UpdateFormTitleText(); + UpdateFormTitleText(); + }); } public void SetYmapHasChanged(bool changed) { if (CurrentYmapFile == null) return; bool changechange = changed != CurrentYmapFile.HasChanged; - if (!changechange) return; + //if (!changechange) return; CurrentYmapFile.HasChanged = changed; @@ -8561,20 +8671,20 @@ namespace CodeWalker.Project return pos; } - public RpfFileEntry FindParentYmapEntry(uint hash) + public RpfFileEntry? FindParentYmapEntry(uint hash) { if (CurrentProjectFile != null) { foreach (var ymap in CurrentProjectFile.YmapFiles) { - if ((ymap._CMapData.name.Hash == hash) || (JenkHash.GenHash(Path.GetFileNameWithoutExtension(ymap.Name)) == hash)) + if (ymap._CMapData.name.Hash == hash || JenkHash.GenHash(Path.GetFileNameWithoutExtension(ymap.Name)) == hash) { return ymap.RpfFileEntry; } } } - if ((GameFileCache != null) && (GameFileCache.IsInited)) + if (GameFileCache is not null && GameFileCache.IsInited) { return GameFileCache.GetYmapEntry(hash); } @@ -8590,45 +8700,47 @@ namespace CodeWalker.Project //######## Private methods - private void LoadYmapFromFile(YmapFile ymap, string filename) + private async Task LoadYmapFromFileAsync(YmapFile ymap, string filename) { - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); - ymap.Load(data); + await ymap.LoadAsync(data); ymap.InitYmapEntityArchetypes(GameFileCache); //this needs to be done after calling YmapFile.Load() - } - private void LoadYtypFromFile(YtypFile ytyp, string filename) - { - byte[] data = File.ReadAllBytes(filename); - ytyp.Load(data); + GameFileCache?.AddProjectFile(ymap); + } + private async Task LoadYtypFromFileAsync(YtypFile ytyp, string filename) + { + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); + + await ytyp.LoadAsync(data); AddProjectArchetypes(ytyp); } - private void LoadYbnFromFile(YbnFile ybn, string filename) + private async Task LoadYbnFromFileAsync(YbnFile ybn, string filename) { - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); ybn.Load(data); - if (WorldForm != null) + if (WorldForm is not null) { - if (ybn?.Bounds != null) + if (ybn.Bounds is not null) { - WorldForm.UpdateCollisionBoundsGraphics(ybn?.Bounds); + WorldForm.UpdateCollisionBoundsGraphics(ybn.Bounds); } } } - private void LoadYndFromFile(YndFile ynd, string filename) + private async Task LoadYndFromFileAsync(YndFile ynd, string filename) { - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename); ynd.Load(data); - WorldForm.Space.PatchYndFile(ynd); - if (WorldForm != null) + if (WorldForm is not null) { + WorldForm.Space.PatchYndFile(ynd); // TODO: Wasteful -- be smarter about this foreach (var file in CurrentProjectFile.YndFiles) { @@ -8647,20 +8759,17 @@ namespace CodeWalker.Project //note: this is actually necessary to properly populate junctions data........ } } - private void LoadYnvFromFile(YnvFile ynv, string filename) + private async Task LoadYnvFromFileAsync(YnvFile ynv, string filename) { - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename); ynv.Load(data); - if (WorldForm != null) - { - WorldForm.UpdateNavYnvGraphics(ynv, true); //polys don't get drawn until something changes otherwise - } + WorldForm?.UpdateNavYnvGraphics(ynv, true); //polys don't get drawn until something changes otherwise } - private void LoadTrainTrackFromFile(TrainTrack track, string filename) + private async Task LoadTrainTrackFromFileAsync(TrainTrack track, string filename) { - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename); string fname = new FileInfo(filename).Name; @@ -8669,10 +8778,7 @@ namespace CodeWalker.Project track.FilePath = filename; track.RpfFileEntry.Name = fname; - if (WorldForm != null) - { - WorldForm.UpdateTrainTrackGraphics(track, true); //links don't get drawn until something changes otherwise - } + WorldForm?.UpdateTrainTrackGraphics(track, true); //links don't get drawn until something changes otherwise } private void LoadScenarioFromFile(YmtFile ymt, string filename) { @@ -8686,64 +8792,52 @@ namespace CodeWalker.Project rel.Load(data, rel?.RpfFileEntry); } - private void LoadYdrFromFile(YdrFile ydr, string filename) + private async Task LoadYdrFromFile(YdrFile ydr, string filename) { AddFilenameToJenkIndex(filename); - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); - ydr.Load(data); + await ydr.LoadAsync(data); - if (GameFileCache != null) - { - GameFileCache.AddProjectFile(ydr); - } + GameFileCache?.AddProjectFile(ydr); } - private void LoadYddFromFile(YddFile ydd, string filename) + private async Task LoadYddFromFileAsync(YddFile ydd, string filename) { AddFilenameToJenkIndex(filename); - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); - ydd.Load(data); + await ydd.LoadAsync(data); - if (GameFileCache != null) - { - GameFileCache.AddProjectFile(ydd); - } + GameFileCache?.AddProjectFile(ydd); } - private void LoadYftFromFile(YftFile yft, string filename) + private async Task LoadYftFromFileAsync(YftFile yft, string filename) { AddFilenameToJenkIndex(filename); - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); yft.Load(data); - if (GameFileCache != null) - { - GameFileCache.AddProjectFile(yft); - } + GameFileCache?.AddProjectFile(yft); } - private void LoadYtdFromFile(YtdFile ytd, string filename) + private async Task LoadYtdFromFileAsync(YtdFile ytd, string filename) { AddFilenameToJenkIndex(filename); - byte[] data = File.ReadAllBytes(filename); + byte[] data = await File.ReadAllBytesAsync(filename).ConfigureAwait(false); - ytd.Load(data); + await ytd.LoadAsync(data); - if (GameFileCache != null) - { - GameFileCache.AddProjectFile(ytd); - } + GameFileCache?.AddProjectFile(ytd); } private void AddFilenameToJenkIndex(string filename) { - var n = Path.GetFileNameWithoutExtension(filename).ToLowerInvariant(); - JenkIndex.Ensure(n); + var n = Path.GetFileNameWithoutExtension(filename); + JenkIndex.EnsureBoth(n); } @@ -8763,25 +8857,36 @@ namespace CodeWalker.Project private void UpdateFormTitleText() { - if (CurrentProjectFile == null) + this.InvokeIfRequired(() => { - Text = "Project - CodeWalker by dexyfex"; - } - else - { - Text = CurrentProjectFile.Name + " - CodeWalker by dexyfex"; - } + if (CurrentProjectFile == null) + { + Text = "Project - CodeWalker by dexyfex"; + } + else + { + Text = $"{CurrentProjectFile.Name} - CodeWalker by dexyfex"; + } + }); } private void RefreshProjectUI() { - bool enable = (CurrentProjectFile != null); - FileCloseProjectMenu.Enabled = enable; - FileSaveProjectMenu.Enabled = enable; - FileSaveProjectAsMenu.Enabled = enable; + this.InvokeIfRequired(() => + { + bool enable = (CurrentProjectFile != null); + FileCloseProjectMenu.Enabled = enable; + FileSaveProjectMenu.Enabled = enable; + FileSaveProjectAsMenu.Enabled = enable; + }); } private void RefreshUI() { + if (InvokeRequired) + { + Invoke(RefreshUI); + return; + } RefreshYmapUI(); RefreshEntityUI(); RefreshCarGenUI(); @@ -8811,6 +8916,11 @@ namespace CodeWalker.Project } private void RefreshYmapUI() { + if (InvokeRequired) + { + Invoke(RefreshYmapUI); + return; + } bool enable = (CurrentYmapFile != null); bool inproj = YmapExistsInProject(CurrentYmapFile); @@ -8864,6 +8974,11 @@ namespace CodeWalker.Project } private void RefreshYtypUI() { + if (InvokeRequired) + { + Invoke(RefreshYtypUI); + return; + } bool enable = (CurrentYtypFile != null); bool inproj = YtypExistsInProject(CurrentYtypFile); bool ismlo = ((CurrentEntity != null) && (CurrentEntity.MloParent != null)) || (CurrentMloRoom != null) || (CurrentMloPortal != null) || (CurrentMloEntitySet != null) || (CurrentArchetype is MloArchetype); @@ -8893,6 +9008,11 @@ namespace CodeWalker.Project } private void RefreshYbnUI() { + if (InvokeRequired) + { + Invoke(RefreshYbnUI); + return; + } bool enable = (CurrentYbnFile != null); bool inproj = YbnExistsInProject(CurrentYbnFile); @@ -8919,6 +9039,11 @@ namespace CodeWalker.Project } private void RefreshYndUI() { + if (InvokeRequired) + { + Invoke(RefreshYndUI); + return; + } bool enable = (CurrentYndFile != null); bool inproj = YndExistsInProject(CurrentYndFile); @@ -8944,6 +9069,11 @@ namespace CodeWalker.Project } private void RefreshYnvUI() { + if (InvokeRequired) + { + Invoke(RefreshYnvUI); + return; + } bool enable = (CurrentYnvFile != null); bool inproj = YnvExistsInProject(CurrentYnvFile); @@ -8969,6 +9099,11 @@ namespace CodeWalker.Project } private void RefreshTrainTrackUI() { + if (InvokeRequired) + { + Invoke(RefreshTrainTrackUI); + return; + } bool enable = (CurrentTrainTrack != null); bool inproj = TrainTrackExistsInProject(CurrentTrainTrack); @@ -8994,6 +9129,11 @@ namespace CodeWalker.Project } private void RefreshScenarioUI() { + if (InvokeRequired) + { + Invoke(RefreshScenarioUI); + return; + } bool enable = (CurrentScenario != null); bool inproj = ScenarioExistsInProject(CurrentScenario); @@ -9024,6 +9164,11 @@ namespace CodeWalker.Project } private void RefreshAudioUI() { + if (InvokeRequired) + { + Invoke(RefreshAudioUI); + return; + } bool enable = (CurrentAudioFile != null); bool inproj = AudioFileExistsInProject(CurrentAudioFile); @@ -9054,12 +9199,17 @@ namespace CodeWalker.Project } private void RefreshYdrUI() { + if (InvokeRequired) + { + Invoke(RefreshYdrUI); + return; + } bool enable = (CurrentYdrFile != null); bool inproj = YdrExistsInProject(CurrentYdrFile); if (CurrentYdrFile != null) { - YdrNameMenu.Text = "(" + CurrentYdrFile.Name + ")"; + YdrNameMenu.Text = $"({CurrentYdrFile.Name})"; } else { @@ -9072,12 +9222,17 @@ namespace CodeWalker.Project } private void RefreshYddUI() { + if (InvokeRequired) + { + Invoke(RefreshYddUI); + return; + } bool enable = (CurrentYddFile != null); bool inproj = YddExistsInProject(CurrentYddFile); if (CurrentYddFile != null) { - YddNameMenu.Text = "(" + CurrentYddFile.Name + ")"; + YddNameMenu.Text = $"({CurrentYddFile.Name})"; } else { @@ -9090,12 +9245,17 @@ namespace CodeWalker.Project } private void RefreshYftUI() { + if (InvokeRequired) + { + Invoke(RefreshYftUI); + return; + } bool enable = (CurrentYftFile != null); bool inproj = YftExistsInProject(CurrentYftFile); if (CurrentYftFile != null) { - YftNameMenu.Text = "(" + CurrentYftFile.Name + ")"; + YftNameMenu.Text = $"({CurrentYftFile.Name})"; } else { @@ -9108,12 +9268,17 @@ namespace CodeWalker.Project } private void RefreshYtdUI() { + if (InvokeRequired) + { + Invoke(RefreshYtdUI); + return; + } bool enable = (CurrentYtdFile != null); bool inproj = YtdExistsInProject(CurrentYtdFile); if (CurrentYtdFile != null) { - YtdNameMenu.Text = "(" + CurrentYtdFile.Name + ")"; + YtdNameMenu.Text = $"({CurrentYtdFile.Name})"; } else { @@ -9128,7 +9293,12 @@ namespace CodeWalker.Project private void SetCurrentSaveItem() { - string filename = null; + if (InvokeRequired) + { + Invoke(SetCurrentSaveItem); + return; + } + string? filename = null; if (CurrentYmapFile != null) { filename = CurrentYmapFile.RpfFileEntry?.Name; @@ -9166,9 +9336,9 @@ namespace CodeWalker.Project if (enable) { - FileSaveItemMenu.Text = "Save " + filename; - FileSaveItemAsMenu.Text = "Save " + filename + " As..."; - ToolbarSaveButton.Text = "Save " + filename; + FileSaveItemMenu.Text = $"Save {filename}"; + FileSaveItemAsMenu.Text = $"Save {filename} As..."; + ToolbarSaveButton.Text = $"Save {filename}"; } else { @@ -9186,10 +9356,7 @@ namespace CodeWalker.Project FileSaveItemAsMenu.Visible = enable; ToolbarSaveButton.Enabled = enable; - if (WorldForm != null) - { - WorldForm.SetCurrentSaveItem(filename); - } + WorldForm?.SetCurrentSaveItem(filename); } @@ -9201,6 +9368,10 @@ namespace CodeWalker.Project private string ShowSaveDialog(string filter, string filename) { + if (InvokeRequired) + { + return Invoke(() => ShowSaveDialog(filter, filename)); + } SaveFileDialog.FileName = filename; SaveFileDialog.Filter = filter; if (SaveFileDialog.ShowDialog(this) != DialogResult.OK) @@ -9211,6 +9382,10 @@ namespace CodeWalker.Project } private string ShowOpenDialog(string filter, string filename) { + if (InvokeRequired) + { + return Invoke(() => ShowOpenDialog(filter, filename)); + } OpenFileDialog.FileName = filename; OpenFileDialog.Filter = filter; OpenFileDialog.Multiselect = false; @@ -9220,8 +9395,12 @@ namespace CodeWalker.Project } return OpenFileDialog.FileName; } - private string[] ShowOpenDialogMulti(string filter, string filename) + private string[]? ShowOpenDialogMulti(string filter, string filename) { + if (InvokeRequired) + { + return Invoke(() => ShowOpenDialogMulti(filter, filename)); + } OpenFileDialog.FileName = filename; OpenFileDialog.Filter = filter; OpenFileDialog.Multiselect = true; @@ -9240,7 +9419,7 @@ namespace CodeWalker.Project //######## events - private void ProjectForm_FormClosing(object sender, FormClosingEventArgs e) + private async void ProjectForm_FormClosing(object sender, FormClosingEventArgs e) { if (CurrentProjectFile != null) { @@ -9257,7 +9436,7 @@ namespace CodeWalker.Project return; } } - CloseProject(); + await CloseProject(); } private void ProjectForm_FormClosed(object sender, FormClosedEventArgs e) { @@ -9298,90 +9477,90 @@ namespace CodeWalker.Project PromoteIfPreviewPanel(MainDockPanel.ActiveContent); } - private void FileNewProjectMenu_Click(object sender, EventArgs e) + private async void FileNewProjectMenu_Click(object sender, EventArgs e) { - NewProject(); + await NewProjectAsync(); } - private void FileNewYmapMenu_Click(object sender, EventArgs e) + private async void FileNewYmapMenu_Click(object sender, EventArgs e) { - NewYmap(); + await NewYmap(); } - private void FileNewYtypMenu_Click(object sender, EventArgs e) + private async void FileNewYtypMenu_Click(object sender, EventArgs e) { - NewYtyp(); + await NewYtyp(); } - private void FileNewYbnMenu_Click(object sender, EventArgs e) + private async void FileNewYbnMenu_Click(object sender, EventArgs e) { - NewYbn(); + await NewYbn(); } - private void FileNewYndMenu_Click(object sender, EventArgs e) + private async void FileNewYndMenu_Click(object sender, EventArgs e) { - NewYnd(); + await NewYnd(); } - private void FileNewYnvMenu_Click(object sender, EventArgs e) + private async void FileNewYnvMenu_Click(object sender, EventArgs e) { - NewYnv(); + await NewYnv(); } - private void FileNewTrainsMenu_Click(object sender, EventArgs e) + private async void FileNewTrainsMenu_Click(object sender, EventArgs e) { - NewTrainTrack(); + await NewTrainTrack(); } - private void FileNewScenarioMenu_Click(object sender, EventArgs e) + private async void FileNewScenarioMenu_Click(object sender, EventArgs e) { - NewScenario(); + await NewScenario(); } - private void FileNewAudioDatMenu_Click(object sender, EventArgs e) + private async void FileNewAudioDatMenu_Click(object sender, EventArgs e) { - NewAudioFile(); + await NewAudioFile(); } - private void FileOpenProjectMenu_Click(object sender, EventArgs e) + private async void FileOpenProjectMenu_Click(object sender, EventArgs e) { - OpenProject(); + await OpenProject(); } - private void FileOpenFilesMenu_Click(object sender, EventArgs e) + private async void FileOpenFilesMenu_Click(object sender, EventArgs e) { - OpenFiles(); + await OpenFiles(); } - private void FileOpenFolderMenu_Click(object sender, EventArgs e) + private async void FileOpenFolderMenu_Click(object sender, EventArgs e) { - OpenFolder(); + await OpenFolder(); } - private void FileCloseProjectMenu_Click(object sender, EventArgs e) + private async void FileCloseProjectMenu_Click(object sender, EventArgs e) { - CloseProject(); + await CloseProject(); } - private void FileSaveProjectMenu_Click(object sender, EventArgs e) + private async void FileSaveProjectMenu_Click(object sender, EventArgs e) { - SaveProject(); + await SaveProject(); } - private void FileSaveProjectAsMenu_Click(object sender, EventArgs e) + private async void FileSaveProjectAsMenu_Click(object sender, EventArgs e) { - SaveProject(true); + await SaveProject(true); } - private void FileSaveItemMenu_Click(object sender, EventArgs e) + private async void FileSaveItemMenu_Click(object sender, EventArgs e) { - Save(); + await Save(); } - private void FileSaveItemAsMenu_Click(object sender, EventArgs e) + private async void FileSaveItemAsMenu_Click(object sender, EventArgs e) { - Save(true); + await Save(true); } private void ViewProjectExplorerMenu_Click(object sender, EventArgs e) { ShowProjectExplorer(); } - private void ViewThemeBlueMenu_Click(object sender, EventArgs e) + private async void ViewThemeBlueMenu_Click(object sender, EventArgs e) { - SetTheme("Blue"); + await SetTheme("Blue"); } - private void ViewThemeLightMenu_Click(object sender, EventArgs e) + private async void ViewThemeLightMenu_Click(object sender, EventArgs e) { - SetTheme("Light"); + await SetTheme("Light"); } - private void ViewThemeDarkMenu_Click(object sender, EventArgs e) + private async void ViewThemeDarkMenu_Click(object sender, EventArgs e) { - SetTheme("Dark"); + await SetTheme("Dark"); } private void YmapNewEntityMenu_Click(object sender, EventArgs e) @@ -9396,9 +9575,9 @@ namespace CodeWalker.Project { NewGrassBatch(); } - private void YmapAddToProjectMenu_Click(object sender, EventArgs e) + private async void YmapAddToProjectMenu_Click(object sender, EventArgs e) { - AddYmapToProject(CurrentYmapFile); + await AddYmapToProjectAsync(CurrentYmapFile); } private void YmapRemoveFromProjectMenu_Click(object sender, EventArgs e) { @@ -9617,9 +9796,9 @@ namespace CodeWalker.Project { NewAudioInteriorRoom(); } - private void AudioAddToProjectMenu_Click(object sender, EventArgs e) + private async void AudioAddToProjectMenu_Click(object sender, EventArgs e) { - AddAudioFileToProject(CurrentAudioFile); + await AddAudioFileToProject(CurrentAudioFile); } private void AudioRemoveFromProjectMenu_Click(object sender, EventArgs e) { @@ -9689,79 +9868,79 @@ namespace CodeWalker.Project } } - private void ToolbarNewButton_ButtonClick(object sender, EventArgs e) + private async void ToolbarNewButton_ButtonClick(object sender, EventArgs e) { - if (CurrentProjectFile == null) + if (CurrentProjectFile is null) { - NewProject(); + await NewProjectAsync(); } else { - NewYmap(); + await NewYmap(); } } - private void ToolbarNewProjectMenu_Click(object sender, EventArgs e) + private async void ToolbarNewProjectMenu_Click(object sender, EventArgs e) { - NewProject(); + await NewProjectAsync(); } - private void ToolbarNewYmapMenu_Click(object sender, EventArgs e) + private async void ToolbarNewYmapMenu_Click(object sender, EventArgs e) { - NewYmap(); + await NewYmap(); } - private void ToolbarNewYtypMenu_Click(object sender, EventArgs e) + private async void ToolbarNewYtypMenu_Click(object sender, EventArgs e) { - NewYtyp(); + await NewYtyp(); } - private void ToolbarNewYbnMenu_Click(object sender, EventArgs e) + private async void ToolbarNewYbnMenu_Click(object sender, EventArgs e) { - NewYbn(); + await NewYbn(); } - private void ToolbarNewYndMenu_Click(object sender, EventArgs e) + private async void ToolbarNewYndMenu_Click(object sender, EventArgs e) { - NewYnd(); + await NewYnd(); } - private void ToolbarNewYnvMenu_Click(object sender, EventArgs e) + private async void ToolbarNewYnvMenu_Click(object sender, EventArgs e) { - NewYnv(); + await NewYnv(); } - private void ToolbarNewTrainsMenu_Click(object sender, EventArgs e) + private async void ToolbarNewTrainsMenu_Click(object sender, EventArgs e) { - NewTrainTrack(); + await NewTrainTrack(); } - private void ToolbarNewScenarioMenu_Click(object sender, EventArgs e) + private async void ToolbarNewScenarioMenu_Click(object sender, EventArgs e) { - NewScenario(); + await NewScenario(); } - private void ToolbarOpenButton_ButtonClick(object sender, EventArgs e) + private async void ToolbarOpenButton_ButtonClick(object sender, EventArgs e) { if (CurrentProjectFile == null) { - OpenProject(); + await OpenProject(); } else { - OpenFiles(); + await OpenFiles(); } } - private void ToolbarOpenProjectMenu_Click(object sender, EventArgs e) + private async void ToolbarOpenProjectMenu_Click(object sender, EventArgs e) { - OpenProject(); + await OpenProject(); } - private void ToolbarOpenFilesMenu_Click(object sender, EventArgs e) + private async void ToolbarOpenFilesMenu_Click(object sender, EventArgs e) { - OpenFiles(); + await OpenFiles(); } - private void ToolbarOpenFolderMenu_Click(object sender, EventArgs e) + private async void ToolbarOpenFolderMenu_Click(object sender, EventArgs e) { - OpenFolder(); + await OpenFolder(); } - private void ToolbarSaveButton_Click(object sender, EventArgs e) + private async void ToolbarSaveButton_Click(object sender, EventArgs e) { - Save(); + await Save(); } - private void ToolbarSaveAllButton_Click(object sender, EventArgs e) + private async void ToolbarSaveAllButton_Click(object sender, EventArgs e) { - SaveAll(); + await SaveAll(); } } } diff --git a/CodeWalker/Project/UndoStep.cs b/CodeWalker/Project/UndoStep.cs index e4f4aec..435effb 100644 --- a/CodeWalker/Project/UndoStep.cs +++ b/CodeWalker/Project/UndoStep.cs @@ -1208,12 +1208,12 @@ namespace CodeWalker.Project public class CollisionVertexPositionUndoStep : UndoStep { - public BoundVertex Vertex { get; set; } - public YmapEntityDef Entity { get; set; } + public BoundVertex? Vertex { get; set; } + public YmapEntityDef? Entity { get; set; } public Vector3 StartPosition { get; set; } public Vector3 EndPosition { get; set; } - public CollisionVertexPositionUndoStep(BoundVertex vertex, YmapEntityDef ent, Vector3 startpos, WorldForm wf) + public CollisionVertexPositionUndoStep(BoundVertex? vertex, YmapEntityDef? ent, Vector3 startpos, WorldForm wf) { Vertex = vertex; Entity = ent; @@ -1225,9 +1225,9 @@ namespace CodeWalker.Project private void Update(WorldForm wf, ref MapSelection sel, Vector3 p) { - if (Vertex != null) + if (Vertex is not null) { - if (Entity != null) + if (Entity is not null) { Vertex.Position = Quaternion.Invert(Entity.Orientation).Multiply(p - Entity.Position); } @@ -1237,7 +1237,8 @@ namespace CodeWalker.Project } } - if (Vertex != sel.CollisionVertex) wf.SelectObject(Vertex); + if (Vertex != sel.CollisionVertex) + wf.SelectObject(Vertex); wf.SetWidgetPosition(p); UpdateGraphics(wf); diff --git a/CodeWalker/Properties/PublishProfiles/ClickOnceProfile.pubxml b/CodeWalker/Properties/PublishProfiles/ClickOnceProfile.pubxml new file mode 100644 index 0000000..4e719da --- /dev/null +++ b/CodeWalker/Properties/PublishProfiles/ClickOnceProfile.pubxml @@ -0,0 +1,43 @@ + + + + + 1 + 1.0.0.* + True + Release + True + true + True + Web + https://codewalker.tedeapolis.nl/ + True + True + True + False + Any CPU + bin\Release\net8.0-windows\win-x64\app.publish\ + bin\publish\click-once\ + ClickOnce + True + True + win-x64 + False + (none) + False + false + net8.0-windows + True + Foreground + False + Publish.html + + + + True + .NET Desktop Runtime 8.0.0 (x64) + + + \ No newline at end of file diff --git a/CodeWalker/Properties/PublishProfiles/FolderProfile.pubxml b/CodeWalker/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..9e1866e --- /dev/null +++ b/CodeWalker/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + ..\publish\ + FileSystem + <_TargetId>Folder + net8.0-windows + win-x64 + false + true + false + + \ No newline at end of file diff --git a/CodeWalker/Properties/Settings.Designer.cs b/CodeWalker/Properties/Settings.Designer.cs index 851f693..4796f18 100644 --- a/CodeWalker/Properties/Settings.Designer.cs +++ b/CodeWalker/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace CodeWalker.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -24,6 +24,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string Key { @@ -36,6 +37,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Grand Theft Auto V")] public string GTAFolder { @@ -48,6 +50,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string CompiledScriptFolder { @@ -60,6 +63,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string DecompiledScriptFolder { @@ -72,6 +76,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string GTAExeDumpFile { @@ -84,6 +89,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string ExtractedTexturesFolder { @@ -96,6 +102,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string ExtractedRawFilesFolder { @@ -108,6 +115,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string ExtractedShadersFolder { @@ -120,6 +128,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool FullScreen { @@ -132,6 +141,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool Wireframe { @@ -144,6 +154,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool Skydome { @@ -156,6 +167,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool ShowTimedEntities { @@ -168,6 +180,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool ShowCollisionMeshes { @@ -180,6 +193,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("4")] public int CollisionMeshRange { @@ -192,6 +206,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool DynamicLOD { @@ -204,6 +219,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("5")] public int DetailDist { @@ -216,6 +232,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Glokon Marker")] public string MarkerStyle { @@ -228,6 +245,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Glokon Debug")] public string LocatorStyle { @@ -240,6 +258,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool MarkerDepthClip { @@ -252,6 +271,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("None")] public string BoundsStyle { @@ -264,6 +284,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool BoundsDepthClip { @@ -276,6 +297,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("100")] public int BoundsRange { @@ -288,6 +310,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool ShowErrorConsole { @@ -300,6 +323,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool Shadows { @@ -312,6 +336,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("6")] public int ShadowCascades { @@ -324,6 +349,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool Grass { @@ -336,6 +362,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool ShowStatusBar { @@ -348,6 +375,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool WaitForChildren { @@ -360,6 +388,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2147483648")] public long CacheSize { @@ -372,6 +401,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("10")] public double CacheTime { @@ -384,6 +414,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("536870912")] public long GPUGeometryCacheSize { @@ -396,6 +427,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1073741824")] public long GPUTextureCacheSize { @@ -408,6 +440,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("134217728")] public long GPUBoundCompCacheSize { @@ -420,6 +453,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1")] public double GPUCacheTime { @@ -432,6 +466,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0.1")] public double GPUCacheFlushTime { @@ -444,6 +479,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("10")] public float CameraSmoothing { @@ -456,6 +492,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0.005")] public float CameraSensitivity { @@ -468,6 +505,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("1")] public float CameraFieldOfView { @@ -480,6 +518,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Default")] public string RenderMode { @@ -492,6 +531,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("DiffuseSampler")] public string RenderTextureSampler { @@ -504,6 +544,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Texture coord 1")] public string RenderTextureSamplerCoord { @@ -516,6 +557,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Installers;_CommonRedist")] public string ExcludeFolders { @@ -528,6 +570,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool AnisotropicFiltering { @@ -540,6 +583,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool HDR { @@ -552,6 +596,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool WindowMaximized { @@ -564,6 +609,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool EnableMods { @@ -576,6 +622,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string DLC { @@ -588,6 +635,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool XInputLThumbInvert { @@ -600,6 +648,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool XInputRThumbInvert { @@ -612,6 +661,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2")] public float XInputLThumbSensitivity { @@ -624,6 +674,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2")] public float XInputRThumbSensitivity { @@ -636,6 +687,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2")] public float XInputZoomSpeed { @@ -648,6 +700,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("15")] public float XInputMoveSpeed { @@ -660,6 +713,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool MouseInvert { @@ -672,6 +726,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool RememberGTAFolder { @@ -684,6 +739,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Blue")] public string ProjectWindowTheme { @@ -696,6 +752,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Windows")] public string ExplorerWindowTheme { @@ -708,6 +765,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool Deferred { @@ -720,6 +778,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("5")] public float SnapRotationDegrees { @@ -732,6 +791,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("10")] public float SnapGridSize { @@ -745,6 +805,7 @@ namespace CodeWalker.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool JumpListInitialised { get { @@ -756,6 +817,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string RPFExplorerSelectedFolder { @@ -768,6 +830,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string RPFExplorerExtraFolders { @@ -780,6 +843,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool RPFExplorerStartInEditMode { @@ -792,6 +856,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] public string RPFExplorerStartFolder { @@ -804,6 +869,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("720")] public int TimeOfDay { @@ -816,6 +882,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool LODLights { @@ -828,6 +895,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Global")] public string Region { @@ -840,6 +908,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("contrails")] public string Clouds { @@ -852,6 +921,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public string Weather { @@ -864,6 +934,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool NatrualAmbientLight { @@ -876,6 +947,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool ArtificialAmbientLight { @@ -888,6 +960,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2")] public int AntiAliasing { @@ -900,6 +973,7 @@ namespace CodeWalker.Properties { } [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute(@" diff --git a/CodeWalker/Properties/Settings.settings b/CodeWalker/Properties/Settings.settings index 373295b..c3a8b3c 100644 --- a/CodeWalker/Properties/Settings.settings +++ b/CodeWalker/Properties/Settings.settings @@ -2,10 +2,10 @@ - + - + C:\Program Files (x86)\Steam\SteamApps\common\Grand Theft Auto V @@ -185,16 +185,16 @@ False - + - + - + False - + diff --git a/CodeWalker/Rendering/DirectX/DXForm.cs b/CodeWalker/Rendering/DirectX/DXForm.cs index 1713d06..1e9369f 100644 --- a/CodeWalker/Rendering/DirectX/DXForm.cs +++ b/CodeWalker/Rendering/DirectX/DXForm.cs @@ -22,9 +22,12 @@ namespace CodeWalker.Rendering Form Form { get; } public CancellationTokenSource CancellationTokenSource { get; } + + public CancellationToken CancellationToken => CancellationTokenSource.Token; + public bool Pauserendering { get; set; } void InitScene(Device device); - void CleanupScene(); + ValueTask CleanupScene(); ValueTask RenderScene(DeviceContext context); void BuffersResized(int w, int h); bool ConfirmQuit(); diff --git a/CodeWalker/Rendering/DirectX/DXManager.cs b/CodeWalker/Rendering/DirectX/DXManager.cs index 7b39881..b978598 100644 --- a/CodeWalker/Rendering/DirectX/DXManager.cs +++ b/CodeWalker/Rendering/DirectX/DXManager.cs @@ -16,6 +16,7 @@ using System.Runtime; using CodeWalker.Core.Utils; using CodeWalker.Properties; using CodeWalker.GameFiles; +using System.Diagnostics.CodeAnalysis; namespace CodeWalker.Rendering { @@ -31,8 +32,6 @@ namespace CodeWalker.Rendering public RenderTargetView targetview { get; private set; } public DepthStencilView depthview { get; private set; } - public CancellationToken cancellationToken; - private volatile bool Running = false; private volatile bool Rendering = false; private volatile bool Resizing = false; @@ -46,13 +45,21 @@ namespace CodeWalker.Rendering private ViewportF Viewport; private bool autoStartLoop = false; + private void ThrowInitFailedException(Exception exc) + { + var msg = "CodeWalker was unable to initialise the graphics device. Please ensure your system meets the minimum requirements and that your graphics drivers and DirectX are up to date."; + if (exc != null) + { + msg += "\n\nException info: " + exc.ToString(); + } + throw new Exception(msg); + } + public bool Init(DXForm form, bool autostart = true) { dxform = form; autoStartLoop = autostart; - cancellationToken = form.CancellationTokenSource.Token; - try { //SharpDX.Configuration.EnableObjectTracking = true; @@ -79,17 +86,32 @@ namespace CodeWalker.Rendering //#if DEBUG // flags = DeviceCreationFlags.Debug; //#endif - Device dev = null; - SwapChain sc = null; - Exception exc = null; + Device? dev = null; + SwapChain? sc = null; + Exception? exc = null; bool success = false; try { + if (device is not null) + { + dev = device; + } + else + { + dev = new Device(DriverType.Hardware, flags, levels); + device = dev; + } + + using Factory1 scFactory = new Factory1(); + sc = new SwapChain(scFactory, dev, scd); Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc); success = true; } - catch(Exception ex) { exc = ex; } + catch(Exception ex) + { + exc = ex; + } if (!success) { @@ -101,17 +123,15 @@ namespace CodeWalker.Rendering Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc); success = true; } - catch (Exception ex) { exc = ex; } + catch (Exception ex) + { + exc = ex; + } } if (!success) { - var msg = "CodeWalker was unable to initialise the graphics device. Please ensure your system meets the minimum requirements and that your graphics drivers and DirectX are up to date."; - if (exc != null) - { - msg += "\n\nException info: " + exc.ToString(); - } - throw new Exception(msg); + ThrowInitFailedException(exc); } device = dev; @@ -152,34 +172,40 @@ namespace CodeWalker.Rendering } - private void Cleanup() + private async ValueTask Cleanup() { try { using var _ = new DisposableTimer("DXManager Cleanup"); Running = false; int count = 0; + + if (!dxform.CancellationTokenSource.IsCancellationRequested) + { + dxform.CancellationTokenSource.Cancel(); + } + while (Rendering && (count < 1000)) { - Thread.Sleep(1); //try to gracefully exit... + await Task.Delay(1); count++; } - dxform.CleanupScene(); + await dxform.CleanupScene(); - if (context != null) context.ClearState(); + context?.ClearState(); //dipose of all objects - if (depthview != null) depthview.Dispose(); - if (depthbuffer != null) depthbuffer.Dispose(); - if (targetview != null) targetview.Dispose(); - if (backbuffer != null) backbuffer.Dispose(); - if (swapchain != null) swapchain.Dispose(); - if (context != null) context.Dispose(); + depthview?.Dispose(); + depthbuffer?.Dispose(); + targetview?.Dispose(); + backbuffer?.Dispose(); + swapchain?.Dispose(); + context?.Dispose(); //var objs = SharpDX.Diagnostics.ObjectTracker.FindActiveObjects(); - if (device != null) device.Dispose(); + device?.Dispose(); } catch (Exception ex) { @@ -187,12 +213,14 @@ namespace CodeWalker.Rendering } } + + [MemberNotNull(nameof(targetview), nameof(backbuffer), nameof(depthview), nameof(depthbuffer))] private void CreateRenderBuffers() { - if (targetview != null) targetview.Dispose(); - if (backbuffer != null) backbuffer.Dispose(); - if (depthview != null) depthview.Dispose(); - if (depthbuffer != null) depthbuffer.Dispose(); + targetview?.Dispose(); + backbuffer?.Dispose(); + depthview?.Dispose(); + depthbuffer?.Dispose(); backbuffer = Texture2D.FromSwapChain(swapchain, 0); @@ -221,11 +249,11 @@ namespace CodeWalker.Rendering Viewport.X = 0; Viewport.Y = 0; } - private void Resize() + private async void Resize() { Console.WriteLine($"Resizing {Resizing}"); if (Resizing) return; - semaphore.Wait(); + await semaphore.WaitAsync().ConfigureAwait(false); int width = dxform.Form.ClientSize.Width; int height = dxform.Form.ClientSize.Height; @@ -250,7 +278,7 @@ namespace CodeWalker.Rendering StartRenderLoop(); } } - private void Dxform_FormClosing(object sender, FormClosingEventArgs e) + private async void Dxform_FormClosing(object sender, FormClosingEventArgs e) { if (!e.Cancel) { @@ -265,7 +293,7 @@ namespace CodeWalker.Rendering { dxform.CancellationTokenSource.Cancel(); } - Cleanup(); + await Cleanup(); } } @@ -344,7 +372,14 @@ namespace CodeWalker.Rendering { while (Resizing) { - swapchain.Present(1, PresentFlags.None); //just flip buffers when resizing; don't draw + var result = swapchain.Present(1, PresentFlags.None); //just flip buffers when resizing; don't draw + if (result != Result.Ok) + { + if (result == SharpDX.DXGI.ResultCode.DeviceRemoved) + { + Console.WriteLine($"Device was removed {device.DeviceRemovedReason}"); + } + } } if (dxform.Form.WindowState == FormWindowState.Minimized) { @@ -357,30 +392,32 @@ namespace CodeWalker.Rendering GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, true, true); while (dxform.Form.WindowState == FormWindowState.Minimized) { - await Task.Delay(100, cancellationToken).ConfigureAwait(false); //don't hog CPU when minimised - if (dxform.Form.IsDisposed || cancellationToken.IsCancellationRequested) return; //if closed while minimised + await Task.Delay(100, dxform.CancellationToken); //don't hog CPU when minimised + if (dxform.Form.IsDisposed || dxform.CancellationToken.IsCancellationRequested) + return; //if closed while minimised } dxform.Pauserendering = false; Console.WriteLine("Window is maximized"); } - if (Form.ActiveForm == null) + if (Form.ActiveForm is null) { inactiveCount++; if (inactiveCount > 100) { GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce; GC.Collect(); - while (Form.ActiveForm == null) + while (Form.ActiveForm is null) { - await Task.Delay(100, cancellationToken).ConfigureAwait(false); //reduce the FPS when the app isn't active (maybe this should be configurable?) - if (context.IsDisposed || dxform.Form.IsDisposed || cancellationToken.IsCancellationRequested) return; //if form closed while sleeping (eg from rightclick on taskbar) + await Task.Delay(100, dxform.CancellationToken); //reduce the FPS when the app isn't active (maybe this should be configurable?) + if (context.IsDisposed || dxform.Form.IsDisposed || dxform.CancellationToken.IsCancellationRequested) + return; //if form closed while sleeping (eg from rightclick on taskbar) } } else { - await Task.Delay(100, cancellationToken).ConfigureAwait(false); + await Task.Delay(100, dxform.CancellationToken); } } else @@ -388,22 +425,23 @@ namespace CodeWalker.Rendering inactiveCount = 0; if (Form.ActiveForm != dxform.Form) { - await Task.Delay(25, cancellationToken).ConfigureAwait(false); + await Task.Delay(25, dxform.CancellationToken); } } - if (context.IsDisposed || dxform.Form.IsDisposed || cancellationToken.IsCancellationRequested) return; + if (context.IsDisposed || dxform.Form.IsDisposed || dxform.CancellationToken.IsCancellationRequested) + return; Rendering = true; - if (!await semaphore.WaitAsync(50, cancellationToken).ConfigureAwait(false)) + if (!await semaphore.WaitAsync(50, dxform.CancellationToken).ConfigureAwait(false)) { Console.WriteLine("Failed to get lock for syncroot"); - await Task.Delay(10, cancellationToken).ConfigureAwait(false); //don't hog CPU when not able to render... + await Task.Delay(10, dxform.CancellationToken).ConfigureAwait(false); //don't hog CPU when not able to render... continue; } - if (dxform.Form.IsDisposed || cancellationToken.IsCancellationRequested) + if (dxform.Form.IsDisposed || dxform.CancellationToken.IsCancellationRequested) { Rendering = false; return; @@ -426,7 +464,7 @@ namespace CodeWalker.Rendering if (ok) { - if (dxform.Form.IsDisposed || cancellationToken.IsCancellationRequested) + if (dxform.Form.IsDisposed || dxform.CancellationToken.IsCancellationRequested) { Rendering = false; @@ -437,7 +475,17 @@ namespace CodeWalker.Rendering try { - swapchain.Present(1, PresentFlags.None); + var result = swapchain.Present(1, PresentFlags.None); + if (result != Result.Ok) + { + if (result == SharpDX.DXGI.ResultCode.DeviceRemoved) + { + Console.WriteLine($"Device was removed {device.DeviceRemovedReason}"); + } else + { + Console.WriteLine(result.ToString()); + } + } } catch (Exception ex) { diff --git a/CodeWalker/Rendering/DirectX/DXUtility.cs b/CodeWalker/Rendering/DirectX/DXUtility.cs index 7480147..6226e76 100644 --- a/CodeWalker/Rendering/DirectX/DXUtility.cs +++ b/CodeWalker/Rendering/DirectX/DXUtility.cs @@ -11,6 +11,7 @@ using Resource = SharpDX.Direct3D11.Resource; using MapFlags = SharpDX.Direct3D11.MapFlags; using SharpDX.Mathematics.Interop; using SharpDX.Direct3D; +using CommunityToolkit.Diagnostics; namespace CodeWalker.Rendering { @@ -137,13 +138,14 @@ namespace CodeWalker.Rendering //nothing to do here break; default: - throw new Exception(); //not implemented.... + ThrowHelper.ThrowArgumentOutOfRangeException(nameof(viewDimension), viewDimension, "Given value for viewDimension is not supported"); + break; } ShaderResourceView srv = new ShaderResourceView(device, resource, srvd); return srv; } - public static UnorderedAccessView CreateUnorderedAccessView(Device device, Resource resource, Format format, UnorderedAccessViewDimension viewDimension, int firstElement, int numElements, UnorderedAccessViewBufferFlags flags, int mipSlice) + public static UnorderedAccessView? CreateUnorderedAccessView(Device device, Resource resource, Format format, UnorderedAccessViewDimension viewDimension, int firstElement, int numElements, UnorderedAccessViewBufferFlags flags, int mipSlice) { UnorderedAccessViewDescription uavd = new UnorderedAccessViewDescription(); uavd.Format = format; diff --git a/CodeWalker/Rendering/Renderable.cs b/CodeWalker/Rendering/Renderable.cs index 3897e7b..a0f9019 100644 --- a/CodeWalker/Rendering/Renderable.cs +++ b/CodeWalker/Rendering/Renderable.cs @@ -11,6 +11,8 @@ using CodeWalker.World; using SharpDX.Direct3D; using SharpDX; using System.Threading; +using System.Diagnostics; +using Collections.Pooled; namespace CodeWalker.Rendering { @@ -55,24 +57,30 @@ namespace CodeWalker.Rendering public RenderableBoundCompositeInst Inst; } - public struct RenderableInstanceBatchInst + public readonly struct RenderableInstanceBatchInst { - public RenderableInstanceBatch Batch; - public Renderable Renderable; + public readonly RenderableInstanceBatch Batch; + public readonly Renderable Renderable; + + public RenderableInstanceBatchInst(RenderableInstanceBatch batch, Renderable renderable) + { + Batch = batch; + Renderable = renderable; + } } public class Renderable : RenderableCacheItem { - public YtdFile[] SDtxds; - public YtdFile[] HDtxds; + public YtdFile[]? SDtxds; + public YtdFile[]? HDtxds; public bool AllTexturesLoaded = false; - public RenderableModel[] HDModels; - public RenderableModel[] MedModels; - public RenderableModel[] LowModels; - public RenderableModel[] VlowModels; - public RenderableModel[] AllModels; + public RenderableModel[] HDModels = Array.Empty(); + public RenderableModel[]? MedModels; + public RenderableModel[]? LowModels; + public RenderableModel[]? VlowModels; + public RenderableModel[] AllModels = Array.Empty(); public float LodDistanceHigh; public float LodDistanceMed; @@ -91,7 +99,7 @@ namespace CodeWalker.Rendering public YcdFile ClipDict; public ClipMapEntry ClipMapEntry; public Expression Expression; - public Dictionary ModelBoneLinks; + public Dictionary? ModelBoneLinks; public bool EnableRootMotion = false; //used to toggle whether or not to include root motion when playing animations @@ -116,7 +124,7 @@ namespace CodeWalker.Rendering int curmodel = hd?.Length ?? 0; AllModels = new RenderableModel[totmodels]; HDModels = new RenderableModel[hd.Length]; - if (hd != null) + if (hd is not null && hd.Length > 0) { for (int i = 0; i < hd.Length; i++) { @@ -124,7 +132,7 @@ namespace CodeWalker.Rendering AllModels[i] = HDModels[i]; } } - if (med != null) + if (med is not null && med.Length > 0) { MedModels = new RenderableModel[med.Length]; for (int i = 0; i < med.Length; i++) @@ -134,7 +142,7 @@ namespace CodeWalker.Rendering } curmodel += med.Length; } - if (low != null) + if (low is not null && low.Length > 0) { LowModels = new RenderableModel[low.Length]; for (int i = 0; i < low.Length; i++) @@ -144,7 +152,7 @@ namespace CodeWalker.Rendering } curmodel += low.Length; } - if (vlow != null) + if (vlow is not null && vlow.Length > 0) { VlowModels = new RenderableModel[vlow.Length]; for (int i = 0; i < vlow.Length; i++) @@ -177,11 +185,11 @@ namespace CodeWalker.Rendering bool hastransforms = false; bool hasbones = false; Skeleton skeleton = drawable.Skeleton; - Matrix[] modeltransforms = null; - Matrix[] fragtransforms = null; + Matrix[]? modeltransforms = null; + Matrix[]? fragtransforms = null; Vector4 fragoffset = Vector4.Zero; int fragtransformid = 0; - Bone[] bones = null; + Bone[]? bones = null; bool usepose = false; if (skeleton != null) { @@ -285,7 +293,8 @@ namespace CodeWalker.Rendering { if (bone != null) { - if (ModelBoneLinks == null) ModelBoneLinks = new Dictionary(); + if (ModelBoneLinks is null) + ModelBoneLinks = new Dictionary(); ModelBoneLinks[bone.Tag] = model; } } @@ -392,11 +401,12 @@ namespace CodeWalker.Rendering public override void Load(Device device) { - if (AllModels != null) + if (AllModels is not null) { foreach (var model in AllModels) { - if (model.Geometries == null) continue; + if (model.Geometries is null) + continue; foreach (var geom in model.Geometries) { geom.Load(device); @@ -504,11 +514,13 @@ namespace CodeWalker.Rendering foreach (var model in HDModels) { - if (model == null) continue; + if (model is null) + continue; foreach (var geom in model.Geometries) { - if (geom == null) continue; - if (geom.ClipMapEntryUV != null) + if (geom is null) + continue; + if (geom.ClipMapEntryUV is not null) { UpdateAnimUV(geom.ClipMapEntryUV, geom); //animate UVs } @@ -520,17 +532,18 @@ namespace CodeWalker.Rendering { var clipanim = cme.Clip as ClipAnimation; - if (clipanim?.Animation != null) + if (clipanim?.Animation is not null) { UpdateAnim(clipanim.Animation, clipanim.GetPlaybackTime(CurrentAnimTime)); } var clipanimlist = cme.Clip as ClipAnimationList; - if (clipanimlist?.Animations != null) + if (clipanimlist?.Animations is not null) { foreach (var canim in clipanimlist.Animations) { - if (canim?.Animation == null) continue; + if (canim?.Animation is null) + continue; UpdateAnim(canim.Animation, canim.GetPlaybackTime(CurrentAnimTime)); } } @@ -538,12 +551,18 @@ namespace CodeWalker.Rendering } private void UpdateAnim(Animation anim, float t) { - if (anim == null) - { return; } - if (anim.BoneIds?.data_items == null) - { return; } - if (anim.Sequences?.data_items == null) - { return; } + if (anim is null) + { + return; + } + if (anim.BoneIds?.data_items is null) + { + return; + } + if (anim.Sequences?.data_items is null) + { + return; + } bool interpolate = true; //how to know? eg. cs4_14_hickbar_anim shouldn't @@ -552,8 +571,10 @@ namespace CodeWalker.Rendering var dwbl = this.Key; var skel = Skeleton; var bones = skel?.BonesSorted;//.Bones?.Items;// - if (bones == null) - { return; } + if (bones is null) + { + return; + } Vector4 v; Quaternion q; @@ -580,9 +601,9 @@ namespace CodeWalker.Rendering } } - Bone bone = null; + Bone? bone = null; skel?.BonesMap?.TryGetValue(boneid, out bone); - if (bone == null) + if (bone is null) { continue; //skel.BoneTagsMap?.TryGetValue(boneiditem.BoneId, out bone); @@ -676,28 +697,27 @@ namespace CodeWalker.Rendering } } - for (int i = 0; i < bones.Length; i++) + if (ModelBoneLinks is not null) { - var bone = bones[i]; - bone.UpdateAnimTransform(); - bone.UpdateSkinTransform(); + for (int i = 0; i < bones.Length; i++) + { + var bone = bones[i]; + bone.UpdateAnimTransform(); + bone.UpdateSkinTransform(); - //update model's transform from animated bone - RenderableModel bmodel = null; - ModelBoneLinks?.TryGetValue(bone.Tag, out bmodel); + //update model's transform from animated bone + ModelBoneLinks.TryGetValue(bone.Tag, out var bmodel); - if (bmodel == null) - { continue; } - if (bmodel.IsSkinMesh) //don't transform model for skin mesh - { continue; } + if (bmodel is null || bmodel.IsSkinMesh) + continue; - bmodel.Transform = bone.AnimTransform; + bmodel.Transform = bone.AnimTransform; + } } - - } + private void UpdateAnimUV(ClipMapEntry cme, RenderableGeometry rgeom = null) { @@ -840,8 +860,8 @@ namespace CodeWalker.Rendering public class RenderableGeometry { public RenderableModel Owner; - public Buffer VertexBuffer { get; set; } - public Buffer IndexBuffer { get; set; } + public Buffer? VertexBuffer { get; set; } + public Buffer? IndexBuffer { get; set; } public VertexBufferBinding VBBinding; public DrawableGeometry DrawableGeom; public VertexType VertexType { get; set; } @@ -853,8 +873,8 @@ namespace CodeWalker.Rendering public uint TotalDataSize { get; set; } public TextureBase[] Textures; public Texture[] TexturesHD; - public RenderableTexture[] RenderableTextures; - public RenderableTexture[] RenderableTexturesHD; + public RenderableTexture?[]? RenderableTextures; + public RenderableTexture?[]? RenderableTexturesHD; public ShaderParamNames[] TextureParamHashes; public PrimitiveTopology Topology { get; set; } public bool IsFragment = false; @@ -1009,8 +1029,8 @@ namespace CodeWalker.Rendering var pl = shader.ParametersList.Parameters; var hl = shader.ParametersList.Hashes; - List texs = new List(); - List phashes = new List(); + using PooledList texs = new PooledList(); + using PooledList phashes = new PooledList(); if ((pl != null) && (hl != null)) { for (int i = 0; (i < pl.Length) && (i < hl.Length); i++) @@ -1189,34 +1209,34 @@ namespace CodeWalker.Rendering // default: // break; //} - if (VertexBuffer != null) + if (VertexBuffer is not null) { VBBinding = new VertexBufferBinding(VertexBuffer, VertexStride, 0); } - if (DrawableGeom.IndexBuffer != null) + if (DrawableGeom.IndexBuffer is not null) { IndexBuffer = Buffer.Create(device, BindFlags.IndexBuffer, DrawableGeom.IndexBuffer.Indices); } } - public void Unload() + public void Dispose() { - if (VertexBuffer != null) + if (VertexBuffer is not null) { VBBinding.Buffer = null; VertexBuffer.Dispose(); VertexBuffer = null; } - if (IndexBuffer != null) + if (IndexBuffer is not null) { IndexBuffer.Dispose(); IndexBuffer = null; } //DrawableGeom = null; - if (RenderableTextures != null) + if (RenderableTextures is not null) { for (int i = 0; i < RenderableTextures.Length; i++) { @@ -1224,7 +1244,7 @@ namespace CodeWalker.Rendering } RenderableTextures = null; } - if (RenderableTexturesHD != null) + if (RenderableTexturesHD is not null) { for (int i = 0; i < RenderableTexturesHD.Length; i++) { @@ -1232,12 +1252,17 @@ namespace CodeWalker.Rendering } RenderableTexturesHD = null; } + GC.SuppressFinalize(this); + } + public void Unload() + { + Dispose(); } public void Render(DeviceContext context) { - if ((VertexBuffer == null) || (IndexBuffer == null)) + if (VertexBuffer is null || IndexBuffer is null) { return; } @@ -1251,7 +1276,7 @@ namespace CodeWalker.Rendering public void RenderInstanced(DeviceContext context, int instCount) { - if ((VertexBuffer == null) || (IndexBuffer == null)) + if (VertexBuffer is null || IndexBuffer is null) { return; } @@ -1269,15 +1294,15 @@ namespace CodeWalker.Rendering { public uint Hash { get; private set; } public string Name { get; private set; } - public Texture2D Texture2D { get; set; } - public ShaderResourceView ShaderResourceView { get; set; } + public Texture2D? Texture2D { get; set; } + public ShaderResourceView? ShaderResourceView { get; set; } public override void Init(Texture tex) { Key = tex; - if ((Key != null) && (Key.Data != null) && (Key.Data.FullData != null)) + if (Key?.Data?.FullData is not null) { DataSize = Key.Data.FullData.Length; } @@ -1286,7 +1311,7 @@ namespace CodeWalker.Rendering public override void Load(Device device) { - if ((Key != null) && (Key.Data != null) && (Key.Data.FullData != null)) + if (Key?.Data?.FullData is not null) { using (var stream = DataStream.Create(Key.Data.FullData, true, false)) { @@ -1346,8 +1371,9 @@ namespace CodeWalker.Rendering Texture2D = new Texture2D(device, desc, boxes.ToArray()); //multiple mips ShaderResourceView = new ShaderResourceView(device, Texture2D); } - catch //(Exception ex) + catch (Exception ex) { + Console.WriteLine(ex); //string str = ex.ToString(); //todo: don't fail silently.. } } @@ -1372,12 +1398,12 @@ namespace CodeWalker.Rendering public override void Unload() { IsLoaded = false; - if (ShaderResourceView != null) + if (ShaderResourceView is not null) { ShaderResourceView.Dispose(); ShaderResourceView = null; } - if (Texture2D != null) + if (Texture2D is not null) { Texture2D.Dispose(); Texture2D = null; @@ -1385,9 +1411,9 @@ namespace CodeWalker.Rendering LoadQueued = false; } - public override string ToString() + public override string? ToString() { - return (Key != null) ? Key.ToString() : base.ToString(); + return Key?.ToString() ?? base.ToString(); } } @@ -1446,10 +1472,10 @@ namespace CodeWalker.Rendering public rage__fwGrassInstanceListDef__InstanceData[] GrassInstanceData { get; set; } public GpuSBuffer GrassInstanceBuffer { get; set; } public int InstanceCount { get; set; } - public Vector3 AABBMin { get; set; } - public Vector3 AABBMax { get; set; } - public Vector3 Position { get; set; } - public Vector3 CamRel { get; set; } + public Vector3 AABBMin; + public Vector3 AABBMax; + public Vector3 Position; + public Vector3 CamRel; public override void Init(YmapGrassInstanceBatch batch) { @@ -1513,13 +1539,13 @@ namespace CodeWalker.Rendering public float Distance; } - public LODLight[] Points; - public LODLight[] Spots; - public LODLight[] Caps; + public LODLight[] Points = Array.Empty(); + public LODLight[] Spots = Array.Empty(); + public LODLight[] Caps = Array.Empty(); - public GpuSBuffer PointsBuffer { get; set; } - public GpuSBuffer SpotsBuffer { get; set; } - public GpuSBuffer CapsBuffer { get; set; } + public GpuSBuffer? PointsBuffer { get; set; } + public GpuSBuffer? SpotsBuffer { get; set; } + public GpuSBuffer? CapsBuffer { get; set; } public override void Init(YmapFile key) @@ -1529,17 +1555,18 @@ namespace CodeWalker.Rendering var ll = key.LODLights; var dll = key.Parent?.DistantLODLights; - if (ll == null) return; - if (dll == null) return; + if (ll == null) + return; + if (dll == null) + return; - if (ll.LodLights == null) - { return; } + if (ll.LodLights == null || ll.LodLights.Length == 0) + { + return; + } var n = ll.LodLights.Length; - if (n <= 0) - { return; } - var points = new List(); var spots = new List(); @@ -1548,7 +1575,8 @@ namespace CodeWalker.Rendering for (int i = 0; i < n; i++) { var l = ll.LodLights[i]; - if (l.Enabled == false || l.Visible == false) continue; + if (l.Enabled == false || l.Visible == false) + continue; var light = new LODLight(); light.Position = l.Position; light.Colour = (uint)l.Colour.ToBgra(); @@ -1577,77 +1605,101 @@ namespace CodeWalker.Rendering } } - Points = points.ToArray(); - Spots = spots.ToArray(); - Caps = caps.ToArray(); + Points = points.Count > 0 ? points.ToArray() : Array.Empty(); + Spots = spots.Count > 0 ? spots.ToArray() : Array.Empty(); + Caps = caps.Count > 0 ? caps.ToArray() : Array.Empty(); DataSize = (points.Count + spots.Count + caps.Count) * 80; } - public (int, int, int) UpdateLods(Vector3 refPos) + private int spotsIndex = 0, pointsIndex = 0, capsIndex = 0; + public (int, int, int) UpdateLods(in Vector3 refPos, bool updateLods = true) { - for (int i = 0; i < Points.Length; i++) + if (!updateLods) { - Points[i].Distance = Vector3.DistanceSquared(refPos, Points[i].Position); - } - for (int i = 0; i < Spots.Length; i++) - { - Spots[i].Distance = Vector3.DistanceSquared(refPos, Spots[i].Position); + return (spotsIndex, pointsIndex, capsIndex); } - for (int i = 0; i < Caps.Length; i++) + if (Points.Length > 0) { - Caps[i].Distance = Vector3.DistanceSquared(refPos, Caps[i].Position); - } - - Array.Sort(Points, (a, b) => a.Distance.CompareTo(b.Distance)); - Array.Sort(Spots, (a, b) => a.Distance.CompareTo(b.Distance)); - Array.Sort(Caps, (a, b) => a.Distance.CompareTo(b.Distance)); - - var spotsIndex = 0; - var pointsIndex = 0; - var capsIndex = 0; - for (int i = 0; i < Points.Length; i++) - { - if (Points[i].Distance > 100_000) + for (int i = 0; i < Points.Length; i++) { - pointsIndex = i; - break; + Points[i].Distance = Vector3.DistanceSquared(refPos, Points[i].Position); } - } - for (int i = 0; i < Spots.Length; i++) - { - if (Spots[i].Distance > 100_000) + + Array.Sort(Points, (a, b) => b.Distance.CompareTo(a.Distance)); + + pointsIndex = -1; + + for (int i = Points.Length - 1; i > 0; i--) { - spotsIndex = i; - break; + if (Points[i].Distance > 100_000) + { + pointsIndex = i; + break; + } } } - for (int i = 0; i < Caps.Length; i++) + + if (Spots.Length > 0) { - if (Caps[i].Distance > 100_000) + for (int i = 0; i < Spots.Length; i++) { - capsIndex = i; - break; + Spots[i].Distance = Vector3.DistanceSquared(refPos, Spots[i].Position); + } + + Array.Sort(Spots, (a, b) => b.Distance.CompareTo(a.Distance)); + + spotsIndex = -1; + + for (int i = Spots.Length - 1; i > 0; i--) + { + if (Spots[i].Distance > 100_000) + { + spotsIndex = i; + break; + } } } - return (pointsIndex, spotsIndex, capsIndex); + + if (Caps.Length > 0) + { + for (int i = 0; i < Caps.Length; i++) + { + Caps[i].Distance = Vector3.DistanceSquared(refPos, Caps[i].Position); + } + + Array.Sort(Caps, (a, b) => b.Distance.CompareTo(a.Distance)); + + capsIndex = -1; + + for (int i = Caps.Length - 1; i > 0; i--) + { + if (Caps[i].Distance > 100_000) + { + capsIndex = i; + break; + } + } + } + + return (spotsIndex, pointsIndex, capsIndex); } public override void Load(Device device) { - if ((Points != null) && (Points.Length > 0)) + if (Points.Length > 0) { PointsBuffer = new GpuSBuffer(device, Points); } - if ((Spots != null) && (Spots.Length > 0)) + if (Spots.Length > 0) { SpotsBuffer = new GpuSBuffer(device, Spots); } - if ((Caps != null) && (Caps.Length > 0)) + if (Caps.Length > 0) { CapsBuffer = new GpuSBuffer(device, Caps); } @@ -1695,7 +1747,7 @@ namespace CodeWalker.Rendering public override void Init(YmapDistantLODLights key) { Key = key; - if ((key.positions == null) || (key.colours == null)) + if (key.positions.Length == 0 || key.colours.Length == 0) { return; } @@ -1735,7 +1787,6 @@ namespace CodeWalker.Rendering InstanceBuffer = null; } } - } @@ -1745,16 +1796,16 @@ namespace CodeWalker.Rendering public EditorVertex[] PathVertices; public int PathVertexCount { get; set; } - public Buffer PathVertexBuffer { get; set; } + public Buffer? PathVertexBuffer { get; set; } public VertexBufferBinding PathVBBinding; public EditorVertex[] TriangleVertices; public int TriangleVertexCount { get; set; } - public Buffer TriangleVertexBuffer { get; set; } + public Buffer? TriangleVertexBuffer { get; set; } public VertexBufferBinding TriangleVBBinding; public Vector4[] Nodes; - public GpuSBuffer NodeBuffer { get; set; } + public GpuSBuffer? NodeBuffer { get; set; } public override void Init(BasePathData key) { @@ -1762,30 +1813,20 @@ namespace CodeWalker.Rendering DataSize = 0; PathVertices = key.GetPathVertices(); - if (PathVertices != null) - { - PathVertexCount = PathVertices.Length; - DataSize = PathVertices.Length * VertexStride; - } + PathVertexCount = PathVertices.Length; + DataSize = PathVertices.Length * VertexStride; TriangleVertices = key.GetTriangleVertices(); - if (TriangleVertices != null) - { - TriangleVertexCount = TriangleVertices.Length; - DataSize += TriangleVertices.Length * VertexStride; - } + TriangleVertexCount = TriangleVertices.Length; + DataSize += TriangleVertices.Length * VertexStride; Nodes = key.GetNodePositions(); - if (Nodes != null) - { - DataSize += Nodes.Length * 16;//sizeof(Vector4) - } - + DataSize += Nodes.Length * 16;//sizeof(Vector4) } public override void Load(Device device) { - if ((PathVertices != null) && (PathVertices.Length > 0)) + if (PathVertices != null && PathVertices.Length > 0) { PathVertexBuffer = Buffer.Create(device, BindFlags.VertexBuffer, PathVertices); if (PathVertexBuffer != null) @@ -1794,7 +1835,7 @@ namespace CodeWalker.Rendering } } - if ((TriangleVertices != null) && (TriangleVertices.Length > 0)) + if (TriangleVertices != null && TriangleVertices.Length > 0) { TriangleVertexBuffer = Buffer.Create(device, BindFlags.VertexBuffer, TriangleVertices); if (TriangleVertexBuffer != null) @@ -1803,7 +1844,7 @@ namespace CodeWalker.Rendering } } - if ((Nodes != null) && (Nodes.Length > 0)) + if (Nodes != null && Nodes.Length > 0) { NodeBuffer = new GpuSBuffer(device, Nodes); } @@ -2217,8 +2258,10 @@ namespace CodeWalker.Rendering p1 = bgeom.GetVertex(bcap.capsuleIndex1); p2 = bgeom.GetVertex(bcap.capsuleIndex2); a1 = p2 - p1; - n1 = Vector3.Normalize(a1); - p3 = Vector3.Normalize(n1.GetPerpVec()); + n1 = a1; + n1.Normalize(); + p3 = n1.GetPerpVec(); + p3.Normalize(); //p4 = Vector3.Normalize(Vector3.Cross(n1, p3)); Quaternion q1 = Quaternion.Invert(Quaternion.LookAtRH(Vector3.Zero, p3, n1)); rcapsules[curcapsule].Point1 = p1; @@ -2320,10 +2363,7 @@ namespace CodeWalker.Rendering var colourf = BoundsMaterialTypes.GetMaterialColour(mat); var colour = (uint)colourf.ToRgba(); - var rsph = new RenderableSphere(); - rsph.Colour = colour; - rsph.Center = Vector3.TransformCoordinate(bsph.SphereCenter, xform); - rsph.Radius = bsph.SphereRadius; + var rsph = new RenderableSphere(Vector3.TransformCoordinate(bsph.SphereCenter, xform), bsph.SphereRadius, colour); Spheres = new[] { rsph }; @@ -2346,12 +2386,13 @@ namespace CodeWalker.Rendering var extent = (bbox.BoxMax - bbox.BoxMin).Abs(); - var rbox = new RenderableBox(); - rbox.Colour = colour; - rbox.Corner = Vector3.TransformCoordinate(bbox.BoxMin, xform); - rbox.Edge1 = Vector3.TransformNormal(new Vector3(extent.X, 0, 0), xform); - rbox.Edge2 = Vector3.TransformNormal(new Vector3(0, extent.Y, 0), xform); - rbox.Edge3 = Vector3.TransformNormal(new Vector3(0, 0, extent.Z), xform); + var rbox = new RenderableBox( + Vector3.TransformCoordinate(bbox.BoxMin, xform), + colour, + Vector3.TransformNormal(new Vector3(extent.X, 0, 0), xform), + Vector3.TransformNormal(new Vector3(0, extent.Y, 0), xform), + Vector3.TransformNormal(new Vector3(0, 0, extent.Z), xform) + ); Boxes = new[] { rbox }; @@ -2529,23 +2570,23 @@ namespace CodeWalker.Rendering } - public struct RenderableBox + public struct RenderableBox(Vector3 corner, uint colour, Vector3 edge1, Vector3 edge2, Vector3 edge3) { - public Vector3 Corner { get; set; } - public uint Colour { get; set; } - public Vector3 Edge1 { get; set; } - public float Pad1 { get; set; } - public Vector3 Edge2 { get; set; } - public float Pad2 { get; set; } - public Vector3 Edge3 { get; set; } - public float Pad3 { get; set; } + public Vector3 Corner { get; set; } = corner; + public uint Colour { get; set; } = colour; + public Vector3 Edge1 { get; set; } = edge1; + public float Pad1 { get; init; } + public Vector3 Edge2 { get; set; } = edge2; + public float Pad2 { get; init; } + public Vector3 Edge3 { get; set; } = edge3; + public float Pad3 { get; init; } } - public struct RenderableSphere + public struct RenderableSphere(Vector3 center, float radius, uint colour) { - public Vector3 Center { get; set; } - public float Radius { get; set; } + public Vector3 Center { get; set; } = center; + public float Radius { get; set; } = radius; public Vector3 Pad0 { get; set; } - public uint Colour { get; set; } + public uint Colour { get; set; } = colour; } public struct RenderableCapsule { @@ -2569,10 +2610,10 @@ namespace CodeWalker.Rendering } - public struct RenderableEntity + public struct RenderableEntity(YmapEntityDef entity, Renderable renderable) { - public YmapEntityDef Entity; - public Renderable Renderable; + public YmapEntityDef Entity = entity; + public Renderable Renderable = renderable; } diff --git a/CodeWalker/Rendering/RenderableCache.cs b/CodeWalker/Rendering/RenderableCache.cs index 0058702..b6aeb6e 100644 --- a/CodeWalker/Rendering/RenderableCache.cs +++ b/CodeWalker/Rendering/RenderableCache.cs @@ -135,7 +135,8 @@ namespace CodeWalker.Rendering public bool ContentThreadProc() { - if (currentDevice == null) return false; //can't do anything with no device + if (currentDevice == null) + return false; //can't do anything with no device Monitor.Enter(updateSyncRoot); try @@ -211,35 +212,35 @@ namespace CodeWalker.Rendering waterquads.RenderThreadSync(currentDevice); } - public Renderable GetRenderable(DrawableBase drawable) + public Renderable? GetRenderable(DrawableBase drawable) { return renderables.Get(drawable); } - public RenderableTexture GetRenderableTexture(Texture texture) + public RenderableTexture? GetRenderableTexture(Texture texture) { return textures.Get(texture); } - public RenderableBoundComposite GetRenderableBoundComp(Bounds bound) + public RenderableBoundComposite? GetRenderableBoundComp(Bounds bound) { return boundcomps.Get(bound); } - public RenderableInstanceBatch GetRenderableInstanceBatch(YmapGrassInstanceBatch batch) + public RenderableInstanceBatch? GetRenderableInstanceBatch(YmapGrassInstanceBatch batch) { return instbatches.Get(batch); } - public RenderableDistantLODLights GetRenderableDistantLODLights(YmapDistantLODLights lights) + public RenderableDistantLODLights? GetRenderableDistantLODLights(YmapDistantLODLights lights) { return distlodlights.Get(lights); } - public RenderableLODLights GetRenderableLODLights(YmapFile ymap) + public RenderableLODLights? GetRenderableLODLights(YmapFile ymap) { return lodlights.Get(ymap); } - public RenderablePathBatch GetRenderablePathBatch(BasePathData pathdata) + public RenderablePathBatch? GetRenderablePathBatch(BasePathData pathdata) { return pathbatches.Get(pathdata); } - public RenderableWaterQuad GetRenderableWaterQuad(WaterQuad quad) + public RenderableWaterQuad? GetRenderableWaterQuad(WaterQuad quad) { return waterquads.Get(quad); } @@ -278,7 +279,7 @@ namespace CodeWalker.Rendering LoadQueued = 2, } - public abstract class RenderableCacheItem + public abstract class RenderableCacheItem: IDisposable { public TKey Key; public volatile bool IsLoaded = false; @@ -290,6 +291,12 @@ namespace CodeWalker.Rendering public abstract void Init(TKey key); public abstract void Load(Device device); public abstract void Unload(); + + public void Dispose() + { + Unload(); + GC.SuppressFinalize(this); + } } public class RenderableCacheLookup where TVal: RenderableCacheItem, new() @@ -303,43 +310,23 @@ namespace CodeWalker.Rendering public long CacheUse = 0; public double CacheTime; public int LoadedCount = 0;//temporary, per loop - private long LastFrameTime = 0; public RenderableCacheLookup(long limit, double time) { CacheLimit = limit; CacheTime = time; - LastFrameTime = DateTime.UtcNow.ToBinary(); } - public int QueueLength - { - get - { - return itemsToLoad.Count; - } - } - public int CurrentLoadedCount - { - get - { - return loadeditems.Count; - } - } - public int CurrentCacheCount - { - get - { - return cacheitems.Count; - } - } + public int QueueLength => itemsToLoad.Count; + public int CurrentLoadedCount => loadeditems.Count; + public int CurrentCacheCount => cacheitems.Count; public void Clear() { itemsToLoad = new ConcurrentQueue(); foreach (TVal rnd in loadeditems) { - rnd.Unload(); + rnd.Dispose(); } loadeditems.Clear(); cacheitems.Clear(); @@ -398,7 +385,7 @@ namespace CodeWalker.Rendering //unload items that haven't been used in longer than the cache period. //var now = DateTime.UtcNow; var rnode = loadeditems.First; - while (rnode != null) + while (rnode is not null) { var lastUsed = rnode.Value.LastUseTime.Elapsed; if (lastUsed.TotalSeconds > CacheTime) @@ -418,7 +405,6 @@ namespace CodeWalker.Rendering public void RenderThreadSync(Device device) { - LastFrameTime = DateTime.UtcNow.ToBinary(); TVal item; TKey key; while (keysToInvalidate.TryDequeue(out key)) @@ -445,37 +431,44 @@ namespace CodeWalker.Rendering } - public TVal Get(TKey key) + public TVal? Get(TKey? key) { - if (key == null) return null; - TVal item = null; - if (!cacheitems.TryGetValue(key, out item)) + if (key is null) + { + return null; + } + + if (!cacheitems.TryGetValue(key, out var item)) { item = new TVal(); item.Init(key); cacheitems.Add(key, item); } + item.LastUseTime.Restart(); - if ((!item.IsLoaded) && (!item.LoadQueued))// || + if (!item.IsLoaded && !item.LoadQueued)// || { item.LoadQueued = true; itemsToLoad.Enqueue(item); } + return item; } - public void Invalidate(TKey key) + public void Invalidate(TKey? key) { - if (key == null) return; + if (key is null) + { + return; + } keysToInvalidate.Enqueue(key); } public void UpdateImmediate(TKey key, Device device) { - TVal item; - if (cacheitems.TryGetValue(key, out item)) + if (cacheitems.TryGetValue(key, out var item)) { Interlocked.Add(ref CacheUse, -item.DataSize); item.Unload(); diff --git a/CodeWalker/Rendering/Renderer.cs b/CodeWalker/Rendering/Renderer.cs index 0dd92df..9c91f6d 100644 --- a/CodeWalker/Rendering/Renderer.cs +++ b/CodeWalker/Rendering/Renderer.cs @@ -5,6 +5,7 @@ using SharpDX; using SharpDX.Direct3D11; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading; @@ -13,22 +14,16 @@ using static CodeWalker.Rendering.RenderableLODLights; namespace CodeWalker.Rendering { + //TODO: Figure out if Renderer can be made a singleton so multiple forms can share GPU resources public class Renderer { private DXForm Form; - private GameFileCache gameFileCache; - private RenderableCache renderableCache; - public RenderableCache RenderableCache { get { return renderableCache; } } - - private DXManager dxman = new DXManager(); - public DXManager DXMan { get { return dxman; } } - private Device currentdevice; - public Device Device { get { return currentdevice; } } - private object rendersyncroot = new object(); - public object RenderSyncRoot { get { return rendersyncroot; } } - - public ShaderManager shaders; - + private readonly GameFileCache gameFileCache; + public RenderableCache RenderableCache { get; } = new RenderableCache(); + public DXManager DXMan { get; } = new DXManager(); + public Device? Device { get; private set; } + public SemaphoreSlim RenderSyncRoot { get; } = new SemaphoreSlim(1, 1); + public ShaderManager? Shaders { get; private set; } public Camera camera; private double currentRealTime = 0; @@ -79,7 +74,7 @@ namespace CodeWalker.Rendering public float MapViewDetail = 1.0f; - private UnitQuad markerquad = null; + private UnitQuad? markerquad = null; public bool markerdepthclip = Settings.Default.MarkerDepthClip; @@ -173,8 +168,7 @@ namespace CodeWalker.Rendering public Renderer(DXForm form, GameFileCache cache) { Form = form; - gameFileCache = cache ?? GameFileCacheFactory.GetInstance(); - renderableCache = new RenderableCache(); + gameFileCache = cache ?? GameFileCacheFactory.Instance; var s = Settings.Default; camera = new Camera(s.CameraSmoothing, s.CameraSensitivity, s.CameraFieldOfView); @@ -183,22 +177,22 @@ namespace CodeWalker.Rendering public bool Init() { - return dxman.Init(Form, false); + return DXMan.Init(Form, false); } public void Start() { - dxman.Start(); + DXMan.Start(); } public void DeviceCreated(Device device, int width, int height) { - currentdevice = device; + Device = device; - shaders = new ShaderManager(device, dxman); - shaders.OnWindowResize(width, height); //init the buffers + Shaders = new ShaderManager(device, DXMan); + Shaders.OnWindowResize(width, height); //init the buffers - renderableCache.OnDeviceCreated(device); + RenderableCache.OnDeviceCreated(device); camera.OnWindowResize(width, height); //init the projection stuff @@ -209,31 +203,38 @@ namespace CodeWalker.Rendering public void DeviceDestroyed() { - renderableCache.OnDeviceDestroyed(); + RenderableCache.OnDeviceDestroyed(); - markerquad.Dispose(); + markerquad?.Dispose(); + markerquad = null; - shaders.Dispose(); + Shaders?.Dispose(); + Shaders = null; - currentdevice = null; + Device = null; } public void BuffersResized(int width, int height) { - lock (rendersyncroot) + using (RenderSyncRoot.WaitDisposable()) { camera.OnWindowResize(width, height); - shaders.OnWindowResize(width, height); + Shaders?.OnWindowResize(width, height); } } public void ReloadShaders() { - if (shaders != null) + if (Device is null) + return; + + if (Shaders is not null) { - shaders.Dispose(); + Shaders.Dispose(); + Shaders = null; } - shaders = new ShaderManager(currentdevice, dxman); + + Shaders = new ShaderManager(Device, DXMan); } @@ -243,9 +244,9 @@ namespace CodeWalker.Rendering fcelapsed += elapsed; if (fcelapsed >= 0.5f) { - fps = framecount * 2; + fps = (int)(framecount * (1.0f / fcelapsed)); framecount = 0; - fcelapsed -= 0.5f; + fcelapsed = 0.0f; } if (elapsed > 0.1f) elapsed = 0.1f; currentRealTime += elapsed; @@ -276,11 +277,11 @@ namespace CodeWalker.Rendering { context = ctx; - dxman.ClearRenderTarget(context); + DXMan.ClearRenderTarget(context); - shaders.BeginFrame(context, currentRealTime, currentElapsedTime); + Shaders.BeginFrame(context, currentRealTime, currentElapsedTime); - shaders.EnsureShaderTextures(gameFileCache, renderableCache); + Shaders.EnsureShaderTextures(gameFileCache, RenderableCache); @@ -310,29 +311,37 @@ namespace CodeWalker.Rendering RenderClouds(); - shaders.ClearDepth(context); + Shaders.ClearDepth(context); } public void RenderQueued() { - shaders.RenderQueued(context, camera, currentWindVec); + try + { + Shaders.RenderQueued(context, camera, currentWindVec); - RenderSkeletons(); + RenderSkeletons(); + } + catch(Exception ex) + { + Console.WriteLine(ex); + throw; + } } public void RenderFinalPass() { - shaders.RenderFinalPass(context); + Shaders.RenderFinalPass(context); } public void EndRender() { - renderableCache.RenderThreadSync(); + RenderableCache.RenderThreadSync(); } public bool ContentThreadProc() { - bool rcItemsPending = renderableCache.ContentThreadProc(); + bool rcItemsPending = RenderableCache.ContentThreadProc(); return rcItemsPending; } @@ -347,16 +356,25 @@ namespace CodeWalker.Rendering public void SetWeatherType(string name) { - if (!Monitor.TryEnter(rendersyncroot, 50)) - { return; } //couldn't get a lock... - weathertype = name; - weather.SetNextWeather(weathertype); - Monitor.Exit(rendersyncroot); + if (!RenderSyncRoot.Wait(50)) + { + Console.WriteLine("Failed to get lock after 50 ms on SetWeatherType"); + return; + } //couldn't get a lock... + try + { + weathertype = name; + weather.SetNextWeather(weathertype); + } + finally + { + RenderSyncRoot.Release(); + } } public void SetCameraMode(string modestr) { - lock (rendersyncroot) + using (RenderSyncRoot.WaitDisposable()) { switch (modestr) { @@ -376,69 +394,65 @@ namespace CodeWalker.Rendering } camera.IsMapView = MapViewEnabled; } + } public string GetStatusText() { - var rgc = shaders?.RenderedGeometries ?? 0; - var crc = renderableCache.LoadedRenderableCount; - var ctc = renderableCache.LoadedTextureCount; - var vr = renderableCache.TotalGraphicsMemoryUse + (shaders != null ? shaders.TotalGraphicsMemoryUse : 0); + var rgc = Shaders?.RenderedGeometries ?? 0; + var crc = RenderableCache.LoadedRenderableCount; + var rverts = Shaders?.RenderedVeritices ?? 0; + var ctc = RenderableCache.LoadedTextureCount; + var vr = RenderableCache.TotalGraphicsMemoryUse + (Shaders != null ? Shaders.TotalGraphicsMemoryUse : 0); var vram = TextUtil.GetBytesReadable(vr); var cacheUsage = TextUtil.GetBytesReadable(gameFileCache.MemoryUsage); var cacheMax = TextUtil.GetBytesReadable(gameFileCache.MaxMemoryUsage); - return $"Drawn: {rgc} geom, Loaded: {crc} dr, {ctc} tx, Vram: {vram}, Fps: {fps}, Cache: {cacheUsage}/{cacheMax}"; + return $"Drawn: {rgc} geom, {rverts} verts, Loaded: {crc} dr, {ctc} tx, Vram: {vram}, Fps: {fps}, Cache: {cacheUsage}/{cacheMax}"; } public void Invalidate(Bounds bounds) { - renderableCache.Invalidate(bounds); + RenderableCache.Invalidate(bounds); } public void Invalidate(BasePathData path) { - renderableCache.Invalidate(path); + RenderableCache.Invalidate(path); } public void Invalidate(YmapGrassInstanceBatch batch) { - renderableCache.Invalidate(batch); + RenderableCache.Invalidate(batch); } public void Invalidate(YmapLODLight lodlight) { - renderableCache.Invalidate(lodlight); + RenderableCache.Invalidate(lodlight); } public void UpdateSelectionDrawFlags(DrawableModel model, DrawableGeometry geom, bool rem) { - lock (rendersyncroot) + using (RenderSyncRoot.WaitDisposable()) { - if (model != null) + if (model is not null) { if (rem) { - if (SelectionModelDrawFlags.ContainsKey(model)) - { - SelectionModelDrawFlags.Remove(model); - } + SelectionModelDrawFlags.Remove(model); } else { SelectionModelDrawFlags[model] = false; } } - if (geom != null) + if (geom is not null) { if (rem) { - if (SelectionGeometryDrawFlags.ContainsKey(geom)) - { - SelectionGeometryDrawFlags.Remove(geom); - } + SelectionGeometryDrawFlags.Remove(geom); } else { @@ -471,7 +485,7 @@ namespace CodeWalker.Rendering Color4 lightnaturaldowncolour = new Color4(0.0f); Color4 lightartificialupcolour = new Color4(0.0f); Color4 lightartificialdowncolour = new Color4(0.0f); - bool hdr = (shaders != null) ? shaders.hdr : false; + bool hdr = (Shaders != null) ? Shaders.hdr : false; float hdrint = 1.0f; Vector3 sundir = Vector3.Up; Vector3 moondir = Vector3.Down; @@ -599,9 +613,9 @@ namespace CodeWalker.Rendering globalLights.Params.LightArtificialAmbDown = renderartificialambientlight ? lightartificialdowncolour : Color4.Black; - if (shaders != null) + if (Shaders != null) { - shaders.SetGlobalLightParams(globalLights); + Shaders.SetGlobalLightParams(globalLights); } } @@ -639,29 +653,29 @@ namespace CodeWalker.Rendering - public void RenderMarkers(List batch) { + if (Shaders is null || markerquad is null) + return; - shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); //hmm they are backwards - shaders.SetDepthStencilMode(context, markerdepthclip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); - shaders.SetDefaultBlendState(context); + Shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); //hmm they are backwards + Shaders.SetDepthStencilMode(context, markerdepthclip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); + Shaders.SetDefaultBlendState(context); - var shader = shaders.Marker; + var shader = Shaders.Marker; shader.SetShader(context); shader.SetInputLayout(context, VertexType.Default); shader.SetSceneVars(context, camera, null, globalLights); - MapIcon icon = null; foreach (var marker in batch) { - icon = marker.Icon; + var icon = marker.Icon; Vector2 texs = new Vector2(icon.TexWidth, icon.TexHeight); Vector2 size = texs * marker.Distance; Vector2 offset = (new Vector2(texs.X, -texs.Y) - new Vector2(icon.Center.X, -icon.Center.Y) * 2.0f) * marker.Distance; shader.SetMarkerVars(context, marker.CamRelPos, size, offset); shader.SetTexture(context, icon.TexView); - markerquad.Draw(context); + markerquad?.Draw(context); } shader.UnbindResources(context); @@ -672,18 +686,20 @@ namespace CodeWalker.Rendering public void RenderTransformWidget(TransformWidget widget) { + if (Shaders is null) + return; var dsmode = DepthStencilMode.Enabled; if (widget.Mode == WidgetMode.Rotation) { dsmode = DepthStencilMode.DisableAll; } - shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); - shaders.SetDepthStencilMode(context, dsmode); - shaders.SetDefaultBlendState(context); - shaders.ClearDepth(context, false); + Shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); + Shaders.SetDepthStencilMode(context, dsmode); + Shaders.SetDefaultBlendState(context); + Shaders.ClearDepth(context, false); - var shader = shaders.Widgets; + var shader = Shaders.Widgets; widget.Render(context, camera, shader); } @@ -716,19 +732,19 @@ namespace CodeWalker.Rendering } - public void RenderBrushRadiusOutline(Vector3 position, Vector3 dir, Vector3 up, float radius, uint col) + public void RenderBrushRadiusOutline(in Vector3 position, in Vector3 dir, in Vector3 up, float radius, uint col) { const int Reso = 36; const float MaxDeg = 360f; const float DegToRad = 0.0174533f; const float Ang = DegToRad * MaxDeg / Reso; - var axis = Vector3.Cross(dir, up); + var axis = Vectors.Cross(in dir, in up); var c = new VertexTypePC[Reso]; for (var i = 0; i < Reso; i++) { - var rDir = Quaternion.RotationAxis(dir, i * Ang).Multiply(axis); + var rDir = dir.RotationAxis(i * Ang).Multiply(axis); c[i].Position = position + (rDir * radius); c[i].Colour = col; } @@ -739,7 +755,7 @@ namespace CodeWalker.Rendering SelectionLineVerts.Add(c[(i + 1) % c.Length]); } - SelectionLineVerts.Add(new VertexTypePC{Colour = col, Position = position}); + SelectionLineVerts.Add(new VertexTypePC { Colour = col, Position = position }); SelectionLineVerts.Add(new VertexTypePC { Colour = col, Position = position + dir * 2f}); } @@ -747,26 +763,30 @@ namespace CodeWalker.Rendering { if (mode == BoundsShaderMode.Box) { - var wbox = new MapBox(); - wbox.CamRelPos = camrel; - wbox.BBMin = bbmin; - wbox.BBMax = bbmax; - wbox.Scale = scale; - wbox.Orientation = ori; + var wbox = new MapBox + { + CamRelPos = camrel, + BBMin = bbmin, + BBMax = bbmax, + Scale = scale, + Orientation = ori, + }; WhiteBoxes.Add(wbox); } else if (mode == BoundsShaderMode.Sphere) { - var wsph = new MapSphere(); - wsph.CamRelPos = camrel; - wsph.Radius = bsphrad; + var wsph = new MapSphere + { + CamRelPos = camrel, + Radius = bsphrad, + }; WhiteSpheres.Add(wsph); } } - public void RenderSelectionArrowOutline(Vector3 pos, Vector3 dir, Vector3 up, Quaternion ori, float len, float rad, uint colour) + public void RenderSelectionArrowOutline(in Vector3 pos, in Vector3 dir, in Vector3 up, in Quaternion ori, float len, float rad, uint colour) { - Vector3 ax = Vector3.Cross(dir, up); + dir.Cross(in up, out Vector3 ax); Vector3 sx = ax * rad; Vector3 sy = up * rad; Vector3 sz = dir * len; @@ -839,16 +859,18 @@ namespace CodeWalker.Rendering } - public void RenderSelectionCircle(Vector3 position, float radius, uint col) + public void RenderSelectionCircle(in Vector3 position, float radius, uint col) { const int Reso = 36; const float MaxDeg = 360f; const float DegToRad = 0.0174533f; const float Ang = DegToRad * MaxDeg / Reso; - var dir = Vector3.Normalize(position - camera.Position); - var up = Vector3.Normalize(dir.GetPerpVec()); - var axis = Vector3.Cross(dir, up); + position.Add(in camera.Position, out var dir); + dir.Normalize(); + dir.GetPerpVec(out var up); + up.Normalize(); + dir.Cross(in up, out var axis); var c = new VertexTypePC[Reso]; for (var i = 0; i < Reso; i++) @@ -865,7 +887,7 @@ namespace CodeWalker.Rendering } } - public void RenderSelectionCircle(Vector3 position, Vector3 ax, Vector3 ay, float radius, uint col) + public void RenderSelectionCircle(in Vector3 position, in Vector3 ax, in Vector3 ay, float radius, uint col) { const int Reso = 36; const float MaxDeg = 360f; @@ -890,7 +912,7 @@ namespace CodeWalker.Rendering } } - public void RenderSelectionArc(Vector3 position, Vector3 ax, Vector3 ay, float radius, float angle, uint col) + public void RenderSelectionArc(in Vector3 position, in Vector3 ax, in Vector3 ay, float radius, float angle, uint col) { int res = (int)(angle * 0.1f); const float DegToRad = 0.0174533f; @@ -914,7 +936,7 @@ namespace CodeWalker.Rendering } } - public void RenderSelectionLine(Vector3 p1, Vector3 p2, uint col) + public void RenderSelectionLine(in Vector3 p1, in Vector3 p2, uint col) { SelectionLineVerts.Add(new VertexTypePC() { Position = p1, Colour = col }); SelectionLineVerts.Add(new VertexTypePC() { Position = p2, Colour = col }); @@ -944,7 +966,7 @@ namespace CodeWalker.Rendering SelectionLineVerts.Add(new VertexTypePC() { Position = p1, Colour = col }); } - public void RenderSelectionCone(Vector3 position, Vector3 ax, Vector3 ay, Vector3 dir, float radius, float height, uint col) + public void RenderSelectionCone(in Vector3 position, in Vector3 ax, in Vector3 ay, in Vector3 dir, float radius, float height, uint col) { const int Reso = 36; const float MaxDeg = 360f; @@ -974,25 +996,27 @@ namespace CodeWalker.Rendering } } - public void RenderSelectionCapsule(Vector3 position, Vector3 ax, Vector3 ay, Vector3 dir, float radius, float height, uint col) + public void RenderSelectionCapsule(in Vector3 position, in Vector3 ax, in Vector3 ay, in Vector3 dir, float radius, float height, uint col) { var cp1 = position - (dir * height); var cp2 = position + (dir * height); var axr = ax * radius; var ayr = ay * radius; - RenderSelectionCircle(cp1, ax, ay, radius, col); - RenderSelectionCircle(cp2, ax, ay, radius, col); - RenderSelectionArc(cp1, -dir, ax, radius, 180, col); - RenderSelectionArc(cp1, -dir, ay, radius, 180, col); - RenderSelectionArc(cp2, dir, ax, radius, 180, col); - RenderSelectionArc(cp2, dir, ay, radius, 180, col); + RenderSelectionCircle(in cp1, in ax, in ay, radius, col); + RenderSelectionCircle(in cp2, in ax, in ay, radius, col); + var dirNeg = -dir; + RenderSelectionArc(in cp1, in dirNeg, in ax, radius, 180, col); + RenderSelectionArc(in cp1, in dirNeg, in ay, radius, 180, col); + RenderSelectionArc(in cp2, in dir, in ax, radius, 180, col); + RenderSelectionArc(in cp2, in dir, in ay, radius, 180, col); + RenderSelectionLine(cp1 + axr, cp2 + axr, col); RenderSelectionLine(cp1 + ayr, cp2 + ayr, col); RenderSelectionLine(cp1 - axr, cp2 - axr, col); RenderSelectionLine(cp1 - ayr, cp2 - ayr, col); } - public void RenderSelectionBox(Vector3 p1, Vector3 p2, Vector3 a2, Vector3 a3, uint col) + public void RenderSelectionBox(in Vector3 p1, in Vector3 p2, in Vector3 a2, in Vector3 a3, uint col) { VertexTypePC v = new VertexTypePC(); v.Colour = col; @@ -1046,8 +1070,8 @@ namespace CodeWalker.Rendering switch (type) { case LightType.Point: - RenderSelectionCircle(pos, Vector3.UnitX, Vector3.UnitZ, extent, colwht); - RenderSelectionCircle(pos, Vector3.UnitX, Vector3.UnitY, extent, colwht); + RenderSelectionCircle(in pos, in Vector3.UnitX, in Vector3.UnitZ, extent, colwht); + RenderSelectionCircle(in pos, in Vector3.UnitX, in Vector3.UnitY, extent, colwht); RenderSelectionCircle(pos, Vector3.UnitY, Vector3.UnitZ, extent, colwht); break; case LightType.Spot: @@ -1121,7 +1145,7 @@ namespace CodeWalker.Rendering int ind1 = ynv.Indices[tid + 1]; int ind2 = ynv.Indices[tid + 2]; if ((ind1 >= vc) || (ind2 >= vc)) - { continue; } + continue; v1.Position = ynv.Vertices[ind1]; v2.Position = ynv.Vertices[ind2]; SelectionTriVerts.Add(v0); @@ -1152,7 +1176,7 @@ namespace CodeWalker.Rendering { var ind = ynv.Indices[id]; if (ind >= vc) - { continue; } + continue; v.Position = ynv.Vertices[ind]; SelectionLineVerts.Add(v); @@ -1198,10 +1222,11 @@ namespace CodeWalker.Rendering //} } - public void RenderSelectionCollisionPolyOutline(BoundPolygon poly, uint colourval, YmapEntityDef entity) + public void RenderSelectionCollisionPolyOutline(BoundPolygon poly, uint colourval, YmapEntityDef? entity) { var bgeom = poly?.Owner; - if (bgeom == null) return; + if (bgeom is null) + return; VertexTypePC v = new VertexTypePC(); v.Colour = colourval; @@ -1209,7 +1234,7 @@ namespace CodeWalker.Rendering var ori = Quaternion.Identity; var pos = Vector3.Zero; var sca = Vector3.One; - if (entity != null) + if (entity is not null) { ori = entity.Orientation; pos = entity.Position; @@ -1286,16 +1311,16 @@ namespace CodeWalker.Rendering } - shaders.SetDepthStencilMode(context, clip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); + Shaders.SetDepthStencilMode(context, clip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); - var pshader = shaders.Paths; + var pshader = Shaders.Paths; if (SelectionTriVerts.Count > 0) { - pshader.RenderTriangles(context, SelectionTriVerts, camera, shaders.GlobalLights); + pshader.RenderTriangles(context, SelectionTriVerts, camera, Shaders.GlobalLights); } if (SelectionLineVerts.Count > 0) { - pshader.RenderLines(context, SelectionLineVerts, camera, shaders.GlobalLights); + pshader.RenderLines(context, SelectionLineVerts, camera, Shaders.GlobalLights); } @@ -1303,7 +1328,7 @@ namespace CodeWalker.Rendering Vector3 coloursel = new Vector3(0, 1, 0) * globalLights.HdrIntensity * 5.0f; Vector3 colourwht = new Vector3(1, 1, 1) * globalLights.HdrIntensity * 10.0f; - var shader = shaders.Bounds; + var shader = Shaders.Bounds; if ((WhiteBoxes.Count > 0) || (SelectionBoxes.Count > 0)) { @@ -1375,8 +1400,8 @@ namespace CodeWalker.Rendering Vector3 colour = new Vector3(0, 0, 1) * globalLights.HdrIntensity; Vector3 colourhi = new Vector3(0, 1, 1) * globalLights.HdrIntensity; - shaders.SetDepthStencilMode(context, clip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); - var shader = shaders.Bounds; + Shaders.SetDepthStencilMode(context, clip ? DepthStencilMode.Enabled : DepthStencilMode.DisableAll); + var shader = Shaders.Bounds; if ((BoundingBoxes.Count > 0) || (HilightBoxes.Count > 0)) { @@ -1463,14 +1488,15 @@ namespace CodeWalker.Rendering { YmapEntityDef entity = item.Entity; DrawableBase drawable = item.Renderable.Key; - Skeleton skeleton = drawable?.Skeleton; - if (skeleton == null) continue; + Skeleton? skeleton = drawable?.Skeleton; + if (skeleton is null) continue; Vector3 campos = camera.Position - (entity?.Position ?? Vector3.Zero); var pinds = skeleton.ParentIndices; var bones = skeleton.Bones?.Items; - if ((pinds == null) || (bones == null)) continue; + if (pinds is null || bones is null) + continue; var xforms = skeleton.Transformations; int cnt = Math.Min(pinds.Length, bones.Length); @@ -1500,13 +1526,13 @@ namespace CodeWalker.Rendering for (int j = 0; j < 3; j++) starverts0[j] = bone.AnimTransform.MultiplyW(starverts0[j]); for (int j = 0; j < 3; j++) starverts1[j] = bone.AnimTransform.MultiplyW(starverts1[j]); - if (pbone != null) + if (pbone is not null) { - lbeg = pbone.AnimTransform.MultiplyW(lbeg); - lend = pbone.AnimTransform.MultiplyW(lend); + lbeg = pbone.AnimTransform.MultiplyW(in lbeg); + lend = pbone.AnimTransform.MultiplyW(in lend); } - if (entity != null) + if (entity is not null) { lbeg = entity.Position + entity.Orientation.Multiply(lbeg * entity.Scale); lend = entity.Position + entity.Orientation.Multiply(lend * entity.Scale); @@ -1523,7 +1549,7 @@ namespace CodeWalker.Rendering vb.Position = starverts1[2]; skeletonLineVerts.Add(vb); - if (pbone != null) //don't draw the origin to root bone line + if (pbone is not null) //don't draw the origin to root bone line { vg.Position = lbeg; vb.Position = lend; @@ -1551,8 +1577,8 @@ namespace CodeWalker.Rendering public void RenderLines(List linelist, DepthStencilMode dsmode = DepthStencilMode.Enabled) { - shaders.SetDepthStencilMode(context, dsmode); - shaders.Paths.RenderLines(context, linelist, camera, shaders.GlobalLights); + Shaders.SetDepthStencilMode(context, dsmode); + Shaders.Paths.RenderLines(context, linelist, camera, Shaders.GlobalLights); } @@ -1562,25 +1588,28 @@ namespace CodeWalker.Rendering private void RenderSky() { - if (MapViewEnabled) return; - if (!renderskydome) return; - if (!weather.Inited) return; + if (MapViewEnabled) + return; + if (!renderskydome) + return; + if (!weather.Inited) + return; - var shader = shaders.Skydome; + var shader = Shaders.Skydome; shader.UpdateSkyLocals(weather, globalLights); - DrawableBase skydomeydr = null; + DrawableBase? skydomeydr = null; YddFile skydomeydd = gameFileCache.GetYdd(2640562617); //skydome hash if ((skydomeydd != null) && (skydomeydd.Loaded) && (skydomeydd.Dict != null)) { skydomeydr = skydomeydd.Dict.Values.FirstOrDefault(); } - Texture starfield = null; - Texture moon = null; + Texture? starfield = null; + Texture? moon = null; YtdFile skydomeytd = gameFileCache.GetYtd(2640562617); //skydome hash if ((skydomeytd != null) && (skydomeytd.Loaded) && (skydomeytd.TextureDict != null) && (skydomeytd.TextureDict.Dict != null)) { @@ -1592,89 +1621,96 @@ namespace CodeWalker.Rendering } } - Renderable sdrnd = null; - if (skydomeydr != null) + Renderable? sdrnd = null; + if (skydomeydr is not null) { - sdrnd = renderableCache.GetRenderable(skydomeydr); + sdrnd = RenderableCache.GetRenderable(skydomeydr); } - RenderableTexture sftex = null; - if (starfield != null) + RenderableTexture? sftex = null; + if (starfield is not null) { - sftex = renderableCache.GetRenderableTexture(starfield); + sftex = RenderableCache.GetRenderableTexture(starfield); } - RenderableTexture moontex = null; - if (moon != null) + RenderableTexture? moontex = null; + if (moon is not null) { - moontex = renderableCache.GetRenderableTexture(moon); + moontex = RenderableCache.GetRenderableTexture(moon); } - if ((sdrnd != null) && (sdrnd.IsLoaded) && (sftex != null) && (sftex.IsLoaded)) + + if (sdrnd is null || !sdrnd.IsLoaded || sftex is null || !sftex.IsLoaded) { - shaders.SetDepthStencilMode(context, DepthStencilMode.DisableAll); - shaders.SetRasterizerMode(context, RasterizerMode.Solid); - - RenderableInst rinst = new RenderableInst(); - rinst.Position = Vector3.Zero; - rinst.CamRel = Vector3.Zero; - rinst.Distance = 0.0f; - rinst.BBMin = skydomeydr.BoundingBoxMin; - rinst.BBMax = skydomeydr.BoundingBoxMax; - rinst.BSCenter = Vector3.Zero; - rinst.Radius = skydomeydr.BoundingSphereRadius; - rinst.Orientation = Quaternion.Identity; - rinst.Scale = Vector3.One; - rinst.TintPaletteIndex = 0; - rinst.CastShadow = false; - rinst.Renderable = sdrnd; - shader.SetShader(context); - shader.SetInputLayout(context, VertexType.PTT); - shader.SetSceneVars(context, camera, null, globalLights); - shader.SetEntityVars(context, ref rinst); - - RenderableModel rmod = ((sdrnd.HDModels != null) && (sdrnd.HDModels.Length > 0)) ? sdrnd.HDModels[0] : null; - RenderableGeometry rgeom = ((rmod != null) && (rmod.Geometries != null) && (rmod.Geometries.Length > 0)) ? rmod.Geometries[0] : null; - - if ((rgeom != null) && (rgeom.VertexType == VertexType.PTT)) - { - shader.SetModelVars(context, rmod); - shader.SetTextures(context, sftex); - - rgeom.Render(context); - } - - //shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); - //shaders.SetDepthStencilMode(context, DepthStencilMode.Enabled); - shader.RenderSun(context, camera, weather, globalLights); - - - if ((rendermoon) && (moontex != null) && (moontex.IsLoaded)) - { - shader.RenderMoon(context, camera, weather, globalLights, moontex); - } - - - - shader.UnbindResources(context); + return; } + Shaders.SetDepthStencilMode(context, DepthStencilMode.DisableAll); + Shaders.SetRasterizerMode(context, RasterizerMode.Solid); + + RenderableInst rinst = new RenderableInst(); + rinst.Position = Vector3.Zero; + rinst.CamRel = Vector3.Zero; + rinst.Distance = 0.0f; + rinst.BBMin = skydomeydr!.BoundingBoxMin; + rinst.BBMax = skydomeydr.BoundingBoxMax; + rinst.BSCenter = Vector3.Zero; + rinst.Radius = skydomeydr.BoundingSphereRadius; + rinst.Orientation = Quaternion.Identity; + rinst.Scale = Vector3.One; + rinst.TintPaletteIndex = 0; + rinst.CastShadow = false; + rinst.Renderable = sdrnd; + shader.SetShader(context); + shader.SetInputLayout(context, VertexType.PTT); + shader.SetSceneVars(context, camera, null, globalLights); + shader.SetEntityVars(context, ref rinst); + + RenderableModel? rmod = ((sdrnd.HDModels is not null) && (sdrnd.HDModels.Length > 0)) ? sdrnd.HDModels[0] : null; + RenderableGeometry? rgeom = ((rmod is not null) && (rmod.Geometries is not null) && (rmod.Geometries.Length > 0)) ? rmod.Geometries[0] : null; + + if (rgeom is not null && rgeom.VertexType == VertexType.PTT) + { + shader.SetModelVars(context, rmod!); + shader.SetTextures(context, sftex); + + rgeom.Render(context); + } + + //shaders.SetRasterizerMode(context, RasterizerMode.SolidDblSided); + //shaders.SetDepthStencilMode(context, DepthStencilMode.Enabled); + shader.RenderSun(context, camera, weather, globalLights); + + + if (rendermoon && moontex is not null && moontex.IsLoaded) + { + shader.RenderMoon(context, camera, weather, globalLights, moontex); + } + + + + shader.UnbindResources(context); } private void RenderClouds() { - if (MapViewEnabled) return; - if (!renderclouds) return; - if (!renderskydome) return; - if (!weather.Inited) return; - if (!clouds.Inited) return; + if (MapViewEnabled) + return; + if (!renderclouds) + return; + if (!renderskydome) + return; + if (!weather.Inited) + return; + if (!clouds.Inited) + return; - var shader = shaders.Clouds; + var shader = Shaders.Clouds; - shaders.SetDepthStencilMode(context, DepthStencilMode.DisableAll); - shaders.SetRasterizerMode(context, RasterizerMode.Solid); - shaders.SetDefaultBlendState(context); + Shaders.SetDepthStencilMode(context, DepthStencilMode.DisableAll); + Shaders.SetRasterizerMode(context, RasterizerMode.Solid); + Shaders.SetDefaultBlendState(context); //shaders.SetAlphaBlendState(context); shader.SetShader(context); @@ -1688,17 +1724,19 @@ namespace CodeWalker.Rendering //render one cloud fragment. CloudHatFrag frag = clouds.HatManager.FindFrag(individualcloudfrag); - if (frag == null) return; + if (frag is null) + return; for (int i = 0; i < frag.Layers.Length; i++) { CloudHatFragLayer layer = frag.Layers[i]; uint dhash = JenkHash.GenHashLower(layer.Filename); Archetype arch = gameFileCache.GetArchetype(dhash); - if (arch == null) - { continue; } + if (arch is null) + continue; - if (Math.Max(camera.Position.Z, 0.0f) < layer.HeightTigger) continue; + if (Math.Max(camera.Position.Z, 0.0f) < layer.HeightTigger) + continue; var drw = gameFileCache.TryGetDrawable(arch); var rnd = TryGetRenderable(arch, drw); @@ -1745,14 +1783,8 @@ namespace CodeWalker.Rendering geom.Render(context); } } - } - - } - - - } @@ -1761,11 +1793,11 @@ namespace CodeWalker.Rendering { foreach (var quad in waterquads) { - RenderableWaterQuad rquad = renderableCache.GetRenderableWaterQuad(quad); + RenderableWaterQuad rquad = RenderableCache.GetRenderableWaterQuad(quad); if ((rquad != null) && (rquad.IsLoaded)) { rquad.CamRel = -camera.Position; - shaders.Enqueue(rquad); + Shaders.Enqueue(rquad); } } } @@ -1774,10 +1806,10 @@ namespace CodeWalker.Rendering { foreach (var ynd in ynds) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(ynd); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(ynd); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } } @@ -1786,10 +1818,10 @@ namespace CodeWalker.Rendering { foreach (var track in tracks) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(track); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(track); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } } @@ -1798,29 +1830,29 @@ namespace CodeWalker.Rendering { foreach (var ynv in ynvs) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(ynv); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(ynv); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } } public void RenderNavMesh(YnvFile ynv) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(ynv); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(ynv); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } public void RenderBasePath(BasePathData basepath) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(basepath); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(basepath); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } @@ -1828,20 +1860,20 @@ namespace CodeWalker.Rendering { foreach (var scenario in ymts) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(scenario.ScenarioRegion); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(scenario.ScenarioRegion); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } } public void RenderPopZones(PopZones zones) { - RenderablePathBatch rnd = renderableCache.GetRenderablePathBatch(zones); + RenderablePathBatch rnd = RenderableCache.GetRenderablePathBatch(zones); if ((rnd != null) && (rnd.IsLoaded)) { - shaders.Enqueue(rnd); + Shaders.Enqueue(rnd); } } @@ -1862,7 +1894,8 @@ namespace CodeWalker.Rendering foreach (var ymap in ymapsWithinStreamingExtents.Values) { - if (!RenderWorldYmapIsVisible(ymap)) continue; + if (!RenderWorldYmapIsVisible(ymap)) + continue; VisibleYmaps.Add(ymap); } RenderWorldAdjustMapViewCamera(); @@ -1879,7 +1912,7 @@ namespace CodeWalker.Rendering foreach (var updatelodlights in LodManager.UpdateLodLights) { - renderableCache.InvalidateImmediate(updatelodlights); + RenderableCache.InvalidateImmediate(updatelodlights); } @@ -1975,15 +2008,13 @@ namespace CodeWalker.Rendering { var ent = RenderEntities[i]; - var rndbl = ent.LodManagerRenderable as Renderable; - if (rndbl != null) + if (ent.LodManagerRenderable is Renderable rndbl) { - var rent = new RenderableEntity(); - rent.Entity = ent; - rent.Renderable = rndbl; + var rent = new RenderableEntity(ent, rndbl); - if (HideEntities.ContainsKey(ent.EntityHash)) continue; //don't render hidden entities! + if (HideEntities.ContainsKey(ent.EntityHash)) + continue; //don't render hidden entities! RenderArchetype(ent.Archetype, ent, rent.Renderable, false); } @@ -2165,13 +2196,15 @@ namespace CodeWalker.Rendering } private void RenderWorldAddInteriorEntities(YmapEntityDef ent) { - if (ent?.MloInstance?.Entities != null) + if (ent?.MloInstance?.Entities != null && ent.MloInstance.Entities.Length > 0) { for (int j = 0; j < ent.MloInstance.Entities.Length; j++) { var intent = ent.MloInstance.Entities[j]; - if (intent?.Archetype == null) continue; //missing archetype... - if (!RenderIsEntityFinalRender(intent)) continue; //proxy or something.. + if (intent?.Archetype == null) + continue; //missing archetype... + if (!RenderIsEntityFinalRender(intent)) + continue; //proxy or something.. intent.IsWithinLodDist = true; @@ -2183,20 +2216,24 @@ namespace CodeWalker.Rendering renderworldentities.Add(intent); } } - if (ent?.MloInstance?.EntitySets != null) + if (ent?.MloInstance?.EntitySets != null && ent.MloInstance.EntitySets.Length > 0) { for (int e = 0; e < ent.MloInstance.EntitySets.Length; e++) { var entityset = ent.MloInstance.EntitySets[e]; - if ((entityset == null) || (!entityset.VisibleOrForced)) continue; + if ((entityset == null) || (!entityset.VisibleOrForced)) + continue; var entities = entityset.Entities; - if (entities == null) continue; + if (entities == null) + continue; for (int i = 0; i < entities.Count; i++) { var intent = entities[i]; - if (intent?.Archetype == null) continue; //missing archetype... - if (!RenderIsEntityFinalRender(intent)) continue; //proxy or something.. + if (intent?.Archetype == null) + continue; //missing archetype... + if (!RenderIsEntityFinalRender(intent)) + continue; //proxy or something.. intent.IsWithinLodDist = true; @@ -2211,6 +2248,7 @@ namespace CodeWalker.Rendering } } } + private void RenderWorldAdjustMapViewCamera() { if (MapViewEnabled) @@ -2228,11 +2266,10 @@ namespace CodeWalker.Rendering for (int y = 0; y < VisibleYmaps.Count; y++) { var ymap = VisibleYmaps[y]; - if (ymap.AllEntities != null) + if (ymap.AllEntities.Length > 0) { - for (int i = 0; i < ymap.AllEntities.Length; i++)//this is bad + foreach(var ent in ymap.AllEntities) { - var ent = ymap.AllEntities[i]; if ((ent.Position.Z < 1000.0f) && (ent.BSRadius < 500.0f)) { if ((ent.BBMax.X > cvwmin) && (ent.BBMin.X < cvwmax) && (ent.BBMax.Y > cvhmin) && (ent.BBMin.Y < cvhmax)) @@ -2246,7 +2283,8 @@ namespace CodeWalker.Rendering } //move the camera closer to the geometry, to help shadows in map view. - if (maxZ == float.MinValue) maxZ = 1000.0f; + if (maxZ == float.MinValue) + maxZ = 1000.0f; camera.Position.Z = Math.Min(maxZ, 1000.0f); camera.ViewFrustum.Position = camera.Position; } @@ -2286,7 +2324,7 @@ namespace CodeWalker.Rendering } } } - if (renderlodlights && shaders.deferred) + if (renderlodlights && (Shaders?.deferred ?? false)) { for (int y = 0; y < VisibleYmaps.Count; y++) { @@ -2305,14 +2343,16 @@ namespace CodeWalker.Rendering private bool RenderIsEntityFinalRender(YmapEntityDef ent) { var arch = ent.Archetype; - if (arch == null) return false; + if (arch == null) + return false; bool isshadowproxy = false; bool isreflproxy = false; uint archflags = arch._BaseArchetypeDef.flags; if (arch.Type == MetaName.CTimeArchetypeDef) { - if (!(rendertimedents && (rendertimedentsalways || arch.IsActive(timeofday)))) return false; + if (!(rendertimedents && (rendertimedentsalways || arch.IsActive(timeofday)))) + return false; //archflags = arch._BaseArchetypeDef.flags; } //else if (arch.Type == MetaName.CMloArchetypeDef) @@ -2389,7 +2429,8 @@ namespace CodeWalker.Rendering private Renderable GetArchetypeRenderable(Archetype arch) { - if (arch == null) return null; + if (arch == null) + return null; Renderable rndbl = null; if (!ArchetypeRenderables.TryGetValue(arch, out rndbl)) @@ -2413,28 +2454,30 @@ namespace CodeWalker.Rendering public void RenderYmap(YmapFile ymap) { - if (ymap == null) return; - if (!ymap.Loaded) return; + if (ymap is null) + return; + if (!ymap.Loaded) + return; - if ((ymap.AllEntities != null) && (ymap.RootEntities != null)) + if (ymap.AllEntities.Length > 0 && ymap.RootEntities.Length > 0) { if (usedynamiclod) { - for (int i = 0; i < ymap.RootEntities.Length; i++) + foreach(var ent in ymap.RootEntities) { - RenderYmapLOD(ymap.RootEntities[i].Ymap, ymap.RootEntities[i]); + RenderYmapLOD(ent.Ymap, ent); } } else { var ents = renderchildents ? ymap.AllEntities : ymap.RootEntities; - for (int i = 0; i < ents.Length; i++) + foreach(var ent in ents) { - var ent = ents[i]; - if (renderchildents && ent.Children != null) continue; + if (renderchildents && ent.Children is not null) + continue; //if (rootent.CEntityDef.parentIndex == -1) continue; Archetype arch = ent.Archetype; - if (arch != null) + if (arch is not null) { bool timed = (arch.Type == MetaName.CTimeArchetypeDef); if (!timed || (rendertimedents && (rendertimedentsalways || arch.IsActive(timeofday)))) @@ -2450,15 +2493,15 @@ namespace CodeWalker.Rendering } } - if (rendercars && ymap.CarGenerators != null) + if (rendercars && ymap.CarGenerators != null && ymap.CarGenerators.Length > 0) { RenderYmapCarGenerators(ymap); } - if (rendergrass && (ymap.GrassInstanceBatches != null)) + if (rendergrass && ymap.GrassInstanceBatches != null && ymap.GrassInstanceBatches.Length > 0) { RenderYmapGrass(ymap); } - if (renderdistlodlights && timecycle.IsNightTime && (ymap.DistantLODLights != null)) + if (renderdistlodlights && timecycle.IsNightTime && ymap.DistantLODLights != null) { RenderYmapDistantLODLights(ymap); } @@ -2494,7 +2537,7 @@ namespace CodeWalker.Rendering { //recurse... var children = entity.ChildrenMerged; - if ((children != null)) + if (children is not null) { usechild = true; for (int i = 0; i < children.Length; i++) @@ -2525,12 +2568,13 @@ namespace CodeWalker.Rendering { if ((entity.MloInstance != null) && (entity.MloInstance.Entities != null)) { - for (int j = 0; j < entity.MloInstance.Entities.Length; j++) + foreach(var intent in entity.MloInstance.Entities) { - var intent = entity.MloInstance.Entities[j]; var intarch = intent.Archetype; - if (intarch == null) continue; //missing archetype... - if (!RenderIsEntityFinalRender(intent)) continue; //proxy or something.. + if (intarch is null) + continue; //missing archetype... + if (!RenderIsEntityFinalRender(intent)) + continue; //proxy or something.. RenderArchetype(intarch, intent); } } @@ -2567,12 +2611,18 @@ namespace CodeWalker.Rendering float cx = camera.Position.X; float cy = camera.Position.Y; float cz = camera.Position.Z; - if (cx < (batch.AABBMin.X - lodDist)) continue; - if (cx > (batch.AABBMax.X + lodDist)) continue; - if (cy < (batch.AABBMin.Y - lodDist)) continue; - if (cy > (batch.AABBMax.Y + lodDist)) continue; - if (cz < (batch.AABBMin.Z - lodDist)) continue; - if (cz > (batch.AABBMax.Z + lodDist)) continue; + if (cx < (batch.AABBMin.X - lodDist)) + continue; + if (cx > (batch.AABBMax.X + lodDist)) + continue; + if (cy < (batch.AABBMin.Y - lodDist)) + continue; + if (cy > (batch.AABBMax.Y + lodDist)) + continue; + if (cz < (batch.AABBMin.Z - lodDist)) + continue; + if (cz > (batch.AABBMax.Z + lodDist)) + continue; var bscent = batch.CamRel; @@ -2585,18 +2635,18 @@ namespace CodeWalker.Rendering var arch = batch.Archetype; var drbl = gameFileCache.TryGetDrawable(arch); var rndbl = TryGetRenderable(arch, drbl); - var instb = renderableCache.GetRenderableInstanceBatch(batch); - if (rndbl == null) continue; //no renderable - if (!(rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload))) continue; //not loaded yet - if ((instb == null) || !instb.IsLoaded) continue; + var instb = RenderableCache.GetRenderableInstanceBatch(batch); + if (rndbl is null) + continue; //no renderable + if (!(rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload))) + continue; //not loaded yet + if (instb is null || !instb.IsLoaded) + continue; instb.CamRel = instb.Position - camera.Position;//to gracefully handle batch size changes - RenderableInstanceBatchInst binst = new RenderableInstanceBatchInst(); - binst.Batch = instb; - binst.Renderable = rndbl; - - shaders.Enqueue(ref binst); + RenderableInstanceBatchInst binst = new RenderableInstanceBatchInst(instb, rndbl); + Shaders.Enqueue(in binst); } @@ -2606,13 +2656,16 @@ namespace CodeWalker.Rendering private void RenderYmapLODLights(YmapFile ymap) { - if (ymap.LODLights == null) return; - if (ymap.Parent?.DistantLODLights == null) return; //need to get lodlights positions from parent (distlodlights) + if (ymap.LODLights?.LodLights is null || ymap.LODLights.LodLights.Length == 0) + return; + if (ymap.Parent?.DistantLODLights is null) + return; //need to get lodlights positions from parent (distlodlights) - RenderableLODLights lights = renderableCache.GetRenderableLODLights(ymap); - if (!lights.IsLoaded) return; + RenderableLODLights lights = RenderableCache.GetRenderableLODLights(ymap); + if (!lights.IsLoaded) + return; - shaders.Enqueue(lights); + Shaders.Enqueue(lights); } @@ -2620,20 +2673,12 @@ namespace CodeWalker.Rendering { //enqueue ymap DistantLODLights instance batch for rendering - if (ymap.DistantLODLights == null) return; + if (ymap.DistantLODLights == null || ymap.DistantLODLights.colours.Length == 0) + return; - switch (ymap.DistantLODLights.CDistantLODLight.category) - { - case 0: //distlodlights_small009.ymap - case 1: //distlodlights_medium000.ymap - case 2: //distlodlights_large000.ymap - break; - default: - break; - } - - RenderableDistantLODLights lights = renderableCache.GetRenderableDistantLODLights(ymap.DistantLODLights); - if (!lights.IsLoaded) return; + RenderableDistantLODLights lights = RenderableCache.GetRenderableDistantLODLights(ymap.DistantLODLights); + if (!lights.IsLoaded) + return; uint ytdhash = 3154743001; //"graphics" @@ -2645,24 +2690,27 @@ namespace CodeWalker.Rendering graphicsytd.TextureDict.Dict.TryGetValue(texhash, out lighttex); } - if (lighttex == null) return; + if (lighttex == null) + return; RenderableTexture lightrtex = null; if (lighttex != null) { - lightrtex = renderableCache.GetRenderableTexture(lighttex); + lightrtex = RenderableCache.GetRenderableTexture(lighttex); } - if (lightrtex == null) return; - if (!lightrtex.IsLoaded) return; + if (lightrtex == null) + return; + if (!lightrtex.IsLoaded) + return; lights.Texture = lightrtex; - shaders.Enqueue(lights); + Shaders.Enqueue(lights); } private void RenderYmapCarGenerators(YmapFile ymap) { - - if (ymap.CarGenerators == null) return; + if (ymap.CarGenerators == null) + return; var maxdist = 200 * renderworldDetailDistMult; var maxdist2 = maxdist * maxdist; @@ -2673,7 +2721,8 @@ namespace CodeWalker.Rendering var bscent = cg.Position - camera.Position; float bsrad = cg._CCarGen.perpendicularLength; - if (bscent.LengthSquared() > maxdist2) continue; //don't render distant cars.. + if (bscent.LengthSquared() > maxdist2) + continue; //don't render distant cars.. if (!camera.ViewFrustum.ContainsSphereNoClipNoOpt(ref bscent, bsrad)) { continue; //frustum cull cars... @@ -2942,7 +2991,8 @@ namespace CodeWalker.Rendering for (int x = 0; x < width; x++) { var v = smr.GetValue(x); - if ((v < 0) || (v > 255)) continue; + if (v < 0 || v > 255) + continue; var col = (uint)(new Color(v, v, v, 127).ToRgba()); v0 = m.MultiplyW(new Vector3(x, y, 0)); v1 = m.MultiplyW(new Vector3(x, y+1, 0)); @@ -3003,9 +3053,11 @@ namespace CodeWalker.Rendering { if ((bsrad < renderboundsmaxrad) && (dist < renderboundsmaxdist)) { - MapSphere ms = new MapSphere(); - ms.CamRelPos = bscent; - ms.Radius = bsrad; + MapSphere ms = new MapSphere + { + CamRelPos = bscent, + Radius = bsrad, + }; BoundingSpheres.Add(ms); } } @@ -3013,13 +3065,15 @@ namespace CodeWalker.Rendering { if ((dist < renderboundsmaxdist)) { - MapBox mb = new MapBox(); - mb.CamRelPos = camrel; - mb.BBMin = arche.BBMin; - mb.BBMax = arche.BBMax; - mb.Orientation = orientation; - mb.Scale = scale; - BoundingBoxes.Add(mb); + BoundingBoxes.Add( + new MapBox( + camRelPos: camrel, + bbMin: arche.BBMin, + bbMax: arche.BBMax, + orientation: orientation, + scale: scale + ) + ); } } @@ -3049,8 +3103,7 @@ namespace CodeWalker.Rendering //fragments have extra drawables! need to render those too... TODO: handle fragments properly... - FragDrawable fd = rndbl.Key as FragDrawable; - if (fd != null) + if (rndbl.Key is FragDrawable fd) { var frag = fd.OwnerFragment; if ((frag != null) && (frag.DrawableCloth != null)) //cloth... @@ -3068,15 +3121,15 @@ namespace CodeWalker.Rendering return res; } - public bool RenderDrawable(DrawableBase drawable, Archetype arche, YmapEntityDef entity, uint txdHash = 0, TextureDictionary txdExtra = null, Texture diffOverride = null, ClipMapEntry animClip = null, ClothInstance cloth = null, Expression expr = null) + public bool RenderDrawable(DrawableBase drawable, Archetype arche, YmapEntityDef entity, uint txdHash = 0, TextureDictionary? txdExtra = null, Texture? diffOverride = null, ClipMapEntry? animClip = null, ClothInstance? cloth = null, Expression? expr = null) { //enqueue a single drawable for rendering. - if (drawable == null) + if (drawable is null) return false; Renderable rndbl = TryGetRenderable(arche, drawable, txdHash, txdExtra, diffOverride); - if (rndbl == null || !rndbl.IsLoaded) + if (rndbl is null || !rndbl.IsLoaded) return false; if (animClip != null) @@ -3103,16 +3156,13 @@ namespace CodeWalker.Rendering { //enqueue a single renderable for rendering. - if (!rndbl.IsLoaded) return false; + if (!rndbl.IsLoaded) + return false; if (RenderedDrawablesListEnable) //for later hit tests { - var rd = new RenderedDrawable(); - rd.Drawable = rndbl.Key; - rd.Archetype = arche; - rd.Entity = entity; - RenderedDrawables.Add(rd); + RenderedDrawables.Add(new RenderedDrawable(rndbl.Key, arche, entity)); } bool isselected = SelectionFlagsTestAll || (rndbl.Key == SelectedDrawable); @@ -3169,18 +3219,15 @@ namespace CodeWalker.Rendering } - if ((rendercollisionmeshes || (SelectionMode == MapSelectionMode.Collision)) && rendercollisionmeshlayerdrawable) { if ((entity == null) || ((entity._CEntityDef.flags & 4) == 0)) //skip if entity embedded collisions disabled { - Drawable sdrawable = rndbl.Key as Drawable; - if ((sdrawable != null) && (sdrawable.Bound != null)) + if ((rndbl.Key is Drawable sdrawable) && (sdrawable.Bound != null)) { RenderCollisionMesh(sdrawable.Bound, entity); } - FragDrawable fdrawable = rndbl.Key as FragDrawable; - if (fdrawable != null) + if (rndbl.Key is FragDrawable fdrawable) { if (fdrawable.Bound != null) { @@ -3199,7 +3246,7 @@ namespace CodeWalker.Rendering RenderSkeleton(rndbl, entity); } - if (renderlights && shaders.deferred && (rndbl.Lights != null)) + if (renderlights && Shaders.deferred && (rndbl.Lights != null)) { entity?.EnsureLights(rndbl.Key); @@ -3207,9 +3254,8 @@ namespace CodeWalker.Rendering //reinit lights when added/removed from editor var dd = rndbl.Key as Drawable; - var fd = rndbl.Key as FragDrawable; var lights = dd?.LightAttributes?.data_items; - if ((lights == null) && (fd != null) && (fd?.OwnerFragment?.Drawable == fd)) + if ((lights == null) && (rndbl.Key is FragDrawable fd) && (fd?.OwnerFragment?.Drawable == fd)) { lights = fd.OwnerFragment.LightAttributes?.data_items; } @@ -3234,7 +3280,7 @@ namespace CodeWalker.Rendering linst.EntityPosition = position; linst.EntityRotation = orientation; linst.Light = rndlight; - shaders.Enqueue(ref linst); + Shaders.Enqueue(in linst); } } @@ -3266,11 +3312,15 @@ namespace CodeWalker.Rendering if (isselected) { if (SelectionModelDrawFlags.ContainsKey(model.DrawableModel)) - { continue; } //filter out models in selected item that aren't flagged for drawing. + { + continue; + } //filter out models in selected item that aren't flagged for drawing. } if (!RenderIsModelFinalRender(model) && !renderproxies) - { continue; } //filter out reflection proxy models... + { + continue; + } //filter out reflection proxy models... for (int gi = 0; gi < model.Geometries.Length; gi++) { @@ -3286,17 +3336,21 @@ namespace CodeWalker.Rendering if (isselected) { if (geom.disableRendering || SelectionGeometryDrawFlags.ContainsKey(dgeom)) - { continue; } //filter out geometries in selected item that aren't flagged for drawing. + { + continue; + } //filter out geometries in selected item that aren't flagged for drawing. } else { if (geom.disableRendering) - { continue; } //filter out certain geometries like certain hair parts that shouldn't render by default + { + continue; + } //filter out certain geometries like certain hair parts that shouldn't render by default } rginst.Geom = geom; - shaders.Enqueue(ref rginst); + Shaders.Enqueue(in rginst); } } } @@ -3393,7 +3447,7 @@ namespace CodeWalker.Rendering var vi = ped.Ymt?.VariationInfo; - if (vi != null) + if (vi is not null) { for (int i = 0; i < 12; i++) { @@ -3414,7 +3468,7 @@ namespace CodeWalker.Rendering var expr = ped.Expressions[i]; //if (compData == null) return; - if (drawable == null) return; + if (drawable is null) return; var td = ped.Ytd?.TextureDict; var ac = ped.AnimClip; @@ -3452,9 +3506,10 @@ namespace CodeWalker.Rendering } - bool drawFlag = true; - if (!SelectionDrawableDrawFlags.TryGetValue(drawable, out drawFlag)) - { drawFlag = true; } + if (!SelectionDrawableDrawFlags.TryGetValue(drawable, out var drawFlag)) + { + drawFlag = true; + } if (drawFlag) { @@ -3500,7 +3555,7 @@ namespace CodeWalker.Rendering orientation = Quaternion.Identity; } - RenderableBoundComposite rndbc = renderableCache.GetRenderableBoundComp(bounds); + RenderableBoundComposite rndbc = RenderableCache.GetRenderableBoundComp(bounds); if ((rndbc != null) && rndbc.IsLoaded) { RenderableBoundGeometryInst rbginst = new RenderableBoundGeometryInst(); @@ -3509,7 +3564,8 @@ namespace CodeWalker.Rendering { foreach (var geom in rndbc.Geometries) { - if (geom == null) continue; + if (geom == null) + continue; rbginst.Geom = geom; var pos = position; @@ -3527,16 +3583,13 @@ namespace CodeWalker.Rendering rbginst.Inst.Orientation = ori; rbginst.Inst.Scale = sca; rbginst.Inst.CamRel = rbginst.Inst.Position - camera.Position; - shaders.Enqueue(ref rbginst); + Shaders.Enqueue(in rbginst); } } if (RenderedBoundCompsListEnable) //for later hit tests { - var rb = new RenderedBoundComposite(); - rb.BoundComp = rndbc; - rb.Entity = entity; - RenderedBoundComps.Add(rb); + RenderedBoundComps.Add(new RenderedBoundComposite(rndbc, entity)); } } @@ -3548,16 +3601,17 @@ namespace CodeWalker.Rendering - private Renderable TryGetRenderable(Archetype arche, DrawableBase drawable, uint txdHash = 0, TextureDictionary txdExtra = null, Texture diffOverride = null) + private Renderable? TryGetRenderable(Archetype arche, DrawableBase drawable, uint txdHash = 0, TextureDictionary? txdExtra = null, Texture? diffOverride = null) { - if (drawable == null) return null; + if (drawable is null) + return null; //BUG: only last texdict used!! needs to cache textures per archetype........ //(but is it possible to have the same drawable with different archetypes?) MetaHash texDict = txdHash; //uint texDictOrig = txdHash; uint clipDict = 0; - if (arche != null) + if (arche is not null) { texDict = arche.TextureDict.Hash; clipDict = arche.ClipDict.Hash; @@ -3570,28 +3624,28 @@ namespace CodeWalker.Rendering } - Renderable rndbl = renderableCache.GetRenderable(drawable); - if (rndbl == null) return null; + var rndbl = RenderableCache.GetRenderable(drawable); + if (rndbl is null) + return null; if ((clipDict != 0) && (rndbl.ClipDict == null)) { - YcdFile ycd = gameFileCache.GetYcd(clipDict); - if ((ycd != null) && (ycd.Loaded)) + var ycd = gameFileCache.GetYcd(clipDict); + if (ycd is not null && ycd.Loaded) { rndbl.ClipDict = ycd; MetaHash ahash = arche.Hash; - if (ycd.ClipMap.TryGetValue(ahash, out rndbl.ClipMapEntry)) rndbl.HasAnims = true; + if (ycd.ClipMap.TryGetValue(ahash, out rndbl.ClipMapEntry)) + rndbl.HasAnims = true; var models = rndbl.HDModels; - for (int i = 0; i < models.Length; i++) + foreach(var model in models) { - var model = models[i]; - if (models[i] == null) + if (model is null) continue; - for (int j = 0; j < model.Geometries.Length; j++) + foreach(var geom in model.Geometries) { - var geom = model.Geometries[j]; - if (geom == null) + if (geom is null) continue; if (geom.globalAnimUVEnable) { @@ -3607,11 +3661,11 @@ namespace CodeWalker.Rendering var extraTexDict = (drawable.Owner as YptFile)?.PtfxList?.TextureDictionary; - if (extraTexDict == null) + if (extraTexDict is null) extraTexDict = txdExtra; - bool cacheSD = (rndbl.SDtxds == null); - bool cacheHD = (renderhdtextures && (rndbl.HDtxds == null)); + bool cacheSD = (rndbl.SDtxds is null); + bool cacheHD = (renderhdtextures && (rndbl.HDtxds is null)); if (cacheSD || cacheHD) { //cache the txd hierarchies for this renderable @@ -3634,7 +3688,7 @@ namespace CodeWalker.Rendering if (cacheSD) { var txdytd = gameFileCache.GetYtd(texDict); - if (txdytd != null) + if (txdytd is not null) { tryGetRenderableSDtxds.Add(txdytd); } @@ -3645,7 +3699,7 @@ namespace CodeWalker.Rendering if (hdtxd != texDict) { var txdhdytd = gameFileCache.GetYtd(hdtxd); - if (txdhdytd != null) + if (txdhdytd is not null) { tryGetRenderableHDtxds.Add(txdhdytd); } @@ -3657,7 +3711,7 @@ namespace CodeWalker.Rendering if (cacheSD) { var pytd = gameFileCache.GetYtd(ptxdname); - if (pytd != null) + if (pytd is not null) { tryGetRenderableSDtxds.Add(pytd); } @@ -3668,7 +3722,7 @@ namespace CodeWalker.Rendering if (phdtxdname != ptxdname) { var phdytd = gameFileCache.GetYtd(phdtxdname); - if (phdytd != null) + if (phdytd is not null) { tryGetRenderableHDtxds.Add(phdytd); } @@ -3677,8 +3731,10 @@ namespace CodeWalker.Rendering ptxdname = gameFileCache.TryGetParentYtdHash(ptxdname); } } - if (cacheSD) rndbl.SDtxds = tryGetRenderableSDtxds.ToArray(); - if (cacheHD) rndbl.HDtxds = tryGetRenderableHDtxds.ToArray(); + if (cacheSD) + rndbl.SDtxds = tryGetRenderableSDtxds.ToArray(); + if (cacheHD) + rndbl.HDtxds = tryGetRenderableHDtxds.ToArray(); } @@ -3687,11 +3743,8 @@ namespace CodeWalker.Rendering bool alltexsloaded = true; - - for (int mi = 0; mi < rndbl.AllModels.Length; mi++) + foreach(var model in rndbl.AllModels) { - var model = rndbl.AllModels[mi]; - if (!RenderIsModelFinalRender(model) && !renderproxies) { continue; //filter out reflection proxy models... @@ -3715,9 +3768,9 @@ namespace CodeWalker.Rendering var tex = geom.Textures[i]; var ttex = tex as Texture; - Texture dtex = null; - RenderableTexture rdtex = null; - if ((tex != null) && (ttex == null)) + Texture? dtex = null; + RenderableTexture? rdtex = null; + if (tex is not null && ttex is null) { //TextureRef means this RenderableTexture needs to be loaded from texture dict... if (extraTexDict != null) //for ypt files, first try the embedded tex dict.. @@ -3725,22 +3778,21 @@ namespace CodeWalker.Rendering dtex = extraTexDict.Lookup(tex.NameHash); } - if (dtex == null) //else //if (texDict != 0) + if (dtex is null) //else //if (texDict != 0) { bool waitingforload = false; - if (rndbl.SDtxds != null) + if (rndbl.SDtxds is not null) { //check the SD texture hierarchy - for (int j = 0; j < rndbl.SDtxds.Length; j++) + foreach(var txd in rndbl.SDtxds) { - var txd = rndbl.SDtxds[j]; if (txd.Loaded) { dtex = txd.TextureDict?.Lookup(tex.NameHash); } else { - txd = gameFileCache.GetYtd(txd.Key.Hash);//keep trying to load it - sometimes resuests can get lost (!) + gameFileCache.GetYtd(txd.Key.Hash);//keep trying to load it - sometimes resuests can get lost (!) waitingforload = true; } if (dtex != null) break; @@ -3752,15 +3804,15 @@ namespace CodeWalker.Rendering } } - if ((dtex == null) && (!waitingforload)) + if (dtex is null && !waitingforload) { //not present in dictionary... check already loaded texture dicts... (maybe resident?) var ytd2 = gameFileCache.TryGetTextureDictForTexture(tex.NameHash); - if (ytd2 != null) + if (ytd2 is not null) { if (ytd2.Loaded) { - if (ytd2.TextureDict != null) + if (ytd2.TextureDict is not null) { dtex = ytd2.TextureDict.Lookup(tex.NameHash); } @@ -3785,7 +3837,7 @@ namespace CodeWalker.Rendering } } - if (dtex != null) + if (dtex is not null) { geom.Textures[i] = dtex; //cache it for next time to avoid the lookup... ttex = dtex; @@ -3793,9 +3845,9 @@ namespace CodeWalker.Rendering } - if (ttex != null) //ensure renderable texture + if (ttex is not null) //ensure renderable texture { - rdtex = renderableCache.GetRenderableTexture(ttex); + rdtex = RenderableCache.GetRenderableTexture(ttex); } //if ((rdtex != null) && (rdtex.IsLoaded == false)) @@ -3808,14 +3860,14 @@ namespace CodeWalker.Rendering - RenderableTexture rhdtex = null; + RenderableTexture? rhdtex = null; if (renderhdtextures) { Texture hdtex = geom.TexturesHD[i]; - if (hdtex == null) + if (hdtex is null) { //look for a replacement HD texture... - if (rndbl.HDtxds != null) + if (rndbl.HDtxds is not null) { for (int j = 0; j < rndbl.HDtxds.Length; j++) { @@ -3828,17 +3880,17 @@ namespace CodeWalker.Rendering { txd = gameFileCache.GetYtd(txd.Key.Hash);//keep trying to load it - sometimes resuests can get lost (!) } - if (hdtex != null) break; + if (hdtex is not null) break; } } - if (hdtex != null) + if (hdtex is not null) { geom.TexturesHD[i] = hdtex; } } - if (hdtex != null) + if (hdtex is not null) { - rhdtex = renderableCache.GetRenderableTexture(hdtex); + rhdtex = RenderableCache.GetRenderableTexture(hdtex); } } geom.RenderableTexturesHD[i] = rhdtex; @@ -3861,16 +3913,16 @@ namespace CodeWalker.Rendering } - public struct RenderedDrawable + public readonly struct RenderedDrawable(DrawableBase drawable, Archetype archetype, YmapEntityDef entity) { - public DrawableBase Drawable; - public Archetype Archetype; - public YmapEntityDef Entity; + public readonly DrawableBase Drawable = drawable; + public readonly Archetype Archetype = archetype; + public readonly YmapEntityDef Entity = entity; } - public struct RenderedBoundComposite + public readonly struct RenderedBoundComposite(RenderableBoundComposite boundComp, YmapEntityDef entity) { - public RenderableBoundComposite BoundComp; - public YmapEntityDef Entity; + public readonly RenderableBoundComposite BoundComp = boundComp; + public readonly YmapEntityDef Entity = entity; } public struct RenderSkeletonItem @@ -3943,16 +3995,18 @@ namespace CodeWalker.Rendering Camera = camera; Position = camera.Position; - foreach (var kvp in ymaps) + foreach (var ymap in ymaps.Values) { - var ymap = kvp.Value; - if (ymap._CMapData.parent != 0) //ensure parent references on ymaps + if (ymap._CMapData.parent.Hash != 0) //ensure parent references on ymaps { - ymaps.TryGetValue(ymap._CMapData.parent, out YmapFile pymap); - if (pymap == null) //skip adding ymaps until parents are available - { continue; } + if (!ymaps.TryGetValue(ymap._CMapData.parent, out var pymap)) //skip adding ymaps until parents are available + { + Console.WriteLine($"Couldn't find parent ymap {JenkIndex.GetString(ymap._CMapData.parent)} ({ymap._CMapData.parent.Hash}) for {ymap.Name}"); + continue; + } if (ymap.Parent != pymap) { + Console.WriteLine($"Connected ymap {ymap.Name} to parent {pymap.Name}"); ymap.ConnectToParent(pymap); } } @@ -3961,9 +4015,9 @@ namespace CodeWalker.Rendering RemoveYmaps.Clear(); foreach (var kvp in CurrentYmaps) { - YmapFile ymap = null; - if (!ymaps.TryGetValue(kvp.Key, out ymap) || (ymap != kvp.Value) || (ymap.IsScripted && !ShowScriptedYmaps) || (ymap.LodManagerUpdate)) + if (!ymaps.TryGetValue(kvp.Key, out var ymap) || ymap != kvp.Value || ymap.IsScripted && !ShowScriptedYmaps || ymap.LodManagerUpdate) { + Console.WriteLine($"Removed {kvp.Key} from Ymaps"); RemoveYmaps.Add(kvp.Key); } } @@ -3977,14 +4031,17 @@ namespace CodeWalker.Rendering for (int i = 0; i < remEnts.Length; i++) { var ent = remEnts[i]; - RootEntities.Remove(ent); ent.LodManagerChildren?.Clear(); ent.LodManagerChildren = null; ent.LodManagerRenderable = null; - if ((ent.Parent != null) && (ent.Parent.Ymap != ymap)) + if (ent.Parent is not null && ent.Parent.Ymap != ymap) { ent.Parent.LodManagerRemoveChild(ent); } + else + { + RootEntities.Remove(ent); + } } } var remLodLights = ymap.LODLights?.LodLights; @@ -3998,29 +4055,27 @@ namespace CodeWalker.Rendering ymap.LodManagerUpdate = false; ymap.LodManagerOldEntities = null; } - foreach (var kvp in ymaps) + foreach (var (key, ymap) in ymaps) { - var ymap = kvp.Value; if (ymap.IsScripted && !ShowScriptedYmaps) - { continue; } - if ((ymap._CMapData.parent != 0) && (ymap.Parent == null)) //skip adding ymaps until parents are available - { continue; } - if (!CurrentYmaps.ContainsKey(kvp.Key)) { - CurrentYmaps.Add(kvp.Key, kvp.Value); - if (ymap.AllEntities != null) // add this ymap's entities to the tree... + continue; + } + if (ymap._CMapData.parent != 0 && ymap.Parent is null) //skip adding ymaps until parents are available + { + continue; + } + if (CurrentYmaps.TryAdd(key, ymap)) + { + foreach(var ent in ymap.AllEntities) { - for (int i = 0; i < ymap.AllEntities.Length; i++) + if (ent.Parent is not null) { - var ent = ymap.AllEntities[i]; - if (ent.Parent != null) - { - ent.Parent.LodManagerAddChild(ent); - } - else - { - RootEntities[ent] = ent; - } + ent.Parent.LodManagerAddChild(ent); + } + else + { + RootEntities[ent] = ent; } } var addLodLights = ymap.LODLights?.LodLights; diff --git a/CodeWalker/Rendering/ShaderManager.cs b/CodeWalker/Rendering/ShaderManager.cs index f3af61d..8716fec 100644 --- a/CodeWalker/Rendering/ShaderManager.cs +++ b/CodeWalker/Rendering/ShaderManager.cs @@ -1,17 +1,23 @@ -using CodeWalker.GameFiles; +using CodeWalker.Core.Utils; +using CodeWalker.GameFiles; using CodeWalker.Properties; using CodeWalker.World; +using Collections.Pooled; +using CommunityToolkit.Diagnostics; using SharpDX; using SharpDX.Direct3D11; using System; using System.Collections.Generic; +using System.Diagnostics; +using System.IO; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; namespace CodeWalker.Rendering { - public class ShaderManager + public class ShaderManager : IDisposable { private DXManager DXMan; @@ -39,8 +45,8 @@ namespace CodeWalker.Rendering - public DeferredScene DefScene { get; set; } - public PostProcessor HDR { get; set; } + public DeferredScene? DefScene { get; set; } + public PostProcessor? HDR { get; set; } public BasicShader Basic { get; set; } public CableShader Cable { get; set; } public WaterShader Water { get; set; } @@ -56,7 +62,7 @@ namespace CodeWalker.Rendering public WidgetShader Widgets { get; set; } public bool shadows = Settings.Default.Shadows; - public Shadowmap Shadowmap { get; set; } + public Shadowmap? Shadowmap { get; set; } List shadowcasters = new List(); List shadowbatch = new List(); List shadowbatches = new List(); @@ -125,7 +131,7 @@ namespace CodeWalker.Rendering DXMan = dxman; //HDR = new PostProcessor(dxman); - Basic = new BasicShader(device); + Basic = new BasicShader(device, this); Cable = new CableShader(device); Water = new WaterShader(device); Terrain = new TerrainShader(device); @@ -223,12 +229,37 @@ namespace CodeWalker.Rendering dsDisableAll = new DepthStencilState(device, dsd); } + /// + /// Attempts to find the shaders folder in the directory tree + /// + /// + /// + public static string GetShaderFolder() + { + // Directory we're looking for. + var dirToFind = Path.Combine("Shaders"); + if (!FileUtils.TryFindFolder(dirToFind, out var folder)) + { + throw new FileNotFoundException($"Could not find '{dirToFind}' directory."); + } + else + { + return folder; + } + } + + ~ShaderManager() + { + Console.WriteLine("Finalizer called on ShaderManager, this is not supposed to happen, is a Dispose call missing?"); + Dispose(); + } + public void Dispose() { - if (disposed) return; - disposed = true; + if (disposed) + return; dsEnabled.Dispose(); dsDisableWriteRev.Dispose(); @@ -267,14 +298,16 @@ namespace CodeWalker.Rendering if (HDR != null) { HDR.Dispose(); - HDR = null; } if (Shadowmap != null) { Shadowmap.Dispose(); - Shadowmap = null; } + + disposed = true; + + GC.SuppressFinalize(this); } @@ -291,38 +324,39 @@ namespace CodeWalker.Rendering public void BeginFrame(DeviceContext context, double currentRealTime, float elapsedTime) { - if (disposed) return; + if (disposed) + return; CurrentRealTime = currentRealTime; CurrentElapsedTime = elapsedTime; shadowcasters.Clear(); - if (shadows && (Shadowmap == null)) + if (shadows && Shadowmap is null) { Shadowmap = new Shadowmap(Device); } - if (!shadows && (Shadowmap != null)) + if (!shadows && Shadowmap != null) { Shadowmap.Dispose(); Shadowmap = null; } - if (hdr && (HDR == null)) + if (hdr && HDR is null) { HDR = new PostProcessor(DXMan); HDR.OnWindowResize(DXMan); HDR.LumBlendSpeed = hdrLumBlendSpeed; } - if (!hdr && (HDR != null)) + if (!hdr && HDR is not null) { HDR.Dispose(); HDR = null; } - if (deferred && (DefScene == null)) + if (deferred && DefScene is null) { - DefScene = new DeferredScene(DXMan); + DefScene = new DeferredScene(DXMan, this); DefScene.OnWindowResize(DXMan); } - if (!deferred && (DefScene != null)) + if (!deferred && DefScene != null) { DefScene.Dispose(); DefScene = null; @@ -343,22 +377,22 @@ namespace CodeWalker.Rendering RenderWaterQuads.Clear(); - if (DefScene != null) + if (DefScene is not null) { DefScene.Clear(context); DefScene.ClearDepth(context); } - if (HDR != null) + if (HDR is not null) { HDR.Clear(context); HDR.ClearDepth(context); } - if (DefScene != null) + if (DefScene is not null) { DefScene.SetSceneColour(context); } - else if (HDR != null) + else if (HDR is not null) { HDR.SetPrimary(context); //for rendering some things before shadowmaps... (eg sky) } @@ -408,8 +442,15 @@ namespace CodeWalker.Rendering return null; } + public Stopwatch lastLodUpdate = Stopwatch.StartNew(); public void RenderQueued(DeviceContext context, Camera camera, Vector4 wind) { + bool updateLods = false; + if (lastLodUpdate.Elapsed.TotalSeconds > 1.0) + { + updateLods = true; + lastLodUpdate.Restart(); + } GeometryCount = 0; VerticesCount = 0; Camera = camera; @@ -447,11 +488,11 @@ namespace CodeWalker.Rendering } - if (DefScene != null) + if (DefScene is not null) { DefScene.SetGBuffers(context); } - else if (HDR != null) + else if (HDR is not null) { HDR.SetPrimary(context); } @@ -592,20 +633,20 @@ namespace CodeWalker.Rendering DefScene.SetSceneColour(context); - DefScene.RenderLights(context, camera, Shadowmap, GlobalLights); + DefScene.RenderLights(context, camera, Shadowmap, GlobalLights, updateLods); if (RenderLODLights.Count > 0) //LOD lights pass { context.OutputMerger.BlendState = bsAdd; //additive blend for lights... context.OutputMerger.DepthStencilState = dsDisableWriteRev;//only render parts behind or at surface - DefScene.RenderLights(context, camera, RenderLODLights); + DefScene.RenderLights(context, camera, RenderLODLights, updateLods); } if (RenderLights.Count > 0) { context.OutputMerger.BlendState = bsAdd; //additive blend for lights... context.OutputMerger.DepthStencilState = dsDisableWriteRev;//only render parts behind or at surface - DefScene.RenderLights(context, camera, RenderLights); + DefScene.RenderLights(context, camera, RenderLights, updateLods); } } @@ -677,9 +718,9 @@ namespace CodeWalker.Rendering context.OutputMerger.BlendState = bsDefault; context.OutputMerger.DepthStencilState = dsDisableAll; - if (HDR != null) + if (HDR is not null) { - if ((DefScene?.SSAASampleCount ?? 1) > 1) + if (DefScene is not null && DefScene.SSAASampleCount > 1) { HDR.SetPrimary(context); DefScene.SSAAPass(context); @@ -687,7 +728,7 @@ namespace CodeWalker.Rendering HDR.Render(DXMan, CurrentElapsedTime, DefScene); } - else if (DefScene != null) + else if (DefScene is not null) { DXMan.SetDefaultRenderTarget(context); DefScene.SSAAPass(context); @@ -771,7 +812,7 @@ namespace CodeWalker.Rendering } - private void RenderGeometryBatches(DeviceContext context, List batches, Shader shader) + private void RenderGeometryBatches(DeviceContext context, IList batches, Shader shader) { shader.SetShader(context); shader.SetSceneVars(context, Camera, Shadowmap, GlobalLights); @@ -781,7 +822,7 @@ namespace CodeWalker.Rendering } shader.UnbindResources(context); } - private void RenderGeometryBatch(DeviceContext context, List batch, Shader shader) + private void RenderGeometryBatch(DeviceContext context, IList batch, Shader shader) { GeometryCount += batch.Count; @@ -794,8 +835,11 @@ namespace CodeWalker.Rendering var geom = batch[i]; var gmodel = geom.Geom.Owner; shader.SetEntityVars(context, ref geom.Inst); - - VerticesCount += geom.Geom.VertexCount; + + if (shader != Shadow) + { + VerticesCount += geom.Geom.VertexCount; + } if (gmodel != model) { @@ -847,9 +891,7 @@ namespace CodeWalker.Rendering private void RenderInstancedBatch(DeviceContext context, RenderableInstanceBatchInst batch) { Basic.SetInstanceVars(context, batch.Batch); - - if (batch.Renderable.HDModels.Length > 1) - { } + VertexType? vertexType = null; for(int i = 0; i < batch.Renderable.HDModels.Length; i++) { @@ -860,8 +902,9 @@ namespace CodeWalker.Rendering Basic.SetModelVars(context, model); foreach (var geom in model.Geometries) { - if (Basic.SetInputLayout(context, geom.VertexType)) + if (vertexType == geom.VertexType || Basic.SetInputLayout(context, geom.VertexType)) { + vertexType = geom.VertexType; Basic.SetGeomVars(context, geom); geom.RenderInstanced(context, batch.Batch.InstanceCount); } @@ -872,20 +915,23 @@ namespace CodeWalker.Rendering - public void Enqueue(ref RenderableGeometryInst geom) + public void Enqueue(in RenderableGeometryInst geom) { var shader = geom.Geom.DrawableGeom.Shader; - var b = (shader!=null) ? shader.RenderBucket : 0; //rage render bucket? + var b = shader?.RenderBucket ?? 0; //rage render bucket? var bucket = EnsureRenderBucket(b); - ShaderBatch batch = null; - ShaderKey key = new ShaderKey(); - key.ShaderName = (shader!=null) ? shader.Name : new MetaHash(0); - key.ShaderFile = (shader!=null) ? shader.FileName : new MetaHash(0); + if (bucket is null) + { + ThrowHelper.ThrowArgumentOutOfRangeException(nameof(b), b, "Bucket doesn't exist"); + return; + } - if (!bucket.Batches.TryGetValue(key, out batch)) + ShaderKey key = new ShaderKey(shader?.Name ?? default, shader?.FileName ?? default); + + if (!bucket.Batches.TryGetValue(key, out var batch)) { batch = new ShaderBatch(key); bucket.Batches.Add(key, batch); @@ -893,15 +939,15 @@ namespace CodeWalker.Rendering batch.Geometries.Add(geom); } - public void Enqueue(ref RenderableLightInst light) + public void Enqueue(in RenderableLightInst light) { RenderLights.Add(light); } - public void Enqueue(ref RenderableBoundGeometryInst geom) + public void Enqueue(in RenderableBoundGeometryInst geom) { RenderBoundGeoms.Add(geom); } - public void Enqueue(ref RenderableInstanceBatchInst batch) + public void Enqueue(in RenderableInstanceBatchInst batch) { RenderInstBatches.Add(batch); } @@ -923,9 +969,9 @@ namespace CodeWalker.Rendering } - public ShaderRenderBucket EnsureRenderBucket(int index) + public ShaderRenderBucket? EnsureRenderBucket(int index) { - ShaderRenderBucket bucket = null; + ShaderRenderBucket? bucket = null; while (index >= RenderBuckets.Count) { RenderBuckets.Add(new ShaderRenderBucket(RenderBuckets.Count)); @@ -965,7 +1011,7 @@ namespace CodeWalker.Rendering public void ClearDepth(DeviceContext context, bool firstpass = true) { - if ((HDR != null) && firstpass) + if (HDR is not null && firstpass) { HDR.ClearDepth(context); } @@ -1025,14 +1071,8 @@ namespace CodeWalker.Rendering { Width = w; Height = h; - if (DefScene != null) - { - DefScene.OnWindowResize(DXMan); - } - if (HDR != null) - { - HDR.OnWindowResize(DXMan); - } + DefScene?.OnWindowResize(DXMan); + HDR?.OnWindowResize(DXMan); } } @@ -1052,26 +1092,52 @@ namespace CodeWalker.Rendering } - public struct ShaderKey + public readonly struct ShaderKey : IEquatable { - public MetaHash ShaderName; - public MetaHash ShaderFile; + public readonly MetaHash ShaderName; + public readonly MetaHash ShaderFile; + + public ShaderKey() + { + ShaderName = new MetaHash(); + ShaderFile = new MetaHash(); + } + + public ShaderKey(MetaHash shaderName, MetaHash shaderFile) + { + ShaderName = shaderName; + ShaderFile = shaderFile; + } public override string ToString() { return ShaderFile.ToString() + ": " + ShaderName.ToString(); } - public override int GetHashCode() + public override bool Equals(object? obj) { - return ShaderName.GetHashCode(); + return obj is ShaderKey key && Equals(key); } - public override bool Equals(object obj) + public bool Equals(ShaderKey other) { - if (obj == null) return false; - if (obj is not ShaderKey shaderKey) return false; - return shaderKey.ShaderName == ShaderName && shaderKey.ShaderFile == ShaderFile; + return ShaderName.Equals(other.ShaderName) && + ShaderFile.Equals(other.ShaderFile); + } + + public override int GetHashCode() + { + return HashCode.Combine(ShaderName, ShaderFile); + } + + public static bool operator ==(ShaderKey left, ShaderKey right) + { + return left.Equals(right); + } + + public static bool operator !=(ShaderKey left, ShaderKey right) + { + return !(left == right); } } public class ShaderRenderBucket @@ -1122,7 +1188,8 @@ namespace CodeWalker.Rendering foreach (var kvp in Batches.Where(p => p.Value.Geometries.Count > 0).OrderBy(p => p.Value.Geometries.Average(p => p.Inst.Distance))) { - if (kvp.Value.Geometries.Count == 0) continue; + if (kvp.Value.Geometries.Count == 0) + continue; List b = null; switch (kvp.Key.ShaderFile.Hash) diff --git a/CodeWalker/Rendering/Shaders/BasicShader.cs b/CodeWalker/Rendering/Shaders/BasicShader.cs index 86a570c..7453245 100644 --- a/CodeWalker/Rendering/Shaders/BasicShader.cs +++ b/CodeWalker/Rendering/Shaders/BasicShader.cs @@ -13,6 +13,7 @@ using SharpDX; using CodeWalker.GameFiles; using CodeWalker.World; using System.Diagnostics; +using CodeWalker.Rendering.Utils; namespace CodeWalker.Rendering { @@ -181,11 +182,14 @@ namespace CodeWalker.Rendering Matrix3_s[] defaultBoneMatrices; bool defaultBoneMatricesBound = false; + public ShaderManager _shaderManager; + private Dictionary layouts = new Dictionary(); - public BasicShader(Device device) + public BasicShader(Device device, ShaderManager shaderManager) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + _shaderManager = shaderManager; + string folder = ShaderManager.GetShaderFolder(); byte[] vspnctbytes = File.ReadAllBytes(Path.Combine(folder, "BasicVS_PNCT.cso")); byte[] vspncttbytes = File.ReadAllBytes(Path.Combine(folder, "BasicVS_PNCTT.cso")); byte[] vspnctttbytes = File.ReadAllBytes(Path.Combine(folder, "BasicVS_PNCTTT.cso")); @@ -215,32 +219,33 @@ namespace CodeWalker.Rendering byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "BasicPS.cso")); byte[] psdefbytes = File.ReadAllBytes(Path.Combine(folder, "BasicPS_Deferred.cso")); - basicvspnct = new VertexShader(device, vspnctbytes); - basicvspnctt = new VertexShader(device, vspncttbytes); - basicvspncttt = new VertexShader(device, vspnctttbytes); - basicvspncct = new VertexShader(device, vspncctbytes); - basicvspncctt = new VertexShader(device, vspnccttbytes); - basicvspnccttt = new VertexShader(device, vspncctttbytes); - basicvspnctx = new VertexShader(device, vspnctxbytes); - basicvspncctx = new VertexShader(device, vspncctxbytes); - basicvspncttx = new VertexShader(device, vspncttxbytes); - basicvspnccttx = new VertexShader(device, vspnccttxbytes); - basicvspnctttx = new VertexShader(device, vspnctttxbytes); - basicvspncctttx = new VertexShader(device, vspncctttxbytes); - basicvspbbnct = new VertexShader(device, vspbbnctbytes); - basicvspbbnctx = new VertexShader(device, vspbbnctxbytes); - basicvspbbnctt = new VertexShader(device, vspbbncttbytes); - basicvspbbncttt = new VertexShader(device, vspbbnctttbytes); - basicvspbbncct = new VertexShader(device, vspbbncctbytes); - basicvspbbncctx = new VertexShader(device, vspbbncctxbytes); - basicvspbbnccttx = new VertexShader(device, vspbbnccttxbytes); - basicvspbbncttx = new VertexShader(device, vspbbncttxbytes); - basicvsbox = new VertexShader(device, vsboxbytes); - basicvssphere = new VertexShader(device, vsspherebytes); - basicvscapsule = new VertexShader(device, vscapsulebytes); - basicvscylinder = new VertexShader(device, vscylinderbytes); - basicps = new PixelShader(device, psbytes); - basicpsdef = new PixelShader(device, psdefbytes); + basicvspnct = device.CreateVertexShader("BasicVS_PNCT.cso"); + basicvspnctt = device.CreateVertexShader("BasicVS_PNCTT.cso"); + basicvspncttt = device.CreateVertexShader("BasicVS_PNCTTT.cso"); + basicvspncct = device.CreateVertexShader("BasicVS_PNCCT.cso"); + basicvspncctt = device.CreateVertexShader("BasicVS_PNCCTT.cso"); + basicvspnccttt = device.CreateVertexShader("BasicVS_PNCCTTT.cso"); + basicvspnctx = device.CreateVertexShader("BasicVS_PNCTX.cso"); + basicvspncctx = device.CreateVertexShader("BasicVS_PNCCTX.cso"); + basicvspncttx = device.CreateVertexShader("BasicVS_PNCTTX.cso"); + basicvspnccttx = device.CreateVertexShader("BasicVS_PNCCTTX.cso"); + basicvspnctttx = device.CreateVertexShader("BasicVS_PNCTTTX.cso"); + basicvspncctttx = device.CreateVertexShader("BasicVS_PNCCTTTX.cso"); + basicvspbbnct = device.CreateVertexShader("BasicVS_PBBNCT.cso"); + basicvspbbnctx = device.CreateVertexShader("BasicVS_PBBNCTX.cso"); + basicvspbbnctt = device.CreateVertexShader("BasicVS_PBBNCTT.cso"); + basicvspbbncttt = device.CreateVertexShader("BasicVS_PBBNCTTT.cso"); + basicvspbbncct = device.CreateVertexShader("BasicVS_PBBNCCT.cso"); + basicvspbbncctx = device.CreateVertexShader("BasicVS_PBBNCCTX.cso"); + basicvspbbnccttx = device.CreateVertexShader("BasicVS_PBBNCCTTX.cso"); + basicvspbbncttx = device.CreateVertexShader("BasicVS_PBBNCTTX.cso"); + + basicvsbox = device.CreateVertexShader("BasicVS_Box.cso"); + basicvssphere = device.CreateVertexShader("BasicVS_Sphere.cso"); + basicvscapsule = device.CreateVertexShader("BasicVS_Capsule.cso"); + basicvscylinder = device.CreateVertexShader("BasicVS_Cylinder.cso"); + basicps = device.CreatePixelShader("BasicPS.cso"); + basicpsdef = device.CreatePixelShader("BasicPS_Deferred.cso"); VSSceneVars = new GpuVarsBuffer(device); VSEntityVars = new GpuVarsBuffer(device); @@ -361,9 +366,12 @@ namespace CodeWalker.Rendering defaultBoneMatrices = new Matrix3_s[255]; for (int i = 0; i < 255; i++) { - defaultBoneMatrices[i].Row1 = Vector4.UnitX; - defaultBoneMatrices[i].Row2 = Vector4.UnitY; - defaultBoneMatrices[i].Row3 = Vector4.UnitZ; + defaultBoneMatrices[i] = new Matrix3_s + { + Row1 = Vector4.UnitX, + Row2 = Vector4.UnitY, + Row3 = Vector4.UnitZ + }; } } @@ -491,13 +499,21 @@ namespace CodeWalker.Rendering break; } - context.VertexShader.Set(vs); + + if (context.VertexShader.Get() != vs) + { + context.VertexShader.Set(vs); + } } public override void SetShader(DeviceContext context) { - context.PixelShader.Set(Deferred ? basicpsdef : basicps); + var shader = Deferred ? basicpsdef : basicps; + if (context.PixelShader.Get() != shader) + { + context.PixelShader.Set(Deferred ? basicpsdef : basicps); + } } public override bool SetInputLayout(DeviceContext context, VertexType type) @@ -512,7 +528,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { uint rendermode = 0; uint rendermodeind = 1; @@ -554,10 +570,7 @@ namespace CodeWalker.Rendering PSSceneVars.Update(context); PSSceneVars.SetPSCBuffer(context, 0); - if (shadowmap != null) - { - shadowmap.SetFinalRenderResources(context); - } + shadowmap?.SetFinalRenderResources(context); if (!InstGlobalVars.Flag) //on the first frame, update the instance globals { @@ -875,11 +888,14 @@ namespace CodeWalker.Rendering InstLocalVars.Vars.vecBatchAabbMin = batch.AABBMin; InstLocalVars.Vars.vecBatchAabbDelta = batch.AABBMax - batch.AABBMin; - InstLocalVars.Vars.vecPlayerPos = new Vector4(batch.Position - batch.CamRel, 1.0f); + Vector3.Subtract(ref batch.Position, ref batch.CamRel, out var result); + InstLocalVars.Vars.vecPlayerPos = new Vector4(result, 1.0f); InstLocalVars.Vars._vecCollParams = new Vector2(2.0f, -3.0f);//range, offset InstLocalVars.Vars.fadeAlphaDistUmTimer = new Vector4(0.0f); InstLocalVars.Vars.uMovementParams = new Vector4(0.0f); - InstLocalVars.Vars._fakedGrassNormal = new Vector4(Vector3.Normalize(-batch.CamRel), 0.0f); + var camRel = -batch.CamRel; + camRel.Normalize(); + InstLocalVars.Vars._fakedGrassNormal = new Vector4(camRel, 0.0f); InstLocalVars.Vars.gScaleRange = gb.Batch.ScaleRange; InstLocalVars.Vars.gWindBendingGlobals = new Vector4(WindVector.X, WindVector.Y, 1.0f, 1.0f); InstLocalVars.Vars.gWindBendScaleVar = new Vector2(WindVector.Z, WindVector.W); diff --git a/CodeWalker/Rendering/Shaders/BoundsShader.cs b/CodeWalker/Rendering/Shaders/BoundsShader.cs index 7793b61..1ac5be1 100644 --- a/CodeWalker/Rendering/Shaders/BoundsShader.cs +++ b/CodeWalker/Rendering/Shaders/BoundsShader.cs @@ -72,7 +72,7 @@ namespace CodeWalker.Rendering public BoundsShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] spherevsbytes = File.ReadAllBytes(Path.Combine(folder, "BoundingSphereVS.cso")); byte[] boxvsbytes = File.ReadAllBytes(Path.Combine(folder, "BoundingBoxVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "BoundsPS.cso")); @@ -126,7 +126,7 @@ namespace CodeWalker.Rendering return true; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { switch (mode) { diff --git a/CodeWalker/Rendering/Shaders/CableShader.cs b/CodeWalker/Rendering/Shaders/CableShader.cs index babe3c1..1dac663 100644 --- a/CodeWalker/Rendering/Shaders/CableShader.cs +++ b/CodeWalker/Rendering/Shaders/CableShader.cs @@ -89,7 +89,7 @@ namespace CodeWalker.Rendering public CableShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "CableVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "CablePS.cso")); byte[] psdefbytes = File.ReadAllBytes(Path.Combine(folder, "CablePS_Deferred.cso")); @@ -158,7 +158,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { uint rendermode = 0; uint rendermodeind = 1; @@ -197,10 +197,7 @@ namespace CodeWalker.Rendering PSSceneVars.Update(context); PSSceneVars.SetPSCBuffer(context, 0); - if (shadowmap != null) - { - shadowmap.SetFinalRenderResources(context); - } + shadowmap?.SetFinalRenderResources(context); } public override void SetEntityVars(DeviceContext context, ref RenderableInst rend) diff --git a/CodeWalker/Rendering/Shaders/CloudsShader.cs b/CodeWalker/Rendering/Shaders/CloudsShader.cs index 4b4c88c..b38e8b6 100644 --- a/CodeWalker/Rendering/Shaders/CloudsShader.cs +++ b/CodeWalker/Rendering/Shaders/CloudsShader.cs @@ -107,7 +107,7 @@ namespace CodeWalker.Rendering public CloudsShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "CloudsVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "CloudsPS.cso")); @@ -176,7 +176,7 @@ namespace CodeWalker.Rendering context.PixelShader.Set(ps); } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { CloudsLocalVars.Update(context); CloudsLocalVars.SetVSCBuffer(context, 0); diff --git a/CodeWalker/Rendering/Shaders/DeferredScene.cs b/CodeWalker/Rendering/Shaders/DeferredScene.cs index cdc3419..170bb93 100644 --- a/CodeWalker/Rendering/Shaders/DeferredScene.cs +++ b/CodeWalker/Rendering/Shaders/DeferredScene.cs @@ -15,6 +15,7 @@ using SharpDX.DXGI; using SharpDX.Mathematics.Interop; using System.Diagnostics; using CodeWalker.Properties; +using System.Diagnostics.CodeAnalysis; namespace CodeWalker.Rendering { @@ -69,9 +70,9 @@ namespace CodeWalker.Rendering } - public class DeferredScene + public class DeferredScene : IDisposable { - + private readonly ShaderManager _shaderManager; public GpuMultiTexture GBuffers; // diffuse, normals, specular, irradiance public GpuTexture SceneColour; //final scene colour buffer @@ -85,16 +86,19 @@ namespace CodeWalker.Rendering VertexShader DirLightVS; PixelShader DirLightPS; - PixelShader DirLightMSPS; + PixelShader? DirLightMSPS; VertexShader LodLightVS; PixelShader LodLightPS; - PixelShader LodLightMSPS; + PixelShader? LodLightMSPS; VertexShader LightVS; PixelShader LightPS; - PixelShader LightMSPS; + PixelShader? LightMSPS; LightCone LightCone; UnitSphere LightSphere; UnitCapsule LightCapsule; + LightCone LightConeLOD; + UnitSphere LightSphereLOD; + UnitCapsule LightCapsuleLOD; UnitQuad LightQuad; InputLayout LightQuadLayout; @@ -111,26 +115,16 @@ namespace CodeWalker.Rendering public int SSAASampleCount = 1; - public int MSAASampleCount = 8; + public int MSAASampleCount = Settings.Default.AntiAliasing; + public long VramUsage => WindowSizeVramUsage; - - - public long VramUsage - { - get - { - return WindowSizeVramUsage; - } - } - - - - public DeferredScene(DXManager dxman) + public DeferredScene(DXManager dxman, ShaderManager shaderManager) { + _shaderManager = shaderManager; var device = dxman.device; - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + var folder = ShaderManager.GetShaderFolder(); byte[] bDirLightVS = File.ReadAllBytes(Path.Combine(folder, "DirLightVS.cso")); byte[] bDirLightPS = File.ReadAllBytes(Path.Combine(folder, "DirLightPS.cso")); byte[] bDirLightMSPS = File.ReadAllBytes(Path.Combine(folder, "DirLightPS_MS.cso")); @@ -159,13 +153,20 @@ namespace CodeWalker.Rendering } catch { + DirLightMSPS = null; + LodLightMSPS = null; + LightMSPS = null; MSAASampleCount = 1; //can't do MSAA without at least 10.1 support } - LightCone = new LightCone(device, bLodLightVS, 2); - LightSphere = new UnitSphere(device, bLodLightVS, 3, true); - LightCapsule = new UnitCapsule(device, bLodLightVS, 4, false); + LightCone = new LightCone(device, bLightVS, 2); + LightSphere = new UnitSphere(device, bLightVS, 3, true); + LightCapsule = new UnitCapsule(device, bLightVS, 4, false); + + LightConeLOD = new LightCone(device, bLodLightVS, 2); + LightSphereLOD = new UnitSphere(device, bLodLightVS, 2, true); + LightCapsuleLOD = new UnitCapsule(device, bLodLightVS, 2, false); LightQuad = new UnitQuad(device, true); LightQuadLayout = new InputLayout(device, bDirLightVS, new[] { @@ -191,128 +192,38 @@ namespace CodeWalker.Rendering BlendState = DXUtility.CreateBlendState(device, false, BlendOperation.Add, BlendOption.One, BlendOption.Zero, BlendOperation.Add, BlendOption.One, BlendOption.Zero, ColorWriteMaskFlags.All); + OnWindowResize(dxman); } public void Dispose() { DisposeBuffers(); - if (BlendState != null) - { - BlendState.Dispose(); - BlendState = null; - } - if (SampleStateLinear != null) - { - SampleStateLinear.Dispose(); - SampleStateLinear = null; - } - if (SampleStatePoint != null) - { - SampleStatePoint.Dispose(); - SampleStatePoint = null; - } - if (LightVSVars != null) - { - LightVSVars.Dispose(); - LightVSVars = null; - } - if (LightPSVars != null) - { - LightPSVars.Dispose(); - LightPSVars = null; - } - if (LightInstVars != null) - { - LightInstVars.Dispose(); - LightInstVars = null; - } - if (LightQuadLayout != null) - { - LightQuadLayout.Dispose(); - LightQuadLayout = null; - } - if (LightQuad != null) - { - LightQuad.Dispose(); - LightQuad = null; - } - if (LightCone != null) - { - LightCone.Dispose(); - LightCone = null; - } - if (LightSphere != null) - { - LightSphere.Dispose(); - LightSphere = null; - } - if (LightCapsule != null) - { - LightCapsule.Dispose(); - LightCapsule = null; - } - if (DirLightPS != null) - { - DirLightPS.Dispose(); - DirLightPS = null; - } - if (DirLightMSPS != null) - { - DirLightMSPS.Dispose(); - DirLightMSPS = null; - } - if (DirLightVS != null) - { - DirLightVS.Dispose(); - DirLightVS = null; - } - if (LodLightPS != null) - { - LodLightPS.Dispose(); - LodLightPS = null; - } - if (LodLightMSPS != null) - { - LodLightMSPS.Dispose(); - LodLightMSPS = null; - } - if (LodLightVS != null) - { - LodLightVS.Dispose(); - LodLightVS = null; - } - if (LightPS != null) - { - LightPS.Dispose(); - LightPS = null; - } - if (LightMSPS != null) - { - LightMSPS.Dispose(); - LightMSPS = null; - } - if (LightVS != null) - { - LightVS.Dispose(); - LightVS = null; - } - if (SSAAPSVars != null) - { - SSAAPSVars.Dispose(); - SSAAPSVars = null; - } - if (SSAAPS != null) - { - SSAAPS.Dispose(); - SSAAPS = null; - } - if (FinalVS != null) - { - FinalVS.Dispose(); - FinalVS = null; - } + BlendState.Dispose(); + SampleStateLinear.Dispose(); + SampleStatePoint.Dispose(); + LightVSVars.Dispose(); + LightPSVars.Dispose(); + LightInstVars.Dispose(); + LightQuadLayout.Dispose(); + LightQuad.Dispose(); + LightConeLOD.Dispose(); + LightSphereLOD.Dispose(); + LightCapsuleLOD.Dispose(); + DirLightPS.Dispose(); + DirLightMSPS?.Dispose(); + DirLightVS.Dispose(); + LodLightPS.Dispose(); + LodLightMSPS?.Dispose(); + LodLightVS.Dispose(); + LightPS.Dispose(); + LightMSPS?.Dispose(); + LightVS.Dispose(); + SSAAPSVars.Dispose(); + SSAAPS.Dispose(); + FinalVS.Dispose(); } + [MemberNotNull(nameof(GBuffers), nameof(SceneColour))] public void OnWindowResize(DXManager dxman) { DisposeBuffers(); @@ -340,16 +251,8 @@ namespace CodeWalker.Rendering } public void DisposeBuffers() { - if (GBuffers != null) - { - GBuffers.Dispose(); - GBuffers = null; - } - if (SceneColour != null) - { - SceneColour.Dispose(); - SceneColour = null; - } + GBuffers?.Dispose(); + SceneColour?.Dispose(); WindowSizeVramUsage = 0; } @@ -374,7 +277,7 @@ namespace CodeWalker.Rendering context.Rasterizer.SetViewport(Viewport); } - public void RenderLights(DeviceContext context, Camera camera, Shadowmap globalShadows, ShaderGlobalLights globalLights) + public void RenderLights(DeviceContext context, Camera camera, Shadowmap? globalShadows, ShaderGlobalLights globalLights, bool updateLods = true) { //first full-screen directional light pass, for sun/moon @@ -398,7 +301,7 @@ namespace CodeWalker.Rendering LightPSVars.Vars.GlobalLights = globalLights.Params; LightPSVars.Vars.ViewProjInv = Matrix.Transpose(camera.ViewProjInvMatrix); LightPSVars.Vars.CameraPos = Vector4.Zero; - LightPSVars.Vars.EnableShadows = (globalShadows != null) ? 1u : 0u; + LightPSVars.Vars.EnableShadows = (globalShadows is not null) ? 1u : 0u; LightPSVars.Vars.RenderMode = 0; LightPSVars.Vars.RenderModeIndex = 1; LightPSVars.Vars.RenderSamplerCoord = 0; @@ -412,7 +315,7 @@ namespace CodeWalker.Rendering context.PixelShader.SetShaderResources(0, GBuffers.DepthSRV); context.PixelShader.SetShaderResources(2, GBuffers.SRVs); - if (globalShadows != null) + if (globalShadows is not null) { globalShadows.SetFinalRenderResources(context); } @@ -427,7 +330,7 @@ namespace CodeWalker.Rendering context.PixelShader.SetSamplers(0, null, null); } - public void RenderLights(DeviceContext context, Camera camera, List lodlights) + public void RenderLights(DeviceContext context, Camera camera, List lodlights, bool updateLods = true) { //instanced rendering of all other lights, using appropriate shapes //blend mode: additive @@ -436,6 +339,7 @@ namespace CodeWalker.Rendering context.VertexShader.Set(LodLightVS); context.PixelShader.Set(ps); + context.InputAssembler.InputLayout = LightQuadLayout; LightVSVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); LightVSVars.Vars.CameraPos = new Vector4(camera.Position, 0.0f); @@ -458,11 +362,11 @@ namespace CodeWalker.Rendering context.PixelShader.SetShaderResources(0, GBuffers.DepthSRV); context.PixelShader.SetShaderResources(2, GBuffers.SRVs); - - foreach (var rll in lodlights) + for (int i = 0; i < Math.Min(lodlights.Count, 500); i++) { - var (pointsIndex, spotsIndex, capsIndex) = rll.UpdateLods(camera.Position); - if (rll.PointsBuffer != null && pointsIndex > 0) + var rll = lodlights[i]; + var (spotsIndex, pointsIndex, capsIndex) = rll.UpdateLods(in camera.Position, updateLods); + if (rll.PointsBuffer != null && pointsIndex >= 0) { context.VertexShader.SetShaderResources(0, rll.PointsBuffer.SRV); context.PixelShader.SetShaderResources(6, rll.PointsBuffer.SRV); @@ -473,9 +377,9 @@ namespace CodeWalker.Rendering LightPSVars.Update(context); LightPSVars.SetPSCBuffer(context, 0); - LightSphere.DrawInstanced(context, pointsIndex + 1); + LightSphereLOD.DrawInstanced(context, pointsIndex + 1); } - if (rll.SpotsBuffer != null && spotsIndex > 0) + if (rll.SpotsBuffer != null && spotsIndex >= 0) { context.VertexShader.SetShaderResources(0, rll.SpotsBuffer.SRV); context.PixelShader.SetShaderResources(6, rll.SpotsBuffer.SRV); @@ -485,9 +389,9 @@ namespace CodeWalker.Rendering LightPSVars.Vars.LightType = 2; LightPSVars.Update(context); LightPSVars.SetPSCBuffer(context, 0); - LightCone.DrawInstanced(context, spotsIndex + 1); + LightConeLOD.DrawInstanced(context, spotsIndex + 1); } - if (rll.CapsBuffer != null && capsIndex > 0) + if (rll.CapsBuffer != null && capsIndex >= 0) { context.VertexShader.SetShaderResources(0, rll.CapsBuffer.SRV); context.PixelShader.SetShaderResources(6, rll.CapsBuffer.SRV); @@ -497,7 +401,7 @@ namespace CodeWalker.Rendering LightPSVars.Vars.LightType = 4; LightPSVars.Update(context); LightPSVars.SetPSCBuffer(context, 0); - LightCapsule.DrawInstanced(context, capsIndex + 1); + LightCapsuleLOD.DrawInstanced(context, capsIndex + 1); } } @@ -509,7 +413,9 @@ namespace CodeWalker.Rendering context.PixelShader.SetSamplers(0, null, null); } - public void RenderLights(DeviceContext context, Camera camera, List lights) + + private const int lightLimit = 500; + public void RenderLights(DeviceContext context, Camera camera, List lights, bool updateLods = true) { //instanced rendering of all other lights, using appropriate shapes //blend mode: additive @@ -520,6 +426,8 @@ namespace CodeWalker.Rendering context.VertexShader.Set(LightVS); context.PixelShader.Set(ps); + context.InputAssembler.InputLayout = LightQuadLayout; + LightVSVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); LightVSVars.Vars.CameraPos = new Vector4(camera.Position, 0.0f); LightVSVars.Vars.LightType = 0; @@ -545,8 +453,13 @@ namespace CodeWalker.Rendering context.PixelShader.SetShaderResources(0, GBuffers.DepthSRV); context.PixelShader.SetShaderResources(2, GBuffers.SRVs); + if (lights.Count > lightLimit) + { + Console.WriteLine($"Lights count larger than {lightLimit}, {lights.Count}"); + } - for (int i = 0; i < lights.Count; i++) + // Cap lights to 200, to avoid excessive GPU load due to loads of lights + for (int i = 0; i < Math.Min(lights.Count, lightLimit); i++) { var li = lights[i]; var rl = li.Light; diff --git a/CodeWalker/Rendering/Shaders/DistantLightsShader.cs b/CodeWalker/Rendering/Shaders/DistantLightsShader.cs index 002f0c4..9399357 100644 --- a/CodeWalker/Rendering/Shaders/DistantLightsShader.cs +++ b/CodeWalker/Rendering/Shaders/DistantLightsShader.cs @@ -24,7 +24,7 @@ namespace CodeWalker.Rendering public float Pad0; } - public class DistantLightsShader : Shader + public class DistantLightsShader : Shader, IDisposable { bool disposed = false; @@ -42,7 +42,7 @@ namespace CodeWalker.Rendering public DistantLightsShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "DistantLightsVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "DistantLightsPS.cso")); @@ -88,7 +88,7 @@ namespace CodeWalker.Rendering context.InputAssembler.InputLayout = layout; return true; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { VSSceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); VSSceneVars.Vars.ViewInv = Matrix.Transpose(camera.ViewInvMatrix); diff --git a/CodeWalker/Rendering/Shaders/MarkerShader.cs b/CodeWalker/Rendering/Shaders/MarkerShader.cs index 4740e7b..16450bc 100644 --- a/CodeWalker/Rendering/Shaders/MarkerShader.cs +++ b/CodeWalker/Rendering/Shaders/MarkerShader.cs @@ -47,7 +47,7 @@ namespace CodeWalker.Rendering public MarkerShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "MarkerVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "MarkerPS.cso")); @@ -95,7 +95,7 @@ namespace CodeWalker.Rendering } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { VSSceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); VSSceneVars.Vars.ViewInv = Matrix.Transpose(camera.ViewInvMatrix); diff --git a/CodeWalker/Rendering/Shaders/PathShader.cs b/CodeWalker/Rendering/Shaders/PathShader.cs index b51668b..3e35901 100644 --- a/CodeWalker/Rendering/Shaders/PathShader.cs +++ b/CodeWalker/Rendering/Shaders/PathShader.cs @@ -47,7 +47,7 @@ namespace CodeWalker.Rendering public PathShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] boxvsbytes = File.ReadAllBytes(Path.Combine(folder, "PathBoxVS.cso")); byte[] boxpsbytes = File.ReadAllBytes(Path.Combine(folder, "PathBoxPS.cso")); byte[] dynvsbytes = File.ReadAllBytes(Path.Combine(folder, "PathDynVS.cso")); @@ -99,7 +99,7 @@ namespace CodeWalker.Rendering return true; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { VSSceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); VSSceneVars.Vars.CameraPos = new Vector4(camera.Position, 0.0f); diff --git a/CodeWalker/Rendering/Shaders/PostProcessor.cs b/CodeWalker/Rendering/Shaders/PostProcessor.cs index 5ed6b1c..57d3283 100644 --- a/CodeWalker/Rendering/Shaders/PostProcessor.cs +++ b/CodeWalker/Rendering/Shaders/PostProcessor.cs @@ -47,7 +47,7 @@ namespace CodeWalker.Rendering public Vector4 avSampleWeights13; public Vector4 avSampleWeights14; - public Vector4 Get(int i) + public readonly Vector4 Get(int i) { switch (i) { @@ -113,38 +113,38 @@ namespace CodeWalker.Rendering } - public class PostProcessor + public class PostProcessor : IDisposable { - ComputeShader ReduceTo1DCS; - ComputeShader ReduceTo0DCS; - ComputeShader LumBlendCS; - ComputeShader BloomFilterBPHCS; - ComputeShader BloomFilterVCS; - PixelShader CopyPixelsPS; - VertexShader FinalPassVS; - PixelShader FinalPassPS; - UnitQuad FinalPassQuad; - InputLayout FinalPassLayout; - GpuVarsBuffer ReduceCSVars; - GpuVarsBuffer LumBlendCSVars; - GpuVarsBuffer FilterBPHCSVars; - GpuVarsBuffer FilterVCSVars; - GpuVarsBuffer FinalPSVars; + ComputeShader? ReduceTo1DCS; + ComputeShader? ReduceTo0DCS; + ComputeShader? LumBlendCS; + ComputeShader? BloomFilterBPHCS; + ComputeShader? BloomFilterVCS; + PixelShader? CopyPixelsPS; + VertexShader? FinalPassVS; + PixelShader? FinalPassPS; + UnitQuad? FinalPassQuad; + InputLayout? FinalPassLayout; + GpuVarsBuffer? ReduceCSVars; + GpuVarsBuffer? LumBlendCSVars; + GpuVarsBuffer? FilterBPHCSVars; + GpuVarsBuffer? FilterVCSVars; + GpuVarsBuffer? FinalPSVars; - GpuTexture Primary; + GpuTexture? Primary; - GpuBuffer Reduction0; - GpuBuffer Reduction1; + GpuBuffer? Reduction0; + GpuBuffer? Reduction1; - GpuBuffer LumBlendResult; + GpuBuffer? LumBlendResult; - GpuBuffer Bloom0; - GpuBuffer Bloom1; - GpuTexture Bloom; + GpuBuffer? Bloom0; + GpuBuffer? Bloom1; + GpuTexture? Bloom; - SamplerState SampleStatePoint; - SamplerState SampleStateLinear; - BlendState BlendState; + SamplerState? SampleStatePoint; + SamplerState? SampleStateLinear; + BlendState? BlendState; long WindowSizeVramUsage = 0; int Width = 0; int Height = 0; @@ -166,7 +166,7 @@ namespace CodeWalker.Rendering RawViewportF[] vpOld = new RawViewportF[15]; - DeferredScene DefScene; + DeferredScene? DefScene; bool UsePrimary = true; ShaderResourceView SceneColourSRV @@ -187,7 +187,7 @@ namespace CodeWalker.Rendering { var device = dxman.device; - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] bReduceTo1DCS = File.ReadAllBytes(Path.Combine(folder, "PPReduceTo1DCS.cso")); byte[] bReduceTo0DCS = File.ReadAllBytes(Path.Combine(folder, "PPReduceTo0DCS.cso")); byte[] bLumBlendCS = File.ReadAllBytes(Path.Combine(folder, "PPLumBlendCS.cso")); @@ -230,100 +230,73 @@ namespace CodeWalker.Rendering GetSampleWeights(ref FilterVCSVars.Vars.avSampleWeights, 3.0f, 1.25f); //init sample weights FilterBPHCSVars.Vars.avSampleWeights = FilterVCSVars.Vars.avSampleWeights; } + private bool isDisposed = false; public void Dispose() { + if (isDisposed) + { + return; + } DisposeBuffers(); - if (BlendState != null) - { - BlendState.Dispose(); - BlendState = null; - } - if (SampleStateLinear != null) - { - SampleStateLinear.Dispose(); - SampleStateLinear = null; - } - if (SampleStatePoint != null) - { - SampleStatePoint.Dispose(); - SampleStatePoint = null; - } - if (FinalPSVars != null) - { - FinalPSVars.Dispose(); - FinalPSVars = null; - } - if (FilterVCSVars != null) - { - FilterVCSVars.Dispose(); - FilterVCSVars = null; - } - if (FilterBPHCSVars != null) - { - FilterBPHCSVars.Dispose(); - FilterBPHCSVars = null; - } - if (LumBlendCSVars != null) - { - LumBlendCSVars.Dispose(); - LumBlendCSVars = null; - } - if (ReduceCSVars != null) - { - ReduceCSVars.Dispose(); - ReduceCSVars = null; - } - if (FinalPassLayout != null) - { - FinalPassLayout.Dispose(); - FinalPassLayout = null; - } - if (FinalPassQuad != null) - { - FinalPassQuad.Dispose(); - FinalPassQuad = null; - } - if (FinalPassPS != null) - { - FinalPassPS.Dispose(); - FinalPassPS = null; - } - if (FinalPassVS != null) - { - FinalPassVS.Dispose(); - FinalPassVS = null; - } - if (CopyPixelsPS != null) - { - CopyPixelsPS.Dispose(); - CopyPixelsPS = null; - } - if (BloomFilterVCS != null) - { - BloomFilterVCS.Dispose(); - BloomFilterVCS = null; - } - if (BloomFilterBPHCS != null) - { - BloomFilterBPHCS.Dispose(); - BloomFilterBPHCS = null; - } - if (LumBlendCS != null) - { - LumBlendCS.Dispose(); - LumBlendCS = null; - } - if (ReduceTo0DCS != null) - { - ReduceTo0DCS.Dispose(); - ReduceTo0DCS = null; - } - if (ReduceTo1DCS != null) - { - ReduceTo1DCS.Dispose(); - ReduceTo1DCS = null; - } + BlendState?.Dispose(); + BlendState = null; + + SampleStateLinear?.Dispose(); + SampleStateLinear = null; + + SampleStatePoint?.Dispose(); + SampleStatePoint = null; + + + FinalPSVars?.Dispose(); + FinalPSVars = null; + + + FilterVCSVars?.Dispose(); + FilterVCSVars = null; + + FilterBPHCSVars?.Dispose(); + FilterBPHCSVars = null; + + LumBlendCSVars?.Dispose(); + LumBlendCSVars = null; + + ReduceCSVars?.Dispose(); + ReduceCSVars = null; + + FinalPassLayout?.Dispose(); + FinalPassLayout = null; + + FinalPassQuad?.Dispose(); + FinalPassQuad = null; + + FinalPassPS?.Dispose(); + FinalPassPS = null; + + FinalPassVS?.Dispose(); + FinalPassVS = null; + + CopyPixelsPS?.Dispose(); + CopyPixelsPS = null; + + BloomFilterVCS?.Dispose(); + BloomFilterVCS = null; + + BloomFilterBPHCS?.Dispose(); + BloomFilterBPHCS = null; + + LumBlendCS?.Dispose(); + LumBlendCS = null; + + ReduceTo0DCS?.Dispose(); + ReduceTo0DCS = null; + + ReduceTo1DCS?.Dispose(); + ReduceTo1DCS = null; + + isDisposed = true; + GC.SuppressFinalize(this); } public void OnWindowResize(DXManager dxman) @@ -381,41 +354,27 @@ namespace CodeWalker.Rendering } public void DisposeBuffers() { - if (Bloom != null) - { - Bloom.Dispose(); - Bloom = null; - } - if (Bloom0 != null) - { - Bloom0.Dispose(); - Bloom0 = null; - } - if (Bloom1 != null) - { - Bloom1.Dispose(); - Bloom1 = null; - } - if (LumBlendResult != null) - { - LumBlendResult.Dispose(); - LumBlendResult = null; - } - if (Reduction0 != null) - { - Reduction0.Dispose(); - Reduction0 = null; - } - if (Reduction1 != null) - { - Reduction1.Dispose(); - Reduction1 = null; - } - if (Primary != null) - { - Primary.Dispose(); - Primary = null; - } + Bloom?.Dispose(); + Bloom = null; + + Bloom0?.Dispose(); + Bloom0 = null; + + Bloom1?.Dispose(); + Bloom1 = null; + + LumBlendResult?.Dispose(); + LumBlendResult = null; + + Reduction0?.Dispose(); + Reduction0 = null; + + Reduction1?.Dispose(); + Reduction1 = null; + + Primary?.Dispose(); + Primary = null; + WindowSizeVramUsage = 0; } @@ -424,19 +383,19 @@ namespace CodeWalker.Rendering Color4 clearColour = new Color4(0.2f, 0.4f, 0.6f, 0.0f); //Color4 clearColour = new Color4(0.0f, 0.0f, 0.0f, 0.0f); - Primary.Clear(context, clearColour); + Primary?.Clear(context, clearColour); } public void ClearDepth(DeviceContext context) { - Primary.ClearDepth(context); + Primary?.ClearDepth(context); } public void SetPrimary(DeviceContext context) { - Primary.SetRenderTarget(context); + Primary?.SetRenderTarget(context); context.Rasterizer.SetViewport(Viewport); } - public void Render(DXManager dxman, float elapsed, DeferredScene defScene) + public void Render(DXManager dxman, float elapsed, DeferredScene? defScene) { ElapsedTime = elapsed; DefScene = defScene; diff --git a/CodeWalker/Rendering/Shaders/Shader.cs b/CodeWalker/Rendering/Shaders/Shader.cs index 39a71bc..4ed129e 100644 --- a/CodeWalker/Rendering/Shaders/Shader.cs +++ b/CodeWalker/Rendering/Shaders/Shader.cs @@ -20,7 +20,7 @@ namespace CodeWalker.Rendering public abstract void SetShader(DeviceContext context); public abstract bool SetInputLayout(DeviceContext context, VertexType type); - public abstract void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights); + public abstract void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights); public abstract void SetEntityVars(DeviceContext context, ref RenderableInst rend); public abstract void SetModelVars(DeviceContext context, RenderableModel model); public abstract void SetGeomVars(DeviceContext context, RenderableGeometry geom); diff --git a/CodeWalker/Rendering/Shaders/ShadowShader.cs b/CodeWalker/Rendering/Shaders/ShadowShader.cs index ed68588..c5ed379 100644 --- a/CodeWalker/Rendering/Shaders/ShadowShader.cs +++ b/CodeWalker/Rendering/Shaders/ShadowShader.cs @@ -82,7 +82,7 @@ namespace CodeWalker.Rendering public ShadowShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "ShadowVS.cso")); byte[] vssbytes = File.ReadAllBytes(Path.Combine(folder, "ShadowVS_Skin.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "ShadowPS.cso")); @@ -167,9 +167,12 @@ namespace CodeWalker.Rendering defaultBoneMatrices = new Matrix3_s[255]; for (int i = 0; i < 255; i++) { - defaultBoneMatrices[i].Row1 = Vector4.UnitX; - defaultBoneMatrices[i].Row2 = Vector4.UnitY; - defaultBoneMatrices[i].Row3 = Vector4.UnitZ; + defaultBoneMatrices[i] = new Matrix3_s + { + Row1 = Vector4.UnitX, + Row2 = Vector4.UnitY, + Row3 = Vector4.UnitZ + }; } } @@ -212,7 +215,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { } public void SetSceneVars(DeviceContext context, Matrix shadowviewproj) @@ -237,7 +240,7 @@ namespace CodeWalker.Rendering public override void SetModelVars(DeviceContext context, RenderableModel model) { - if ((model.Owner.Skeleton?.BoneTransforms != null) && (model.Owner.Skeleton.BoneTransforms.Length > 0)) + if ((model.Owner.Skeleton?.BoneTransforms is not null) && (model.Owner.Skeleton.BoneTransforms.Length > 0)) { SetBoneMatrices(context, model.Owner.Skeleton.BoneTransforms); defaultBoneMatricesBound = false; @@ -247,12 +250,13 @@ namespace CodeWalker.Rendering SetBoneMatrices(context, defaultBoneMatrices); defaultBoneMatricesBound = true; } - if (model.Owner.Cloth?.Vertices != null) + if (model.Owner.Cloth?.Vertices is not null) { SetClothVertices(context, model.Owner.Cloth.Vertices); } - if (!model.UseTransform) return; + if (!model.UseTransform) + return; VSModelVars.Vars.Transform = Matrix.Transpose(model.Transform); VSModelVars.Update(context); VSModelVars.SetVSCBuffer(context, 2); @@ -260,12 +264,12 @@ namespace CodeWalker.Rendering public override void SetGeomVars(DeviceContext context, RenderableGeometry geom) { - RenderableTexture texture = null; // ((geom.Textures != null) && (geom.Textures.Length > 0)) ? geom.Textures[0] : null; + RenderableTexture? texture = null; // ((geom.Textures != null) && (geom.Textures.Length > 0)) ? geom.Textures[0] : null; //RenderableTexture tintpal = null; //float tntpalind = 0.0f; - if ((geom.RenderableTextures != null) && (geom.RenderableTextures.Length > 0)) + if (geom.RenderableTextures is not null && geom.RenderableTextures.Length > 0) { for (int i = 0; i < geom.RenderableTextures.Length; i++) { @@ -281,7 +285,8 @@ namespace CodeWalker.Rendering texture = itex; break; } - if (texture != null) break; + if (texture is not null) + break; } ////try get default diffuse texture @@ -308,7 +313,7 @@ namespace CodeWalker.Rendering //fallback try get first texture... eventaully remove this! (helps with water for now) int index = 0; - while (((texture == null)) && (index < geom.RenderableTextures.Length)) + while (texture is null && index < geom.RenderableTextures.Length) { texture = geom.RenderableTextures[index]; index++; @@ -327,7 +332,7 @@ namespace CodeWalker.Rendering } - bool usediff = ((texture != null) && (texture.ShaderResourceView != null)); + bool usediff = texture is not null && texture.ShaderResourceView != null; uint windflag = 0; @@ -368,11 +373,11 @@ namespace CodeWalker.Rendering //context.PixelShader.SetSampler(1, texsamplerc); if (usediff) { - texture.SetPSResource(context, 0); + texture!.SetPSResource(context, 0); } - if (geom.BoneTransforms != null) + if (geom.BoneTransforms is not null) { SetBoneMatrices(context, geom.BoneTransforms); defaultBoneMatricesBound = false; @@ -412,16 +417,8 @@ namespace CodeWalker.Rendering { if (disposed) return; - if (texsampler != null) - { - texsampler.Dispose(); - texsampler = null; - } - if (texsamplerc != null) - { - texsamplerc.Dispose(); - texsamplerc = null; - } + texsampler?.Dispose(); + texsamplerc?.Dispose(); foreach (InputLayout layout in layouts.Values) { @@ -441,7 +438,13 @@ namespace CodeWalker.Rendering shadowvs.Dispose(); shadowvs_skin.Dispose(); + GC.SuppressFinalize(this); disposed = true; } + + ~ShadowShader() + { + Dispose(); + } } } diff --git a/CodeWalker/Rendering/Shaders/SkydomeShader.cs b/CodeWalker/Rendering/Shaders/SkydomeShader.cs index d655a2c..15ca3fd 100644 --- a/CodeWalker/Rendering/Shaders/SkydomeShader.cs +++ b/CodeWalker/Rendering/Shaders/SkydomeShader.cs @@ -132,7 +132,7 @@ namespace CodeWalker.Rendering public SkydomeShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] skyvsbytes = File.ReadAllBytes(Path.Combine(folder, "SkydomeVS.cso")); byte[] skypsbytes = File.ReadAllBytes(Path.Combine(folder, "SkydomePS.cso")); byte[] sunvsbytes = File.ReadAllBytes(Path.Combine(folder, "SkySunVS.cso")); @@ -261,7 +261,7 @@ namespace CodeWalker.Rendering SkyLocalVars.Vars.noisePhase = Vector4.Zero; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { SkyLocalVars.Update(context); SkyLocalVars.SetVSCBuffer(context, 0); @@ -288,7 +288,8 @@ namespace CodeWalker.Rendering public override void SetModelVars(DeviceContext context, RenderableModel model) { - if (!model.UseTransform) return; + if (!model.UseTransform) + return; VSModelVars.Vars.Transform = Matrix.Transpose(model.Transform); VSModelVars.Update(context); VSModelVars.SetVSCBuffer(context, 3); diff --git a/CodeWalker/Rendering/Shaders/TerrainShader.cs b/CodeWalker/Rendering/Shaders/TerrainShader.cs index 9e3ea83..2f3dbe8 100644 --- a/CodeWalker/Rendering/Shaders/TerrainShader.cs +++ b/CodeWalker/Rendering/Shaders/TerrainShader.cs @@ -102,7 +102,7 @@ namespace CodeWalker.Rendering public TerrainShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vspncct = File.ReadAllBytes(Path.Combine(folder, "TerrainVS_PNCCT.cso")); byte[] vspncctt = File.ReadAllBytes(Path.Combine(folder, "TerrainVS_PNCCTT.cso")); byte[] vspnccttx = File.ReadAllBytes(Path.Combine(folder, "TerrainVS_PNCCTTX.cso")); @@ -280,7 +280,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { uint rendermode = 0; uint rendermodeind = 1; @@ -334,10 +334,7 @@ namespace CodeWalker.Rendering PSSceneVars.Update(context); PSSceneVars.SetPSCBuffer(context, 0); - if (shadowmap != null) - { - shadowmap.SetFinalRenderResources(context); - } + shadowmap?.SetFinalRenderResources(context); } public override void SetEntityVars(DeviceContext context, ref RenderableInst rend) @@ -385,7 +382,7 @@ namespace CodeWalker.Rendering if (geom.HDTextureEnable) { var hdtex = geom.RenderableTexturesHD[i]; - if ((hdtex != null) && (hdtex.IsLoaded)) + if (hdtex is not null && hdtex.IsLoaded) { itex = hdtex; } diff --git a/CodeWalker/Rendering/Shaders/TreesLodShader.cs b/CodeWalker/Rendering/Shaders/TreesLodShader.cs index c8dd213..843a985 100644 --- a/CodeWalker/Rendering/Shaders/TreesLodShader.cs +++ b/CodeWalker/Rendering/Shaders/TreesLodShader.cs @@ -78,7 +78,7 @@ namespace CodeWalker.Rendering public TreesLodShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "TreesLodVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "TreesLodPS.cso")); byte[] psdefbytes = File.ReadAllBytes(Path.Combine(folder, "TreesLodPS_Deferred.cso")); @@ -134,7 +134,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { VSSceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); VSSceneVars.Update(context); diff --git a/CodeWalker/Rendering/Shaders/WaterShader.cs b/CodeWalker/Rendering/Shaders/WaterShader.cs index c56f725..fd7b3b4 100644 --- a/CodeWalker/Rendering/Shaders/WaterShader.cs +++ b/CodeWalker/Rendering/Shaders/WaterShader.cs @@ -122,7 +122,7 @@ namespace CodeWalker.Rendering public WaterShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsptbytes = File.ReadAllBytes(Path.Combine(folder, "WaterVS_PT.cso")); byte[] vspctbytes = File.ReadAllBytes(Path.Combine(folder, "WaterVS_PCT.cso")); byte[] vspnctbytes = File.ReadAllBytes(Path.Combine(folder, "WaterVS_PNCT.cso")); @@ -234,7 +234,7 @@ namespace CodeWalker.Rendering return false; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { uint rendermode = 0; uint rendermodeind = 1; @@ -287,8 +287,8 @@ namespace CodeWalker.Rendering Vector2 fogtexInv = 1.0f / (fogtexMax - fogtexMin); - bool usewaterbumps = (waterbump != null) && (waterbump.ShaderResourceView != null) && (waterbump2 != null) && (waterbump2.ShaderResourceView != null); - bool usefogtex = (waterfog != null) && (waterfog.ShaderResourceView != null); + bool usewaterbumps = (waterbump is not null) && (waterbump.ShaderResourceView is not null) && (waterbump2 is not null) && (waterbump2.ShaderResourceView is not null); + bool usefogtex = (waterfog is not null) && (waterfog.ShaderResourceView is not null); VSSceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); VSSceneVars.Vars.WaterVector = Vector4.Zero; @@ -297,7 +297,7 @@ namespace CodeWalker.Rendering VSSceneVars.SetVSCBuffer(context, 0); PSSceneVars.Vars.GlobalLights = lights.Params; - PSSceneVars.Vars.EnableShadows = (shadowmap != null) ? 1u : 0u; + PSSceneVars.Vars.EnableShadows = (shadowmap is not null) ? 1u : 0u; PSSceneVars.Vars.RenderMode = rendermode; PSSceneVars.Vars.RenderModeIndex = rendermodeind; PSSceneVars.Vars.RenderSamplerCoord = (uint)RenderTextureSamplerCoord; @@ -309,18 +309,15 @@ namespace CodeWalker.Rendering PSSceneVars.Update(context); PSSceneVars.SetPSCBuffer(context, 0); - if (shadowmap != null) - { - shadowmap.SetFinalRenderResources(context); - } + shadowmap?.SetFinalRenderResources(context); if (usewaterbumps) { - context.PixelShader.SetShaderResource(4, waterbump.ShaderResourceView); - context.PixelShader.SetShaderResource(5, waterbump2.ShaderResourceView); + context.PixelShader.SetShaderResource(4, waterbump!.ShaderResourceView); + context.PixelShader.SetShaderResource(5, waterbump2!.ShaderResourceView); } if (usefogtex) { - context.PixelShader.SetShaderResource(6, waterfog.ShaderResourceView); + context.PixelShader.SetShaderResource(6, waterfog!.ShaderResourceView); } } @@ -354,7 +351,8 @@ namespace CodeWalker.Rendering { var itex = geom.RenderableTextures[i]; var ihash = geom.TextureParamHashes[i]; - if (itex == null) continue; + if (itex is null) + continue; switch (ihash) { case ShaderParamNames.DiffuseSampler: diff --git a/CodeWalker/Rendering/Shaders/WidgetShader.cs b/CodeWalker/Rendering/Shaders/WidgetShader.cs index 9ab93c8..91067bc 100644 --- a/CodeWalker/Rendering/Shaders/WidgetShader.cs +++ b/CodeWalker/Rendering/Shaders/WidgetShader.cs @@ -29,7 +29,7 @@ namespace CodeWalker.Rendering } - public class WidgetShader : Shader + public class WidgetShader : Shader, IDisposable { VertexShader vs; PixelShader ps; @@ -40,7 +40,7 @@ namespace CodeWalker.Rendering public WidgetShader(Device device) { - string folder = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "Shaders"); + string folder = ShaderManager.GetShaderFolder(); byte[] vsbytes = File.ReadAllBytes(Path.Combine(folder, "WidgetVS.cso")); byte[] psbytes = File.ReadAllBytes(Path.Combine(folder, "WidgetPS.cso")); @@ -72,7 +72,7 @@ namespace CodeWalker.Rendering context.InputAssembler.SetIndexBuffer(null, SharpDX.DXGI.Format.Unknown, 0); return true; } - public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap shadowmap, ShaderGlobalLights lights) + public override void SetSceneVars(DeviceContext context, Camera camera, Shadowmap? shadowmap, ShaderGlobalLights lights) { SceneVars.Vars.ViewProj = Matrix.Transpose(camera.ViewProjMatrix); SceneVars.Update(context); diff --git a/CodeWalker/Rendering/Utils/GpuBuffers.cs b/CodeWalker/Rendering/Utils/GpuBuffers.cs index 35fb4db..af67aca 100644 --- a/CodeWalker/Rendering/Utils/GpuBuffers.cs +++ b/CodeWalker/Rendering/Utils/GpuBuffers.cs @@ -10,10 +10,11 @@ using MapFlags = SharpDX.Direct3D11.MapFlags; using SharpDX.Direct3D11; using SharpDX; using SharpDX.Direct3D; +using System.Diagnostics.CodeAnalysis; namespace CodeWalker.Rendering { - public class GpuVarsBuffer where T:struct //shader vars buffer helper! + public class GpuVarsBuffer : IDisposable where T:struct //shader vars buffer helper! { public int Size; public Buffer Buffer; @@ -26,12 +27,16 @@ namespace CodeWalker.Rendering } public void Dispose() { - if (Buffer != null) - { - Buffer.Dispose(); - Buffer = null; - } + Buffer.Dispose(); + GC.SuppressFinalize(this); } + + ~GpuVarsBuffer() + { + Console.WriteLine("Finalizing GpuVarsBuffer"); + Dispose(); + } + public void Update(DeviceContext context) { try @@ -40,7 +45,9 @@ namespace CodeWalker.Rendering Utilities.Write(dataBox.DataPointer, ref Vars); context.UnmapSubresource(Buffer, 0); } - catch { } //not much we can do about this except ignore it.. + catch(Exception ex) { + Console.WriteLine(ex); + } //not much we can do about this except ignore it.. } public void SetVSCBuffer(DeviceContext context, int slot) { @@ -53,7 +60,7 @@ namespace CodeWalker.Rendering } - public class GpuABuffer where T : struct //Dynamic GPU buffer of items updated by CPU, for array of structs used as a constant buffer + public class GpuABuffer : IDisposable where T : struct //Dynamic GPU buffer of items updated by CPU, for array of structs used as a constant buffer { public int StructSize; public int StructCount; @@ -69,12 +76,16 @@ namespace CodeWalker.Rendering } public void Dispose() { - if (Buffer != null) - { - Buffer.Dispose(); - Buffer = null; - } + Buffer.Dispose(); + GC.SuppressFinalize(this); } + + ~GpuABuffer() + { + Console.WriteLine("Finalizing GpuABuffer"); + Dispose(); + } + public void Update(DeviceContext context, T[] data) { var dataBox = context.MapSubresource(Buffer, 0, MapMode.WriteDiscard, MapFlags.None); @@ -94,7 +105,7 @@ namespace CodeWalker.Rendering } - public class GpuSBuffer where T : struct //for static struct data as resource view + public class GpuSBuffer : IDisposable where T : struct //for static struct data as resource view { public int StructSize; public int StructCount; @@ -113,26 +124,25 @@ namespace CodeWalker.Rendering } public void Dispose() { - if (SRV != null) - { - SRV.Dispose(); - SRV = null; - } - if (Buffer != null) - { - Buffer.Dispose(); - Buffer = null; - } + SRV.Dispose(); + Buffer.Dispose(); + GC.SuppressFinalize(this); + } + + ~GpuSBuffer() + { + Console.WriteLine("Finalizing GpuSBuffer"); + Dispose(); } } - public class GpuCBuffer where T : struct //Dynamic GPU buffer of items updated by CPU + public class GpuCBuffer : IDisposable where T : struct //Dynamic GPU buffer of items updated by CPU { public int StructSize; public int StructCount; public int BufferSize; - public int CurrentCount; + public int CurrentCount => Data.Count; public Buffer Buffer; public ShaderResourceView SRV; public List Data; @@ -149,42 +159,58 @@ namespace CodeWalker.Rendering Data = new List(count); DataArray = new T[count]; } + public void Dispose() { - if (SRV != null) - { - SRV.Dispose(); - SRV = null; - } - if (Buffer != null) - { - Buffer.Dispose(); - Buffer = null; - } + SRV.Dispose(); + Buffer.Dispose(); + GC.SuppressFinalize(this); + } + + ~GpuCBuffer() + { + Console.WriteLine("Finalizing GpuCBuffer"); + Dispose(); } public void Clear() { Data.Clear(); - CurrentCount = 0; } - public bool Add(T item) + + public void EnsureElementsFit(int add) { - if (CurrentCount < StructCount) + if (CurrentCount + add > StructCount) { - Data.Add(item); - CurrentCount++; - return true; + throw new ArgumentOutOfRangeException(nameof(add), $"GpuBuffer exceeded max length of {StructCount}"); + } + } + + public bool Add(in T item) + { + EnsureElementsFit(1); + Data.Add(item); + return true; + } + + public void AddRange(ICollection items) + { + EnsureElementsFit(items.Count); + Data.AddRange(items); + } + + public void AddRange(Span items) + { + EnsureElementsFit(items.Length); + for (int i = 0; i < items.Length; i++) + { + Data.Add(items[i]); } - return false; } public void Update(DeviceContext context) { - for (int i = 0; i < CurrentCount; i++) - { - DataArray[i] = Data[i]; - } + Data.CopyTo(DataArray); var dataBox = context.MapSubresource(Buffer, 0, MapMode.WriteDiscard, MapFlags.None); Utilities.Write(dataBox.DataPointer, DataArray, 0, CurrentCount); context.UnmapSubresource(Buffer, 0); @@ -208,7 +234,7 @@ namespace CodeWalker.Rendering } - public class GpuBuffer where T : struct //Dynamic GPU buffer of items updated by compute shader + public class GpuBuffer : IDisposable where T : struct //Dynamic GPU buffer of items updated by compute shader { public int StructSize; public int StructCount; @@ -232,41 +258,38 @@ namespace CodeWalker.Rendering } public void Dispose() { - if (UAV != null) - { - UAV.Dispose(); - UAV = null; - } - if (SRV != null) - { - SRV.Dispose(); - SRV = null; - } - if (Buffer != null) - { - Buffer.Dispose(); - Buffer = null; - } + UAV.Dispose(); + SRV.Dispose(); + Buffer.Dispose(); + + GC.SuppressFinalize(this); + } + + ~GpuBuffer() + { + Console.WriteLine("Finalizing GpuBuffer"); + Dispose(); } } - public class GpuTexture //texture and render targets (depth, MS). + public class GpuTexture : IDisposable //texture and render targets (depth, MS). { public Texture2D Texture; - public Texture2D TextureMS; - public Texture2D Depth; - public Texture2D DepthMS; + public Texture2D? TextureMS; + public Texture2D? Depth; + public Texture2D? DepthMS; public RenderTargetView RTV; - public DepthStencilView DSV; - public RenderTargetView MSRTV; - public DepthStencilView MSDSV; + public DepthStencilView? DSV; + public RenderTargetView? MSRTV; + public DepthStencilView? MSDSV; public ShaderResourceView SRV; //public ShaderResourceView DepthSRV; //possibly causing crash on DX10 hardware when multisampled public int VramUsage; public bool Multisampled; public bool UseDepth; + [MemberNotNull(nameof(Texture), nameof(RTV), nameof(SRV))] public void Init(Device device, int w, int h, Format f, int sc, int sq, bool depth, Format df) { VramUsage = 0; @@ -281,7 +304,6 @@ namespace CodeWalker.Rendering BindFlags db = BindFlags.DepthStencil;// | BindFlags.ShaderResource;// D3D11_BIND_DEPTH_STENCIL; DepthStencilViewDimension dsvd = DepthStencilViewDimension.Texture2D; Format dtexf = GetDepthTexFormat(df); - Format dsrvf = GetDepthSrvFormat(df); Texture = DXUtility.CreateTexture2D(device, w, h, 1, 1, f, 1, 0, u, b, 0, 0); RTV = DXUtility.CreateRenderTargetView(device, Texture, f, rtvd, 0, 0, 0); @@ -320,52 +342,24 @@ namespace CodeWalker.Rendering } public void Dispose() { - if (SRV != null) - { - SRV.Dispose(); - SRV = null; - } - if (MSDSV != null) - { - MSDSV.Dispose(); - MSDSV = null; - } - if (MSRTV != null) - { - MSRTV.Dispose(); - MSRTV = null; - } - if (DSV != null) - { - DSV.Dispose(); - DSV = null; - } - if (RTV != null) - { - RTV.Dispose(); - RTV = null; - } - if (DepthMS != null) - { - DepthMS.Dispose(); - DepthMS = null; - } - if (Depth != null) - { - Depth.Dispose(); - Depth = null; - } - if (TextureMS != null) - { - TextureMS.Dispose(); - TextureMS = null; - } - if (Texture != null) - { - Texture.Dispose(); - Texture = null; - } + SRV.Dispose(); + MSDSV?.Dispose(); + MSRTV?.Dispose(); + DSV?.Dispose(); + RTV.Dispose(); + DepthMS?.Dispose(); + Depth?.Dispose(); + TextureMS?.Dispose(); + Texture.Dispose(); + GC.SuppressFinalize(this); } + + ~GpuTexture() + { + Console.WriteLine("Finalizer called on GpuTexture"); + Dispose(); + } + public GpuTexture(Device device, int w, int h, Format f, int sc, int sq, bool depth, Format df) { Init(device, w, h, f, sc, sq, depth, df); @@ -473,20 +467,21 @@ namespace CodeWalker.Rendering } - public class GpuMultiTexture //multiple texture and render targets (depth). + public class GpuMultiTexture : IDisposable //multiple texture and render targets (depth). { public Texture2D[] Textures; - public Texture2D Depth; + public Texture2D? Depth; public RenderTargetView[] RTVs; - public DepthStencilView DSV; + public DepthStencilView? DSV; public ShaderResourceView[] SRVs; - public ShaderResourceView DepthSRV; + public ShaderResourceView? DepthSRV; public int VramUsage; public bool UseDepth; public int Count; public bool Multisampled; public int MultisampleCount; + [MemberNotNull(nameof(Textures), nameof(RTVs), nameof(SRVs))] public void Init(Device device, int w, int h, int count, Format f, bool depth, Format df, int multisamplecount) { Count = count; @@ -539,26 +534,23 @@ namespace CodeWalker.Rendering RTVs[i].Dispose(); Textures[i].Dispose(); } - SRVs = null; - RTVs = null; - Textures = null; + SRVs = Array.Empty(); + RTVs = Array.Empty(); + Textures = Array.Empty(); + Count = 0; - if (DSV != null) - { - DSV.Dispose(); - DSV = null; - } - if (DepthSRV != null) - { - DepthSRV.Dispose(); - DepthSRV = null; - } - if (Depth != null) - { - Depth.Dispose(); - Depth = null; - } + DSV?.Dispose(); + DepthSRV?.Dispose(); + Depth?.Dispose(); + GC.SuppressFinalize(this); } + + ~GpuMultiTexture() + { + Console.WriteLine("Finalizer called on GpuBuffers"); + Dispose(); + } + public GpuMultiTexture(Device device, int w, int h, int count, Format f, bool depth, Format df, int msc = 1) { Init(device, w, h, count, f, depth, df, msc); @@ -582,7 +574,8 @@ namespace CodeWalker.Rendering public void ClearDepth(DeviceContext context) { - if (!UseDepth) return; + if (!UseDepth) + return; context.ClearDepthStencilView(DSV, DepthStencilClearFlags.Depth, 0.0f, 0); } diff --git a/CodeWalker/Rendering/Utils/ShaderExtensions.cs b/CodeWalker/Rendering/Utils/ShaderExtensions.cs new file mode 100644 index 0000000..44a91e0 --- /dev/null +++ b/CodeWalker/Rendering/Utils/ShaderExtensions.cs @@ -0,0 +1,57 @@ +using CodeWalker.Core.Utils; +using SharpDX.Direct3D11; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Rendering.Utils +{ + public static class ShaderExtensions + { + /// + /// Attempts to find the shaders folder in the directory tree + /// + /// + /// + public static string GetShaderFolder() + { + // Directory we're looking for. + var dirToFind = Path.Combine("Shaders"); + + + if (!FileUtils.TryFindFolder(dirToFind, out var folder)) + { + throw new FileNotFoundException($"Could not find '{dirToFind}' directory."); + } + else + { + Console.WriteLine(folder); + return folder; + } + } + + public static PixelShader CreatePixelShader(this Device device, string filename) + { + var file = Path.Combine(GetShaderFolder(), filename); + + byte[] shaderBytes = File.ReadAllBytes(file); + + var shader = new PixelShader(device, shaderBytes); + shader.DebugName = filename; + return shader; + } + + public static VertexShader CreateVertexShader(this Device device, string filename) + { + var file = Path.Combine(GetShaderFolder(), filename); + + byte[] shaderBytes = File.ReadAllBytes(file); + var shader = new VertexShader(device, shaderBytes); + shader.DebugName = filename; + return shader; + } + } +} diff --git a/CodeWalker/Rendering/Utils/Shadowmap.cs b/CodeWalker/Rendering/Utils/Shadowmap.cs index 89d1dbc..d140f7e 100644 --- a/CodeWalker/Rendering/Utils/Shadowmap.cs +++ b/CodeWalker/Rendering/Utils/Shadowmap.cs @@ -16,7 +16,7 @@ using CodeWalker.Properties; namespace CodeWalker.Rendering { - public class Shadowmap + public class Shadowmap : IDisposable { Texture2D DepthTexture; SamplerState DepthTextureSS; @@ -880,7 +880,7 @@ namespace CodeWalker.Rendering case 15: V15 = v; break; } } - public Vector4 Get(int index) + public readonly Vector4 Get(int index) { switch (index) { @@ -943,7 +943,7 @@ namespace CodeWalker.Rendering public Vector4 pt2; public bool culled; - public Vector4 pt(int i) + public readonly Vector4 pt(int i) { switch (i) { diff --git a/CodeWalker/Rendering/Utils/UnitCylinder.cs b/CodeWalker/Rendering/Utils/UnitCylinder.cs index 4e5aa71..1f4ce87 100644 --- a/CodeWalker/Rendering/Utils/UnitCylinder.cs +++ b/CodeWalker/Rendering/Utils/UnitCylinder.cs @@ -9,6 +9,7 @@ using SharpDX.Direct3D11; using Device = SharpDX.Direct3D11.Device; using Buffer = SharpDX.Direct3D11.Buffer; using SharpDX.DXGI; +using Collections.Pooled; namespace CodeWalker.Rendering { @@ -20,17 +21,11 @@ namespace CodeWalker.Rendering private VertexBufferBinding vbbinding; private int indexcount; - private struct SphTri + private readonly struct SphTri(int i1, int i2, int i3) { - public int v1; - public int v2; - public int v3; - public SphTri(int i1, int i2, int i3) - { - v1 = i1; - v2 = i2; - v3 = i3; - } + public readonly int v1 = i1; + public readonly int v2 = i2; + public readonly int v3 = i3; } public UnitCylinder(Device device, byte[] vsbytes, int detail) @@ -44,9 +39,9 @@ namespace CodeWalker.Rendering - List verts = new List(); + using var verts = new PooledList(); Dictionary vdict = new Dictionary(); - List curtris = new List(); + using var curtris = new PooledList(); //List nxttris = new List(); verts.Add(new Vector4(0.0f, 0.0f, 0.0f, 0.0f));//top end (translated by VS!) @@ -108,8 +103,8 @@ namespace CodeWalker.Rendering - List idata = new List(); - foreach (var tri in curtris) + using var idata = new PooledList(); + foreach (ref var tri in curtris.Span) { idata.Add((uint)tri.v1); idata.Add((uint)tri.v2); diff --git a/CodeWalker/Rendering/Utils/UnitSphere.cs b/CodeWalker/Rendering/Utils/UnitSphere.cs index 9f180cc..123308f 100644 --- a/CodeWalker/Rendering/Utils/UnitSphere.cs +++ b/CodeWalker/Rendering/Utils/UnitSphere.cs @@ -9,6 +9,8 @@ using SharpDX.Direct3D11; using Device = SharpDX.Direct3D11.Device; using Buffer = SharpDX.Direct3D11.Buffer; using SharpDX.DXGI; +using System.Runtime.CompilerServices; +using Collections.Pooled; namespace CodeWalker.Rendering { @@ -20,20 +22,14 @@ namespace CodeWalker.Rendering private VertexBufferBinding vbbinding; private int indexcount; - private struct SphTri + private readonly struct SphTri(int i1, int i2, int i3) { - public int v1; - public int v2; - public int v3; - public SphTri(int i1,int i2, int i3) - { - v1 = i1; - v2 = i2; - v3 = i3; - } + public readonly int v1 = i1; + public readonly int v2 = i2; + public readonly int v3 = i3; } - public UnitSphere(Device device, byte[] vsbytes, int detail, bool invert = false) + public UnitSphere(Device device, byte[] vsbytes, int detail, bool invert = false, [CallerMemberName] string caller = "") { InputLayout = new InputLayout(device, vsbytes, new[] @@ -41,13 +37,14 @@ namespace CodeWalker.Rendering new InputElement("POSITION", 0, Format.R32G32B32A32_Float, 0, 0), //new InputElement("NORMAL", 0, Format.R32G32B32A32_Float, 16, 0), }); + InputLayout.DebugName = caller; - List verts = new List(); + using var verts = new PooledList(); Dictionary vdict = new Dictionary(); - List curtris = new List(); - List nxttris = new List(); + var curtris = new PooledList(); + var nxttris = new PooledList(); verts.Add(new Vector3(-1.0f, 0.0f, 0.0f)); verts.Add(new Vector3(1.0f, 0.0f, 0.0f)); @@ -111,13 +108,13 @@ namespace CodeWalker.Rendering } - List vdata = new List(); + using var vdata = new PooledList(); foreach (var vert in verts) { vdata.Add(new Vector4(vert, 1.0f)); } - List idata = new List(); + using var idata = new PooledList(); foreach (var tri in curtris) { idata.Add((uint)tri.v1); @@ -125,9 +122,11 @@ namespace CodeWalker.Rendering idata.Add((uint)(invert ? tri.v2 : tri.v3)); } + curtris.Dispose(); + nxttris.Dispose(); VertexBuffer = Buffer.Create(device, BindFlags.VertexBuffer, vdata.ToArray()); - vbbinding = new VertexBufferBinding(VertexBuffer, 8, 0); + vbbinding = new VertexBufferBinding(VertexBuffer, 16, 0); IndexBuffer = Buffer.Create(device, BindFlags.IndexBuffer, idata.ToArray()); indexcount = idata.Count; diff --git a/CodeWalker/Rendering/VertexTypes.cs b/CodeWalker/Rendering/VertexTypes.cs index 8460107..2f5bcf7 100644 --- a/CodeWalker/Rendering/VertexTypes.cs +++ b/CodeWalker/Rendering/VertexTypes.cs @@ -53,7 +53,7 @@ namespace CodeWalker.Rendering public static InputElement[] GetLayout(VertexType componentsFlags, VertexDeclarationTypes componentsTypes = VertexDeclarationTypes.GTAV1) { - List inputElements = new List(); + List inputElements = new List(16); var types = (ulong)componentsTypes; var flags = (uint)componentsFlags; diff --git a/CodeWalker/Settings.cs b/CodeWalker/Settings.cs index 41aa4ed..d70b3e3 100644 --- a/CodeWalker/Settings.cs +++ b/CodeWalker/Settings.cs @@ -1,4 +1,7 @@ -namespace CodeWalker.Properties { +using System; +using System.Configuration; + +namespace CodeWalker.Properties { // This class allows you to handle specific events on the settings class: @@ -25,4 +28,10 @@ // Add code to handle the SettingsSaving event here. } } + + public partial class CustomSettingsProvider : LocalFileSettingsProvider + { + private string applicationName = "CodeWalker"; + public override string ApplicationName { get => applicationName; set { } } + } } diff --git a/CodeWalker/Tools/AudioExplorerForm.cs b/CodeWalker/Tools/AudioExplorerForm.cs index 0392b15..9b49fd1 100644 --- a/CodeWalker/Tools/AudioExplorerForm.cs +++ b/CodeWalker/Tools/AudioExplorerForm.cs @@ -29,7 +29,8 @@ namespace CodeWalker.Tools private void LoadDropDowns() { - if (!GameFileCache.IsInited) return; + if (!GameFileCache.IsInited) + return; NameComboLookup.Clear(); NameComboBox.Items.Clear(); @@ -64,14 +65,22 @@ namespace CodeWalker.Tools var str = filetype + " : " + item.ToString(); TypeComboBox.Items.Add(str); } - foreach (var e in Enum.GetValues(typeof(Dat4ConfigType))) addTypeItem("Config", e); - foreach (var e in Enum.GetValues(typeof(Dat4SpeechType))) addTypeItem("Speech", e); - foreach (var e in Enum.GetValues(typeof(Dat10RelType))) addTypeItem("Synths", e); - foreach (var e in Enum.GetValues(typeof(Dat15RelType))) addTypeItem("Mixers", e); - foreach (var e in Enum.GetValues(typeof(Dat16RelType))) addTypeItem("Curves", e); - foreach (var e in Enum.GetValues(typeof(Dat22RelType))) addTypeItem("Categories", e); - foreach (var e in Enum.GetValues(typeof(Dat54SoundType))) addTypeItem("Sounds", e); - foreach (var e in Enum.GetValues(typeof(Dat151RelType))) addTypeItem("Game", e); + foreach (var e in Enum.GetValues(typeof(Dat4ConfigType))) + addTypeItem("Config", e); + foreach (var e in Enum.GetValues(typeof(Dat4SpeechType))) + addTypeItem("Speech", e); + foreach (var e in Enum.GetValues(typeof(Dat10RelType))) + addTypeItem("Synths", e); + foreach (var e in Enum.GetValues(typeof(Dat15RelType))) + addTypeItem("Mixers", e); + foreach (var e in Enum.GetValues(typeof(Dat16RelType))) + addTypeItem("Curves", e); + foreach (var e in Enum.GetValues(typeof(Dat22RelType))) + addTypeItem("Categories", e); + foreach (var e in Enum.GetValues(typeof(Dat54SoundType))) + addTypeItem("Sounds", e); + foreach (var e in Enum.GetValues(typeof(Dat151RelType))) + addTypeItem("Game", e); TypeComboBox.SelectedIndex = 0; @@ -127,12 +136,16 @@ namespace CodeWalker.Tools private string GetRelDataTitleString(RelData item) { - if (item == null) return ""; + if (item is null) + return ""; var h = item.NameHash; var str = JenkIndex.TryGetString(h); - if (string.IsNullOrEmpty(str)) str = GlobalText.TryGetString(h);//is this necessary? - if (string.IsNullOrEmpty(str)) MetaNames.TryGetString(h, out str); - if (string.IsNullOrEmpty(str)) str = h.Hex; + if (string.IsNullOrEmpty(str)) + str = GlobalText.TryGetString(h);//is this necessary? + if (string.IsNullOrEmpty(str)) + MetaNames.TryGetString(h, out str); + if (string.IsNullOrEmpty(str)) + str = h.Hex; var typeid = item.TypeID.ToString(); var rel = item.Rel; if (rel != null) @@ -172,90 +185,104 @@ namespace CodeWalker.Tools private IEnumerable GetUniqueHashes(MetaHash[] hashes, RelData item) { - return hashes?.Distinct()?.Where(h => h != item.NameHash); //try avoid infinite loops... + return hashes?.Distinct()?.Where(h => h != item.NameHash) ?? []; //try avoid infinite loops... } - private void LoadItemHierarchy(RelData item, TreeNode parentNode = null) + private void LoadItemHierarchy(RelData? item, TreeNode? parentNode = null) { TreeNode node; if (parentNode == null) { HierarchyTreeView.Nodes.Clear(); - if (item == null) return; + if (item is null) + return; node = HierarchyTreeView.Nodes.Add(GetRelDataTitleString(item)); } else { - if (item == null) return; + if (item is null) + return; node = parentNode.Nodes.Add(GetRelDataTitleString(item)); } node.Tag = item; - if ((item is Dat22Category) && (parentNode != null) && (!(parentNode.Tag is Dat22Category))) //don't bother expanding out categories, too spammy! + if (item is Dat22Category && parentNode != null && parentNode.Tag is not Dat22Category) //don't bother expanding out categories, too spammy! { return; } - var speech = GetUniqueHashes(item.GetSpeechHashes(), item); - var synths = GetUniqueHashes(item.GetSynthHashes(), item); - var mixers = GetUniqueHashes(item.GetMixerHashes(), item); - var curves = GetUniqueHashes(item.GetCurveHashes(), item); - var categs = GetUniqueHashes(item.GetCategoryHashes(), item); - var sounds = GetUniqueHashes(item.GetSoundHashes(), item); - var games = GetUniqueHashes(item.GetGameHashes(), item); + var speech = item.GetSpeechHashes(); + if (speech.Length > 0) + { + foreach (var h in GetUniqueHashes(speech, item)) + { + if (GameFileCache.AudioSpeechDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); + } + } - if (speech != null) + var synths = item.GetSynthHashes(); + if (synths.Length > 0) { - foreach (var h in speech) + foreach (var h in GetUniqueHashes(synths, item)) { - if (GameFileCache.AudioSpeechDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioSynthsDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } - if (synths != null) + + var mixers = item.GetMixerHashes(); + if (mixers.Length > 0) { - foreach (var h in synths) + foreach (var h in GetUniqueHashes(mixers, item)) { - if (GameFileCache.AudioSynthsDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioMixersDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } - if (mixers != null) + + var curves = item.GetCurveHashes(); + if (curves.Length > 0) { - foreach (var h in mixers) + foreach (var h in GetUniqueHashes(curves, item)) { - if (GameFileCache.AudioMixersDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioCurvesDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } - if (curves != null) + + var categs = item.GetCategoryHashes(); + if (categs.Length > 0) { - foreach (var h in curves) + foreach (var h in GetUniqueHashes(categs, item)) { - if (GameFileCache.AudioCurvesDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioCategsDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } - if (categs != null) + + var sounds = item.GetSoundHashes(); + if (sounds.Length > 0) { - foreach (var h in categs) + foreach (var h in GetUniqueHashes(sounds, item)) { - if (GameFileCache.AudioCategsDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioSoundsDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } - if (sounds != null) + + var games = item.GetGameHashes(); + if (games.Length > 0) { - foreach (var h in sounds) + foreach (var h in GetUniqueHashes(games, item)) { - if (GameFileCache.AudioSoundsDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); - } - } - if (games != null) - { - foreach (var h in games) - { - if (GameFileCache.AudioGameDict.TryGetValue(h, out RelData child)) LoadItemHierarchy(child, node); + if (GameFileCache.AudioGameDict.TryGetValue(h, out RelData child)) + LoadItemHierarchy(child, node); } } diff --git a/CodeWalker/Tools/BinarySearchForm.cs b/CodeWalker/Tools/BinarySearchForm.cs index daaa10a..4bfe8ed 100644 --- a/CodeWalker/Tools/BinarySearchForm.cs +++ b/CodeWalker/Tools/BinarySearchForm.cs @@ -60,14 +60,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateStatus(text); })); + Invoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void RPFScanComplete() { @@ -75,15 +77,17 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { RPFScanComplete(); })); + Invoke(RPFScanComplete); } else { - StatusLabel.Text = "Ready"; + UpdateStatus("Ready"); //RpfSearchPanel.Enabled = true; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -226,14 +230,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { FileSearchAddResult(result); })); + Invoke(FileSearchAddResult, result); } else { FileSearchResultsTextBox.AppendText(result + "\r\n"); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void FileSearchComplete() @@ -242,14 +248,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { FileSearchComplete(); })); + Invoke(FileSearchComplete); } else { FileSearchPanel.Enabled = true; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void FileSearchAbortButton_Click(object sender, EventArgs e) @@ -301,7 +309,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { RpfSearchAddResult(result); })); + Invoke(RpfSearchAddResult, result); } else { @@ -309,7 +317,9 @@ namespace CodeWalker.Tools RpfSearchResultsListView.VirtualListSize = RpfSearchResults.Count; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void RpfSearch() @@ -432,8 +442,7 @@ namespace CodeWalker.Tools return; } - RpfFileEntry fentry = entry as RpfFileEntry; - if (fentry == null) continue; + if (entry is not RpfFileEntry fentry) continue; curfile++; @@ -518,7 +527,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { RpfSearchComplete(); })); + Invoke(RpfSearchComplete); } else { @@ -533,7 +542,9 @@ namespace CodeWalker.Tools RpfSearchSaveResultsButton.Enabled = true; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void RpfSearchButton_Click(object sender, EventArgs e) @@ -640,11 +651,9 @@ namespace CodeWalker.Tools RpfSelectedOffset = offset; RpfSelectedLength = length; - RpfFileEntry rfe = entry as RpfFileEntry; - if (rfe == null) + if (entry is not RpfFileEntry rfe) { - RpfDirectoryEntry rde = entry as RpfDirectoryEntry; - if (rde != null) + if (entry is RpfDirectoryEntry rde) { FileInfoLabel.Text = rde.Path + " (Directory)"; DataTextBox.Text = "[Please select a data file]"; @@ -847,16 +856,16 @@ namespace CodeWalker.Tools int poslim = pos + charsperln; hexb.Clear(); texb.Clear(); - hexb.AppendFormat("{0:X4}: ", pos); + hexb.Append($"{pos:X4}: "); for (int c = pos; c < poslim; c++) { if (c < data.Length) { byte b = data[c]; - hexb.AppendFormat("{0:X2} ", b); + hexb.Append($"{b:X2} "); if (char.IsControl((char)b)) { - texb.Append("."); + texb.Append('.'); } else { @@ -866,13 +875,13 @@ namespace CodeWalker.Tools else { hexb.Append(" "); - texb.Append(" "); + texb.Append(' '); } } if (i == selline) selstartc = finb.Length; - finb.AppendLine(hexb.ToString() + "| " + texb.ToString()); + finb.AppendLine($"{hexb}| {texb}"); if (i == selline) selendc = finb.Length - 1; } @@ -912,8 +921,7 @@ namespace CodeWalker.Tools return; } - RpfFileEntry rfe = RpfSelectedEntry as RpfFileEntry; - if (rfe == null) + if (RpfSelectedEntry is not RpfFileEntry rfe) { MessageBox.Show("Please select a file to export."); return; @@ -933,13 +941,12 @@ namespace CodeWalker.Tools } - RpfResourceFileEntry rrfe = rfe as RpfResourceFileEntry; - if (rrfe != null) //add resource header if this is a resource file. + if (rfe is RpfResourceFileEntry rrfe) //add resource header if this is a resource file. { data = ResourceBuilder.AddResourceHeader(rrfe, data); } - if (data == null) + if (data is null) { MessageBox.Show("Error extracting file! " + rfe.File.LastError); return; diff --git a/CodeWalker/Tools/BrowseForm.cs b/CodeWalker/Tools/BrowseForm.cs index bd737db..83a2994 100644 --- a/CodeWalker/Tools/BrowseForm.cs +++ b/CodeWalker/Tools/BrowseForm.cs @@ -115,9 +115,9 @@ namespace CodeWalker.Tools MainTreeView.Nodes.Clear(); string searchpath = FolderTextBox.Text; - string replpath = searchpath + "\\"; + string replpath = $"{searchpath}\\"; - Task.Run(() => + _ = Task.Run(() => { UpdateStatus("Starting scan..."); @@ -137,16 +137,19 @@ namespace CodeWalker.Tools RpfFile rf = new RpfFile(rpfpath, rpfpath.Replace(replpath, "")); - UpdateStatus("Scanning " + rf.Name + "..."); + UpdateStatus($"Scanning {rf.Name}..."); - counts += rf.ScanStructure(UpdateStatus, UpdateStatus); + if (rf.ScanStructure(UpdateStatus, UpdateStatus, out var result)) + { + counts += result; + } AddScannedFile(rf, null, true); RootFiles.Add(rf); } - UpdateStatus(string.Format("Scan complete. {0} RPF files, {1} total files, {2} total folders, {3} resources, {4} binary files.", counts.Rpfs, counts.Files, counts.Folders, counts.Resources, counts.BinaryFiles)); + UpdateStatus($"Scan complete. {counts.Rpfs} RPF files, {counts.Files} total files, {counts.Folders} total folders, {counts.Resources} resources, {counts.BinaryFiles} binary files."); InProgress = false; TotalFileCount = (int)counts.Files; }); @@ -161,14 +164,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateStatus(text); })); + Invoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void ClearFiles() @@ -181,7 +186,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { AddScannedFile(file, node, addToList); })); + Invoke(AddScannedFile, file, node, addToList); } else { @@ -200,7 +205,9 @@ namespace CodeWalker.Tools } } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private TreeNode AddFileNode(RpfFile file, TreeNode n) { @@ -315,11 +322,9 @@ namespace CodeWalker.Tools SelectedOffset = offset; SelectedLength = length; - RpfFileEntry rfe = entry as RpfFileEntry; - if (rfe == null) + if (entry is not RpfFileEntry rfe) { - RpfDirectoryEntry rde = entry as RpfDirectoryEntry; - if (rde != null) + if (entry is RpfDirectoryEntry rde) { FileInfoLabel.Text = rde.Path + " (Directory)"; DataTextBox.Text = "[Please select a data file]"; @@ -528,16 +533,16 @@ namespace CodeWalker.Tools int poslim = pos + charsperln; hexb.Clear(); texb.Clear(); - hexb.AppendFormat("{0:X4}: ", pos); + hexb.Append($"{pos:X4}: "); for (int c = pos; c < poslim; c++) { if (c < data.Length) { byte b = data[c]; - hexb.AppendFormat("{0:X2} ", b); + hexb.Append($"{b:X2} "); if (char.IsControl((char)b)) { - texb.Append("."); + texb.Append('.'); } else { @@ -547,7 +552,7 @@ namespace CodeWalker.Tools else { hexb.Append(" "); - texb.Append(" "); + texb.Append(' '); } } @@ -722,7 +727,7 @@ namespace CodeWalker.Tools return; } - UpdateStatus(curfile.ToString() + "/" + totrpfs.ToString() + ": Testing " + file.FilePath + "..."); + UpdateStatus($"{curfile}/{totrpfs}: Testing {file.FilePath}..."); string errorstr = file.TestExtractAllFiles(); @@ -737,7 +742,7 @@ namespace CodeWalker.Tools } - UpdateStatus("Test complete. " + errcount.ToString() + " problems encountered"); + UpdateStatus($"Test complete. {errcount} problems encountered"); InProgress = false; }); } @@ -747,7 +752,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { AddTestError(error); })); + Invoke(AddTestError, error); } else { @@ -755,7 +760,9 @@ namespace CodeWalker.Tools } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -867,8 +874,7 @@ namespace CodeWalker.Tools return; } - RpfFileEntry rfe = node.Tag as RpfFileEntry; - if (rfe == null) + if (node.Tag is not RpfFileEntry rfe) { MessageBox.Show("Please select a file to export."); return; @@ -888,8 +894,7 @@ namespace CodeWalker.Tools } - RpfResourceFileEntry rrfe = rfe as RpfResourceFileEntry; - if (rrfe != null) //add resource header if this is a resource file. + if (rfe is RpfResourceFileEntry rrfe) //add resource header if this is a resource file. { data = ResourceBuilder.AddResourceHeader(rrfe, data); } @@ -948,7 +953,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { AddSearchResult(result); })); + Invoke(AddSearchResult, result); } else { @@ -956,7 +961,9 @@ namespace CodeWalker.Tools SearchResultsListView.VirtualListSize = SearchResults.Count; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void Search() @@ -1068,8 +1075,7 @@ namespace CodeWalker.Tools return; } - RpfFileEntry fentry = entry as RpfFileEntry; - if (fentry == null) continue; + if (entry is not RpfFileEntry fentry) continue; curfile++; @@ -1139,7 +1145,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { SearchComplete(); })); + Invoke(SearchComplete); } else { @@ -1154,7 +1160,9 @@ namespace CodeWalker.Tools SearchSaveResultsButton.Enabled = true; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void SearchButton_Click(object sender, EventArgs e) { diff --git a/CodeWalker/Tools/ExtractKeysForm.cs b/CodeWalker/Tools/ExtractKeysForm.cs index 15c942c..15cf42a 100644 --- a/CodeWalker/Tools/ExtractKeysForm.cs +++ b/CodeWalker/Tools/ExtractKeysForm.cs @@ -69,14 +69,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateStatus(text); })); + Invoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void BeginButton_Click(object sender, EventArgs e) diff --git a/CodeWalker/Tools/ExtractRawForm.cs b/CodeWalker/Tools/ExtractRawForm.cs index a26cb7c..229dbc2 100644 --- a/CodeWalker/Tools/ExtractRawForm.cs +++ b/CodeWalker/Tools/ExtractRawForm.cs @@ -48,14 +48,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateExtractStatus(text); })); + Invoke(UpdateExtractStatus, text); } else { ExtractStatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void OutputFolderTextBox_TextChanged(object sender, EventArgs e) @@ -164,8 +166,7 @@ namespace CodeWalker.Tools data = ResourceBuilder.Compress(data); } - RpfResourceFileEntry rrfe = fentry as RpfResourceFileEntry; - if (rrfe != null) //add resource header if this is a resource file. + if (fentry is RpfResourceFileEntry rrfe) //add resource header if this is a resource file. { data = ResourceBuilder.AddResourceHeader(rrfe, data); } diff --git a/CodeWalker/Tools/ExtractScriptsForm.cs b/CodeWalker/Tools/ExtractScriptsForm.cs index 0cbf466..7197343 100644 --- a/CodeWalker/Tools/ExtractScriptsForm.cs +++ b/CodeWalker/Tools/ExtractScriptsForm.cs @@ -196,14 +196,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateDumpStatus(text); })); + Invoke(UpdateDumpStatus, text); } else { DumpStatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void UpdateExtractStatus(string text) @@ -212,14 +214,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateExtractStatus(text); })); + Invoke(UpdateExtractStatus, text); } else { ExtractStatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } } diff --git a/CodeWalker/Tools/ExtractShadersForm.cs b/CodeWalker/Tools/ExtractShadersForm.cs index a90683f..f825146 100644 --- a/CodeWalker/Tools/ExtractShadersForm.cs +++ b/CodeWalker/Tools/ExtractShadersForm.cs @@ -133,7 +133,7 @@ namespace CodeWalker.Tools if (entry.IsExtension(".fxc")) { UpdateExtractStatus(entry.Path); - FxcFile fxc = rpfman.GetFile(entry); + FxcFile fxc = RpfManager.GetFile(entry); if (fxc == null) throw new Exception("Couldn't load file."); string basepath = outputpath + "\\" + rpf.Name.Replace(".rpf", ""); @@ -215,7 +215,10 @@ namespace CodeWalker.Tools ExtractStatusLabel.Text = text; } } - catch { } + catch (Exception ex) + { + Console.WriteLine(ex); + } } } diff --git a/CodeWalker/Tools/ExtractTexForm.cs b/CodeWalker/Tools/ExtractTexForm.cs index 78f7f2b..ea9fefa 100644 --- a/CodeWalker/Tools/ExtractTexForm.cs +++ b/CodeWalker/Tools/ExtractTexForm.cs @@ -146,11 +146,11 @@ namespace CodeWalker.Tools if (bytd && entry.IsExtension(".ytd")) { UpdateExtractStatus(entry.Path); - YtdFile ytd = rpfman.GetFile(entry); - if (ytd == null) throw new Exception("Couldn't load file."); - if (ytd.TextureDict == null) throw new Exception("Couldn't load texture dictionary."); - if (ytd.TextureDict.Textures == null) throw new Exception("Couldn't load texture dictionary texture array."); - if (ytd.TextureDict.Textures.data_items == null) throw new Exception("Texture dictionary had no entries..."); + YtdFile ytd = RpfManager.GetFile(entry); + if (ytd is null) throw new Exception("Couldn't load file."); + if (ytd.TextureDict is null) throw new Exception("Couldn't load texture dictionary."); + if (ytd.TextureDict.Textures is null) throw new Exception("Couldn't load texture dictionary texture array."); + if (ytd.TextureDict.Textures.data_items is null) throw new Exception("Texture dictionary had no entries..."); foreach (var tex in ytd.TextureDict.Textures.data_items) { SaveTexture(tex, entry, outputpath); @@ -159,10 +159,10 @@ namespace CodeWalker.Tools else if (bydr && entry.IsExtension(".ydr")) { UpdateExtractStatus(entry.Path); - YdrFile ydr = rpfman.GetFile(entry); - if (ydr == null) throw new Exception("Couldn't load file."); - if (ydr.Drawable == null) throw new Exception("Couldn't load drawable."); - if (ydr.Drawable.ShaderGroup != null) + YdrFile ydr = RpfManager.GetFile(entry); + if (ydr is null) throw new Exception("Couldn't load file."); + if (ydr.Drawable is null) throw new Exception("Couldn't load drawable."); + if (ydr.Drawable.ShaderGroup is not null) { var ydrtd = ydr.Drawable.ShaderGroup.TextureDictionary; if ((ydrtd != null) && (ydrtd.Textures != null) && (ydrtd.Textures.data_items != null)) @@ -177,7 +177,7 @@ namespace CodeWalker.Tools else if (bydd && entry.IsExtension(".ydd")) { UpdateExtractStatus(entry.Path); - YddFile ydd = rpfman.GetFile(entry); + YddFile ydd = RpfManager.GetFile(entry); if (ydd == null) throw new Exception("Couldn't load file."); //if (ydd.DrawableDict == null) throw new Exception("Couldn't load drawable dictionary."); //if (ydd.DrawableDict.Drawables == null) throw new Exception("Drawable dictionary had no items..."); @@ -201,7 +201,7 @@ namespace CodeWalker.Tools else if (byft && entry.IsExtension(".yft")) { UpdateExtractStatus(entry.Path); - YftFile yft = rpfman.GetFile(entry); + YftFile yft = RpfManager.GetFile(entry); if (yft == null) throw new Exception("Couldn't load file."); if (yft.Fragment == null) throw new Exception("Couldn't load fragment."); if (yft.Fragment.Drawable != null) diff --git a/CodeWalker/Tools/ImportFbxForm.cs b/CodeWalker/Tools/ImportFbxForm.cs index aa0bb07..6035eb0 100644 --- a/CodeWalker/Tools/ImportFbxForm.cs +++ b/CodeWalker/Tools/ImportFbxForm.cs @@ -91,7 +91,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - BeginInvoke(new Action(() => { ConvertComplete(); })); + BeginInvoke(ConvertComplete); } else { @@ -100,7 +100,10 @@ namespace CodeWalker.Tools Close(); } } - catch { } + catch (Exception ex) + { + Console.WriteLine(ex); + } } public void UpdateStatus(string text) @@ -109,14 +112,17 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch (Exception ex) + { + Console.WriteLine(ex); + } } diff --git a/CodeWalker/Tools/JenkIndForm.cs b/CodeWalker/Tools/JenkIndForm.cs index 980aeed..dd92597 100644 --- a/CodeWalker/Tools/JenkIndForm.cs +++ b/CodeWalker/Tools/JenkIndForm.cs @@ -34,13 +34,13 @@ namespace CodeWalker.Tools if (!GameFileCache.IsInited) { - Task.Run(() => + Task.Run(async () => { try { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); GameFileCache.DoFullStringIndex = true; - GameFileCache.Init(UpdateStatus, UpdateStatus); + await GameFileCache.InitAsync(UpdateStatus, UpdateStatus); IndexBuildComplete(); } catch (Exception ex) @@ -80,14 +80,16 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { UpdateStatus(text); })); + Invoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void IndexBuildComplete() { @@ -95,7 +97,7 @@ namespace CodeWalker.Tools { if (InvokeRequired) { - Invoke(new Action(() => { IndexBuildComplete(); })); + Invoke(IndexBuildComplete); } else { @@ -104,7 +106,9 @@ namespace CodeWalker.Tools Cursor = Cursors.Default; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -149,7 +153,7 @@ namespace CodeWalker.Tools return; } } - StatusLabel.Text = Convert.ToString(hash, 16).ToUpper().PadLeft(8, '0'); + StatusLabel.Text = hash.ToString("X8"); var str = JenkIndex.TryGetString(hash); diff --git a/CodeWalker/Utils/AudioUtils.cs b/CodeWalker/Utils/AudioUtils.cs index 14b96f9..290b5ba 100644 --- a/CodeWalker/Utils/AudioUtils.cs +++ b/CodeWalker/Utils/AudioUtils.cs @@ -28,7 +28,7 @@ namespace CodeWalker.Utils public float[] outputMatrix = new[] { 1.0f, 1.0f }; //left/right channel output levels public float trackLength; } - private AudioVoice[] voices = new AudioVoice[0]; + private AudioVoice[] voices = Array.Empty(); public enum PlayerState { Stopped, Playing, Paused }; public PlayerState State { get; private set; } = PlayerState.Stopped; @@ -282,7 +282,6 @@ namespace CodeWalker.Utils var awcentries = new Dictionary(); void addRpfDatRels(RpfFile rpffile) { - if (rpffile.AllEntries == null) return; foreach (var entry in rpffile.AllEntries) { if (entry is RpfFileEntry) @@ -305,7 +304,6 @@ namespace CodeWalker.Utils } void addRpfAwcs(RpfFile rpffile) { - if (rpffile.AllEntries == null) return; foreach (var entry in rpffile.AllEntries) { if (entry is RpfFileEntry) @@ -314,17 +312,21 @@ namespace CodeWalker.Utils if (entry.IsExtension(".awc")) { var shortname = entry.ShortName; - var parentname = entry.Parent?.ShortName ?? ""; - if (string.IsNullOrEmpty(parentname) && (entry.Parent?.File != null)) + var parentname = ReadOnlySpan.Empty; + if (entry.Parent is not null) + { + parentname = entry.Parent.ShortName; + } + if (parentname.IsEmpty && (entry.Parent?.File != null)) { parentname = entry.Parent.File.Name; int ind = parentname.LastIndexOf('.'); if (ind > 0) { - parentname = parentname.Substring(0, ind); + parentname = parentname.Slice(0, ind); } } - var contname = parentname + "/" + shortname; + var contname = parentname.ToString() + "/" + shortname.ToString(); var hash = JenkHash.GenHashLower(contname); awcentries[hash] = fentry; } @@ -350,6 +352,8 @@ namespace CodeWalker.Utils } foreach (var dlcrpf in gameFileCache.DlcActiveRpfs) //load from current dlc rpfs { + if (dlcrpf.AllEntries is null || dlcrpf.AllEntries.Count == 0) + continue; addRpfDatRels(dlcrpf); addRpfAwcs(dlcrpf); } @@ -361,7 +365,7 @@ namespace CodeWalker.Utils var gamedb = new Dictionary(); foreach (var datentry in datrelentries.Values) { - var relfile = rpfman.GetFile(datentry); + var relfile = RpfManager.GetFile(datentry); if (relfile?.RelDatas != null) { foreach (var rd in relfile.RelDatas) diff --git a/CodeWalker/Utils/ConsoleWindow.cs b/CodeWalker/Utils/ConsoleWindow.cs index b24fb1b..79c5e9b 100644 --- a/CodeWalker/Utils/ConsoleWindow.cs +++ b/CodeWalker/Utils/ConsoleWindow.cs @@ -94,7 +94,7 @@ namespace CodeWalker.Utils public class ConsoleStream : TextWriter { - private readonly List _writers; + private readonly List _writers; public ConsoleStream(params TextWriter[] streams) { @@ -116,15 +116,19 @@ namespace CodeWalker.Utils public override void Write(char ch) { + var checkNull = false; for (int i = 0; i < _writers.Count; i++) { + var writer = _writers[i]; + if (writer is null) + continue; try { - _writers[i].Write(ch); + writer.Write(ch); } catch (ObjectDisposedException) { - _writers.Remove(_writers[i]); + _writers[i] = null; // handle exception here } catch (IOException) @@ -132,13 +136,18 @@ namespace CodeWalker.Utils // handle exception here } } + + if (checkNull) + { + _writers.RemoveAll(p => p is null); + } } public override void Write(string value) { foreach (var writer in _writers) { - writer.Write(value); + writer?.Write(value); } } @@ -150,16 +159,20 @@ namespace CodeWalker.Utils public override void WriteLine(string value) { + var checkNull = false; for (int i = 0; i < _writers.Count; i++) { + var writer = _writers[i]; + if (writer is null) + continue; try { - _writers[i].WriteLine(value); - _writers[i].Flush(); + writer.WriteLine(value); + writer.Flush(); } catch (ObjectDisposedException) { - _writers.Remove(_writers[i]); + _writers[i] = null; // handle exception here } catch (IOException) @@ -167,20 +180,29 @@ namespace CodeWalker.Utils // handle exception here } } + if (checkNull) + { + _writers.RemoveAll(p => p is null); + } } public override void WriteLine(object value) { + var checkNull = false; for (int i = 0; i < _writers.Count; i++) { + var writer = _writers[i]; + if (writer is null) + continue; try { - _writers[i].WriteLine(value); - _writers[i].Flush(); + writer.WriteLine(value); + writer.Flush(); } catch (ObjectDisposedException) { - _writers.Remove(_writers[i]); + checkNull = true; + _writers[i] = null; // handle exception here } catch (IOException) @@ -188,6 +210,11 @@ namespace CodeWalker.Utils // handle exception here } } + + if (checkNull) + { + _writers.RemoveAll(p => p is null); + } } public override void Close() @@ -195,7 +222,7 @@ namespace CodeWalker.Utils base.Close(); foreach(var writer in _writers) { - writer.Close(); + writer?.Close(); } _writers.Clear(); } diff --git a/CodeWalker/Utils/GTAFolder.cs b/CodeWalker/Utils/GTAFolder.cs index c01d881..cba44b2 100644 --- a/CodeWalker/Utils/GTAFolder.cs +++ b/CodeWalker/Utils/GTAFolder.cs @@ -107,13 +107,14 @@ namespace CodeWalker CurrentGTAFolder = folder; Settings.Default.GTAFolder = folder; Settings.Default.Save(); + Settings.Default.Reload(); return true; } return false; } - public static string GetCurrentGTAFolderWithTrailingSlash() =>CurrentGTAFolder.EndsWith(@"\") ? CurrentGTAFolder : CurrentGTAFolder + @"\"; + public static string GetCurrentGTAFolderWithTrailingSlash() =>CurrentGTAFolder.EndsWith('\\') ? CurrentGTAFolder : CurrentGTAFolder + '\\'; public static bool AutoDetectFolder(out Dictionary matches) { diff --git a/CodeWalker/Utils/MapUtils.cs b/CodeWalker/Utils/MapUtils.cs index 5570f12..334afda 100644 --- a/CodeWalker/Utils/MapUtils.cs +++ b/CodeWalker/Utils/MapUtils.cs @@ -146,17 +146,38 @@ namespace CodeWalker public struct MapSphere { - public Vector3 CamRelPos { get; set; } - public float Radius { get; set; } + public MapSphere() + { } + + public MapSphere(Vector3 camRelPos, float radius) + { + CamRelPos = camRelPos; + Radius = radius; + } + + public Vector3 CamRelPos; + public float Radius; } public struct MapBox { - public Vector3 CamRelPos { get; set; } - public Vector3 BBMin { get; set; } - public Vector3 BBMax { get; set; } - public Quaternion Orientation { get; set; } - public Vector3 Scale { get; set; } + public MapBox() + { } + + public MapBox(Vector3 camRelPos, Vector3 bbMin, Vector3 bbMax, Quaternion orientation, Vector3 scale) + { + CamRelPos = camRelPos; + BBMin = bbMin; + BBMax = bbMax; + Orientation = orientation; + Scale = scale; + } + + public Vector3 CamRelPos; + public Vector3 BBMin; + public Vector3 BBMax; + public Quaternion Orientation; + public Vector3 Scale; } diff --git a/CodeWalker/Utils/NamedPipe.cs b/CodeWalker/Utils/NamedPipe.cs index dd91370..5155b2e 100644 --- a/CodeWalker/Utils/NamedPipe.cs +++ b/CodeWalker/Utils/NamedPipe.cs @@ -5,6 +5,7 @@ using System.IO; using System.IO.Pipes; using System.Linq; using System.Text; +using System.Threading.Tasks; using System.Windows.Forms; namespace CodeWalker.Core.Utils @@ -18,12 +19,13 @@ namespace CodeWalker.Core.Utils this.form = form; } - public async void Init() + public void Init() { try { using var client = new NamedPipeClientStream("codewalker"); - client.Connect(100); + client.Connect(0); + client.Dispose(); return; } catch (Exception ex) @@ -41,61 +43,91 @@ namespace CodeWalker.Core.Utils public async void StartServer() { - var server = new NamedPipeServerStream("codewalker", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances); - - var buffer = new byte[1024]; - - while (true) + try { - try + await Task.Run(async () => { - await server.WaitForConnectionAsync(); - var read = await server.ReadAsync(buffer.AsMemory()); - if (read > 0) + var server = new NamedPipeServerStream("codewalker", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances); + + var buffer = new byte[1024]; + + while (true) { - var message = Encoding.UTF8.GetString(buffer, 0, read); - - Console.WriteLine(message); - - var args = message.Split(' '); - if (args[0] == "explorer") + try { - form.BeginInvoke(() => + await Task.Delay(50); + await server.WaitForConnectionAsync(); + var read = await server.ReadAsync(buffer.AsMemory()); + if (read > 0) { - var f = new ExploreForm(); - f.Load += (sender, args) => + var message = Encoding.UTF8.GetString(buffer, 0, read); + + Console.WriteLine(message); + + var args = message.Split(' '); + + switch (args[0]) { - f.WindowState = FormWindowState.Normal; - f.Activate(); - }; + case "explorer": + form.BeginInvoke(() => + { + var f = new ExploreForm(); + f.Load += (sender, args) => + { + f.WindowState = FormWindowState.Normal; + f.Activate(); + }; - f.Show(); - }); - } else if (args[0] == "open-file") - { - try - { - var form = OpenAnyFile.OpenFilePath(string.Join(" ", args.AsSpan(1).ToArray())); - form.Show(); - form.Activate(); - } - catch(NotImplementedException ex) - { - Console.WriteLine(ex); - MessageBox.Show("Dit type bestand is op het moment nog niet ondersteund!", ex.ToString()); + f.Show(); + }); + break; + case "peds-mode": + form.BeginInvoke(() => + { + var f = new PedsForm(); + f.Load += (sender, args) => + { + f.WindowState = FormWindowState.Normal; + f.Activate(); + }; + + f.Show(); + }); + break; + case "open-file": + try + { + var form = OpenAnyFile.OpenFilePath(string.Join(" ", args.AsSpan(1).ToArray())); + form.Show(); + form.Activate(); + } + catch (NotImplementedException ex) + { + Console.WriteLine(ex); + MessageBox.Show("This file type is not yet supported!", ex.ToString()); + } + break; + } } + + server.Disconnect(); + } + catch (Exception ex) + { + Console.WriteLine(ex); + if (ex is not IOException) + { + throw; + } + server.Disconnect(); } - } - } - catch (Exception ex) - { - if (ex is not IOException) - { - throw; - } - server.Disconnect(); - } + } + }); + } + catch(Exception ex) + { + Console.WriteLine(ex); } } @@ -109,7 +141,7 @@ namespace CodeWalker.Core.Utils try { using var client = new NamedPipeClientStream("codewalker"); - client.Connect(100); + client.Connect(0); var _buffer = Encoding.UTF8.GetBytes(message); diff --git a/CodeWalker/Utils/OpenAnyFile.cs b/CodeWalker/Utils/OpenAnyFile.cs index 870b03c..73612d1 100644 --- a/CodeWalker/Utils/OpenAnyFile.cs +++ b/CodeWalker/Utils/OpenAnyFile.cs @@ -47,10 +47,10 @@ namespace CodeWalker.Utils else if (extension == ".ymf" || extension == ".ymap" || extension == ".ytyp" || extension == ".ymt") { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); - var fileCache = GameFileCacheFactory.GetInstance(); + var fileCache = GameFileCacheFactory.Instance; if (!fileCache.IsInited) { - fileCache.Init(); + fileCache.InitAsync().GetAwaiter().GetResult(); } var metaForm = new MetaForm(); diff --git a/CodeWalker/Utils/Synthesizer.cs b/CodeWalker/Utils/Synthesizer.cs index a170745..f143ceb 100644 --- a/CodeWalker/Utils/Synthesizer.cs +++ b/CodeWalker/Utils/Synthesizer.cs @@ -1,5 +1,5 @@ using CodeWalker.GameFiles; - +using CommunityToolkit.Diagnostics; using SharpDX; using SharpDX.Multimedia; using SharpDX.XAudio2; @@ -724,7 +724,7 @@ namespace CodeWalker.Utils case Dat10Synth.Opcode.READ_VARIABLE: if ((param[1].Value & 0xFF) < Synth.Variables.Length) { - SetRegister(param[0], Synth.Variables[param[1].Value & 0xFF]?.Value ?? 0); + SetRegister(param[0], Synth.Variables[param[1].Value & 0xFF].Value); } break; case Dat10Synth.Opcode.STOP: @@ -1612,7 +1612,9 @@ namespace CodeWalker.Utils releaseType = EnvelopeReleaseType.Exponential; break; - default: throw new ArgumentOutOfRangeException("Not an ENVELOPE_GEN_* opcode"); + default: + ThrowHelper.ThrowArgumentOutOfRangeException("Not an ENVELOPE_GEN_* opcode"); + return default; } EnvelopeTriggerMode triggerMode; @@ -1631,7 +1633,9 @@ namespace CodeWalker.Utils triggerMode = EnvelopeTriggerMode.Interruptible; break; - default: throw new ArgumentOutOfRangeException("Not an ENVELOPE_GEN_* opcode"); + default: + ThrowHelper.ThrowArgumentOutOfRangeException("Not an ENVELOPE_GEN_* opcode"); + return default; } return EnvelopeGen(releaseType, triggerMode, buffer, ref stateBlock, predelay, attack, decay, sustain, hold, release, trigger); @@ -1859,7 +1863,9 @@ namespace CodeWalker.Utils triggerMode = EnvelopeTriggerMode.Interruptible; break; - default: throw new ArgumentOutOfRangeException("Not an TIMED_TRIGGER_* opcode"); + default: + ThrowHelper.ThrowArgumentOutOfRangeException("Not an TIMED_TRIGGER_* opcode"); + return default; } return TimedTrigger(triggerMode, ref stateBlock, trigger, predelay, attack, decay, hold, release); diff --git a/CodeWalker/VehicleForm.cs b/CodeWalker/VehicleForm.cs index 095dae1..f86988b 100644 --- a/CodeWalker/VehicleForm.cs +++ b/CodeWalker/VehicleForm.cs @@ -22,10 +22,9 @@ namespace CodeWalker { public partial class VehicleForm : Form, DXForm { - public Form Form { get { return this; } } //for DXForm/DXManager use + public Form Form => this; //for DXForm/DXManager use public Renderer Renderer { get; set; } - public object RenderSyncRoot { get { return Renderer.RenderSyncRoot; } } volatile bool formopen = false; volatile bool running = false; @@ -33,6 +32,7 @@ namespace CodeWalker public bool Pauserendering { get; set; } = false; public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); + private CancellationToken CancellationToken; //volatile bool initialised = false; @@ -53,7 +53,7 @@ namespace CodeWalker System.Drawing.Point MouseLastPoint; - public GameFileCache GameFileCache { get; } = GameFileCacheFactory.GetInstance(); + public GameFileCache GameFileCache => GameFileCacheFactory.Instance; InputManager Input = new InputManager(); @@ -88,6 +88,7 @@ namespace CodeWalker public VehicleForm() { + CancellationToken = CancellationTokenSource.Token; InitializeComponent(); Renderer = new Renderer(this, GameFileCache); @@ -137,7 +138,7 @@ namespace CodeWalker camera.TargetRotation.X = 0.5f * (float)Math.PI; camera.CurrentRotation.X = 0.5f * (float)Math.PI; - Renderer.shaders.deferred = false; //no point using this here yet + Renderer.Shaders.deferred = false; //no point using this here yet LoadSettings(); @@ -149,7 +150,7 @@ namespace CodeWalker frametimer.Start(); } - public void CleanupScene() + public async ValueTask CleanupScene() { formopen = false; @@ -158,7 +159,7 @@ namespace CodeWalker int count = 0; while (running && (count < 5000)) //wait for the content thread to exit gracefully { - Thread.Sleep(1); + await Task.Delay(1); count++; } } @@ -176,7 +177,7 @@ namespace CodeWalker GameFileCache.BeginFrame(); - if (!Monitor.TryEnter(Renderer.RenderSyncRoot, 50)) + if (!await Renderer.RenderSyncRoot.WaitAsync(50)) { return; } //couldn't get a lock, try again next time @@ -228,7 +229,7 @@ namespace CodeWalker } finally { - Monitor.Exit(Renderer.RenderSyncRoot); + Renderer.RenderSyncRoot.Release(); } //UpdateMarkerSelectionPanelInvoke(); } @@ -286,7 +287,7 @@ namespace CodeWalker } - private void ContentThread() + private async ValueTask ContentThread() { //main content loading thread. running = true; @@ -311,7 +312,7 @@ namespace CodeWalker GameFileCache.LoadArchetypes = false;//to speed things up a little GameFileCache.BuildExtendedJenkIndex = false;//to speed things up a little GameFileCache.DoFullStringIndex = true;//to get all global text from DLC... - GameFileCache.Init(UpdateStatus, LogError); + await GameFileCache.InitAsync(UpdateStatus, LogError); //UpdateDlcListComboBox(gameFileCache.DlcNameList); @@ -331,29 +332,39 @@ namespace CodeWalker //UpdateStatus("Ready"); - Task.Run(async () => { - while (formopen && !IsDisposed) //renderer content loop + _ = Task.Run(async () => { + try { - bool rcItemsPending = Renderer.ContentThreadProc(); - - if (!rcItemsPending) + while (formopen && !IsDisposed && !CancellationToken.IsCancellationRequested) //renderer content loop { - await Task.Delay(ActiveForm == null ? 50 : 1).ConfigureAwait(false); + bool rcItemsPending = Renderer.ContentThreadProc(); + + if (!rcItemsPending) + { + await Task.Delay(ActiveForm == null ? 50 : 2, CancellationToken).ConfigureAwait(false); + } } } + catch(TaskCanceledException) + { } }); - Task.Run(async () => + _ = Task.Run(async () => { - while (formopen && !IsDisposed) //main asset loop + try { - bool fcItemsPending = GameFileCache.ContentThreadProc(); - - if (!fcItemsPending) + while (formopen && !IsDisposed) //main asset loop { - await Task.Delay(ActiveForm == null ? 50 : 1).ConfigureAwait(false); + bool fcItemsPending = GameFileCache.ContentThreadProc(); + + if (!fcItemsPending) + { + await Task.Delay(ActiveForm == null ? 50 : 2, CancellationToken).ConfigureAwait(false); + } } } + catch (TaskCanceledException) { } + running = false; }); @@ -412,14 +423,16 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateStatus(text); })); + BeginInvoke(UpdateStatus, text); } else { StatusLabel.Text = text; } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void LogError(string text) { @@ -427,17 +440,20 @@ namespace CodeWalker { if (InvokeRequired) { - Invoke(new Action(() => { LogError(text); })); + Invoke(LogError, text); } else { //TODO: error logging.. + Console.WriteLine(text); ConsoleTextBox.AppendText(text + "\r\n"); //StatusLabel.Text = text; //MessageBox.Show(text); } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } @@ -487,7 +503,8 @@ namespace CodeWalker } private void AddDrawableModelsTreeNodes(DrawableModel[] models, string prefix, bool check, TreeNode parentDrawableNode = null) { - if (models == null) return; + if (models is null) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -507,7 +524,8 @@ namespace CodeWalker Renderer.SelectionModelDrawFlags[model] = false; } - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { @@ -528,12 +546,10 @@ namespace CodeWalker { var hash = pl.Hashes[ip]; var parm = pl.Parameters[ip]; - var tex = parm.Data as TextureBase; - if (tex != null) + if (parm.Data is TextureBase tex) { - var t = tex as Texture; var tstr = tex.Name.Trim(); - if (t != null) + if (tex is Texture t) { tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height); } @@ -552,49 +568,36 @@ namespace CodeWalker } private void UpdateSelectionDrawFlags(TreeNode node) { - //update the selection draw flags depending on tag and checked/unchecked - var drwbl = node.Tag as DrawableBase; - var model = node.Tag as DrawableModel; - var geom = node.Tag as DrawableGeometry; bool rem = node.Checked; - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { - if (drwbl != null) + if (node.Tag is DrawableBase drwbl) { if (rem) { - if (DrawableDrawFlags.ContainsKey(drwbl)) - { - DrawableDrawFlags.Remove(drwbl); - } + DrawableDrawFlags.Remove(drwbl); } else { DrawableDrawFlags[drwbl] = false; } } - if (model != null) + if (node.Tag is DrawableModel model) { if (rem) { - if (Renderer.SelectionModelDrawFlags.ContainsKey(model)) - { - Renderer.SelectionModelDrawFlags.Remove(model); - } + Renderer.SelectionModelDrawFlags.Remove(model); } else { Renderer.SelectionModelDrawFlags[model] = false; } } - if (geom != null) + if (node.Tag is DrawableGeometry geom) { if (rem) { - if (Renderer.SelectionGeometryDrawFlags.ContainsKey(geom)) - { - Renderer.SelectionGeometryDrawFlags.Remove(geom); - } + Renderer.SelectionGeometryDrawFlags.Remove(geom); } else { @@ -610,7 +613,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateGlobalVehiclesUI(); })); + BeginInvoke(UpdateGlobalVehiclesUI); } else { @@ -655,8 +658,7 @@ namespace CodeWalker //AddDrawableModelsTreeNodes(drawable.DrawableModels?.Extra, "X Detail", false); - var fdrawable = drawable as FragDrawable; - if (fdrawable != null) + if (drawable is FragDrawable fdrawable) { var plod1 = fdrawable.OwnerFragment?.PhysicsLODGroup?.PhysicsLOD1; if ((plod1 != null) && (plod1.Children?.data_items != null)) @@ -1205,17 +1207,22 @@ namespace CodeWalker private void HDRRenderingCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + + using (Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.hdr = HDRRenderingCheckBox.Checked; + Renderer.Shaders.hdr = HDRRenderingCheckBox.Checked; } } private void ShadowsCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + using (Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.shadows = ShadowsCheckBox.Checked; + Renderer.Shaders.shadows = ShadowsCheckBox.Checked; } } @@ -1235,7 +1242,8 @@ namespace CodeWalker int v = TimeOfDayTrackBar.Value; float fh = v / 60.0f; UpdateTimeOfDayLabel(); - lock (Renderer.RenderSyncRoot) + + using (Renderer.RenderSyncRoot.WaitDisposable()) { Renderer.timeofday = fh; timecycle.SetTime(Renderer.timeofday); @@ -1250,12 +1258,16 @@ namespace CodeWalker private void WireframeCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.wireframe = WireframeCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.wireframe = WireframeCheckBox.Checked; } private void AnisotropicFilteringCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; } private void HDTexturesCheckBox_CheckedChanged(object sender, EventArgs e) @@ -1265,75 +1277,75 @@ namespace CodeWalker private void RenderModeComboBox_SelectedIndexChanged(object sender, EventArgs e) { + if (Renderer.Shaders is null) + return; TextureSamplerComboBox.Enabled = false; TextureCoordsComboBox.Enabled = false; switch (RenderModeComboBox.Text) { default: case "Default": - Renderer.shaders.RenderMode = WorldRenderMode.Default; + Renderer.Shaders.RenderMode = WorldRenderMode.Default; break; case "Single texture": - Renderer.shaders.RenderMode = WorldRenderMode.SingleTexture; + Renderer.Shaders.RenderMode = WorldRenderMode.SingleTexture; TextureSamplerComboBox.Enabled = true; TextureCoordsComboBox.Enabled = true; break; case "Vertex normals": - Renderer.shaders.RenderMode = WorldRenderMode.VertexNormals; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexNormals; break; case "Vertex tangents": - Renderer.shaders.RenderMode = WorldRenderMode.VertexTangents; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexTangents; break; case "Vertex colour 1": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 1; break; case "Vertex colour 2": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 2; break; case "Vertex colour 3": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 3; break; case "Texture coord 1": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 1; break; case "Texture coord 2": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 2; break; case "Texture coord 3": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 3; break; } } private void TextureSamplerComboBox_SelectedIndexChanged(object sender, EventArgs e) { - if (TextureSamplerComboBox.SelectedItem is ShaderParamNames) + if (Renderer.Shaders is null) + return; + if (TextureSamplerComboBox.SelectedItem is ShaderParamNames names) { - Renderer.shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; + Renderer.Shaders.RenderTextureSampler = names; } } private void TextureCoordsComboBox_SelectedIndexChanged(object sender, EventArgs e) { - switch (TextureCoordsComboBox.Text) + if (Renderer.Shaders is null) + return; + + Renderer.Shaders.RenderTextureSamplerCoord = TextureCoordsComboBox.Text switch { - default: - case "Texture coord 1": - Renderer.shaders.RenderTextureSamplerCoord = 1; - break; - case "Texture coord 2": - Renderer.shaders.RenderTextureSamplerCoord = 2; - break; - case "Texture coord 3": - Renderer.shaders.RenderTextureSamplerCoord = 3; - break; - } + "Texture coord 2" => 2, + "Texture coord 3" => 3, + _ => 1, + }; } private void GridCheckBox_CheckedChanged(object sender, EventArgs e) diff --git a/CodeWalker/World/CutsceneForm.cs b/CodeWalker/World/CutsceneForm.cs index 7bd25c0..d28ed25 100644 --- a/CodeWalker/World/CutsceneForm.cs +++ b/CodeWalker/World/CutsceneForm.cs @@ -1,6 +1,7 @@ using CodeWalker.GameFiles; using CodeWalker.Rendering; using CodeWalker.Utils; +using Collections.Pooled; using SharpDX; using System; using System.Collections.Generic; @@ -116,8 +117,7 @@ namespace CodeWalker.World AudioDatabase.Init(GameFileCache); } - var entry = dditem?.RpfEntry as RpfFileEntry; - if (entry != null) + if (dditem?.RpfEntry is RpfFileEntry entry) { cutFile = new CutFile(entry); @@ -139,10 +139,12 @@ namespace CodeWalker.World { try { - Invoke(new Action(() => { CutsceneLoaded(cs); })); + Invoke(CutsceneLoaded, cs); + } + catch(Exception ex) + { + Console.WriteLine(ex); } - catch - { } return; } @@ -290,7 +292,8 @@ namespace CodeWalker.World private void CutsceneForm_Load(object sender, EventArgs e) { - if (!GameFileCache.IsInited) return;//what to do here? + if (!GameFileCache.IsInited) + return;//what to do here? var rpfman = GameFileCache.RpfMan; var rpflist = rpfman.AllRpfs; //loadedOnly ? gfc.ActiveMapRpfFiles.Values.ToList() : @@ -498,7 +501,7 @@ namespace CodeWalker.World public int NextCameraCut { get; set; } = 0; public int NextConcatData { get; set; } = 0; - public Gxt2File Gxt2File { get; set; } = null; + public Gxt2File? Gxt2File { get; set; } = null; public Vector3 Position { get; set; } public Quaternion Rotation { get; set; } @@ -544,13 +547,13 @@ namespace CodeWalker.World private void LoadYcds() { int cutListCount = (CameraCutList?.Length ?? 0) + 1; - var shortName = CutFile.FileEntry?.ShortName ?? ""; + var shortName = CutFile.FileEntry.ShortName; Ycds = new YcdFile[cutListCount]; - if (!string.IsNullOrEmpty(shortName)) + if (!shortName.IsEmpty) { for (int i = 0; i < cutListCount; i++) { - var ycdname = shortName + "-" + i.ToString(); + var ycdname = shortName.ToString() + "-" + i.ToString(); var ycdhash = JenkHash.GenHashLower(ycdname); var ycd = GameFileCache.GetYcd(ycdhash); while ((ycd != null) && (!ycd.Loaded)) @@ -609,33 +612,40 @@ namespace CodeWalker.World void updateObjectTransform(CutsceneObject obj, ClipMapEntry cme, ushort boneTag, byte posTrack, byte rotTrack) { - if (cme != null) + if (cme is null) + return; + + if (cme.Clip is ClipAnimation canim) { - if (cme.Clip is ClipAnimation canim) + if (canim.Animation is not null) { - if (canim.Animation != null) - { - var t = canim.GetPlaybackTime(cutOffset); - var f = canim.Animation.GetFramePosition(t); - var p = canim.Animation.FindBoneIndex(boneTag, posTrack); - var r = canim.Animation.FindBoneIndex(boneTag, rotTrack); - if (p >= 0) obj.Position = canim.Animation.EvaluateVector4(f, p, true).XYZ(); - if (r >= 0) obj.Rotation = canim.Animation.EvaluateQuaternion(f, r, true); - } + var playbackTime = canim.GetPlaybackTime(cutOffset); + var framePosition = canim.Animation.GetFramePosition(playbackTime); + var p = canim.Animation.FindBoneIndex(boneTag, posTrack); + var r = canim.Animation.FindBoneIndex(boneTag, rotTrack); + if (p >= 0) + obj.Position = canim.Animation.EvaluateVector4(in framePosition, p, true).XYZ(); + if (r >= 0) + obj.Rotation = canim.Animation.EvaluateQuaternion(in framePosition, r, true); } - else if (cme.Clip is ClipAnimationList alist) + } + else if (cme.Clip is ClipAnimationList alist) + { + if (alist.Animations?.Data is not null) { - if (alist.Animations?.Data != null) + foreach (var anim in alist.Animations.Data) { - foreach (var anim in alist.Animations.Data) - { - var t = anim.GetPlaybackTime(cutOffset); - var f = anim.Animation.GetFramePosition(t); - var p = anim.Animation.FindBoneIndex(boneTag, posTrack); - var r = anim.Animation.FindBoneIndex(boneTag, rotTrack); - if (p >= 0) obj.Position = anim.Animation.EvaluateVector4(f, p, true).XYZ(); - if (r >= 0) obj.Rotation = anim.Animation.EvaluateQuaternion(f, r, true); - } + if (anim.Animation is null) + continue; + + var t = anim.GetPlaybackTime(cutOffset); + var f = anim.Animation.GetFramePosition(t); + var p = anim.Animation.FindBoneIndex(boneTag, posTrack); + var r = anim.Animation.FindBoneIndex(boneTag, rotTrack); + if (p >= 0) + obj.Position = anim.Animation.EvaluateVector4(in f, p, true).XYZ(); + if (r >= 0) + obj.Rotation = anim.Animation.EvaluateQuaternion(in f, r, true); } } } @@ -647,7 +657,7 @@ namespace CodeWalker.World var ycd = (cutIndex < (Ycds?.Length ?? 0)) ? Ycds[cutIndex] : null; if (ycd?.CutsceneMap != null) { - ClipMapEntry cme = null; + ClipMapEntry? cme = null; if (CameraObject != null) { @@ -672,15 +682,16 @@ namespace CodeWalker.World { foreach (var obj in SceneObjects.Values) { - if (obj.Enabled == false) continue; + if (obj.Enabled == false) + continue; var pos = Position; var rot = Rotation; - var animate = (obj.Ped != null) || (obj.Prop != null) || (obj.Vehicle != null) || (obj.Weapon != null); + var animate = obj.Ped is not null || obj.Prop is not null || obj.Vehicle is not null || obj.Weapon is not null; if (animate) { ycd.CutsceneMap.TryGetValue(obj.AnimHash, out cme); - if (cme != null) + if (cme is not null) { cme.OverridePlayTime = true; cme.PlayTime = cutOffset; @@ -690,25 +701,25 @@ namespace CodeWalker.World } obj.AnimClip = cme; } - if (obj.Ped != null) + if (obj.Ped is not null) { obj.Ped.Position = pos; obj.Ped.Rotation = rot; obj.Ped.UpdateEntity(); obj.Ped.AnimClip = cme; } - if (obj.Prop != null) + if (obj.Prop is not null) { obj.Prop.Position = pos; obj.Prop.Orientation = rot; } - if (obj.Vehicle != null) + if (obj.Vehicle is not null) { obj.Vehicle.Position = pos; obj.Vehicle.Rotation = rot; obj.Vehicle.UpdateEntity(); } - if (obj.Weapon != null) + if (obj.Weapon is not null) { obj.Weapon.Position = pos; obj.Weapon.Rotation = rot; @@ -875,8 +886,7 @@ namespace CodeWalker.World private void LoadScene(CutEvent e) { - var args = e.EventArgs as CutLoadSceneEventArgs; - if (args == null) + if (e.EventArgs is not CutLoadSceneEventArgs args) { return; } @@ -886,23 +896,19 @@ namespace CodeWalker.World } private void LoadAnimation(CutEvent e) { - var args = e.EventArgs as CutNameEventArgs; - if (args == null) + if (e.EventArgs is not CutNameEventArgs args) { return; } } private void LoadAudio(CutEvent e) { - var args = e.EventArgs as CutNameEventArgs; - if (args == null) + if (e.EventArgs is not CutNameEventArgs args) { return; } - var obje = e as CutObjectIdEvent; - if (obje == null) + if (e is not CutObjectIdEvent obje) { return; } - var obj = obje.Object as CutAudioObject; - if (obj == null) + if (obje.Object is not CutAudioObject obj) { return; } if (Seeking) return; @@ -931,8 +937,7 @@ namespace CodeWalker.World } private void LoadModels(CutEvent e) { - var args = e.EventArgs as CutObjectIdListEventArgs; - if (args == null) + if (e.EventArgs is not CutObjectIdListEventArgs args) { return; } if (args.iObjectIdList == null) return; @@ -952,15 +957,13 @@ namespace CodeWalker.World } private void LoadParticles(CutEvent e) { - var args = e.EventArgs as CutObjectIdListEventArgs; - if (args == null) + if (e.EventArgs is not CutObjectIdListEventArgs args) { return; } } private void LoadOverlays(CutEvent e) { - var args = e.EventArgs as CutObjectIdListEventArgs; - if (args == null) + if (e.EventArgs is not CutObjectIdListEventArgs args) { return; } } @@ -971,8 +974,7 @@ namespace CodeWalker.World if (Gxt2File != null) { } - var args = e.EventArgs as CutFinalNameEventArgs; - if (args == null) + if (e.EventArgs is not CutFinalNameEventArgs args) { return; } var namel = args.cName?.ToLowerInvariant(); @@ -983,13 +985,12 @@ namespace CodeWalker.World if (gxt2entry != null) //probably should do this load async { - Gxt2File = GameFileCache.RpfMan.GetFile(gxt2entry); + Gxt2File = RpfManager.GetFile(gxt2entry); - if (Gxt2File != null) + if (Gxt2File is not null) { - for (int i = 0; i < Gxt2File.TextEntries.Length; i++) + foreach(var te in Gxt2File.TextEntries) { - var te = Gxt2File.TextEntries[i]; GlobalText.Ensure(te.Text, te.Hash); } } @@ -998,8 +999,7 @@ namespace CodeWalker.World } private void UnloadModels(CutEvent e) { - var args = e.EventArgs as CutObjectIdListEventArgs; - if (args == null) + if (e.EventArgs is not CutObjectIdListEventArgs args) { return; } if (args.iObjectIdList == null) return; @@ -1008,7 +1008,7 @@ namespace CodeWalker.World { CutsceneObject obj = null; SceneObjects.TryGetValue(objid, out obj); - if (obj != null) + if (obj is not null) { obj.Enabled = false; } @@ -1019,8 +1019,7 @@ namespace CodeWalker.World } private void EnableHideObject(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; CutsceneObject cso = null; SceneObjects.TryGetValue(oe.iObjectId, out cso); @@ -1034,8 +1033,7 @@ namespace CodeWalker.World } private void EnableBlockBounds(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void EnableScreenFade(CutEvent e) @@ -1043,8 +1041,7 @@ namespace CodeWalker.World } private void EnableAnimation(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void EnableParticleEffect(CutEvent e) @@ -1055,15 +1052,13 @@ namespace CodeWalker.World } private void EnableAudio(CutEvent e) { - var args = e.EventArgs as CutNameEventArgs; - if (args == null) + if (e.EventArgs is not CutNameEventArgs args) { return; } } private void EnableCamera(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void EnableLight(CutEvent e) @@ -1071,8 +1066,7 @@ namespace CodeWalker.World } private void DisableHideObject(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; CutsceneObject cso = null; SceneObjects.TryGetValue(oe.iObjectId, out cso); @@ -1083,8 +1077,7 @@ namespace CodeWalker.World } private void DisableBlockBounds(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void DisableScreenFade(CutEvent e) @@ -1092,8 +1085,7 @@ namespace CodeWalker.World } private void DisableAnimation(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void DisableParticleEffect(CutEvent e) @@ -1104,15 +1096,13 @@ namespace CodeWalker.World } private void DisableAudio(CutEvent e) { - var args = e.EventArgs as CutNameEventArgs; - if (args == null) + if (e.EventArgs is not CutNameEventArgs args) { return; } } private void DisableCamera(CutEvent e) { - var oe = e as CutObjectIdEvent; - if (oe == null) return; + if (e is not CutObjectIdEvent oe) return; } private void DisableLight(CutEvent e) @@ -1120,8 +1110,7 @@ namespace CodeWalker.World } private void Subtitle(CutEvent e) { - var args = e.EventArgs as CutSubtitleEventArgs; - if (args == null) + if (e.EventArgs is not CutSubtitleEventArgs args) { return; } if (!EnableSubtitles) return; @@ -1143,12 +1132,10 @@ namespace CodeWalker.World } private void PedVariation(CutEvent e) { - var args = e.EventArgs as CutObjectVariationEventArgs; - if (args == null) + if (e.EventArgs is not CutObjectVariationEventArgs args) { return; } - var oe = e as CutObjectIdEvent; - if (oe == null) + if (e is not CutObjectIdEvent oe) { return; } if (Seeking) return; //this gets a bit messy when seeking backwards @@ -1172,12 +1159,10 @@ namespace CodeWalker.World } private void CameraCut(CutEvent e) { - var args = e.EventArgs as CutCameraCutEventArgs; - if (args == null) + if (e.EventArgs is not CutCameraCutEventArgs args) { return; } - var oe = e as CutObjectIdEvent; - if (oe == null) + if (e is not CutObjectIdEvent oe) { return; } @@ -1404,8 +1389,8 @@ namespace CodeWalker.World //how to know the correct name/hash to use? //sound name in the format: cutscenes_name_mastered_only var name = aud.cName.ToCleanString().ToLowerInvariant().Replace(".wav", ""); - var soundname = "cutscenes_" + name + "_mastered"; - var soundname2 = "cutscenes_" + name + "_mastered_only"; + var soundname = $"cutscenes_{name}n_mastered"; + var soundname2 = $"cutscenes_{name}_mastered_only"; uint soundhash = JenkHash.GenHash(soundname); uint soundhash2 = JenkHash.GenHash(soundname2); @@ -1428,8 +1413,8 @@ namespace CodeWalker.World MetaHash awchash = 0; AwcFile awc = null; - var streaminfs = new List(); - var streamlist = new List(); + using var streaminfs = new PooledList(); + using var streamlist = new PooledList(); foreach (var chan in strsnd.ChildSounds) { @@ -1475,7 +1460,7 @@ namespace CodeWalker.World var streaminf = streaminfs[i]; var left = 1.0f; var right = 1.0f; - switch (streaminf.Header?.Pan ?? 0) + switch (streaminf.Header.Pan) { case 0://center/default left = 1.0f; diff --git a/CodeWalker/World/MapSelection.cs b/CodeWalker/World/MapSelection.cs index d80f2a1..4aa93e7 100644 --- a/CodeWalker/World/MapSelection.cs +++ b/CodeWalker/World/MapSelection.cs @@ -45,42 +45,42 @@ namespace CodeWalker [TypeConverter(typeof(ExpandableObjectConverter))] public struct MapSelection { - public WorldForm WorldForm { get; set; } - public YmapEntityDef EntityDef { get; set; } - public Archetype Archetype { get; set; } - public DrawableBase Drawable { get; set; } - public DrawableGeometry Geometry { get; set; } - public MetaWrapper EntityExtension { get; set; } - public MetaWrapper ArchetypeExtension { get; set; } - public YmapTimeCycleModifier TimeCycleModifier { get; set; } - public YmapCarGen CarGenerator { get; set; } - public YmapGrassInstanceBatch GrassBatch { get; set; } - public YmapLODLight LodLight { get; set; } - public YmapBoxOccluder BoxOccluder { get; set; } - public YmapOccludeModelTriangle OccludeModelTri { get; set; } - public YmapEntityDef MloEntityDef { get; set; } - public MCMloRoomDef MloRoomDef { get; set; } - public WaterQuad WaterQuad { get; set; } - public WaterCalmingQuad CalmingQuad { get; set; } - public WaterWaveQuad WaveQuad { get; set; } - public Bounds CollisionBounds { get; set; } - public BoundPolygon CollisionPoly { get; set; } - public BoundVertex CollisionVertex { get; set; } - public YnvPoly NavPoly { get; set; } - public YnvPoint NavPoint { get; set; } - public YnvPortal NavPortal { get; set; } - public YndNode PathNode { get; set; } - public YndLink PathLink { get; set; } - public TrainTrackNode TrainTrackNode { get; set; } - public ScenarioNode ScenarioNode { get; set; } - public MCScenarioChainingEdge ScenarioEdge { get; set; } - public AudioPlacement Audio { get; set; } + public WorldForm? WorldForm { get; set; } + public YmapEntityDef? EntityDef { get; set; } + public Archetype? Archetype { get; set; } + public DrawableBase? Drawable { get; set; } + public DrawableGeometry? Geometry { get; set; } + public MetaWrapper? EntityExtension { get; set; } + public MetaWrapper? ArchetypeExtension { get; set; } + public YmapTimeCycleModifier? TimeCycleModifier { get; set; } + public YmapCarGen? CarGenerator { get; set; } + public YmapGrassInstanceBatch? GrassBatch { get; set; } + public YmapLODLight? LodLight { get; set; } + public YmapBoxOccluder? BoxOccluder { get; set; } + public YmapOccludeModelTriangle? OccludeModelTri { get; set; } + public YmapEntityDef? MloEntityDef { get; set; } + public MCMloRoomDef? MloRoomDef { get; set; } + public WaterQuad? WaterQuad { get; set; } + public WaterCalmingQuad? CalmingQuad { get; set; } + public WaterWaveQuad? WaveQuad { get; set; } + public Bounds? CollisionBounds { get; set; } + public BoundPolygon? CollisionPoly { get; set; } + public BoundVertex? CollisionVertex { get; set; } + public YnvPoly? NavPoly { get; set; } + public YnvPoint? NavPoint { get; set; } + public YnvPortal? NavPortal { get; set; } + public YndNode? PathNode { get; set; } + public YndLink? PathLink { get; set; } + public TrainTrackNode? TrainTrackNode { get; set; } + public ScenarioNode? ScenarioNode { get; set; } + public MCScenarioChainingEdge? ScenarioEdge { get; set; } + public AudioPlacement? Audio { get; set; } - public MapSelection[] MultipleSelectionItems { get; private set; } + public MapSelection[]? MultipleSelectionItems { get; private set; } public Vector3 MultipleSelectionCenter { get; set; } public Quaternion MultipleSelectionRotation { get; set; } public Vector3 MultipleSelectionScale { get; set; } - public BoundVertex[] GatheredCollisionVerts { get; private set; } //for collision polys, need to move all the individual vertices instead + public BoundVertex[]? GatheredCollisionVerts { get; private set; } //for collision polys, need to move all the individual vertices instead public Vector3 BBOffset { get; set; } public Quaternion BBOrientation { get; set; } @@ -91,47 +91,43 @@ namespace CodeWalker public float HitDist { get; set; } - public bool HasValue + public readonly bool HasValue { get { - return (EntityDef != null) || - (Archetype != null) || - (Drawable != null) || - (Geometry != null) || - (EntityExtension != null) || - (ArchetypeExtension != null) || - (TimeCycleModifier != null) || - (CarGenerator != null) || - (GrassBatch != null) || - (WaterQuad != null) || - (CalmingQuad != null) || - (WaveQuad != null) || - (CollisionBounds != null) || - (CollisionPoly != null) || - (CollisionVertex != null) || - (NavPoly != null) || - (NavPoint != null) || - (NavPortal != null) || - (PathNode != null) || - (TrainTrackNode != null) || - (LodLight != null) || - (BoxOccluder != null) || - (OccludeModelTri != null) || - (MloEntityDef != null) || - (ScenarioNode != null) || - (Audio != null) || - (MloRoomDef != null); + return (EntityDef is not null) || + (Archetype is not null) || + (Drawable is not null) || + (Geometry is not null) || + (EntityExtension is not null) || + (ArchetypeExtension is not null) || + (TimeCycleModifier is not null) || + (CarGenerator is not null) || + (GrassBatch is not null) || + (WaterQuad is not null) || + (CalmingQuad is not null) || + (WaveQuad is not null) || + (CollisionBounds is not null) || + (CollisionPoly is not null) || + (CollisionVertex is not null) || + (NavPoly is not null) || + (NavPoint is not null) || + (NavPortal is not null) || + (PathNode is not null) || + (TrainTrackNode is not null) || + (LodLight is not null) || + (BoxOccluder is not null) || + (OccludeModelTri is not null) || + (MloEntityDef is not null) || + (ScenarioNode is not null) || + (Audio is not null) || + (MloRoomDef is not null); } } - public bool HasHit - { - get { return (HitDist != float.MaxValue); } - } + public readonly bool HasHit => HitDist != float.MaxValue; - - public bool CheckForChanges(MapSelection mhit) + public readonly bool CheckForChanges(in MapSelection mhit) { return (EntityDef != mhit.EntityDef) || (Archetype != mhit.Archetype) @@ -160,35 +156,35 @@ namespace CodeWalker || (Audio != mhit.Audio) || (MloRoomDef != mhit.MloRoomDef); } - public bool CheckForChanges() + public readonly bool CheckForChanges() { - return (EntityDef != null) - || (Archetype != null) - || (Drawable != null) - || (TimeCycleModifier != null) - || (ArchetypeExtension != null) - || (EntityExtension != null) - || (CarGenerator != null) - || (MloEntityDef != null) - || (LodLight != null) - || (GrassBatch != null) - || (BoxOccluder != null) - || (OccludeModelTri != null) - || (WaterQuad != null) - || (CalmingQuad != null) - || (WaveQuad != null) - || (CollisionBounds != null) - || (CollisionPoly != null) - || (CollisionVertex != null) - || (NavPoly != null) - || (NavPoint != null) - || (NavPortal != null) - || (PathNode != null) - || (PathLink != null) - || (TrainTrackNode != null) - || (ScenarioNode != null) - || (Audio != null) - || (MloRoomDef != null); + return (EntityDef is not null) + || (Archetype is not null) + || (Drawable is not null) + || (TimeCycleModifier is not null) + || (ArchetypeExtension is not null) + || (EntityExtension is not null) + || (CarGenerator is not null) + || (MloEntityDef is not null) + || (LodLight is not null) + || (GrassBatch is not null) + || (BoxOccluder is not null) + || (OccludeModelTri is not null) + || (WaterQuad is not null) + || (CalmingQuad is not null) + || (WaveQuad is not null) + || (CollisionBounds is not null) + || (CollisionPoly is not null) + || (CollisionVertex is not null) + || (NavPoly is not null) + || (NavPoint is not null) + || (NavPortal is not null) + || (PathNode is not null) + || (PathLink is not null) + || (TrainTrackNode is not null) + || (ScenarioNode is not null) + || (Audio is not null) + || (MloRoomDef is not null); } @@ -233,148 +229,148 @@ namespace CodeWalker HitDist = float.MaxValue; } - public string GetNameString(string defval) + public readonly string GetNameString(string defval) { string name = defval; - var ename = (EntityDef != null) ? EntityDef._CEntityDef.archetypeName.ToString() : string.Empty; - var enamec = ename + ((!string.IsNullOrEmpty(ename)) ? ": " : ""); - if (MultipleSelectionItems != null) + var ename = (EntityDef is not null) ? EntityDef._CEntityDef.archetypeName.ToString() : string.Empty; + var enamec = ename + ((!string.IsNullOrEmpty(ename)) ? ": " : string.Empty); + if (MultipleSelectionItems is not null) { name = "Multiple items"; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { - name = enamec + "Vertex " + CollisionVertex.Index.ToString() + ((CollisionBounds != null) ? (": " + CollisionBounds.GetName()) : string.Empty); + name = $"{enamec}Vertex {CollisionVertex.Index}{((CollisionBounds is not null) ? ($": {CollisionBounds.GetName()}") : string.Empty)}"; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { - name = enamec + "Poly " + CollisionPoly.Index.ToString() + ((CollisionBounds != null) ? (": " + CollisionBounds.GetName()) : string.Empty); + name = $"{enamec}Poly {CollisionPoly.Index}{((CollisionBounds != null) ? ($": {CollisionBounds.GetName()}") : string.Empty)}"; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { - name = enamec + CollisionBounds.GetName(); + name = $"{enamec}{CollisionBounds.GetName()}"; } - else if (EntityDef != null) + else if (EntityDef is not null) { name = ename; } - else if (Archetype != null) + else if (Archetype is not null) { name = Archetype.Hash.ToString(); } - else if (TimeCycleModifier != null) + else if (TimeCycleModifier is not null) { name = TimeCycleModifier.CTimeCycleModifier.name.ToString(); } - else if (CarGenerator != null) + else if (CarGenerator is not null) { - name = (CarGenerator.Ymap?.Name ?? "") + ": " + CarGenerator.NameString(); + name = $"{(CarGenerator.Ymap?.Name ?? string.Empty)}: {CarGenerator.NameString()}"; } - else if (GrassBatch != null) + else if (GrassBatch is not null) { - name = (GrassBatch.Ymap?.Name ?? "") + ": " + GrassBatch.Archetype?.Name ?? ""; + name = $"{(GrassBatch.Ymap?.Name ?? string.Empty)}: {GrassBatch.Archetype?.Name ?? string.Empty}"; } - else if (LodLight != null) + else if (LodLight is not null) { - name = (LodLight.Ymap?.Name ?? "") + ": " + LodLight.Index.ToString(); + name = $"{(LodLight.Ymap?.Name ?? string.Empty)}: {LodLight.Index}"; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { - name = "BoxOccluder " + (BoxOccluder.Ymap?.Name ?? "") + ": " + BoxOccluder.Index.ToString(); + name = "BoxOccluder " + (BoxOccluder.Ymap?.Name ?? string.Empty) + ": " + BoxOccluder.Index.ToString(); } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { - name = "OccludeModel " + (OccludeModelTri.Ymap?.Name ?? "") + ": " + (OccludeModelTri.Model?.Index??0).ToString() + ":" + OccludeModelTri.Index.ToString(); + name = $"OccludeModel {OccludeModelTri.Ymap?.Name ?? string.Empty}: {OccludeModelTri.Model?.Index ?? 0}:{OccludeModelTri.Index}"; } - else if (WaterQuad != null) + else if (WaterQuad is not null) { - name = "WaterQuad " + WaterQuad.ToString(); + name = $"WaterQuad {WaterQuad}"; } - else if (CalmingQuad != null) + else if (CalmingQuad is not null) { - name = "WaterCalmingQuad " + CalmingQuad.ToString(); + name = $"WaterCalmingQuad {CalmingQuad}"; } - else if (WaveQuad != null) + else if (WaveQuad is not null) { - name = "WaterWaveQuad " + WaveQuad.ToString(); + name = $"WaterWaveQuad {WaveQuad}"; } - else if (NavPoly != null) + else if (NavPoly is not null) { - name = "NavPoly " + NavPoly.ToString(); + name = $"NavPoly {NavPoly}"; } - else if (NavPoint != null) + else if (NavPoint is not null) { - name = "NavPoint " + NavPoint.ToString(); + name = $"NavPoint {NavPoint}"; } - else if (NavPortal != null) + else if (NavPortal is not null) { - name = "NavPortal " + NavPortal.ToString(); + name = $"NavPortal {NavPortal}"; } - else if (PathNode != null) + else if (PathNode is not null) { - name = "PathNode " + PathNode.AreaID.ToString() + "." + PathNode.NodeID.ToString(); //+ FloatUtil.GetVector3String(PathNode.Position); + name = $"PathNode {PathNode.AreaID}.{PathNode.NodeID}"; //+ FloatUtil.GetVector3String(PathNode.Position); } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { - name = "TrainTrackNode " + FloatUtil.GetVector3String(TrainTrackNode.Position); + name = $"TrainTrackNode {FloatUtil.GetVector3String(TrainTrackNode.Position)}"; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { name = ScenarioNode.ToString(); } - else if (Audio != null) + else if (Audio is not null) { - name = Audio.ShortTypeName + " " + Audio.GetNameString();// FloatUtil.GetVector3String(Audio.InnerPos); + name = $"{Audio.ShortTypeName} {Audio.GetNameString()}";// FloatUtil.GetVector3String(Audio.InnerPos); } - if (MloRoomDef != null) + if (MloRoomDef is not null) { - name = "MloRoomDef " + MloRoomDef.RoomName; + name = $"MloRoomDef {MloRoomDef.RoomName}"; } - if (EntityExtension != null) + if (EntityExtension is not null) { - name += ": " + EntityExtension.Name; + name += $": {EntityExtension.Name}"; } - if (ArchetypeExtension != null) + if (ArchetypeExtension is not null) { - name += ": " + ArchetypeExtension.Name; + name += $": {ArchetypeExtension.Name}"; } return name; } - public string GetFullNameString(string defval) + public readonly string GetFullNameString(string defval) { string name = GetNameString(defval); - if (Geometry != null) + if (Geometry is not null) { - name += " (" + GeometryIndex.ToString() + ")"; + name += $" ({GeometryIndex})"; } return name; } - public bool CanMarkUndo() + public readonly bool CanMarkUndo() { - if (MultipleSelectionItems != null) return true; - if (EntityDef != null) return true; - if (CarGenerator != null) return true; - if (LodLight != null) return true; - if (BoxOccluder != null) return true; - if (OccludeModelTri != null) return true; - if (CollisionBounds != null) return true; - if (CollisionPoly != null) return true; - if (CollisionVertex != null) return true; - if (PathNode != null) return true; + if (MultipleSelectionItems is not null) return true; + if (EntityDef is not null) return true; + if (CarGenerator is not null) return true; + if (LodLight is not null) return true; + if (BoxOccluder is not null) return true; + if (OccludeModelTri is not null) return true; + if (CollisionBounds is not null) return true; + if (CollisionPoly is not null) return true; + if (CollisionVertex is not null) return true; + if (PathNode is not null) return true; //if (NavPoly != null) return true; - if (NavPoint != null) return true; - if (NavPortal != null) return true; - if (TrainTrackNode != null) return true; - if (ScenarioNode != null) return true; - if (Audio != null) return true; + if (NavPoint is not null) return true; + if (NavPortal is not null) return true; + if (TrainTrackNode is not null) return true; + if (ScenarioNode is not null) return true; + if (Audio is not null) return true; return false; } - public UndoStep CreateUndoStep(WidgetMode mode, Vector3 startPos, Quaternion startRot, Vector3 startScale, WorldForm wf, bool editPivot) + public readonly UndoStep? CreateUndoStep(WidgetMode mode, Vector3 startPos, Quaternion startRot, Vector3 startScale, WorldForm wf, bool editPivot) { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { switch (mode) { @@ -383,14 +379,14 @@ namespace CodeWalker case WidgetMode.Scale: return new MultiScaleUndoStep(this, startScale, wf); } } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { switch (mode) { case WidgetMode.Position: return new CollisionVertexPositionUndoStep(CollisionVertex, EntityDef, startPos, wf); } } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { switch (mode) { @@ -399,7 +395,7 @@ namespace CodeWalker case WidgetMode.Scale: return new CollisionPolyScaleUndoStep(CollisionPoly, startScale, wf); } } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { switch (mode) { @@ -408,7 +404,7 @@ namespace CodeWalker case WidgetMode.Scale: return new CollisionScaleUndoStep(CollisionBounds, startScale, wf); } } - else if (EntityDef != null) + else if (EntityDef is not null) { if (editPivot) { @@ -428,7 +424,7 @@ namespace CodeWalker } } } - else if (CarGenerator != null) + else if (CarGenerator is not null) { switch (mode) { @@ -437,7 +433,7 @@ namespace CodeWalker case WidgetMode.Scale: return new CarGenScaleUndoStep(CarGenerator, startScale); } } - else if (LodLight != null) + else if (LodLight is not null) { switch (mode) { @@ -446,7 +442,7 @@ namespace CodeWalker case WidgetMode.Scale: return new LodLightScaleUndoStep(LodLight, startScale); } } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { switch (mode) { @@ -455,7 +451,7 @@ namespace CodeWalker case WidgetMode.Scale: return new BoxOccluderScaleUndoStep(BoxOccluder, startScale); } } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { switch (mode) { @@ -464,18 +460,18 @@ namespace CodeWalker case WidgetMode.Scale: return new OccludeModelTriScaleUndoStep(OccludeModelTri, startScale); } } - else if (PathNode != null) + else if (PathNode is not null) { switch (mode) { case WidgetMode.Position: return new PathNodePositionUndoStep(PathNode, startPos, wf); } } - else if (NavPoly != null) + else if (NavPoly is not null) { //todo... } - else if (NavPoint != null) + else if (NavPoint is not null) { switch (mode) { @@ -483,7 +479,7 @@ namespace CodeWalker case WidgetMode.Rotation: return new NavPointRotationUndoStep(NavPoint, startRot, wf); } } - else if (NavPortal != null) + else if (NavPortal is not null) { switch (mode) { @@ -491,14 +487,14 @@ namespace CodeWalker case WidgetMode.Rotation: return new NavPortalRotationUndoStep(NavPortal, startRot, wf); } } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { switch (mode) { case WidgetMode.Position: return new TrainTrackNodePositionUndoStep(TrainTrackNode, startPos, wf); } } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { switch (mode) { @@ -506,7 +502,7 @@ namespace CodeWalker case WidgetMode.Rotation: return new ScenarioNodeRotationUndoStep(ScenarioNode, startRot, wf); } } - else if (Audio != null) + else if (Audio is not null) { switch (mode) { @@ -517,394 +513,395 @@ namespace CodeWalker return null; } - public bool CanShowWidget + public readonly bool CanShowWidget { get { bool res = false; - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { res = true; } - else if (EntityDef != null) + else if (EntityDef is not null) { res = true; } - else if (CarGenerator != null) + else if (CarGenerator is not null) { res = true; } - else if (LodLight != null) + else if (LodLight is not null) { res = true; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { res = true; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { res = true; } - else if (NavPoly != null) + else if (NavPoly is not null) { res = true; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { res = true; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { res = true; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { res = true; } - else if (NavPoint != null) + else if (NavPoint is not null) { res = true; } - else if (NavPortal != null) + else if (NavPortal is not null) { res = true; } - else if (PathNode != null) + else if (PathNode is not null) { res = true; } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { res = true; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { res = true; } - else if (Audio != null) + else if (Audio is not null) { res = true; } return res; } } - public Vector3 WidgetPosition + public readonly Vector3 WidgetPosition { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { return MultipleSelectionCenter; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { - if (EntityDef != null) return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionVertex.Position); + if (EntityDef is not null) + return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionVertex.Position); return CollisionVertex.Position; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { - if (EntityDef != null) return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionPoly.Position); + if (EntityDef is not null) return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionPoly.Position); return CollisionPoly.Position; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { - if (EntityDef != null) return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionBounds.Position); + if (EntityDef is not null) return EntityDef.Position + EntityDef.Orientation.Multiply(CollisionBounds.Position); return CollisionBounds.Position; } - else if (EntityDef != null) + else if (EntityDef is not null) { return EntityDef.WidgetPosition; } - else if (CarGenerator != null) + else if (CarGenerator is not null) { return CarGenerator.Position; } - else if (LodLight != null) + else if (LodLight is not null) { return LodLight.Position; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { return BoxOccluder.Position; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { return OccludeModelTri.Center; } - else if (NavPoly != null) + else if (NavPoly is not null) { return NavPoly.Position; } - else if (NavPoint != null) + else if (NavPoint is not null) { return NavPoint.Position; } - else if (NavPortal != null) + else if (NavPortal is not null) { return NavPortal.Position; } - else if (PathNode != null) + else if (PathNode is not null) { return PathNode.Position; } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { return TrainTrackNode.Position; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { return ScenarioNode.Position; } - else if (Audio != null) + else if (Audio is not null) { return Audio.InnerPos; } return Vector3.Zero; } } - public Quaternion WidgetRotation + public readonly Quaternion WidgetRotation { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { return MultipleSelectionRotation; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { - if (EntityDef != null) return EntityDef.Orientation; + if (EntityDef is not null) return EntityDef.Orientation; return Quaternion.Identity; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { - if (EntityDef != null) return CollisionPoly.Orientation * EntityDef.Orientation; + if (EntityDef is not null) return CollisionPoly.Orientation * EntityDef.Orientation; return CollisionPoly.Orientation; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { - if (EntityDef != null) return CollisionBounds.Orientation * EntityDef.Orientation; + if (EntityDef is not null) return CollisionBounds.Orientation * EntityDef.Orientation; return CollisionBounds.Orientation; } - else if (EntityDef != null) + else if (EntityDef is not null) { return EntityDef.WidgetOrientation; } - else if (CarGenerator != null) + else if (CarGenerator is not null) { return CarGenerator.Orientation; } - else if (LodLight != null) + else if (LodLight is not null) { return LodLight.Orientation; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { return BoxOccluder.Orientation; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { return OccludeModelTri.Orientation; } - else if (NavPoly != null) + else if (NavPoly is not null) { return Quaternion.Identity; } - else if (NavPoint != null) + else if (NavPoint is not null) { return NavPoint.Orientation; } - else if (NavPortal != null) + else if (NavPortal is not null) { return NavPortal.Orientation; } - else if (PathNode != null) + else if (PathNode is not null) { return Quaternion.Identity; } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { return Quaternion.Identity; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { return ScenarioNode.Orientation; } - else if (Audio != null) + else if (Audio is not null) { return Audio.Orientation; } return Quaternion.Identity; } } - public WidgetAxis WidgetRotationAxes + public readonly WidgetAxis WidgetRotationAxes { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { return WidgetAxis.XYZ; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { return WidgetAxis.None; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { return WidgetAxis.XYZ; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { return WidgetAxis.XYZ; } - else if (EntityDef != null) + else if (EntityDef is not null) { return WidgetAxis.XYZ; } - else if (CarGenerator != null) + else if (CarGenerator is not null) { return WidgetAxis.Z; } - else if (LodLight != null) + else if (LodLight is not null) { return WidgetAxis.XYZ; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { return WidgetAxis.Z; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { return WidgetAxis.XYZ; } - else if (NavPoly != null) + else if (NavPoly is not null) { return WidgetAxis.XYZ; } - else if (NavPoint != null) + else if (NavPoint is not null) { return WidgetAxis.Z; } - else if (NavPortal != null) + else if (NavPortal is not null) { return WidgetAxis.Z; } - else if (PathNode != null) + else if (PathNode is not null) { return WidgetAxis.None; } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { return WidgetAxis.None; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { return WidgetAxis.Z; } - else if (Audio != null) + else if (Audio is not null) { return WidgetAxis.Z; } return WidgetAxis.None; } } - public Vector3 WidgetScale + public readonly Vector3 WidgetScale { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { return MultipleSelectionScale; } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { return Vector3.One; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { return CollisionPoly.Scale; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { return CollisionBounds.Scale; } - else if (EntityDef != null) + else if (EntityDef is not null) { return EntityDef.Scale; } - else if (CarGenerator != null) + else if (CarGenerator is not null) { return new Vector3(CarGenerator.CCarGen.perpendicularLength); } - else if (LodLight != null) + else if (LodLight is not null) { return LodLight.Scale; } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { return BoxOccluder.Size; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { return OccludeModelTri.Scale; } - else if (NavPoly != null) + else if (NavPoly is not null) { return Vector3.One; } - else if (NavPoint != null) + else if (NavPoint is not null) { return Vector3.One; } - else if (NavPortal != null) + else if (NavPortal is not null) { return Vector3.One; } - else if (PathNode != null) + else if (PathNode is not null) { return Vector3.One; } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { return Vector3.One; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { return Vector3.One; } - else if (Audio != null) + else if (Audio is not null) { return Vector3.One; } return Vector3.One; } } - public bool WidgetScaleLockXY + public readonly bool WidgetScaleLockXY { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { for (int i = 0; i < MultipleSelectionItems.Length; i++) { - if ((MultipleSelectionItems[i].EntityDef != null) && (MultipleSelectionItems[i].CollisionBounds == null)) return true; + if ((MultipleSelectionItems[i].EntityDef is not null) && (MultipleSelectionItems[i].CollisionBounds is null)) return true; } return false; } - if (BoxOccluder != null) + if (BoxOccluder is not null) { return false; } - if (OccludeModelTri != null) + if (OccludeModelTri is not null) { return false; } - if (CollisionBounds != null) + if (CollisionBounds is not null) { return false; } - if (CollisionPoly != null) + if (CollisionPoly is not null) { return false; } @@ -912,46 +909,49 @@ namespace CodeWalker } } - public bool CanCopyPaste + public readonly bool CanCopyPaste { get { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { for (int i = 0; i < MultipleSelectionItems.Length; i++) { - if (MultipleSelectionItems[i].CanCopyPaste) return true; + if (MultipleSelectionItems[i].CanCopyPaste) + return true; } return false; } - else if (CollisionVertex != null) return false;//can't copy just a vertex.. - else if (CollisionPoly != null) return true; - else if (CollisionBounds != null) return true; - else if (EntityDef != null) return true; - else if (CarGenerator != null) return true; - else if (LodLight != null) return true; - else if (BoxOccluder != null) return true; - else if (OccludeModelTri != null) return true; - else if (PathNode != null) return true; - else if (NavPoly != null) return true; - else if (NavPoint != null) return true; - else if (NavPortal != null) return true; - else if (TrainTrackNode != null) return true; - else if (ScenarioNode != null) return true; - else if (Audio?.AudioZone != null) return true; - else if (Audio?.AudioEmitter != null) return true; + else if (CollisionVertex is not null) return false;//can't copy just a vertex.. + else if (CollisionPoly is not null) return true; + else if (CollisionBounds is not null) return true; + else if (EntityDef is not null) return true; + else if (CarGenerator is not null) return true; + else if (LodLight is not null) return true; + else if (BoxOccluder is not null) return true; + else if (OccludeModelTri is not null) return true; + else if (PathNode is not null) return true; + else if (NavPoly is not null) return true; + else if (NavPoint is not null) return true; + else if (NavPortal is not null) return true; + else if (TrainTrackNode is not null) return true; + else if (ScenarioNode is not null) return true; + else if (Audio?.AudioZone is not null) return true; + else if (Audio?.AudioEmitter is not null) return true; return false; } } - public void SetMultipleSelectionItems(MapSelection[] items) + public void SetMultipleSelectionItems(MapSelection[]? items) { - if ((items != null) && (items.Length == 0)) items = null; + if (items is not null && items.Length == 0) + items = null; + MultipleSelectionItems = items; GatheredCollisionVerts = null; var center = Vector3.Zero; - if (items != null) + if (items is not null) { Dictionary collVerts = null; for (int i = 0; i < items.Length; i++) @@ -959,18 +959,18 @@ namespace CodeWalker center += items[i].WidgetPosition; var collVert = items[i].CollisionVertex; var collPoly = items[i].CollisionPoly; - if (collVert != null) + if (collVert is not null) { if (collVerts == null) collVerts = new Dictionary(); collVerts[collVert] = collVert.Index; } - else if (collPoly != null) + else if (collPoly is not null) { if (collVerts == null) collVerts = new Dictionary(); collPoly.GatherVertices(collVerts); } } - if (collVerts != null) + if (collVerts is not null) { GatheredCollisionVerts = collVerts.Keys.ToArray(); } @@ -985,7 +985,7 @@ namespace CodeWalker public void SetPosition(Vector3 newpos, bool editPivot) { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { if (editPivot) { @@ -1006,8 +1006,8 @@ namespace CodeWalker } ent = MultipleSelectionItems[i].EntityDef ?? ent; } - if (ent != null) dpos = Quaternion.Invert(ent.Orientation).Multiply(dpos); - if (GatheredCollisionVerts != null) + if (ent is not null) dpos = Quaternion.Invert(ent.Orientation).Multiply(dpos); + if (GatheredCollisionVerts is not null) { for (int i = 0; i < GatheredCollisionVerts.Length; i++) { @@ -1019,22 +1019,22 @@ namespace CodeWalker MultipleSelectionCenter = newpos; } } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { - if (EntityDef != null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); + if (EntityDef is not null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); CollisionVertex.Position = newpos; } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { - if (EntityDef != null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); + if (EntityDef is not null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); CollisionPoly.Position = newpos; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { - if (EntityDef != null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); + if (EntityDef is not null) newpos = Quaternion.Invert(EntityDef.Orientation).Multiply(newpos - EntityDef.Position); CollisionBounds.Position = newpos; } - else if (EntityDef != null) + else if (EntityDef is not null) { if (editPivot) { @@ -1045,23 +1045,23 @@ namespace CodeWalker EntityDef.SetPositionFromWidget(newpos); } } - else if (CarGenerator != null) + else if (CarGenerator is not null) { CarGenerator.SetPosition(newpos); } - else if (LodLight != null) + else if (LodLight is not null) { LodLight.SetPosition(newpos); } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { BoxOccluder.Position = newpos; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { OccludeModelTri.Center = newpos; } - else if (PathNode != null) + else if (PathNode is not null) { PathNode.SetYndNodePosition(WorldForm.Space, newpos, out var affectedFiles); foreach (var affectedFile in affectedFiles) @@ -1069,27 +1069,27 @@ namespace CodeWalker WorldForm.UpdatePathYndGraphics(affectedFile, false); } } - else if (NavPoly != null) + else if (NavPoly is not null) { NavPoly.SetPosition(newpos); } - else if (NavPoint != null) + else if (NavPoint is not null) { NavPoint.SetPosition(newpos); } - else if (NavPortal != null) + else if (NavPortal is not null) { NavPortal.SetPosition(newpos); } - else if (TrainTrackNode != null) + else if (TrainTrackNode is not null) { TrainTrackNode.SetPosition(newpos); } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { ScenarioNode.SetPosition(newpos); } - else if (Audio != null) + else if (Audio is not null) { Audio.SetPosition(newpos); } @@ -1097,7 +1097,7 @@ namespace CodeWalker } public void SetRotation(Quaternion newrot, bool editPivot) { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { if (editPivot) { @@ -1107,7 +1107,7 @@ namespace CodeWalker var cen = MultipleSelectionCenter; var orinv = Quaternion.Invert(MultipleSelectionRotation); var trans = newrot * orinv; - YmapEntityDef ent = null;//hack to use an entity for multple selections... buggy if entities mismatch!!! + YmapEntityDef? ent = null;//hack to use an entity for multple selections... buggy if entities mismatch!!! for (int i = 0; i < MultipleSelectionItems.Length; i++) { var collVert = MultipleSelectionItems[i].CollisionVertex; @@ -1124,15 +1124,15 @@ namespace CodeWalker } ent = MultipleSelectionItems[i].EntityDef ?? ent; } - var eorinv = (ent != null) ? Quaternion.Invert(ent.Orientation) : Quaternion.Identity; - if (GatheredCollisionVerts != null) + var eorinv = (ent is not null) ? Quaternion.Invert(ent.Orientation) : Quaternion.Identity; + if (GatheredCollisionVerts is not null) { for (int i = 0; i < GatheredCollisionVerts.Length; i++) { var refpos = GatheredCollisionVerts[i].Position; var relpos = refpos - cen; var newpos = trans.Multiply(relpos) + cen; - if (ent != null) + if (ent is not null) { refpos = ent.Position + ent.Orientation.Multiply(refpos); relpos = refpos - cen; @@ -1144,21 +1144,21 @@ namespace CodeWalker MultipleSelectionRotation = newrot; } } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { //do nothing, but stop any poly from being rotated also } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { - if (EntityDef != null) newrot = Quaternion.Normalize(Quaternion.Invert(EntityDef.Orientation) * newrot); + if (EntityDef is not null) newrot = Quaternion.Normalize(Quaternion.Invert(EntityDef.Orientation) * newrot); CollisionPoly.Orientation = newrot; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { - if (EntityDef != null) newrot = Quaternion.Normalize(Quaternion.Invert(EntityDef.Orientation) * newrot); + if (EntityDef is not null) newrot = Quaternion.Normalize(Quaternion.Invert(EntityDef.Orientation) * newrot); CollisionBounds.Orientation = newrot; } - else if (EntityDef != null) + else if (EntityDef is not null) { if (editPivot) { @@ -1169,42 +1169,42 @@ namespace CodeWalker EntityDef.SetOrientationFromWidget(newrot); } } - else if (CarGenerator != null) + else if (CarGenerator is not null) { CarGenerator.SetOrientation(newrot); } - else if (LodLight != null) + else if (LodLight is not null) { LodLight.SetOrientation(newrot); } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { BoxOccluder.Orientation = newrot; } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { OccludeModelTri.Orientation = newrot; } - else if (ScenarioNode != null) + else if (ScenarioNode is not null) { ScenarioNode.SetOrientation(newrot); } - else if (NavPoint != null) + else if (NavPoint is not null) { NavPoint.SetOrientation(newrot); } - else if (NavPortal != null) + else if (NavPortal is not null) { NavPortal.SetOrientation(newrot); } - else if (Audio != null) + else if (Audio is not null) { Audio.SetOrientation(newrot); } } public void SetScale(Vector3 newscale, bool editPivot) { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { if (editPivot) {//editing pivot scale is sort of meaningless.. @@ -1215,7 +1215,7 @@ namespace CodeWalker var ori = MultipleSelectionRotation; var orinv = Quaternion.Invert(ori); var rsca = newscale / MultipleSelectionScale; - YmapEntityDef ent = null;//hack to use an entity for multple selections... buggy if entities mismatch!!! + YmapEntityDef? ent = null;//hack to use an entity for multple selections... buggy if entities mismatch!!! for (int i = 0; i < MultipleSelectionItems.Length; i++) { var collVert = MultipleSelectionItems[i].CollisionVertex; @@ -1231,14 +1231,14 @@ namespace CodeWalker ent = MultipleSelectionItems[i].EntityDef ?? ent; } var eorinv = (ent != null) ? Quaternion.Invert(ent.Orientation) : Quaternion.Identity; - if (GatheredCollisionVerts != null) + if (GatheredCollisionVerts is not null) { for (int i = 0; i < GatheredCollisionVerts.Length; i++) { var refpos = GatheredCollisionVerts[i].Position; var relpos = refpos - cen; var newpos = ori.Multiply(orinv.Multiply(relpos) * rsca) + cen; - if (ent != null) + if (ent is not null) { refpos = ent.Position + ent.Orientation.Multiply(refpos); relpos = refpos - cen; @@ -1251,36 +1251,36 @@ namespace CodeWalker MultipleSelectionScale = newscale; } } - else if (CollisionVertex != null) + else if (CollisionVertex is not null) { //do nothing, but stop any poly from being scaled also } - else if (CollisionPoly != null) + else if (CollisionPoly is not null) { CollisionPoly.Scale = newscale; } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { CollisionBounds.Scale = newscale; } - else if (EntityDef != null) + else if (EntityDef is not null) { EntityDef.SetScale(newscale); } - else if (CarGenerator != null) + else if (CarGenerator is not null) { CarGenerator.SetScale(newscale); AABB = new BoundingBox(CarGenerator.BBMin, CarGenerator.BBMax); } - else if (LodLight != null) + else if (LodLight is not null) { LodLight.SetScale(newscale); } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { BoxOccluder.SetSize(newscale); } - else if (OccludeModelTri != null) + else if (OccludeModelTri is not null) { OccludeModelTri.Scale = newscale; } @@ -1320,9 +1320,9 @@ namespace CodeWalker - public void UpdateGraphics(WorldForm wf) + public readonly void UpdateGraphics(WorldForm wf) { - if (MultipleSelectionItems != null) + if (MultipleSelectionItems is not null) { var pathYnds = new Dictionary(); var navYnvs = new Dictionary(); @@ -1335,51 +1335,51 @@ namespace CodeWalker foreach (var item in MultipleSelectionItems) { - if (item.PathNode != null) + if (item.PathNode is not null) { pathYnds[item.PathNode.Ynd] = 1; } - if (item.NavPoly != null) + if (item.NavPoly is not null) { navYnvs[item.NavPoly.Ynv] = 1; } - if (item.NavPoint != null) + if (item.NavPoint is not null) { navYnvs[item.NavPoint.Ynv] = 1; } - if (item.NavPortal != null) + if (item.NavPortal is not null) { navYnvs[item.NavPortal.Ynv] = 1; } - if (item.TrainTrackNode != null) + if (item.TrainTrackNode is not null) { trainTracks[item.TrainTrackNode.Track] = 1; } - if (item.ScenarioNode != null) + if (item.ScenarioNode is not null) { scenarioYmts[item.ScenarioNode.Ymt] = 1; } - if (item.CollisionBounds != null) + if (item.CollisionBounds is not null) { bounds[item.CollisionBounds] = 1; } - if (item.CollisionPoly?.Owner != null) + if (item.CollisionPoly?.Owner is not null) { bounds[item.CollisionPoly.Owner] = 1; } - if (item.CollisionVertex?.Owner != null) + if (item.CollisionVertex?.Owner is not null) { bounds[item.CollisionVertex.Owner] = 1; } - if (item.LodLight?.LodLights != null) + if (item.LodLight?.LodLights is not null) { lodlights[item.LodLight.LodLights] = 1; } - if (item.BoxOccluder != null) + if (item.BoxOccluder is not null) { boxoccls[item.BoxOccluder] = 1; } - if (item.OccludeModelTri?.Model != null) + if (item.OccludeModelTri?.Model is not null) { occlmods[item.OccludeModelTri.Model] = 1; } @@ -1422,51 +1422,51 @@ namespace CodeWalker } else { - if (PathNode != null) + if (PathNode is not null) { wf.UpdatePathYndGraphics(PathNode.Ynd, false); } - if (NavPoly != null) + if (NavPoly is not null) { wf.UpdateNavYnvGraphics(NavPoly.Ynv, true); } - if (NavPoint != null) + if (NavPoint is not null) { wf.UpdateNavYnvGraphics(NavPoint.Ynv, true); } - if (NavPortal != null) + if (NavPortal is not null) { wf.UpdateNavYnvGraphics(NavPortal.Ynv, true); } - if (TrainTrackNode != null) + if (TrainTrackNode is not null) { wf.UpdateTrainTrackGraphics(TrainTrackNode.Track, false); } - if (ScenarioNode != null) + if (ScenarioNode is not null) { wf.UpdateScenarioGraphics(ScenarioNode.Ymt, false); } - if (CollisionVertex?.Owner != null) + if (CollisionVertex?.Owner is not null) { wf.UpdateCollisionBoundsGraphics(CollisionVertex.Owner); } - else if (CollisionPoly?.Owner != null) + else if (CollisionPoly?.Owner is not null) { wf.UpdateCollisionBoundsGraphics(CollisionPoly.Owner); } - else if (CollisionBounds != null) + else if (CollisionBounds is not null) { wf.UpdateCollisionBoundsGraphics(CollisionBounds); } - else if (LodLight != null) + else if (LodLight is not null) { wf.UpdateLodLightGraphics(LodLight); } - else if (BoxOccluder != null) + else if (BoxOccluder is not null) { wf.UpdateBoxOccluderGraphics(BoxOccluder); } - else if (OccludeModelTri?.Model != null) + else if (OccludeModelTri?.Model is not null) { wf.UpdateOccludeModelGraphics(OccludeModelTri?.Model); } @@ -1474,29 +1474,29 @@ namespace CodeWalker } - public object GetProjectObject() + public readonly object GetProjectObject() { - if (MultipleSelectionItems != null) return MultipleSelectionItems; - else if (CollisionVertex != null) return CollisionVertex; - else if (CollisionPoly != null) return CollisionPoly; - else if (CollisionBounds != null) return CollisionBounds; - else if (EntityDef != null) return EntityDef; - else if (CarGenerator != null) return CarGenerator; - else if (LodLight != null) return LodLight; - else if (BoxOccluder != null) return BoxOccluder; - else if (OccludeModelTri != null) return OccludeModelTri; - else if (PathNode != null) return PathNode; - else if (NavPoly != null) return NavPoly; - else if (NavPoint != null) return NavPoint; - else if (NavPortal != null) return NavPortal; - else if (TrainTrackNode != null) return TrainTrackNode; - else if (ScenarioNode != null) return ScenarioNode; - else if (Audio?.AudioZone != null) return Audio; - else if (Audio?.AudioEmitter != null) return Audio; + if (MultipleSelectionItems is not null) return MultipleSelectionItems; + else if (CollisionVertex is not null) return CollisionVertex; + else if (CollisionPoly is not null) return CollisionPoly; + else if (CollisionBounds is not null) return CollisionBounds; + else if (EntityDef is not null) return EntityDef; + else if (CarGenerator is not null) return CarGenerator; + else if (LodLight is not null) return LodLight; + else if (BoxOccluder is not null) return BoxOccluder; + else if (OccludeModelTri is not null) return OccludeModelTri; + else if (PathNode is not null) return PathNode; + else if (NavPoly is not null) return NavPoly; + else if (NavPoint is not null) return NavPoint; + else if (NavPortal is not null) return NavPortal; + else if (TrainTrackNode is not null) return TrainTrackNode; + else if (ScenarioNode is not null) return ScenarioNode; + else if (Audio?.AudioZone is not null) return Audio; + else if (Audio?.AudioEmitter is not null) return Audio; return null; } - public static MapSelection FromProjectObject(WorldForm worldForm, object o, object parent = null) + public static MapSelection FromProjectObject(WorldForm worldForm, object o, object? parent = null) { const float nrad = 0.5f; var ms = new MapSelection(); @@ -1632,10 +1632,7 @@ namespace CodeWalker - public override string ToString() - { - return GetFullNameString("[Empty]"); - } + public override readonly string ToString() => GetFullNameString("[Empty]"); } diff --git a/CodeWalker/World/Widget.cs b/CodeWalker/World/Widget.cs index d52c4f5..c1b8c23 100644 --- a/CodeWalker/World/Widget.cs +++ b/CodeWalker/World/Widget.cs @@ -17,7 +17,7 @@ namespace CodeWalker.World public abstract void Render(DeviceContext context, Camera cam, WidgetShader shader); - protected bool GetAxisRayHit(Vector3 ax1, Vector3 ax2, Vector3 camrel, Ray ray, out Vector3 pos) + protected bool GetAxisRayHit(in Vector3 ax1, in Vector3 ax2, in Vector3 camrel, in Ray ray, out Vector3 pos) { //helper method for double sided ray/plane intersection Vector3 pn = Vector3.Cross(ax1, ax2); diff --git a/CodeWalker/World/WorldInfoForm.cs b/CodeWalker/World/WorldInfoForm.cs index 71c5af6..4c22a60 100644 --- a/CodeWalker/World/WorldInfoForm.cs +++ b/CodeWalker/World/WorldInfoForm.cs @@ -215,7 +215,8 @@ namespace CodeWalker.World } private void AddSelectionDrawableModelsTreeNodes(DrawableModel[] models, string prefix, bool check) { - if (models == null) return; + if (models is null) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -228,7 +229,8 @@ namespace CodeWalker.World var tmnode = SelDrawableTexturesTreeView.Nodes.Add(mprefix + " " + model.ToString()); tmnode.Tag = model; - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { @@ -249,14 +251,12 @@ namespace CodeWalker.World { var hash = pl.Hashes[ip]; var parm = pl.Parameters[ip]; - var tex = parm.Data as TextureBase; - if (tex != null) + if (parm.Data is TextureBase tex) { - var t = tex as Texture; var tstr = tex.Name.Trim(); - if (t != null) + if (tex is Texture t) { - tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height); + tstr = $"{tex.Name} ({t.Width}x{t.Height}, embedded)"; } var tnode = tgnode.Nodes.Add(hash.ToString().Trim() + ": " + tstr); tnode.Tag = tex; @@ -381,12 +381,9 @@ namespace CodeWalker.World { owner = Selection.Drawable.Owner; } - YdrFile ydr = owner as YdrFile; - YddFile ydd = owner as YddFile; - YftFile yft = owner as YftFile; SelTextureNameTextBox.Text = tex.Name; - SelTextureDictionaryTextBox.Text = (ytd != null) ? ytd.Name : (ydr != null) ? ydr.Name : (ydd != null) ? ydd.Name : (yft != null) ? yft.Name : string.Empty; + SelTextureDictionaryTextBox.Text = (ytd != null) ? ytd.Name : (owner is YdrFile ydr) ? ydr.Name : (owner is YddFile ydd) ? ydd.Name : (owner is YftFile yft) ? yft.Name : string.Empty; SaveTextureButton.Enabled = true; } else diff --git a/CodeWalker/World/WorldSearchForm.cs b/CodeWalker/World/WorldSearchForm.cs index 46a7966..33e2ac0 100644 --- a/CodeWalker/World/WorldSearchForm.cs +++ b/CodeWalker/World/WorldSearchForm.cs @@ -1,12 +1,16 @@ using CodeWalker.GameFiles; +using CommunityToolkit.HighPerformance; using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; @@ -16,7 +20,7 @@ namespace CodeWalker.World { private WorldForm WorldForm; - private volatile bool AbortOperation = false; + private CancellationTokenSource AbortOperation = new CancellationTokenSource(); private List ArchetypeResults = new List(); private List EntityResults = new List(); @@ -67,118 +71,141 @@ namespace CodeWalker.World ArchetypeSearchButton.Enabled = false; ArchetypeSearchAbortButton.Enabled = true; ArchetypeSearchExportResultsButton.Enabled = false; - AbortOperation = false; + AbortOperation.Cancel(); + AbortOperation = new CancellationTokenSource(); ArchetypeResults.Clear(); ArchetypeResultsListView.VirtualListSize = 0; s = s.ToLowerInvariant(); - Task.Run(() => + _ = Task.Run(async () => { var rpfman = gfc.RpfMan; - IEnumerable rpflist = loadedOnly ? gfc.ActiveMapRpfFiles.Values : rpfman.AllRpfs; - var results = new List(); + RpfFile[] rpflist = (loadedOnly ? (IEnumerable)gfc.ActiveMapRpfFiles.Values : rpfman.AllRpfs).ToArray(); + var results = new ConcurrentBag(); - foreach (var rpf in rpflist) + var token = AbortOperation.Token; + + var hash = JenkHash.GenHashLower(s); + + var archetype = GameFileCache.Instance?.GetArchetype(hash); + + if (archetype is not null) { - foreach (var entry in rpf.AllEntries) + ArchetypeSearchAddResult(archetype); + results.Add(archetype); + } + + try + { + await Parallel.ForAsync(0, rpflist.Length, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount / 2, CancellationToken = token }, async (i, cancellationToken) => { - try + var rpf = rpflist[i]; + foreach (var entry in rpf.AllEntries) { - if (AbortOperation) + try { - ArchetypeSearchUpdateStatus("Search aborted!"); - ArchetypeSearchComplete(); - return; - } - if (entry.Name.EndsWith(".ytyp", StringComparison.OrdinalIgnoreCase)) - { - ArchetypeSearchUpdateStatus(entry.Path); - - YtypFile ytyp = rpfman.GetFile(entry); - if (ytyp == null) continue; - if (ytyp.AllArchetypes == null) continue; - - foreach (var arch in ytyp.AllArchetypes) + if (token.IsCancellationRequested) { - if (arch.Name.ToLowerInvariant().Contains(s) - || arch.AssetName.ToLowerInvariant().Contains(s)) + return; + } + if (entry.Name.EndsWith(".ytyp", StringComparison.OrdinalIgnoreCase)) + { + ArchetypeSearchUpdateStatus(entry.Path); + + YtypFile? ytyp = await RpfManager.GetFileAsync(entry); + + if (ytyp == null) + continue; + + foreach (var arch in ytyp.AllArchetypes) { - ArchetypeSearchAddResult(arch); - results.Add(arch); + if (arch.Name.Contains(s, StringComparison.OrdinalIgnoreCase) + || arch.AssetName.Contains(s, StringComparison.OrdinalIgnoreCase)) + { + ArchetypeSearchAddResult(arch); + results.Add(arch); + } } } } + catch (Exception ex) + { + ArchetypeSearchUpdateStatus(ex.Message); + Console.WriteLine(ex); + } } - catch (Exception ex) - { - ArchetypeSearchUpdateStatus(ex.Message); - } - } - } + }); - ArchetypeSearchUpdateStatus("Search complete. " + results.Count.ToString() + " archetypes found."); - ArchetypeSearchComplete(); + ArchetypeSearchUpdateStatus($"Search complete. {results.Count} archetypes found."); + } + catch (TaskCanceledException) + { + ArchetypeSearchUpdateStatus("Search aborted!"); + } + finally + { + ArchetypeSearchComplete(); + } }); } - private void ArchetypeSearchUpdateStatus(string text) + private async void ArchetypeSearchUpdateStatus(string text, bool force = false) { + if (!force && LastUpdate.Elapsed < TimeSpan.FromSeconds(0.1)) + { + return; + } + + LastUpdate.Restart(); try { - if (InvokeRequired) - { - Invoke(new Action(() => { ArchetypeSearchUpdateStatus(text); })); - } - else - { - ArchetypeSearchStatusLabel.Text = text; - } + await this.SwitchToUi(); + ArchetypeSearchStatusLabel.Text = text; + } + catch(Exception ex) + { + Console.WriteLine(ex); } - catch { } } - private void ArchetypeSearchAddResult(Archetype arch) + private async void ArchetypeSearchAddResult(Archetype arch) { try { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { ArchetypeSearchAddResult(arch); })); - } - else - { - ArchetypeResults.Add(arch); - ArchetypeResultsListView.VirtualListSize = ArchetypeResults.Count; - } + await this.SwitchToUi(); + if (ArchetypeResults.Contains(arch)) + return; + ArchetypeResults.Add(arch); + ArchetypeResultsListView.VirtualListSize = ArchetypeResults.Count; + } + catch (Exception ex) + { + Console.WriteLine(ex); } - catch { } } - private void ArchetypeSearchComplete() + private async void ArchetypeSearchComplete() { try { - if (InvokeRequired) - { - Invoke(new Action(() => { ArchetypeSearchComplete(); })); - } - else - { - ArchetypeSearchTextBox.Enabled = true; - ArchetypeSearchButton.Enabled = true; - ArchetypeSearchAbortButton.Enabled = false; - ArchetypeSearchExportResultsButton.Enabled = true; - } + await this.SwitchToUi(); + ArchetypeSearchTextBox.Enabled = true; + ArchetypeSearchButton.Enabled = true; + ArchetypeSearchAbortButton.Enabled = false; + ArchetypeSearchExportResultsButton.Enabled = true; + } + catch (Exception ex) + { + Console.WriteLine(ex); } - catch { } } private void ArchetypeSearchAbortButton_Click(object sender, EventArgs e) { - AbortOperation = true; + AbortOperation.Cancel(); } private void ArchetypeSearchExportResultsButton_Click(object sender, EventArgs e) @@ -189,7 +216,7 @@ namespace CodeWalker.World return; } - SaveFileDialog.FileName = "Archetypes_" + ArchetypeSearchTextBox.Text; + SaveFileDialog.FileName = $"Archetypes_{ArchetypeSearchTextBox.Text}"; if (SaveFileDialog.ShowDialog() != DialogResult.OK) { return; @@ -201,7 +228,7 @@ namespace CodeWalker.World sb.AppendLine("Name, AssetName, YtypFile"); foreach (var arch in ArchetypeResults) { - sb.AppendLine(string.Format("{0}, {1}, {2}", arch.Name, arch.AssetName, arch.Ytyp?.RpfFileEntry?.Path ?? "")); + sb.AppendLine($"{arch.Name}, {arch.AssetName}, {arch.Ytyp?.RpfFileEntry?.Path ?? ""}"); } File.WriteAllText(fname, sb.ToString()); @@ -308,120 +335,133 @@ namespace CodeWalker.World EntitySearchLoadedOnlyCheckBox.Enabled = false; EntitySearchExportResultsButton.Enabled = false; EntitySearchSetMarkersButton.Enabled = false; - AbortOperation = false; + AbortOperation.Cancel(); + AbortOperation = new CancellationTokenSource(); EntityResults.Clear(); EntityResultsListView.VirtualListSize = 0; s = s.ToLowerInvariant(); //var h = JenkHash.GenHash(s, JenkHashInputEncoding.UTF8); - Task.Run(() => + _ = Task.Run(async () => { var rpfman = gfc.RpfMan; - IEnumerable rpflist = loadedOnly ? gfc.ActiveMapRpfFiles.Values : rpfman.AllRpfs; - var results = new List(); + RpfFile[] rpflist = (loadedOnly ? (IEnumerable)gfc.ActiveMapRpfFiles.Values : rpfman.AllRpfs).ToArray(); + var results = new ConcurrentBag(); - foreach (var rpf in rpflist) + var token = AbortOperation.Token; + + try { - foreach (var entry in rpf.AllEntries) + await Parallel.ForAsync(0, rpflist.Length, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount / 2, CancellationToken = token }, async (i, cancellationToken) => { - try + var rpf = rpflist[i]; + foreach (var entry in rpf.AllEntries) { - if (AbortOperation) + try { - EntitySearchUpdateStatus("Search aborted!"); - EntitySearchComplete(); - return; - } - if (entry.Name.EndsWith(".ymap", StringComparison.OrdinalIgnoreCase)) - { - EntitySearchUpdateStatus(entry.Path); + if (cancellationToken.IsCancellationRequested || AbortOperation.IsCancellationRequested) + return; - YmapFile ymap = rpfman.GetFile(entry); - if (ymap == null) continue; - if (ymap.AllEntities == null) continue; - - foreach (var ent in ymap.AllEntities) + if (entry.Name.EndsWith(".ymap", StringComparison.OrdinalIgnoreCase)) { - //if (ent._CEntityDef.archetypeName.Hash == h) - if (ent.Name.ToLowerInvariant().Contains(s)) + EntitySearchUpdateStatus(entry.Path); + + var ymap = await GameFileCache.Instance.GetYmapAsync(entry.ShortNameHash); + + if (ymap is null || ymap.AllEntities.Length == 0) + continue; + + foreach (var ent in ymap.AllEntities) { - EntitySearchAddResult(ent); - results.Add(ent); + //if (ent._CEntityDef.archetypeName.Hash == h) + if (ent.Name.Contains(s, StringComparison.OrdinalIgnoreCase)) + { + EntitySearchAddResult(ent); + results.Add(ent); + } } } } + catch (Exception ex) + { + EntitySearchUpdateStatus(ex.Message); + Console.WriteLine(ex); + } } - catch (Exception ex) - { - EntitySearchUpdateStatus(ex.Message); - } - } - } + }); - EntitySearchUpdateStatus("Search complete. " + results.Count.ToString() + " entities found."); - EntitySearchComplete(); + EntitySearchUpdateStatus($"Search complete. {results.Count} entities found.", true); + } + catch(TaskCanceledException) + { + EntitySearchUpdateStatus("Search aborted!", true); + } + finally + { + EntitySearchComplete(); + } }); } - private void EntitySearchUpdateStatus(string text) + Stopwatch LastUpdate = Stopwatch.StartNew(); + private async void EntitySearchUpdateStatus(string text, bool force = false) { + if (!force && LastUpdate.Elapsed < TimeSpan.FromSeconds(0.1)) + { + return; + } + + LastUpdate.Restart(); try { - if (InvokeRequired) - { - Invoke(new Action(() => { EntitySearchUpdateStatus(text); })); - } - else - { - EntitySearchStatusLabel.Text = text; - } + await this.SwitchToUi(); + EntitySearchStatusLabel.Text = text; + } + catch (Exception ex) + { + Console.WriteLine(ex); } - catch { } } - private void EntitySearchAddResult(YmapEntityDef ent) + private async void EntitySearchAddResult(YmapEntityDef ent) { try { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { EntitySearchAddResult(ent); })); - } - else - { - EntityResults.Add(ent); - EntityResultsListView.VirtualListSize = EntityResults.Count; - } + await this.SwitchToUi(); + if (EntityResults.Contains(ent)) + return; + EntityResults.Add(ent); + EntityResultsListView.VirtualListSize = EntityResults.Count; + } + catch (Exception ex) + { + Console.WriteLine(ex); } - catch { } } - private void EntitySearchComplete() + private async void EntitySearchComplete() { try { - if (InvokeRequired) - { - Invoke(new Action(() => { EntitySearchComplete(); })); - } - else - { - EntitySearchTextBox.Enabled = true; - EntitySearchButton.Enabled = true; - EntitySearchAbortButton.Enabled = false; - EntitySearchLoadedOnlyCheckBox.Enabled = true; - EntitySearchExportResultsButton.Enabled = true; - EntitySearchSetMarkersButton.Enabled = true; - } + await this.SwitchToUi(); + EntitySearchTextBox.Enabled = true; + EntitySearchButton.Enabled = true; + EntitySearchAbortButton.Enabled = false; + EntitySearchLoadedOnlyCheckBox.Enabled = true; + EntitySearchExportResultsButton.Enabled = true; + EntitySearchSetMarkersButton.Enabled = true; + } + catch (Exception ex) + { + Console.WriteLine(ex); } - catch { } } private void EntitySearchAbortButton_Click(object sender, EventArgs e) { - AbortOperation = true; + AbortOperation.Cancel(); } private void EntitySearchExportResultsButton_Click(object sender, EventArgs e) @@ -444,7 +484,7 @@ namespace CodeWalker.World sb.AppendLine("ArchetypeName, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, YmapFile"); foreach (var ent in EntityResults) { - sb.AppendLine(string.Format("{0}, {1}, {2}, {3}", ent.Name, FloatUtil.GetVector3String(ent._CEntityDef.position), FloatUtil.GetVector4String(ent._CEntityDef.rotation), ent.Ymap?.RpfFileEntry?.Path ?? "")); + sb.AppendLine($"{ent.Name}, {FloatUtil.GetVector3String(ent._CEntityDef.position)}, {FloatUtil.GetVector4String(ent._CEntityDef.rotation)}, {ent.Ymap?.RpfFileEntry?.Path ?? ""}"); } File.WriteAllText(fname, sb.ToString()); diff --git a/CodeWalker/WorldForm.Designer.cs b/CodeWalker/WorldForm.Designer.cs index 11e465d..33f4fc6 100644 --- a/CodeWalker/WorldForm.Designer.cs +++ b/CodeWalker/WorldForm.Designer.cs @@ -30,3701 +30,3609 @@ namespace CodeWalker /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WorldForm)); + components = new System.ComponentModel.Container(); System.Windows.Forms.Label label34; - this.StatusStrip = new System.Windows.Forms.StatusStrip(); - this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.MousedLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.StatsLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.ModelComboBox = new System.Windows.Forms.ComboBox(); - this.ToolsPanel = new System.Windows.Forms.Panel(); - this.ToolsDragPanel = new System.Windows.Forms.Panel(); - this.AboutButton = new System.Windows.Forms.Button(); - this.ToolsButton = new System.Windows.Forms.Button(); - this.ToolsPanelExpandButton = new System.Windows.Forms.Button(); - this.ToolsTabControl = new System.Windows.Forms.TabControl(); - this.ViewTabPage = new System.Windows.Forms.TabPage(); - this.ViewTabControl = new System.Windows.Forms.TabControl(); - this.ViewWorldTabPage = new System.Windows.Forms.TabPage(); - this.EnableModsCheckBox = new System.Windows.Forms.CheckBox(); - this.label30 = new System.Windows.Forms.Label(); - this.DlcLevelComboBox = new System.Windows.Forms.ComboBox(); - this.EnableDlcCheckBox = new System.Windows.Forms.CheckBox(); - this.WorldYmapWeatherFilterCheckBox = new System.Windows.Forms.CheckBox(); - this.WorldYmapTimeFilterCheckBox = new System.Windows.Forms.CheckBox(); - this.WorldScriptedYmapsCheckBox = new System.Windows.Forms.CheckBox(); - this.WorldDetailDistLabel = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.WorldDetailDistTrackBar = new System.Windows.Forms.TrackBar(); - this.WorldLodDistLabel = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.WorldLodDistTrackBar = new System.Windows.Forms.TrackBar(); - this.label15 = new System.Windows.Forms.Label(); - this.WorldMaxLodComboBox = new System.Windows.Forms.ComboBox(); - this.ViewYmapsTabPage = new System.Windows.Forms.TabPage(); - this.ShowYmapChildrenCheckBox = new System.Windows.Forms.CheckBox(); - this.label2 = new System.Windows.Forms.Label(); - this.DetailTrackBar = new System.Windows.Forms.TrackBar(); - this.DynamicLODCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapsTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.ViewModelTabPage = new System.Windows.Forms.TabPage(); - this.label1 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.ViewModeComboBox = new System.Windows.Forms.ComboBox(); - this.ShowToolbarCheckBox = new System.Windows.Forms.CheckBox(); - this.MarkersTabPage = new System.Windows.Forms.TabPage(); - this.label27 = new System.Windows.Forms.Label(); - this.CameraPositionTextBox = new System.Windows.Forms.TextBox(); - this.AddSelectionMarkerButton = new System.Windows.Forms.Button(); - this.AddCurrentPositonMarkerButton = new System.Windows.Forms.Button(); - this.ResetMarkersButton = new System.Windows.Forms.Button(); - this.ClearMarkersButton = new System.Windows.Forms.Button(); - this.GoToButton = new System.Windows.Forms.Button(); - this.ShowLocatorCheckBox = new System.Windows.Forms.CheckBox(); - this.label6 = new System.Windows.Forms.Label(); - this.LocateTextBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.AddMarkersButton = new System.Windows.Forms.Button(); - this.MultiFindTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.SelectionTabPage = new System.Windows.Forms.TabPage(); - this.label25 = new System.Windows.Forms.Label(); - this.SelectionModeComboBox = new System.Windows.Forms.ComboBox(); - this.SelectionNameTextBox = new System.Windows.Forms.TextBox(); - this.SelectionTabControl = new System.Windows.Forms.TabControl(); - this.SelectionEntityTabPage = new System.Windows.Forms.TabPage(); - this.SelEntityPropertyGrid = new CodeWalker.WinForms.ReadOnlyPropertyGrid(); - this.SelectionArchetypeTabPage = new System.Windows.Forms.TabPage(); - this.SelArchetypePropertyGrid = new CodeWalker.WinForms.ReadOnlyPropertyGrid(); - this.SelectionDrawableTabPage = new System.Windows.Forms.TabPage(); - this.tabControl3 = new System.Windows.Forms.TabControl(); - this.tabPage11 = new System.Windows.Forms.TabPage(); - this.SelDrawablePropertyGrid = new CodeWalker.WinForms.ReadOnlyPropertyGrid(); - this.tabPage12 = new System.Windows.Forms.TabPage(); - this.SelDrawableModelsTreeView = new CodeWalker.WinForms.TreeViewFix(); - this.tabPage13 = new System.Windows.Forms.TabPage(); - this.SelDrawableTexturesTreeView = new CodeWalker.WinForms.TreeViewFix(); - this.SelectionExtensionTabPage = new System.Windows.Forms.TabPage(); - this.SelExtensionPropertyGrid = new CodeWalker.WinForms.ReadOnlyPropertyGrid(); - this.MouseSelectCheckBox = new System.Windows.Forms.CheckBox(); - this.OptionsTabPage = new System.Windows.Forms.TabPage(); - this.OptionsTabControl = new System.Windows.Forms.TabControl(); - this.OptionsGeneralTabPage = new System.Windows.Forms.TabPage(); - this.CarGeneratorsCheckBox = new System.Windows.Forms.CheckBox(); - this.RenderEntitiesCheckBox = new System.Windows.Forms.CheckBox(); - this.AdvancedSettingsButton = new System.Windows.Forms.Button(); - this.ControlSettingsButton = new System.Windows.Forms.Button(); - this.MapViewDetailLabel = new System.Windows.Forms.Label(); - this.label28 = new System.Windows.Forms.Label(); - this.MapViewDetailTrackBar = new System.Windows.Forms.TrackBar(); - this.CameraModeComboBox = new System.Windows.Forms.ComboBox(); - this.label24 = new System.Windows.Forms.Label(); - this.WaterQuadsCheckBox = new System.Windows.Forms.CheckBox(); - this.FieldOfViewLabel = new System.Windows.Forms.Label(); - this.label22 = new System.Windows.Forms.Label(); - this.TimedEntitiesAlwaysOnCheckBox = new System.Windows.Forms.CheckBox(); - this.GrassCheckBox = new System.Windows.Forms.CheckBox(); - this.InteriorsCheckBox = new System.Windows.Forms.CheckBox(); - this.CollisionMeshLayerDrawableCheckBox = new System.Windows.Forms.CheckBox(); - this.CollisionMeshLayer2CheckBox = new System.Windows.Forms.CheckBox(); - this.CollisionMeshLayer1CheckBox = new System.Windows.Forms.CheckBox(); - this.label13 = new System.Windows.Forms.Label(); - this.CollisionMeshLayer0CheckBox = new System.Windows.Forms.CheckBox(); - this.label12 = new System.Windows.Forms.Label(); - this.CollisionMeshRangeTrackBar = new System.Windows.Forms.TrackBar(); - this.CollisionMeshesCheckBox = new System.Windows.Forms.CheckBox(); - this.FullScreenCheckBox = new System.Windows.Forms.CheckBox(); - this.TimedEntitiesCheckBox = new System.Windows.Forms.CheckBox(); - this.FieldOfViewTrackBar = new System.Windows.Forms.TrackBar(); - this.OptionsRenderTabPage = new System.Windows.Forms.TabPage(); - this.AntiAliasingTrackBar = new System.Windows.Forms.TrackBar(); - this.FarClipUpDown = new System.Windows.Forms.NumericUpDown(); - this.label32 = new System.Windows.Forms.Label(); - this.NearClipUpDown = new System.Windows.Forms.NumericUpDown(); - this.label31 = new System.Windows.Forms.Label(); - this.HDTexturesCheckBox = new System.Windows.Forms.CheckBox(); - this.WireframeCheckBox = new System.Windows.Forms.CheckBox(); - this.RenderModeComboBox = new System.Windows.Forms.ComboBox(); - this.label11 = new System.Windows.Forms.Label(); - this.TextureSamplerComboBox = new System.Windows.Forms.ComboBox(); - this.TextureCoordsComboBox = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); - this.AnisotropicFilteringCheckBox = new System.Windows.Forms.CheckBox(); - this.ProxiesCheckBox = new System.Windows.Forms.CheckBox(); - this.WaitForChildrenCheckBox = new System.Windows.Forms.CheckBox(); - this.label14 = new System.Windows.Forms.Label(); - this.OptionsHelpersTabPage = new System.Windows.Forms.TabPage(); - this.SnapAngleUpDown = new System.Windows.Forms.NumericUpDown(); - this.label33 = new System.Windows.Forms.Label(); - this.SnapGridSizeUpDown = new System.Windows.Forms.NumericUpDown(); - this.label26 = new System.Windows.Forms.Label(); - this.SkeletonsCheckBox = new System.Windows.Forms.CheckBox(); - this.AudioOuterBoundsCheckBox = new System.Windows.Forms.CheckBox(); - this.PopZonesCheckBox = new System.Windows.Forms.CheckBox(); - this.NavMeshesCheckBox = new System.Windows.Forms.CheckBox(); - this.TrainPathsCheckBox = new System.Windows.Forms.CheckBox(); - this.PathsDepthClipCheckBox = new System.Windows.Forms.CheckBox(); - this.PathBoundsCheckBox = new System.Windows.Forms.CheckBox(); - this.SelectionWidgetCheckBox = new System.Windows.Forms.CheckBox(); - this.MarkerStyleComboBox = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.LocatorStyleComboBox = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.MarkerDepthClipCheckBox = new System.Windows.Forms.CheckBox(); - this.label9 = new System.Windows.Forms.Label(); - this.PathsCheckBox = new System.Windows.Forms.CheckBox(); - this.SelectionBoundsCheckBox = new System.Windows.Forms.CheckBox(); - this.BoundsDepthClipCheckBox = new System.Windows.Forms.CheckBox(); - this.BoundsRangeTrackBar = new System.Windows.Forms.TrackBar(); - this.BoundsStyleComboBox = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); - this.OptionsLightingTabPage = new System.Windows.Forms.TabPage(); - this.HDLightsCheckBox = new System.Windows.Forms.CheckBox(); - this.DeferredShadingCheckBox = new System.Windows.Forms.CheckBox(); - this.WeatherRegionComboBox = new System.Windows.Forms.ComboBox(); - this.label29 = new System.Windows.Forms.Label(); - this.CloudParamTrackBar = new System.Windows.Forms.TrackBar(); - this.CloudParamComboBox = new System.Windows.Forms.ComboBox(); - this.label23 = new System.Windows.Forms.Label(); - this.CloudsComboBox = new System.Windows.Forms.ComboBox(); - this.label21 = new System.Windows.Forms.Label(); - this.TimeSpeedLabel = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.TimeSpeedTrackBar = new System.Windows.Forms.TrackBar(); - this.TimeStartStopButton = new System.Windows.Forms.Button(); - this.ArtificialAmbientLightCheckBox = new System.Windows.Forms.CheckBox(); - this.NaturalAmbientLightCheckBox = new System.Windows.Forms.CheckBox(); - this.LODLightsCheckBox = new System.Windows.Forms.CheckBox(); - this.HDRRenderingCheckBox = new System.Windows.Forms.CheckBox(); - this.ControlTimeOfDayCheckBox = new System.Windows.Forms.CheckBox(); - this.TimeOfDayLabel = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.TimeOfDayTrackBar = new System.Windows.Forms.TrackBar(); - this.WeatherComboBox = new System.Windows.Forms.ComboBox(); - this.label17 = new System.Windows.Forms.Label(); - this.ControlLightDirectionCheckBox = new System.Windows.Forms.CheckBox(); - this.SkydomeCheckBox = new System.Windows.Forms.CheckBox(); - this.ShadowsCheckBox = new System.Windows.Forms.CheckBox(); - this.StatusBarCheckBox = new System.Windows.Forms.CheckBox(); - this.QuitButton = new System.Windows.Forms.Button(); - this.ReloadSettingsButton = new System.Windows.Forms.Button(); - this.SaveSettingsButton = new System.Windows.Forms.Button(); - this.ReloadShadersButton = new System.Windows.Forms.Button(); - this.ErrorConsoleCheckBox = new System.Windows.Forms.CheckBox(); - this.ToolsPanelHideButton = new System.Windows.Forms.Button(); - this.ToolsPanelShowButton = new System.Windows.Forms.Button(); - this.ConsolePanel = new System.Windows.Forms.Panel(); - this.ConsoleTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.StatsUpdateTimer = new System.Windows.Forms.Timer(this.components); - this.SelectedMarkerPanel = new System.Windows.Forms.Panel(); - this.SelectedMarkerPositionTextBox = new System.Windows.Forms.TextBox(); - this.SelectedMarkerNameTextBox = new System.Windows.Forms.TextBox(); - this.ToolsMenu = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolsMenuRPFBrowser = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuRPFExplorer = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuSelectionInfo = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuProjectWindow = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuCutsceneViewer = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuAudioExplorer = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuWorldSearch = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuBinarySearch = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuJenkGen = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuJenkInd = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuExtractScripts = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuExtractTextures = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuExtractRawFiles = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuExtractShaders = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenuOptions = new System.Windows.Forms.ToolStripMenuItem(); - this.Toolbar = new CodeWalker.WinForms.ToolStripFix(); - this.ToolbarNewButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarNewProjectButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewYmapButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewYtypButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewYbnButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewYndButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewTrainsButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarNewScenarioButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarOpenButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarOpenProjectButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarOpenFilesButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarOpenFolderButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarSelectButton = new CodeWalker.WinForms.ToolStripSplitButtonFix(); - this.ToolbarSelectEntityButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectEntityExtensionButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectArchetypeExtensionButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectTimeCycleModifierButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectCarGeneratorButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectGrassButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectWaterQuadButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectCalmingQuadButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectWaveQuadButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectCollisionButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectNavMeshButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectPathButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectTrainTrackButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectLodLightsButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectMloInstanceButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectScenarioButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectAudioButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSelectOcclusionButton = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarMoveButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarRotateButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarScaleButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarTransformSpaceButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarObjectSpaceButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarWorldSpaceButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSnapButton = new CodeWalker.WinForms.ToolStripSplitButtonFix(); - this.ToolbarSnapToGroundButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSnapToGridButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSnapToGroundGridButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarSnapGridSizeButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnappingButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnappingOffButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping1Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping2Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping5Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping10Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping45Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnapping90Button = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRotationSnappingCustomButton = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarUndoButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarUndoListButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarRedoButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarRedoListButton = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarInfoWindowButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarProjectWindowButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarAddItemButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarDeleteItemButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarCopyButton = new System.Windows.Forms.ToolStripButton(); - this.ToolbarPasteButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); - this.ToolbarCameraModeButton = new System.Windows.Forms.ToolStripSplitButton(); - this.ToolbarCameraPerspectiveButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarPanel = new System.Windows.Forms.Panel(); - this.SubtitleLabel = new System.Windows.Forms.Label(); - this.SubtitleTimer = new System.Windows.Forms.Timer(this.components); - this.AntiAliasingValue = new System.Windows.Forms.Label(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WorldForm)); + StatusStrip = new System.Windows.Forms.StatusStrip(); + StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + MousedLabel = new System.Windows.Forms.ToolStripStatusLabel(); + StatsLabel = new System.Windows.Forms.ToolStripStatusLabel(); + ModelComboBox = new System.Windows.Forms.ComboBox(); + ToolsPanel = new System.Windows.Forms.Panel(); + ToolsDragPanel = new System.Windows.Forms.Panel(); + AboutButton = new System.Windows.Forms.Button(); + ToolsButton = new System.Windows.Forms.Button(); + ToolsPanelExpandButton = new System.Windows.Forms.Button(); + ToolsTabControl = new System.Windows.Forms.TabControl(); + ViewTabPage = new System.Windows.Forms.TabPage(); + ViewTabControl = new System.Windows.Forms.TabControl(); + ViewWorldTabPage = new System.Windows.Forms.TabPage(); + EnableModsCheckBox = new System.Windows.Forms.CheckBox(); + label30 = new System.Windows.Forms.Label(); + DlcLevelComboBox = new System.Windows.Forms.ComboBox(); + EnableDlcCheckBox = new System.Windows.Forms.CheckBox(); + WorldYmapWeatherFilterCheckBox = new System.Windows.Forms.CheckBox(); + WorldYmapTimeFilterCheckBox = new System.Windows.Forms.CheckBox(); + WorldScriptedYmapsCheckBox = new System.Windows.Forms.CheckBox(); + WorldDetailDistLabel = new System.Windows.Forms.Label(); + label18 = new System.Windows.Forms.Label(); + WorldDetailDistTrackBar = new System.Windows.Forms.TrackBar(); + WorldLodDistLabel = new System.Windows.Forms.Label(); + label16 = new System.Windows.Forms.Label(); + WorldLodDistTrackBar = new System.Windows.Forms.TrackBar(); + label15 = new System.Windows.Forms.Label(); + WorldMaxLodComboBox = new System.Windows.Forms.ComboBox(); + ViewYmapsTabPage = new System.Windows.Forms.TabPage(); + ShowYmapChildrenCheckBox = new System.Windows.Forms.CheckBox(); + label2 = new System.Windows.Forms.Label(); + DetailTrackBar = new System.Windows.Forms.TrackBar(); + DynamicLODCheckBox = new System.Windows.Forms.CheckBox(); + YmapsTextBox = new TextBoxFix(); + ViewModelTabPage = new System.Windows.Forms.TabPage(); + label1 = new System.Windows.Forms.Label(); + label3 = new System.Windows.Forms.Label(); + ViewModeComboBox = new System.Windows.Forms.ComboBox(); + ShowToolbarCheckBox = new System.Windows.Forms.CheckBox(); + MarkersTabPage = new System.Windows.Forms.TabPage(); + label27 = new System.Windows.Forms.Label(); + CameraPositionTextBox = new System.Windows.Forms.TextBox(); + AddSelectionMarkerButton = new System.Windows.Forms.Button(); + AddCurrentPositonMarkerButton = new System.Windows.Forms.Button(); + ResetMarkersButton = new System.Windows.Forms.Button(); + ClearMarkersButton = new System.Windows.Forms.Button(); + GoToButton = new System.Windows.Forms.Button(); + ShowLocatorCheckBox = new System.Windows.Forms.CheckBox(); + label6 = new System.Windows.Forms.Label(); + LocateTextBox = new System.Windows.Forms.TextBox(); + label7 = new System.Windows.Forms.Label(); + AddMarkersButton = new System.Windows.Forms.Button(); + MultiFindTextBox = new TextBoxFix(); + SelectionTabPage = new System.Windows.Forms.TabPage(); + label25 = new System.Windows.Forms.Label(); + SelectionModeComboBox = new System.Windows.Forms.ComboBox(); + SelectionNameTextBox = new System.Windows.Forms.TextBox(); + SelectionTabControl = new System.Windows.Forms.TabControl(); + SelectionEntityTabPage = new System.Windows.Forms.TabPage(); + SelEntityPropertyGrid = new ReadOnlyPropertyGrid(); + SelectionArchetypeTabPage = new System.Windows.Forms.TabPage(); + SelArchetypePropertyGrid = new ReadOnlyPropertyGrid(); + SelectionDrawableTabPage = new System.Windows.Forms.TabPage(); + tabControl3 = new System.Windows.Forms.TabControl(); + tabPage11 = new System.Windows.Forms.TabPage(); + SelDrawablePropertyGrid = new ReadOnlyPropertyGrid(); + tabPage12 = new System.Windows.Forms.TabPage(); + SelDrawableModelsTreeView = new TreeViewFix(); + tabPage13 = new System.Windows.Forms.TabPage(); + SelDrawableTexturesTreeView = new TreeViewFix(); + SelectionExtensionTabPage = new System.Windows.Forms.TabPage(); + SelExtensionPropertyGrid = new ReadOnlyPropertyGrid(); + MouseSelectCheckBox = new System.Windows.Forms.CheckBox(); + OptionsTabPage = new System.Windows.Forms.TabPage(); + OptionsTabControl = new System.Windows.Forms.TabControl(); + OptionsGeneralTabPage = new System.Windows.Forms.TabPage(); + CarGeneratorsCheckBox = new System.Windows.Forms.CheckBox(); + RenderEntitiesCheckBox = new System.Windows.Forms.CheckBox(); + AdvancedSettingsButton = new System.Windows.Forms.Button(); + ControlSettingsButton = new System.Windows.Forms.Button(); + MapViewDetailLabel = new System.Windows.Forms.Label(); + label28 = new System.Windows.Forms.Label(); + MapViewDetailTrackBar = new System.Windows.Forms.TrackBar(); + CameraModeComboBox = new System.Windows.Forms.ComboBox(); + label24 = new System.Windows.Forms.Label(); + WaterQuadsCheckBox = new System.Windows.Forms.CheckBox(); + FieldOfViewLabel = new System.Windows.Forms.Label(); + label22 = new System.Windows.Forms.Label(); + TimedEntitiesAlwaysOnCheckBox = new System.Windows.Forms.CheckBox(); + GrassCheckBox = new System.Windows.Forms.CheckBox(); + InteriorsCheckBox = new System.Windows.Forms.CheckBox(); + CollisionMeshLayerDrawableCheckBox = new System.Windows.Forms.CheckBox(); + CollisionMeshLayer2CheckBox = new System.Windows.Forms.CheckBox(); + CollisionMeshLayer1CheckBox = new System.Windows.Forms.CheckBox(); + label13 = new System.Windows.Forms.Label(); + CollisionMeshLayer0CheckBox = new System.Windows.Forms.CheckBox(); + label12 = new System.Windows.Forms.Label(); + CollisionMeshRangeTrackBar = new System.Windows.Forms.TrackBar(); + CollisionMeshesCheckBox = new System.Windows.Forms.CheckBox(); + FullScreenCheckBox = new System.Windows.Forms.CheckBox(); + TimedEntitiesCheckBox = new System.Windows.Forms.CheckBox(); + FieldOfViewTrackBar = new System.Windows.Forms.TrackBar(); + OptionsRenderTabPage = new System.Windows.Forms.TabPage(); + AntiAliasingValue = new System.Windows.Forms.Label(); + AntiAliasingTrackBar = new System.Windows.Forms.TrackBar(); + FarClipUpDown = new System.Windows.Forms.NumericUpDown(); + label32 = new System.Windows.Forms.Label(); + NearClipUpDown = new System.Windows.Forms.NumericUpDown(); + label31 = new System.Windows.Forms.Label(); + HDTexturesCheckBox = new System.Windows.Forms.CheckBox(); + WireframeCheckBox = new System.Windows.Forms.CheckBox(); + RenderModeComboBox = new System.Windows.Forms.ComboBox(); + label11 = new System.Windows.Forms.Label(); + TextureSamplerComboBox = new System.Windows.Forms.ComboBox(); + TextureCoordsComboBox = new System.Windows.Forms.ComboBox(); + label10 = new System.Windows.Forms.Label(); + AnisotropicFilteringCheckBox = new System.Windows.Forms.CheckBox(); + ProxiesCheckBox = new System.Windows.Forms.CheckBox(); + WaitForChildrenCheckBox = new System.Windows.Forms.CheckBox(); + label14 = new System.Windows.Forms.Label(); + OptionsHelpersTabPage = new System.Windows.Forms.TabPage(); + SnapAngleUpDown = new System.Windows.Forms.NumericUpDown(); + label33 = new System.Windows.Forms.Label(); + SnapGridSizeUpDown = new System.Windows.Forms.NumericUpDown(); + label26 = new System.Windows.Forms.Label(); + SkeletonsCheckBox = new System.Windows.Forms.CheckBox(); + AudioOuterBoundsCheckBox = new System.Windows.Forms.CheckBox(); + PopZonesCheckBox = new System.Windows.Forms.CheckBox(); + NavMeshesCheckBox = new System.Windows.Forms.CheckBox(); + TrainPathsCheckBox = new System.Windows.Forms.CheckBox(); + PathsDepthClipCheckBox = new System.Windows.Forms.CheckBox(); + PathBoundsCheckBox = new System.Windows.Forms.CheckBox(); + SelectionWidgetCheckBox = new System.Windows.Forms.CheckBox(); + MarkerStyleComboBox = new System.Windows.Forms.ComboBox(); + label4 = new System.Windows.Forms.Label(); + LocatorStyleComboBox = new System.Windows.Forms.ComboBox(); + label5 = new System.Windows.Forms.Label(); + MarkerDepthClipCheckBox = new System.Windows.Forms.CheckBox(); + label9 = new System.Windows.Forms.Label(); + PathsCheckBox = new System.Windows.Forms.CheckBox(); + SelectionBoundsCheckBox = new System.Windows.Forms.CheckBox(); + BoundsDepthClipCheckBox = new System.Windows.Forms.CheckBox(); + BoundsRangeTrackBar = new System.Windows.Forms.TrackBar(); + BoundsStyleComboBox = new System.Windows.Forms.ComboBox(); + label8 = new System.Windows.Forms.Label(); + OptionsLightingTabPage = new System.Windows.Forms.TabPage(); + HDLightsCheckBox = new System.Windows.Forms.CheckBox(); + DeferredShadingCheckBox = new System.Windows.Forms.CheckBox(); + WeatherRegionComboBox = new System.Windows.Forms.ComboBox(); + label29 = new System.Windows.Forms.Label(); + CloudParamTrackBar = new System.Windows.Forms.TrackBar(); + CloudParamComboBox = new System.Windows.Forms.ComboBox(); + label23 = new System.Windows.Forms.Label(); + CloudsComboBox = new System.Windows.Forms.ComboBox(); + label21 = new System.Windows.Forms.Label(); + TimeSpeedLabel = new System.Windows.Forms.Label(); + label20 = new System.Windows.Forms.Label(); + TimeSpeedTrackBar = new System.Windows.Forms.TrackBar(); + TimeStartStopButton = new System.Windows.Forms.Button(); + ArtificialAmbientLightCheckBox = new System.Windows.Forms.CheckBox(); + NaturalAmbientLightCheckBox = new System.Windows.Forms.CheckBox(); + LODLightsCheckBox = new System.Windows.Forms.CheckBox(); + HDRRenderingCheckBox = new System.Windows.Forms.CheckBox(); + ControlTimeOfDayCheckBox = new System.Windows.Forms.CheckBox(); + TimeOfDayLabel = new System.Windows.Forms.Label(); + label19 = new System.Windows.Forms.Label(); + TimeOfDayTrackBar = new System.Windows.Forms.TrackBar(); + WeatherComboBox = new System.Windows.Forms.ComboBox(); + label17 = new System.Windows.Forms.Label(); + ControlLightDirectionCheckBox = new System.Windows.Forms.CheckBox(); + SkydomeCheckBox = new System.Windows.Forms.CheckBox(); + ShadowsCheckBox = new System.Windows.Forms.CheckBox(); + StatusBarCheckBox = new System.Windows.Forms.CheckBox(); + QuitButton = new System.Windows.Forms.Button(); + ReloadSettingsButton = new System.Windows.Forms.Button(); + SaveSettingsButton = new System.Windows.Forms.Button(); + ReloadShadersButton = new System.Windows.Forms.Button(); + ErrorConsoleCheckBox = new System.Windows.Forms.CheckBox(); + ToolsPanelHideButton = new System.Windows.Forms.Button(); + ToolsPanelShowButton = new System.Windows.Forms.Button(); + ConsolePanel = new System.Windows.Forms.Panel(); + ConsoleTextBox = new TextBoxFix(); + StatsUpdateTimer = new System.Windows.Forms.Timer(components); + SelectedMarkerPanel = new System.Windows.Forms.Panel(); + SelectedMarkerPositionTextBox = new System.Windows.Forms.TextBox(); + SelectedMarkerNameTextBox = new System.Windows.Forms.TextBox(); + ToolsMenu = new System.Windows.Forms.ContextMenuStrip(components); + ToolsMenuRPFBrowser = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuRPFExplorer = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuSelectionInfo = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuProjectWindow = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuCutsceneViewer = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuAudioExplorer = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuWorldSearch = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuBinarySearch = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuJenkGen = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuJenkInd = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuExtractScripts = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuExtractTextures = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuExtractRawFiles = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuExtractShaders = new System.Windows.Forms.ToolStripMenuItem(); + ToolsMenuOptions = new System.Windows.Forms.ToolStripMenuItem(); + Toolbar = new ToolStripFix(); + ToolbarNewButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarNewProjectButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewYmapButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewYtypButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewYbnButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewYndButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewTrainsButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarNewScenarioButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarOpenButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarOpenProjectButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarOpenFilesButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarOpenFolderButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); + ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); + toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarSelectButton = new ToolStripSplitButtonFix(); + ToolbarSelectEntityButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectEntityExtensionButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectArchetypeExtensionButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectTimeCycleModifierButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectCarGeneratorButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectGrassButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectWaterQuadButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectCalmingQuadButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectWaveQuadButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectCollisionButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectNavMeshButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectPathButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectTrainTrackButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectLodLightsButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectMloInstanceButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectScenarioButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectAudioButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSelectOcclusionButton = new System.Windows.Forms.ToolStripMenuItem(); + toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarMoveButton = new System.Windows.Forms.ToolStripButton(); + ToolbarRotateButton = new System.Windows.Forms.ToolStripButton(); + ToolbarScaleButton = new System.Windows.Forms.ToolStripButton(); + ToolbarTransformSpaceButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarObjectSpaceButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarWorldSpaceButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSnapButton = new ToolStripSplitButtonFix(); + ToolbarSnapToGroundButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSnapToGridButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSnapToGroundGridButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarSnapGridSizeButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnappingButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnappingOffButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping1Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping2Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping5Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping10Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping45Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnapping90Button = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRotationSnappingCustomButton = new System.Windows.Forms.ToolStripMenuItem(); + toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarUndoButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarUndoListButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarRedoButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarRedoListButton = new System.Windows.Forms.ToolStripMenuItem(); + toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarInfoWindowButton = new System.Windows.Forms.ToolStripButton(); + ToolbarProjectWindowButton = new System.Windows.Forms.ToolStripButton(); + toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarAddItemButton = new System.Windows.Forms.ToolStripButton(); + ToolbarDeleteItemButton = new System.Windows.Forms.ToolStripButton(); + toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarCopyButton = new System.Windows.Forms.ToolStripButton(); + ToolbarPasteButton = new System.Windows.Forms.ToolStripButton(); + toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + ToolbarCameraModeButton = new System.Windows.Forms.ToolStripSplitButton(); + ToolbarCameraPerspectiveButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem(); + ToolbarPanel = new System.Windows.Forms.Panel(); + SubtitleLabel = new System.Windows.Forms.Label(); + SubtitleTimer = new System.Windows.Forms.Timer(components); label34 = new System.Windows.Forms.Label(); - this.StatusStrip.SuspendLayout(); - this.ToolsPanel.SuspendLayout(); - this.ToolsTabControl.SuspendLayout(); - this.ViewTabPage.SuspendLayout(); - this.ViewTabControl.SuspendLayout(); - this.ViewWorldTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.WorldDetailDistTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.WorldLodDistTrackBar)).BeginInit(); - this.ViewYmapsTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DetailTrackBar)).BeginInit(); - this.ViewModelTabPage.SuspendLayout(); - this.MarkersTabPage.SuspendLayout(); - this.SelectionTabPage.SuspendLayout(); - this.SelectionTabControl.SuspendLayout(); - this.SelectionEntityTabPage.SuspendLayout(); - this.SelectionArchetypeTabPage.SuspendLayout(); - this.SelectionDrawableTabPage.SuspendLayout(); - this.tabControl3.SuspendLayout(); - this.tabPage11.SuspendLayout(); - this.tabPage12.SuspendLayout(); - this.tabPage13.SuspendLayout(); - this.SelectionExtensionTabPage.SuspendLayout(); - this.OptionsTabPage.SuspendLayout(); - this.OptionsTabControl.SuspendLayout(); - this.OptionsGeneralTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.MapViewDetailTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.CollisionMeshRangeTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.FieldOfViewTrackBar)).BeginInit(); - this.OptionsRenderTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.AntiAliasingTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.FarClipUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NearClipUpDown)).BeginInit(); - this.OptionsHelpersTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SnapAngleUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.SnapGridSizeUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.BoundsRangeTrackBar)).BeginInit(); - this.OptionsLightingTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.CloudParamTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.TimeSpeedTrackBar)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).BeginInit(); - this.ConsolePanel.SuspendLayout(); - this.SelectedMarkerPanel.SuspendLayout(); - this.ToolsMenu.SuspendLayout(); - this.Toolbar.SuspendLayout(); - this.ToolbarPanel.SuspendLayout(); - this.SuspendLayout(); - // - // StatusStrip - // - this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.StatusLabel, - this.MousedLabel, - this.StatsLabel}); - this.StatusStrip.Location = new System.Drawing.Point(0, 689); - this.StatusStrip.Name = "StatusStrip"; - this.StatusStrip.Size = new System.Drawing.Size(984, 22); - this.StatusStrip.TabIndex = 0; - this.StatusStrip.Text = "statusStrip1"; - // - // StatusLabel - // - this.StatusLabel.BackColor = System.Drawing.SystemColors.Control; - this.StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.StatusLabel.Name = "StatusLabel"; - this.StatusLabel.Size = new System.Drawing.Size(878, 17); - this.StatusLabel.Spring = true; - this.StatusLabel.Text = "Initialising"; - this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // MousedLabel - // - this.MousedLabel.BackColor = System.Drawing.SystemColors.Control; - this.MousedLabel.Name = "MousedLabel"; - this.MousedLabel.Size = new System.Drawing.Size(16, 17); - this.MousedLabel.Text = " "; - // - // StatsLabel - // - this.StatsLabel.BackColor = System.Drawing.SystemColors.Control; - this.StatsLabel.DoubleClickEnabled = true; - this.StatsLabel.Name = "StatsLabel"; - this.StatsLabel.Size = new System.Drawing.Size(75, 17); - this.StatsLabel.Text = "0 geometries"; - this.StatsLabel.DoubleClick += new System.EventHandler(this.StatsLabel_DoubleClick); - // - // ModelComboBox - // - this.ModelComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ModelComboBox.FormattingEnabled = true; - this.ModelComboBox.Items.AddRange(new object[] { - "dt1_lod_slod3", - "dt1_tc_dufo_core", - "dt1_tc_ufocore", - "ex_office_citymodel_01", - "id1_30_build3_dtl2", - "imp_prop_ship_01a", - "prop_alien_egg_01", - "prop_fruit_stand_02", - "prop_fruit_stand_03", - "dune", - "dune2", - "dune2_hi", - "adder", - "adder_hi", - "kuruma2", - "kuruma2_hi", - "infernus", - "infernus_hi", - "buzzard", - "buzzard_hi", - "rhino", - "rhino_hi", - "lazer", - "lazer_hi", - "duster", - "duster_hi", - "marquis", - "marquis_hi", - "submersible", - "submersible_hi", - "cargobob", - "cargobob_hi", - "sanchez", - "sanchez_hi"}); - this.ModelComboBox.Location = new System.Drawing.Point(44, 7); - this.ModelComboBox.Name = "ModelComboBox"; - this.ModelComboBox.Size = new System.Drawing.Size(150, 21); - this.ModelComboBox.TabIndex = 11; - this.ModelComboBox.SelectedIndexChanged += new System.EventHandler(this.ModelComboBox_SelectedIndexChanged); - this.ModelComboBox.TextUpdate += new System.EventHandler(this.ModelComboBox_TextUpdate); - // - // ToolsPanel - // - this.ToolsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsPanel.BackColor = System.Drawing.SystemColors.ControlDark; - this.ToolsPanel.Controls.Add(this.ToolsDragPanel); - this.ToolsPanel.Controls.Add(this.AboutButton); - this.ToolsPanel.Controls.Add(this.ToolsButton); - this.ToolsPanel.Controls.Add(this.ToolsPanelExpandButton); - this.ToolsPanel.Controls.Add(this.ToolsTabControl); - this.ToolsPanel.Controls.Add(this.ToolsPanelHideButton); - this.ToolsPanel.Location = new System.Drawing.Point(754, 12); - this.ToolsPanel.Name = "ToolsPanel"; - this.ToolsPanel.Size = new System.Drawing.Size(218, 665); - this.ToolsPanel.TabIndex = 2; - this.ToolsPanel.Visible = false; - // - // ToolsDragPanel - // - this.ToolsDragPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.ToolsDragPanel.Cursor = System.Windows.Forms.Cursors.VSplit; - this.ToolsDragPanel.Location = new System.Drawing.Point(0, 0); - this.ToolsDragPanel.Name = "ToolsDragPanel"; - this.ToolsDragPanel.Size = new System.Drawing.Size(4, 665); - this.ToolsDragPanel.TabIndex = 16; - this.ToolsDragPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseDown); - this.ToolsDragPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseMove); - this.ToolsDragPanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ToolsDragPanel_MouseUp); - // - // AboutButton - // - this.AboutButton.Location = new System.Drawing.Point(64, 3); - this.AboutButton.Name = "AboutButton"; - this.AboutButton.Size = new System.Drawing.Size(55, 23); - this.AboutButton.TabIndex = 15; - this.AboutButton.Text = "About..."; - this.AboutButton.UseVisualStyleBackColor = true; - this.AboutButton.Click += new System.EventHandler(this.AboutButton_Click); - // - // ToolsButton - // - this.ToolsButton.Location = new System.Drawing.Point(3, 3); - this.ToolsButton.Name = "ToolsButton"; - this.ToolsButton.Size = new System.Drawing.Size(55, 23); - this.ToolsButton.TabIndex = 14; - this.ToolsButton.Text = "Tools..."; - this.ToolsButton.UseVisualStyleBackColor = true; - this.ToolsButton.Click += new System.EventHandler(this.ToolsButton_Click); - // - // ToolsPanelExpandButton - // - this.ToolsPanelExpandButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsPanelExpandButton.Location = new System.Drawing.Point(149, 3); - this.ToolsPanelExpandButton.Name = "ToolsPanelExpandButton"; - this.ToolsPanelExpandButton.Size = new System.Drawing.Size(30, 23); - this.ToolsPanelExpandButton.TabIndex = 13; - this.ToolsPanelExpandButton.Text = "<<"; - this.ToolsPanelExpandButton.UseVisualStyleBackColor = true; - this.ToolsPanelExpandButton.Click += new System.EventHandler(this.ToolsPanelExpandButton_Click); - // - // ToolsTabControl - // - this.ToolsTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsTabControl.Controls.Add(this.ViewTabPage); - this.ToolsTabControl.Controls.Add(this.MarkersTabPage); - this.ToolsTabControl.Controls.Add(this.SelectionTabPage); - this.ToolsTabControl.Controls.Add(this.OptionsTabPage); - this.ToolsTabControl.Location = new System.Drawing.Point(3, 30); - this.ToolsTabControl.Name = "ToolsTabControl"; - this.ToolsTabControl.SelectedIndex = 0; - this.ToolsTabControl.Size = new System.Drawing.Size(213, 632); - this.ToolsTabControl.TabIndex = 12; - // - // ViewTabPage - // - this.ViewTabPage.Controls.Add(this.ViewTabControl); - this.ViewTabPage.Controls.Add(this.label3); - this.ViewTabPage.Controls.Add(this.ViewModeComboBox); - this.ViewTabPage.Controls.Add(this.ShowToolbarCheckBox); - this.ViewTabPage.Location = new System.Drawing.Point(4, 22); - this.ViewTabPage.Name = "ViewTabPage"; - this.ViewTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ViewTabPage.Size = new System.Drawing.Size(205, 606); - this.ViewTabPage.TabIndex = 0; - this.ViewTabPage.Text = "View"; - this.ViewTabPage.UseVisualStyleBackColor = true; - // - // ViewTabControl - // - this.ViewTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ViewTabControl.Controls.Add(this.ViewWorldTabPage); - this.ViewTabControl.Controls.Add(this.ViewYmapsTabPage); - this.ViewTabControl.Controls.Add(this.ViewModelTabPage); - this.ViewTabControl.Location = new System.Drawing.Point(0, 32); - this.ViewTabControl.Name = "ViewTabControl"; - this.ViewTabControl.SelectedIndex = 0; - this.ViewTabControl.Size = new System.Drawing.Size(202, 548); - this.ViewTabControl.TabIndex = 12; - // - // ViewWorldTabPage - // - this.ViewWorldTabPage.Controls.Add(this.EnableModsCheckBox); - this.ViewWorldTabPage.Controls.Add(this.label30); - this.ViewWorldTabPage.Controls.Add(this.DlcLevelComboBox); - this.ViewWorldTabPage.Controls.Add(this.EnableDlcCheckBox); - this.ViewWorldTabPage.Controls.Add(this.WorldYmapWeatherFilterCheckBox); - this.ViewWorldTabPage.Controls.Add(this.WorldYmapTimeFilterCheckBox); - this.ViewWorldTabPage.Controls.Add(this.WorldScriptedYmapsCheckBox); - this.ViewWorldTabPage.Controls.Add(this.WorldDetailDistLabel); - this.ViewWorldTabPage.Controls.Add(this.label18); - this.ViewWorldTabPage.Controls.Add(this.WorldDetailDistTrackBar); - this.ViewWorldTabPage.Controls.Add(this.WorldLodDistLabel); - this.ViewWorldTabPage.Controls.Add(this.label16); - this.ViewWorldTabPage.Controls.Add(this.WorldLodDistTrackBar); - this.ViewWorldTabPage.Controls.Add(this.label15); - this.ViewWorldTabPage.Controls.Add(this.WorldMaxLodComboBox); - this.ViewWorldTabPage.Location = new System.Drawing.Point(4, 22); - this.ViewWorldTabPage.Name = "ViewWorldTabPage"; - this.ViewWorldTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ViewWorldTabPage.Size = new System.Drawing.Size(194, 522); - this.ViewWorldTabPage.TabIndex = 0; - this.ViewWorldTabPage.Text = "World"; - this.ViewWorldTabPage.UseVisualStyleBackColor = true; - // - // EnableModsCheckBox - // - this.EnableModsCheckBox.AutoSize = true; - this.EnableModsCheckBox.Enabled = false; - this.EnableModsCheckBox.Location = new System.Drawing.Point(6, 280); - this.EnableModsCheckBox.Name = "EnableModsCheckBox"; - this.EnableModsCheckBox.Size = new System.Drawing.Size(88, 17); - this.EnableModsCheckBox.TabIndex = 68; - this.EnableModsCheckBox.Text = "Enable Mods"; - this.EnableModsCheckBox.UseVisualStyleBackColor = true; - this.EnableModsCheckBox.CheckedChanged += new System.EventHandler(this.EnableModsCheckBox_CheckedChanged); - // - // label30 - // - this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(1, 337); - this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(60, 13); - this.label30.TabIndex = 70; - this.label30.Text = "DLC Level:"; - // - // DlcLevelComboBox - // - this.DlcLevelComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.DlcLevelComboBox.Enabled = false; - this.DlcLevelComboBox.FormattingEnabled = true; - this.DlcLevelComboBox.Items.AddRange(new object[] { - ""}); - this.DlcLevelComboBox.Location = new System.Drawing.Point(62, 334); - this.DlcLevelComboBox.Name = "DlcLevelComboBox"; - this.DlcLevelComboBox.Size = new System.Drawing.Size(126, 21); - this.DlcLevelComboBox.TabIndex = 70; - this.DlcLevelComboBox.SelectedIndexChanged += new System.EventHandler(this.DlcLevelComboBox_SelectedIndexChanged); - this.DlcLevelComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DlcLevelComboBox_KeyPress); - // - // EnableDlcCheckBox - // - this.EnableDlcCheckBox.AutoSize = true; - this.EnableDlcCheckBox.Enabled = false; - this.EnableDlcCheckBox.Location = new System.Drawing.Point(6, 311); - this.EnableDlcCheckBox.Name = "EnableDlcCheckBox"; - this.EnableDlcCheckBox.Size = new System.Drawing.Size(83, 17); - this.EnableDlcCheckBox.TabIndex = 69; - this.EnableDlcCheckBox.Text = "Enable DLC"; - this.EnableDlcCheckBox.UseVisualStyleBackColor = true; - this.EnableDlcCheckBox.CheckedChanged += new System.EventHandler(this.EnableDlcCheckBox_CheckedChanged); - // - // WorldYmapWeatherFilterCheckBox - // - this.WorldYmapWeatherFilterCheckBox.AutoSize = true; - this.WorldYmapWeatherFilterCheckBox.Checked = true; - this.WorldYmapWeatherFilterCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WorldYmapWeatherFilterCheckBox.Location = new System.Drawing.Point(6, 237); - this.WorldYmapWeatherFilterCheckBox.Name = "WorldYmapWeatherFilterCheckBox"; - this.WorldYmapWeatherFilterCheckBox.Size = new System.Drawing.Size(136, 17); - this.WorldYmapWeatherFilterCheckBox.TabIndex = 67; - this.WorldYmapWeatherFilterCheckBox.Text = "Filter ymaps by weather"; - this.WorldYmapWeatherFilterCheckBox.UseVisualStyleBackColor = true; - this.WorldYmapWeatherFilterCheckBox.CheckedChanged += new System.EventHandler(this.WorldYmapWeatherFilterCheckBox_CheckedChanged); - // - // WorldYmapTimeFilterCheckBox - // - this.WorldYmapTimeFilterCheckBox.AutoSize = true; - this.WorldYmapTimeFilterCheckBox.Checked = true; - this.WorldYmapTimeFilterCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WorldYmapTimeFilterCheckBox.Location = new System.Drawing.Point(6, 214); - this.WorldYmapTimeFilterCheckBox.Name = "WorldYmapTimeFilterCheckBox"; - this.WorldYmapTimeFilterCheckBox.Size = new System.Drawing.Size(149, 17); - this.WorldYmapTimeFilterCheckBox.TabIndex = 66; - this.WorldYmapTimeFilterCheckBox.Text = "Filter ymaps by time of day"; - this.WorldYmapTimeFilterCheckBox.UseVisualStyleBackColor = true; - this.WorldYmapTimeFilterCheckBox.CheckedChanged += new System.EventHandler(this.WorldYmapTimeFilterCheckBox_CheckedChanged); - // - // WorldScriptedYmapsCheckBox - // - this.WorldScriptedYmapsCheckBox.AutoSize = true; - this.WorldScriptedYmapsCheckBox.Checked = true; - this.WorldScriptedYmapsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WorldScriptedYmapsCheckBox.Location = new System.Drawing.Point(6, 182); - this.WorldScriptedYmapsCheckBox.Name = "WorldScriptedYmapsCheckBox"; - this.WorldScriptedYmapsCheckBox.Size = new System.Drawing.Size(126, 17); - this.WorldScriptedYmapsCheckBox.TabIndex = 65; - this.WorldScriptedYmapsCheckBox.Text = "Show scripted ymaps"; - this.WorldScriptedYmapsCheckBox.UseVisualStyleBackColor = true; - this.WorldScriptedYmapsCheckBox.CheckedChanged += new System.EventHandler(this.WorldScriptedYmapsCheckBox_CheckedChanged); - // - // WorldDetailDistLabel - // - this.WorldDetailDistLabel.AutoSize = true; - this.WorldDetailDistLabel.Location = new System.Drawing.Point(87, 94); - this.WorldDetailDistLabel.Name = "WorldDetailDistLabel"; - this.WorldDetailDistLabel.Size = new System.Drawing.Size(22, 13); - this.WorldDetailDistLabel.TabIndex = 64; - this.WorldDetailDistLabel.Text = "1.0"; - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(1, 94); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(80, 13); - this.label18.TabIndex = 63; - this.label18.Text = "Detail distance:"; - // - // WorldDetailDistTrackBar - // - this.WorldDetailDistTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.WorldDetailDistTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.WorldDetailDistTrackBar.LargeChange = 10; - this.WorldDetailDistTrackBar.Location = new System.Drawing.Point(6, 110); - this.WorldDetailDistTrackBar.Maximum = 50; - this.WorldDetailDistTrackBar.Name = "WorldDetailDistTrackBar"; - this.WorldDetailDistTrackBar.Size = new System.Drawing.Size(182, 45); - this.WorldDetailDistTrackBar.TabIndex = 62; - this.WorldDetailDistTrackBar.TickFrequency = 2; - this.WorldDetailDistTrackBar.Value = 10; - this.WorldDetailDistTrackBar.Scroll += new System.EventHandler(this.WorldDetailDistTrackBar_Scroll); - // - // WorldLodDistLabel - // - this.WorldLodDistLabel.AutoSize = true; - this.WorldLodDistLabel.Location = new System.Drawing.Point(82, 39); - this.WorldLodDistLabel.Name = "WorldLodDistLabel"; - this.WorldLodDistLabel.Size = new System.Drawing.Size(22, 13); - this.WorldLodDistLabel.TabIndex = 61; - this.WorldLodDistLabel.Text = "1.0"; - this.WorldLodDistLabel.Visible = false; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(1, 39); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(75, 13); - this.label16.TabIndex = 60; - this.label16.Text = "LOD distance:"; - this.label16.Visible = false; - // - // WorldLodDistTrackBar - // - this.WorldLodDistTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.WorldLodDistTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.WorldLodDistTrackBar.LargeChange = 10; - this.WorldLodDistTrackBar.Location = new System.Drawing.Point(6, 55); - this.WorldLodDistTrackBar.Maximum = 30; - this.WorldLodDistTrackBar.Name = "WorldLodDistTrackBar"; - this.WorldLodDistTrackBar.Size = new System.Drawing.Size(182, 45); - this.WorldLodDistTrackBar.TabIndex = 59; - this.WorldLodDistTrackBar.TickFrequency = 2; - this.WorldLodDistTrackBar.Value = 10; - this.WorldLodDistTrackBar.Visible = false; - this.WorldLodDistTrackBar.Scroll += new System.EventHandler(this.WorldLodDistTrackBar_Scroll); - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(1, 9); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(55, 13); - this.label15.TabIndex = 58; - this.label15.Text = "Max LOD:"; - // - // WorldMaxLodComboBox - // - this.WorldMaxLodComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.WorldMaxLodComboBox.FormattingEnabled = true; - this.WorldMaxLodComboBox.Items.AddRange(new object[] { - "ORPHANHD", - "HD", - "LOD", - "SLOD1", - "SLOD2", - "SLOD3", - "SLOD4"}); - this.WorldMaxLodComboBox.Location = new System.Drawing.Point(62, 6); - this.WorldMaxLodComboBox.Name = "WorldMaxLodComboBox"; - this.WorldMaxLodComboBox.Size = new System.Drawing.Size(126, 21); - this.WorldMaxLodComboBox.TabIndex = 57; - this.WorldMaxLodComboBox.SelectedIndexChanged += new System.EventHandler(this.WorldMaxLodComboBox_SelectedIndexChanged); - this.WorldMaxLodComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.WorldMaxLodComboBox_KeyPress); - // - // ViewYmapsTabPage - // - this.ViewYmapsTabPage.Controls.Add(this.ShowYmapChildrenCheckBox); - this.ViewYmapsTabPage.Controls.Add(this.label2); - this.ViewYmapsTabPage.Controls.Add(this.DetailTrackBar); - this.ViewYmapsTabPage.Controls.Add(this.DynamicLODCheckBox); - this.ViewYmapsTabPage.Controls.Add(this.YmapsTextBox); - this.ViewYmapsTabPage.Location = new System.Drawing.Point(4, 22); - this.ViewYmapsTabPage.Name = "ViewYmapsTabPage"; - this.ViewYmapsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ViewYmapsTabPage.Size = new System.Drawing.Size(194, 522); - this.ViewYmapsTabPage.TabIndex = 1; - this.ViewYmapsTabPage.Text = "Ymaps"; - this.ViewYmapsTabPage.UseVisualStyleBackColor = true; - // - // ShowYmapChildrenCheckBox - // - this.ShowYmapChildrenCheckBox.AutoSize = true; - this.ShowYmapChildrenCheckBox.Enabled = false; - this.ShowYmapChildrenCheckBox.Location = new System.Drawing.Point(6, 59); - this.ShowYmapChildrenCheckBox.Name = "ShowYmapChildrenCheckBox"; - this.ShowYmapChildrenCheckBox.Size = new System.Drawing.Size(93, 17); - this.ShowYmapChildrenCheckBox.TabIndex = 35; - this.ShowYmapChildrenCheckBox.Text = "Show children"; - this.ShowYmapChildrenCheckBox.UseVisualStyleBackColor = true; - this.ShowYmapChildrenCheckBox.CheckedChanged += new System.EventHandler(this.ShowYmapChildrenCheckBox_CheckedChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 88); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(77, 13); - this.label2.TabIndex = 8; - this.label2.Text = "Ymaps to load:"; - // - // DetailTrackBar - // - this.DetailTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.DetailTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.DetailTrackBar.Location = new System.Drawing.Point(6, 24); - this.DetailTrackBar.Maximum = 20; - this.DetailTrackBar.Name = "DetailTrackBar"; - this.DetailTrackBar.Size = new System.Drawing.Size(182, 45); - this.DetailTrackBar.TabIndex = 34; - this.DetailTrackBar.Value = 5; - this.DetailTrackBar.Scroll += new System.EventHandler(this.DetailTrackBar_Scroll); - // - // DynamicLODCheckBox - // - this.DynamicLODCheckBox.AutoSize = true; - this.DynamicLODCheckBox.Checked = true; - this.DynamicLODCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.DynamicLODCheckBox.Location = new System.Drawing.Point(6, 6); - this.DynamicLODCheckBox.Name = "DynamicLODCheckBox"; - this.DynamicLODCheckBox.Size = new System.Drawing.Size(92, 17); - this.DynamicLODCheckBox.TabIndex = 33; - this.DynamicLODCheckBox.Text = "Dynamic LOD"; - this.DynamicLODCheckBox.UseVisualStyleBackColor = true; - this.DynamicLODCheckBox.CheckedChanged += new System.EventHandler(this.DynamicLODCheckBox_CheckedChanged); - // - // YmapsTextBox - // - this.YmapsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapsTextBox.Location = new System.Drawing.Point(0, 104); - this.YmapsTextBox.Multiline = true; - this.YmapsTextBox.Name = "YmapsTextBox"; - this.YmapsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.YmapsTextBox.Size = new System.Drawing.Size(194, 418); - this.YmapsTextBox.TabIndex = 36; - this.YmapsTextBox.Text = resources.GetString("YmapsTextBox.Text"); - this.YmapsTextBox.TextChanged += new System.EventHandler(this.YmapsTextBox_TextChanged); - // - // ViewModelTabPage - // - this.ViewModelTabPage.Controls.Add(this.label1); - this.ViewModelTabPage.Controls.Add(this.ModelComboBox); - this.ViewModelTabPage.Location = new System.Drawing.Point(4, 22); - this.ViewModelTabPage.Name = "ViewModelTabPage"; - this.ViewModelTabPage.Size = new System.Drawing.Size(194, 522); - this.ViewModelTabPage.TabIndex = 2; - this.ViewModelTabPage.Text = "Model"; - this.ViewModelTabPage.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(-1, 10); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(39, 13); - this.label1.TabIndex = 5; - this.label1.Text = "Model:"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 8); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(37, 13); - this.label3.TabIndex = 11; - this.label3.Text = "Mode:"; - // - // ViewModeComboBox - // - this.ViewModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ViewModeComboBox.FormattingEnabled = true; - this.ViewModeComboBox.Items.AddRange(new object[] { - "World view", - "Ymap view", - "Model view"}); - this.ViewModeComboBox.Location = new System.Drawing.Point(48, 5); - this.ViewModeComboBox.Name = "ViewModeComboBox"; - this.ViewModeComboBox.Size = new System.Drawing.Size(111, 21); - this.ViewModeComboBox.TabIndex = 10; - this.ViewModeComboBox.SelectedIndexChanged += new System.EventHandler(this.ViewModeComboBox_SelectedIndexChanged); - this.ViewModeComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ViewModeComboBox_KeyPress); - // - // ShowToolbarCheckBox - // - this.ShowToolbarCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ShowToolbarCheckBox.AutoSize = true; - this.ShowToolbarCheckBox.Location = new System.Drawing.Point(10, 586); - this.ShowToolbarCheckBox.Name = "ShowToolbarCheckBox"; - this.ShowToolbarCheckBox.Size = new System.Drawing.Size(108, 17); - this.ShowToolbarCheckBox.TabIndex = 47; - this.ShowToolbarCheckBox.Text = "Show Toolbar (T)"; - this.ShowToolbarCheckBox.UseVisualStyleBackColor = true; - this.ShowToolbarCheckBox.CheckedChanged += new System.EventHandler(this.ShowToolbarCheckBox_CheckedChanged); - // - // MarkersTabPage - // - this.MarkersTabPage.Controls.Add(this.label27); - this.MarkersTabPage.Controls.Add(this.CameraPositionTextBox); - this.MarkersTabPage.Controls.Add(this.AddSelectionMarkerButton); - this.MarkersTabPage.Controls.Add(this.AddCurrentPositonMarkerButton); - this.MarkersTabPage.Controls.Add(this.ResetMarkersButton); - this.MarkersTabPage.Controls.Add(this.ClearMarkersButton); - this.MarkersTabPage.Controls.Add(this.GoToButton); - this.MarkersTabPage.Controls.Add(this.ShowLocatorCheckBox); - this.MarkersTabPage.Controls.Add(this.label6); - this.MarkersTabPage.Controls.Add(this.LocateTextBox); - this.MarkersTabPage.Controls.Add(this.label7); - this.MarkersTabPage.Controls.Add(this.AddMarkersButton); - this.MarkersTabPage.Controls.Add(this.MultiFindTextBox); - this.MarkersTabPage.Location = new System.Drawing.Point(4, 22); - this.MarkersTabPage.Name = "MarkersTabPage"; - this.MarkersTabPage.Padding = new System.Windows.Forms.Padding(3); - this.MarkersTabPage.Size = new System.Drawing.Size(205, 606); - this.MarkersTabPage.TabIndex = 1; - this.MarkersTabPage.Text = "Markers"; - this.MarkersTabPage.UseVisualStyleBackColor = true; - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(-2, 50); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(121, 13); - this.label27.TabIndex = 22; - this.label27.Text = "Current camera position:"; - // - // CameraPositionTextBox - // - this.CameraPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CameraPositionTextBox.Location = new System.Drawing.Point(0, 67); - this.CameraPositionTextBox.Name = "CameraPositionTextBox"; - this.CameraPositionTextBox.Size = new System.Drawing.Size(205, 20); - this.CameraPositionTextBox.TabIndex = 16; - this.CameraPositionTextBox.Text = "0, 0, 0"; - // - // AddSelectionMarkerButton - // - this.AddSelectionMarkerButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.AddSelectionMarkerButton.Location = new System.Drawing.Point(0, 536); - this.AddSelectionMarkerButton.Name = "AddSelectionMarkerButton"; - this.AddSelectionMarkerButton.Size = new System.Drawing.Size(97, 23); - this.AddSelectionMarkerButton.TabIndex = 22; - this.AddSelectionMarkerButton.Text = "Add selection"; - this.AddSelectionMarkerButton.UseVisualStyleBackColor = true; - this.AddSelectionMarkerButton.Click += new System.EventHandler(this.AddSelectionMarkerButton_Click); - // - // AddCurrentPositonMarkerButton - // - this.AddCurrentPositonMarkerButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.AddCurrentPositonMarkerButton.Location = new System.Drawing.Point(0, 507); - this.AddCurrentPositonMarkerButton.Name = "AddCurrentPositonMarkerButton"; - this.AddCurrentPositonMarkerButton.Size = new System.Drawing.Size(97, 23); - this.AddCurrentPositonMarkerButton.TabIndex = 20; - this.AddCurrentPositonMarkerButton.Text = "Add current pos"; - this.AddCurrentPositonMarkerButton.UseVisualStyleBackColor = true; - this.AddCurrentPositonMarkerButton.Click += new System.EventHandler(this.AddCurrentPositonMarkerButton_Click); - // - // ResetMarkersButton - // - this.ResetMarkersButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ResetMarkersButton.Location = new System.Drawing.Point(108, 507); - this.ResetMarkersButton.Name = "ResetMarkersButton"; - this.ResetMarkersButton.Size = new System.Drawing.Size(97, 23); - this.ResetMarkersButton.TabIndex = 21; - this.ResetMarkersButton.Text = "Default markers"; - this.ResetMarkersButton.UseVisualStyleBackColor = true; - this.ResetMarkersButton.Click += new System.EventHandler(this.ResetMarkersButton_Click); - // - // ClearMarkersButton - // - this.ClearMarkersButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ClearMarkersButton.Location = new System.Drawing.Point(108, 478); - this.ClearMarkersButton.Name = "ClearMarkersButton"; - this.ClearMarkersButton.Size = new System.Drawing.Size(97, 23); - this.ClearMarkersButton.TabIndex = 19; - this.ClearMarkersButton.Text = "Clear markers"; - this.ClearMarkersButton.UseVisualStyleBackColor = true; - this.ClearMarkersButton.Click += new System.EventHandler(this.ClearMarkersButton_Click); - // - // GoToButton - // - this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.GoToButton.Location = new System.Drawing.Point(162, 24); - this.GoToButton.Name = "GoToButton"; - this.GoToButton.Size = new System.Drawing.Size(43, 22); - this.GoToButton.TabIndex = 15; - this.GoToButton.Text = "Go to"; - this.GoToButton.UseVisualStyleBackColor = true; - this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click); - // - // ShowLocatorCheckBox - // - this.ShowLocatorCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ShowLocatorCheckBox.AutoSize = true; - this.ShowLocatorCheckBox.Location = new System.Drawing.Point(101, 8); - this.ShowLocatorCheckBox.Name = "ShowLocatorCheckBox"; - this.ShowLocatorCheckBox.Size = new System.Drawing.Size(88, 17); - this.ShowLocatorCheckBox.TabIndex = 13; - this.ShowLocatorCheckBox.Text = "Show marker"; - this.ShowLocatorCheckBox.UseVisualStyleBackColor = true; - this.ShowLocatorCheckBox.CheckedChanged += new System.EventHandler(this.ShowLocatorCheckBox_CheckedChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(-2, 8); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(79, 13); - this.label6.TabIndex = 13; - this.label6.Text = "Locate: X, Y, Z"; - // - // LocateTextBox - // - this.LocateTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.LocateTextBox.Location = new System.Drawing.Point(0, 25); - this.LocateTextBox.Name = "LocateTextBox"; - this.LocateTextBox.Size = new System.Drawing.Size(156, 20); - this.LocateTextBox.TabIndex = 14; - this.LocateTextBox.Text = "0, 0, 0"; - this.LocateTextBox.TextChanged += new System.EventHandler(this.LocateTextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(-2, 101); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(122, 13); - this.label7.TabIndex = 11; - this.label7.Text = "Multi-find: X, Y, Z, Name"; - // - // AddMarkersButton - // - this.AddMarkersButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.AddMarkersButton.Location = new System.Drawing.Point(0, 478); - this.AddMarkersButton.Name = "AddMarkersButton"; - this.AddMarkersButton.Size = new System.Drawing.Size(97, 23); - this.AddMarkersButton.TabIndex = 18; - this.AddMarkersButton.Text = "Add markers"; - this.AddMarkersButton.UseVisualStyleBackColor = true; - this.AddMarkersButton.Click += new System.EventHandler(this.AddMarkersButton_Click); - // - // MultiFindTextBox - // - this.MultiFindTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.MultiFindTextBox.Location = new System.Drawing.Point(0, 117); - this.MultiFindTextBox.MaxLength = 1048576; - this.MultiFindTextBox.Multiline = true; - this.MultiFindTextBox.Name = "MultiFindTextBox"; - this.MultiFindTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.MultiFindTextBox.Size = new System.Drawing.Size(205, 355); - this.MultiFindTextBox.TabIndex = 17; - // - // SelectionTabPage - // - this.SelectionTabPage.Controls.Add(this.label25); - this.SelectionTabPage.Controls.Add(this.SelectionModeComboBox); - this.SelectionTabPage.Controls.Add(this.SelectionNameTextBox); - this.SelectionTabPage.Controls.Add(this.SelectionTabControl); - this.SelectionTabPage.Controls.Add(this.MouseSelectCheckBox); - this.SelectionTabPage.Location = new System.Drawing.Point(4, 22); - this.SelectionTabPage.Name = "SelectionTabPage"; - this.SelectionTabPage.Size = new System.Drawing.Size(205, 606); - this.SelectionTabPage.TabIndex = 2; - this.SelectionTabPage.Text = "Selection"; - this.SelectionTabPage.UseVisualStyleBackColor = true; - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(6, 33); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(37, 13); - this.label25.TabIndex = 28; - this.label25.Text = "Mode:"; - // - // SelectionModeComboBox - // - this.SelectionModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.SelectionModeComboBox.FormattingEnabled = true; - this.SelectionModeComboBox.Items.AddRange(new object[] { - "Entity", - "Entity Extension", - "Archetype Extension", - "Time Cycle Modifier", - "Car Generator", - "Grass", - "Water Quad", - "Water Calming Quad", - "Water Wave Quad", - "Collision", - "Nav Mesh", - "Path", - "Train Track", - "Lod Lights", - "Mlo Instance", - "Scenario", - "Audio", - "Occlusion"}); - this.SelectionModeComboBox.Location = new System.Drawing.Point(51, 30); - this.SelectionModeComboBox.Name = "SelectionModeComboBox"; - this.SelectionModeComboBox.Size = new System.Drawing.Size(121, 21); - this.SelectionModeComboBox.TabIndex = 23; - this.SelectionModeComboBox.SelectedIndexChanged += new System.EventHandler(this.SelectionModeComboBox_SelectedIndexChanged); - this.SelectionModeComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SelectionModeComboBox_KeyPress); - // - // SelectionNameTextBox - // - this.SelectionNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelectionNameTextBox.BackColor = System.Drawing.Color.White; - this.SelectionNameTextBox.Location = new System.Drawing.Point(3, 66); - this.SelectionNameTextBox.Name = "SelectionNameText"; - this.SelectionNameTextBox.ReadOnly = true; - this.SelectionNameTextBox.Size = new System.Drawing.Size(199, 20); - this.SelectionNameTextBox.TabIndex = 26; - this.SelectionNameTextBox.Text = "Nothing selected"; - // - // SelectionTabControl - // - this.SelectionTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelectionTabControl.Controls.Add(this.SelectionEntityTabPage); - this.SelectionTabControl.Controls.Add(this.SelectionArchetypeTabPage); - this.SelectionTabControl.Controls.Add(this.SelectionDrawableTabPage); - this.SelectionTabControl.Controls.Add(this.SelectionExtensionTabPage); - this.SelectionTabControl.Location = new System.Drawing.Point(0, 95); - this.SelectionTabControl.Margin = new System.Windows.Forms.Padding(0); - this.SelectionTabControl.Name = "SelectionTabControl"; - this.SelectionTabControl.SelectedIndex = 0; - this.SelectionTabControl.Size = new System.Drawing.Size(205, 511); - this.SelectionTabControl.TabIndex = 28; - // - // SelectionEntityTabPage - // - this.SelectionEntityTabPage.Controls.Add(this.SelEntityPropertyGrid); - this.SelectionEntityTabPage.Location = new System.Drawing.Point(4, 22); - this.SelectionEntityTabPage.Name = "SelectionEntityTabPage"; - this.SelectionEntityTabPage.Padding = new System.Windows.Forms.Padding(3); - this.SelectionEntityTabPage.Size = new System.Drawing.Size(197, 485); - this.SelectionEntityTabPage.TabIndex = 0; - this.SelectionEntityTabPage.Text = "Entity"; - this.SelectionEntityTabPage.UseVisualStyleBackColor = true; - // - // SelEntityPropertyGrid - // - this.SelEntityPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelEntityPropertyGrid.HelpVisible = false; - this.SelEntityPropertyGrid.Location = new System.Drawing.Point(0, 6); - this.SelEntityPropertyGrid.Name = "SelEntityPropertyGrid"; - this.SelEntityPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; - this.SelEntityPropertyGrid.ReadOnly = true; - this.SelEntityPropertyGrid.Size = new System.Drawing.Size(197, 476); - this.SelEntityPropertyGrid.TabIndex = 35; - this.SelEntityPropertyGrid.ToolbarVisible = false; - // - // SelectionArchetypeTabPage - // - this.SelectionArchetypeTabPage.Controls.Add(this.SelArchetypePropertyGrid); - this.SelectionArchetypeTabPage.Location = new System.Drawing.Point(4, 22); - this.SelectionArchetypeTabPage.Name = "SelectionArchetypeTabPage"; - this.SelectionArchetypeTabPage.Padding = new System.Windows.Forms.Padding(3); - this.SelectionArchetypeTabPage.Size = new System.Drawing.Size(197, 485); - this.SelectionArchetypeTabPage.TabIndex = 1; - this.SelectionArchetypeTabPage.Text = "Archetype"; - this.SelectionArchetypeTabPage.UseVisualStyleBackColor = true; - // - // SelArchetypePropertyGrid - // - this.SelArchetypePropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelArchetypePropertyGrid.HelpVisible = false; - this.SelArchetypePropertyGrid.Location = new System.Drawing.Point(0, 6); - this.SelArchetypePropertyGrid.Name = "SelArchetypePropertyGrid"; - this.SelArchetypePropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; - this.SelArchetypePropertyGrid.ReadOnly = true; - this.SelArchetypePropertyGrid.Size = new System.Drawing.Size(197, 476); - this.SelArchetypePropertyGrid.TabIndex = 36; - this.SelArchetypePropertyGrid.ToolbarVisible = false; - // - // SelectionDrawableTabPage - // - this.SelectionDrawableTabPage.Controls.Add(this.tabControl3); - this.SelectionDrawableTabPage.Location = new System.Drawing.Point(4, 22); - this.SelectionDrawableTabPage.Margin = new System.Windows.Forms.Padding(0); - this.SelectionDrawableTabPage.Name = "SelectionDrawableTabPage"; - this.SelectionDrawableTabPage.Size = new System.Drawing.Size(197, 485); - this.SelectionDrawableTabPage.TabIndex = 2; - this.SelectionDrawableTabPage.Text = "Drawable"; - this.SelectionDrawableTabPage.UseVisualStyleBackColor = true; - // - // tabControl3 - // - this.tabControl3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tabControl3.Controls.Add(this.tabPage11); - this.tabControl3.Controls.Add(this.tabPage12); - this.tabControl3.Controls.Add(this.tabPage13); - this.tabControl3.Location = new System.Drawing.Point(-4, 7); - this.tabControl3.Name = "tabControl3"; - this.tabControl3.SelectedIndex = 0; - this.tabControl3.Size = new System.Drawing.Size(205, 478); - this.tabControl3.TabIndex = 28; - // - // tabPage11 - // - this.tabPage11.Controls.Add(this.SelDrawablePropertyGrid); - this.tabPage11.Location = new System.Drawing.Point(4, 22); - this.tabPage11.Margin = new System.Windows.Forms.Padding(0); - this.tabPage11.Name = "tabPage11"; - this.tabPage11.Size = new System.Drawing.Size(197, 452); - this.tabPage11.TabIndex = 0; - this.tabPage11.Text = "Info"; - this.tabPage11.UseVisualStyleBackColor = true; - // - // SelDrawablePropertyGrid - // - this.SelDrawablePropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelDrawablePropertyGrid.HelpVisible = false; - this.SelDrawablePropertyGrid.Location = new System.Drawing.Point(0, 0); - this.SelDrawablePropertyGrid.Name = "SelDrawablePropertyGrid"; - this.SelDrawablePropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; - this.SelDrawablePropertyGrid.ReadOnly = true; - this.SelDrawablePropertyGrid.Size = new System.Drawing.Size(197, 452); - this.SelDrawablePropertyGrid.TabIndex = 37; - this.SelDrawablePropertyGrid.ToolbarVisible = false; - // - // tabPage12 - // - this.tabPage12.Controls.Add(this.SelDrawableModelsTreeView); - this.tabPage12.Location = new System.Drawing.Point(4, 22); - this.tabPage12.Name = "tabPage12"; - this.tabPage12.Padding = new System.Windows.Forms.Padding(3); - this.tabPage12.Size = new System.Drawing.Size(197, 452); - this.tabPage12.TabIndex = 1; - this.tabPage12.Text = "Models"; - this.tabPage12.UseVisualStyleBackColor = true; - // - // SelDrawableModelsTreeView - // - this.SelDrawableModelsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelDrawableModelsTreeView.CheckBoxes = true; - this.SelDrawableModelsTreeView.Location = new System.Drawing.Point(0, 0); - this.SelDrawableModelsTreeView.Name = "SelDrawableModelsTreeView"; - this.SelDrawableModelsTreeView.ShowRootLines = false; - this.SelDrawableModelsTreeView.Size = new System.Drawing.Size(197, 452); - this.SelDrawableModelsTreeView.TabIndex = 39; - this.SelDrawableModelsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.SelDrawableModelsTreeView_AfterCheck); - this.SelDrawableModelsTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.SelDrawableModelsTreeView_NodeMouseDoubleClick); - this.SelDrawableModelsTreeView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SelDrawableModelsTreeView_KeyPress); - // - // tabPage13 - // - this.tabPage13.Controls.Add(this.SelDrawableTexturesTreeView); - this.tabPage13.Location = new System.Drawing.Point(4, 22); - this.tabPage13.Name = "tabPage13"; - this.tabPage13.Size = new System.Drawing.Size(197, 452); - this.tabPage13.TabIndex = 2; - this.tabPage13.Text = "Textures"; - this.tabPage13.UseVisualStyleBackColor = true; - // - // SelDrawableTexturesTreeView - // - this.SelDrawableTexturesTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelDrawableTexturesTreeView.Location = new System.Drawing.Point(0, 0); - this.SelDrawableTexturesTreeView.Name = "SelDrawableTexturesTreeView"; - this.SelDrawableTexturesTreeView.ShowRootLines = false; - this.SelDrawableTexturesTreeView.Size = new System.Drawing.Size(197, 452); - this.SelDrawableTexturesTreeView.TabIndex = 40; - // - // SelectionExtensionTabPage - // - this.SelectionExtensionTabPage.Controls.Add(this.SelExtensionPropertyGrid); - this.SelectionExtensionTabPage.Location = new System.Drawing.Point(4, 22); - this.SelectionExtensionTabPage.Name = "SelectionExtensionTabPage"; - this.SelectionExtensionTabPage.Size = new System.Drawing.Size(197, 485); - this.SelectionExtensionTabPage.TabIndex = 3; - this.SelectionExtensionTabPage.Text = "Ext"; - this.SelectionExtensionTabPage.UseVisualStyleBackColor = true; - // - // SelExtensionPropertyGrid - // - this.SelExtensionPropertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelExtensionPropertyGrid.HelpVisible = false; - this.SelExtensionPropertyGrid.Location = new System.Drawing.Point(0, 6); - this.SelExtensionPropertyGrid.Name = "SelExtensionPropertyGrid"; - this.SelExtensionPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; - this.SelExtensionPropertyGrid.ReadOnly = true; - this.SelExtensionPropertyGrid.Size = new System.Drawing.Size(197, 476); - this.SelExtensionPropertyGrid.TabIndex = 36; - this.SelExtensionPropertyGrid.ToolbarVisible = false; - // - // MouseSelectCheckBox - // - this.MouseSelectCheckBox.AutoSize = true; - this.MouseSelectCheckBox.Location = new System.Drawing.Point(8, 7); - this.MouseSelectCheckBox.Name = "MouseSelectCheckBox"; - this.MouseSelectCheckBox.Size = new System.Drawing.Size(143, 17); - this.MouseSelectCheckBox.TabIndex = 22; - this.MouseSelectCheckBox.Text = "Mouse select (right click)"; - this.MouseSelectCheckBox.UseVisualStyleBackColor = true; - this.MouseSelectCheckBox.CheckedChanged += new System.EventHandler(this.MouseSelectCheckBox_CheckedChanged); - // - // OptionsTabPage - // - this.OptionsTabPage.Controls.Add(this.OptionsTabControl); - this.OptionsTabPage.Controls.Add(this.StatusBarCheckBox); - this.OptionsTabPage.Controls.Add(this.QuitButton); - this.OptionsTabPage.Controls.Add(this.ReloadSettingsButton); - this.OptionsTabPage.Controls.Add(this.SaveSettingsButton); - this.OptionsTabPage.Controls.Add(this.ReloadShadersButton); - this.OptionsTabPage.Controls.Add(this.ErrorConsoleCheckBox); - this.OptionsTabPage.Location = new System.Drawing.Point(4, 22); - this.OptionsTabPage.Name = "OptionsTabPage"; - this.OptionsTabPage.Size = new System.Drawing.Size(205, 606); - this.OptionsTabPage.TabIndex = 3; - this.OptionsTabPage.Text = "Options"; - this.OptionsTabPage.UseVisualStyleBackColor = true; - // - // OptionsTabControl - // - this.OptionsTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OptionsTabControl.Controls.Add(this.OptionsGeneralTabPage); - this.OptionsTabControl.Controls.Add(this.OptionsRenderTabPage); - this.OptionsTabControl.Controls.Add(this.OptionsHelpersTabPage); - this.OptionsTabControl.Controls.Add(this.OptionsLightingTabPage); - this.OptionsTabControl.Location = new System.Drawing.Point(0, 3); - this.OptionsTabControl.Name = "OptionsTabControl"; - this.OptionsTabControl.SelectedIndex = 0; - this.OptionsTabControl.Size = new System.Drawing.Size(208, 508); - this.OptionsTabControl.TabIndex = 50; - // - // OptionsGeneralTabPage - // - this.OptionsGeneralTabPage.Controls.Add(this.CarGeneratorsCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.RenderEntitiesCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.AdvancedSettingsButton); - this.OptionsGeneralTabPage.Controls.Add(this.ControlSettingsButton); - this.OptionsGeneralTabPage.Controls.Add(this.MapViewDetailLabel); - this.OptionsGeneralTabPage.Controls.Add(this.label28); - this.OptionsGeneralTabPage.Controls.Add(this.MapViewDetailTrackBar); - this.OptionsGeneralTabPage.Controls.Add(this.CameraModeComboBox); - this.OptionsGeneralTabPage.Controls.Add(this.label24); - this.OptionsGeneralTabPage.Controls.Add(this.WaterQuadsCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.FieldOfViewLabel); - this.OptionsGeneralTabPage.Controls.Add(this.label22); - this.OptionsGeneralTabPage.Controls.Add(this.TimedEntitiesAlwaysOnCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.GrassCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.InteriorsCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshLayerDrawableCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshLayer2CheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshLayer1CheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.label13); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshLayer0CheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.label12); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshRangeTrackBar); - this.OptionsGeneralTabPage.Controls.Add(this.CollisionMeshesCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.FullScreenCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.TimedEntitiesCheckBox); - this.OptionsGeneralTabPage.Controls.Add(this.FieldOfViewTrackBar); - this.OptionsGeneralTabPage.Location = new System.Drawing.Point(4, 22); - this.OptionsGeneralTabPage.Name = "OptionsGeneralTabPage"; - this.OptionsGeneralTabPage.Padding = new System.Windows.Forms.Padding(3); - this.OptionsGeneralTabPage.Size = new System.Drawing.Size(200, 482); - this.OptionsGeneralTabPage.TabIndex = 0; - this.OptionsGeneralTabPage.Text = "General"; - this.OptionsGeneralTabPage.UseVisualStyleBackColor = true; - // - // CarGeneratorsCheckBox - // - this.CarGeneratorsCheckBox.AutoSize = true; - this.CarGeneratorsCheckBox.Location = new System.Drawing.Point(10, 72); - this.CarGeneratorsCheckBox.Name = "CarGeneratorsCheckBox"; - this.CarGeneratorsCheckBox.Size = new System.Drawing.Size(124, 17); - this.CarGeneratorsCheckBox.TabIndex = 31; - this.CarGeneratorsCheckBox.Text = "Show car generators"; - this.CarGeneratorsCheckBox.UseVisualStyleBackColor = true; - this.CarGeneratorsCheckBox.CheckedChanged += new System.EventHandler(this.CarGeneratorsCheckBox_CheckedChanged); - // - // RenderEntitiesCheckBox - // - this.RenderEntitiesCheckBox.AutoSize = true; - this.RenderEntitiesCheckBox.Checked = true; - this.RenderEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.RenderEntitiesCheckBox.Location = new System.Drawing.Point(10, 30); - this.RenderEntitiesCheckBox.Name = "RenderEntitiesCheckBox"; - this.RenderEntitiesCheckBox.Size = new System.Drawing.Size(89, 17); - this.RenderEntitiesCheckBox.TabIndex = 29; - this.RenderEntitiesCheckBox.Text = "Show entities"; - this.RenderEntitiesCheckBox.UseVisualStyleBackColor = true; - this.RenderEntitiesCheckBox.CheckedChanged += new System.EventHandler(this.RenderEntitiesCheckBox_CheckedChanged); - // - // AdvancedSettingsButton - // - this.AdvancedSettingsButton.Location = new System.Drawing.Point(101, 456); - this.AdvancedSettingsButton.Name = "AdvancedSettingsButton"; - this.AdvancedSettingsButton.Size = new System.Drawing.Size(93, 23); - this.AdvancedSettingsButton.TabIndex = 46; - this.AdvancedSettingsButton.Text = "Advanced..."; - this.AdvancedSettingsButton.UseVisualStyleBackColor = true; - this.AdvancedSettingsButton.Click += new System.EventHandler(this.AdvancedSettingsButton_Click); - // - // ControlSettingsButton - // - this.ControlSettingsButton.Location = new System.Drawing.Point(2, 456); - this.ControlSettingsButton.Name = "ControlSettingsButton"; - this.ControlSettingsButton.Size = new System.Drawing.Size(93, 23); - this.ControlSettingsButton.TabIndex = 45; - this.ControlSettingsButton.Text = "Controls..."; - this.ControlSettingsButton.UseVisualStyleBackColor = true; - this.ControlSettingsButton.Click += new System.EventHandler(this.ControlSettingsButton_Click); - // - // MapViewDetailLabel - // - this.MapViewDetailLabel.AutoSize = true; - this.MapViewDetailLabel.Location = new System.Drawing.Point(94, 391); - this.MapViewDetailLabel.Name = "MapViewDetailLabel"; - this.MapViewDetailLabel.Size = new System.Drawing.Size(22, 13); - this.MapViewDetailLabel.TabIndex = 66; - this.MapViewDetailLabel.Text = "1.0"; - // - // label28 - // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(4, 391); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(84, 13); - this.label28.TabIndex = 65; - this.label28.Text = "Map view detail:"; - // - // MapViewDetailTrackBar - // - this.MapViewDetailTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.MapViewDetailTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.MapViewDetailTrackBar.Enabled = false; - this.MapViewDetailTrackBar.LargeChange = 1; - this.MapViewDetailTrackBar.Location = new System.Drawing.Point(6, 407); - this.MapViewDetailTrackBar.Maximum = 30; - this.MapViewDetailTrackBar.Minimum = 2; - this.MapViewDetailTrackBar.Name = "MapViewDetailTrackBar"; - this.MapViewDetailTrackBar.Size = new System.Drawing.Size(188, 45); - this.MapViewDetailTrackBar.TabIndex = 44; - this.MapViewDetailTrackBar.TickFrequency = 2; - this.MapViewDetailTrackBar.Value = 10; - this.MapViewDetailTrackBar.Scroll += new System.EventHandler(this.MapViewDetailTrackBar_Scroll); - // - // CameraModeComboBox - // - this.CameraModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CameraModeComboBox.FormattingEnabled = true; - this.CameraModeComboBox.Items.AddRange(new object[] { - "Perspective", - "Orthographic", - "2D Map"}); - this.CameraModeComboBox.Location = new System.Drawing.Point(82, 305); - this.CameraModeComboBox.Name = "CameraModeComboBox"; - this.CameraModeComboBox.Size = new System.Drawing.Size(112, 21); - this.CameraModeComboBox.TabIndex = 42; - this.CameraModeComboBox.SelectedIndexChanged += new System.EventHandler(this.CameraModeComboBox_SelectedIndexChanged); - this.CameraModeComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CameraModeComboBox_KeyPress); - // - // label24 - // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(4, 308); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(75, 13); - this.label24.TabIndex = 63; - this.label24.Text = "Camera mode:"; - // - // WaterQuadsCheckBox - // - this.WaterQuadsCheckBox.AutoSize = true; - this.WaterQuadsCheckBox.Checked = true; - this.WaterQuadsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WaterQuadsCheckBox.Location = new System.Drawing.Point(10, 135); - this.WaterQuadsCheckBox.Name = "WaterQuadsCheckBox"; - this.WaterQuadsCheckBox.Size = new System.Drawing.Size(114, 17); - this.WaterQuadsCheckBox.TabIndex = 35; - this.WaterQuadsCheckBox.Text = "Show water quads"; - this.WaterQuadsCheckBox.UseVisualStyleBackColor = true; - this.WaterQuadsCheckBox.CheckedChanged += new System.EventHandler(this.WaterQuadsCheckBox_CheckedChanged); - // - // FieldOfViewLabel - // - this.FieldOfViewLabel.AutoSize = true; - this.FieldOfViewLabel.Location = new System.Drawing.Point(79, 335); - this.FieldOfViewLabel.Name = "FieldOfViewLabel"; - this.FieldOfViewLabel.Size = new System.Drawing.Size(22, 13); - this.FieldOfViewLabel.TabIndex = 59; - this.FieldOfViewLabel.Text = "1.0"; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(4, 335); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(69, 13); - this.label22.TabIndex = 58; - this.label22.Text = "Field of view:"; - // - // TimedEntitiesAlwaysOnCheckBox - // - this.TimedEntitiesAlwaysOnCheckBox.AutoSize = true; - this.TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(131, 93); - this.TimedEntitiesAlwaysOnCheckBox.Name = "TimedEntitiesAlwaysOnCheckBox"; - this.TimedEntitiesAlwaysOnCheckBox.Size = new System.Drawing.Size(58, 17); - this.TimedEntitiesAlwaysOnCheckBox.TabIndex = 33; - this.TimedEntitiesAlwaysOnCheckBox.Text = "always"; - this.TimedEntitiesAlwaysOnCheckBox.UseVisualStyleBackColor = true; - this.TimedEntitiesAlwaysOnCheckBox.CheckedChanged += new System.EventHandler(this.TimedEntitiesAlwaysOnCheckBox_CheckedChanged); - // - // GrassCheckBox - // - this.GrassCheckBox.AutoSize = true; - this.GrassCheckBox.Checked = true; - this.GrassCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.GrassCheckBox.Location = new System.Drawing.Point(10, 51); - this.GrassCheckBox.Name = "GrassCheckBox"; - this.GrassCheckBox.Size = new System.Drawing.Size(81, 17); - this.GrassCheckBox.TabIndex = 30; - this.GrassCheckBox.Text = "Show grass"; - this.GrassCheckBox.UseVisualStyleBackColor = true; - this.GrassCheckBox.CheckedChanged += new System.EventHandler(this.GrassCheckBox_CheckedChanged); - // - // InteriorsCheckBox - // - this.InteriorsCheckBox.AutoSize = true; - this.InteriorsCheckBox.Checked = true; - this.InteriorsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.InteriorsCheckBox.Location = new System.Drawing.Point(10, 114); - this.InteriorsCheckBox.Name = "InteriorsCheckBox"; - this.InteriorsCheckBox.Size = new System.Drawing.Size(92, 17); - this.InteriorsCheckBox.TabIndex = 34; - this.InteriorsCheckBox.Text = "Show interiors"; - this.InteriorsCheckBox.UseVisualStyleBackColor = true; - this.InteriorsCheckBox.CheckedChanged += new System.EventHandler(this.InteriorsCheckBox_CheckedChanged); - // - // CollisionMeshLayerDrawableCheckBox - // - this.CollisionMeshLayerDrawableCheckBox.AutoSize = true; - this.CollisionMeshLayerDrawableCheckBox.Checked = true; - this.CollisionMeshLayerDrawableCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.CollisionMeshLayerDrawableCheckBox.Location = new System.Drawing.Point(118, 262); - this.CollisionMeshLayerDrawableCheckBox.Name = "CollisionMeshLayerDrawableCheckBox"; - this.CollisionMeshLayerDrawableCheckBox.Size = new System.Drawing.Size(71, 17); - this.CollisionMeshLayerDrawableCheckBox.TabIndex = 41; - this.CollisionMeshLayerDrawableCheckBox.Text = "Drawable"; - this.CollisionMeshLayerDrawableCheckBox.UseVisualStyleBackColor = true; - this.CollisionMeshLayerDrawableCheckBox.CheckedChanged += new System.EventHandler(this.CollisionMeshLayerDrawableCheckBox_CheckedChanged); - // - // CollisionMeshLayer2CheckBox - // - this.CollisionMeshLayer2CheckBox.AutoSize = true; - this.CollisionMeshLayer2CheckBox.Checked = true; - this.CollisionMeshLayer2CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.CollisionMeshLayer2CheckBox.Location = new System.Drawing.Point(82, 262); - this.CollisionMeshLayer2CheckBox.Name = "CollisionMeshLayer2CheckBox"; - this.CollisionMeshLayer2CheckBox.Size = new System.Drawing.Size(32, 17); - this.CollisionMeshLayer2CheckBox.TabIndex = 40; - this.CollisionMeshLayer2CheckBox.Text = "2"; - this.CollisionMeshLayer2CheckBox.UseVisualStyleBackColor = true; - this.CollisionMeshLayer2CheckBox.CheckedChanged += new System.EventHandler(this.CollisionMeshLayer2CheckBox_CheckedChanged); - // - // CollisionMeshLayer1CheckBox - // - this.CollisionMeshLayer1CheckBox.AutoSize = true; - this.CollisionMeshLayer1CheckBox.Checked = true; - this.CollisionMeshLayer1CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.CollisionMeshLayer1CheckBox.Location = new System.Drawing.Point(46, 262); - this.CollisionMeshLayer1CheckBox.Name = "CollisionMeshLayer1CheckBox"; - this.CollisionMeshLayer1CheckBox.Size = new System.Drawing.Size(32, 17); - this.CollisionMeshLayer1CheckBox.TabIndex = 39; - this.CollisionMeshLayer1CheckBox.Text = "1"; - this.CollisionMeshLayer1CheckBox.UseVisualStyleBackColor = true; - this.CollisionMeshLayer1CheckBox.CheckedChanged += new System.EventHandler(this.CollisionMeshLayer1CheckBox_CheckedChanged); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(4, 244); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(106, 13); - this.label13.TabIndex = 54; - this.label13.Text = "Collision mesh layers:"; - // - // CollisionMeshLayer0CheckBox - // - this.CollisionMeshLayer0CheckBox.AutoSize = true; - this.CollisionMeshLayer0CheckBox.Checked = true; - this.CollisionMeshLayer0CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.CollisionMeshLayer0CheckBox.Location = new System.Drawing.Point(10, 262); - this.CollisionMeshLayer0CheckBox.Name = "CollisionMeshLayer0CheckBox"; - this.CollisionMeshLayer0CheckBox.Size = new System.Drawing.Size(32, 17); - this.CollisionMeshLayer0CheckBox.TabIndex = 38; - this.CollisionMeshLayer0CheckBox.Text = "0"; - this.CollisionMeshLayer0CheckBox.UseVisualStyleBackColor = true; - this.CollisionMeshLayer0CheckBox.CheckedChanged += new System.EventHandler(this.CollisionMeshLayer0CheckBox_CheckedChanged); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(4, 193); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(129, 13); - this.label12.TabIndex = 51; - this.label12.Text = "Collision/nav mesh range:"; - // - // CollisionMeshRangeTrackBar - // - this.CollisionMeshRangeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CollisionMeshRangeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.CollisionMeshRangeTrackBar.LargeChange = 1; - this.CollisionMeshRangeTrackBar.Location = new System.Drawing.Point(6, 209); - this.CollisionMeshRangeTrackBar.Maximum = 15; - this.CollisionMeshRangeTrackBar.Minimum = 1; - this.CollisionMeshRangeTrackBar.Name = "CollisionMeshRangeTrackBar"; - this.CollisionMeshRangeTrackBar.Size = new System.Drawing.Size(188, 45); - this.CollisionMeshRangeTrackBar.TabIndex = 37; - this.CollisionMeshRangeTrackBar.Value = 6; - this.CollisionMeshRangeTrackBar.Scroll += new System.EventHandler(this.CollisionMeshRangeTrackBar_Scroll); - // - // CollisionMeshesCheckBox - // - this.CollisionMeshesCheckBox.AutoSize = true; - this.CollisionMeshesCheckBox.Location = new System.Drawing.Point(10, 171); - this.CollisionMeshesCheckBox.Name = "CollisionMeshesCheckBox"; - this.CollisionMeshesCheckBox.Size = new System.Drawing.Size(132, 17); - this.CollisionMeshesCheckBox.TabIndex = 36; - this.CollisionMeshesCheckBox.Text = "Show collision meshes"; - this.CollisionMeshesCheckBox.UseVisualStyleBackColor = true; - this.CollisionMeshesCheckBox.CheckedChanged += new System.EventHandler(this.CollisionMeshesCheckBox_CheckedChanged); - // - // FullScreenCheckBox - // - this.FullScreenCheckBox.AutoSize = true; - this.FullScreenCheckBox.Location = new System.Drawing.Point(10, 9); - this.FullScreenCheckBox.Name = "FullScreenCheckBox"; - this.FullScreenCheckBox.Size = new System.Drawing.Size(173, 17); - this.FullScreenCheckBox.TabIndex = 28; - this.FullScreenCheckBox.Text = "Full screen (borderless window)"; - this.FullScreenCheckBox.UseVisualStyleBackColor = true; - this.FullScreenCheckBox.CheckedChanged += new System.EventHandler(this.FullScreenCheckBox_CheckedChanged); - // - // TimedEntitiesCheckBox - // - this.TimedEntitiesCheckBox.AutoSize = true; - this.TimedEntitiesCheckBox.Checked = true; - this.TimedEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.TimedEntitiesCheckBox.Location = new System.Drawing.Point(10, 93); - this.TimedEntitiesCheckBox.Name = "TimedEntitiesCheckBox"; - this.TimedEntitiesCheckBox.Size = new System.Drawing.Size(117, 17); - this.TimedEntitiesCheckBox.TabIndex = 32; - this.TimedEntitiesCheckBox.Text = "Show timed entities"; - this.TimedEntitiesCheckBox.UseVisualStyleBackColor = true; - this.TimedEntitiesCheckBox.CheckedChanged += new System.EventHandler(this.TimedEntitiesCheckBox_CheckedChanged); - // - // FieldOfViewTrackBar - // - this.FieldOfViewTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.FieldOfViewTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.FieldOfViewTrackBar.LargeChange = 1; - this.FieldOfViewTrackBar.Location = new System.Drawing.Point(6, 351); - this.FieldOfViewTrackBar.Maximum = 200; - this.FieldOfViewTrackBar.Minimum = 10; - this.FieldOfViewTrackBar.Name = "FieldOfViewTrackBar"; - this.FieldOfViewTrackBar.Size = new System.Drawing.Size(188, 45); - this.FieldOfViewTrackBar.TabIndex = 43; - this.FieldOfViewTrackBar.TickFrequency = 10; - this.FieldOfViewTrackBar.Value = 100; - this.FieldOfViewTrackBar.Scroll += new System.EventHandler(this.FieldOfViewTrackBar_Scroll); - // - // OptionsRenderTabPage - // - this.OptionsRenderTabPage.Controls.Add(this.AntiAliasingValue); - this.OptionsRenderTabPage.Controls.Add(label34); - this.OptionsRenderTabPage.Controls.Add(this.AntiAliasingTrackBar); - this.OptionsRenderTabPage.Controls.Add(this.FarClipUpDown); - this.OptionsRenderTabPage.Controls.Add(this.label32); - this.OptionsRenderTabPage.Controls.Add(this.NearClipUpDown); - this.OptionsRenderTabPage.Controls.Add(this.label31); - this.OptionsRenderTabPage.Controls.Add(this.HDTexturesCheckBox); - this.OptionsRenderTabPage.Controls.Add(this.WireframeCheckBox); - this.OptionsRenderTabPage.Controls.Add(this.RenderModeComboBox); - this.OptionsRenderTabPage.Controls.Add(this.label11); - this.OptionsRenderTabPage.Controls.Add(this.TextureSamplerComboBox); - this.OptionsRenderTabPage.Controls.Add(this.TextureCoordsComboBox); - this.OptionsRenderTabPage.Controls.Add(this.label10); - this.OptionsRenderTabPage.Controls.Add(this.AnisotropicFilteringCheckBox); - this.OptionsRenderTabPage.Controls.Add(this.ProxiesCheckBox); - this.OptionsRenderTabPage.Controls.Add(this.WaitForChildrenCheckBox); - this.OptionsRenderTabPage.Controls.Add(this.label14); - this.OptionsRenderTabPage.Location = new System.Drawing.Point(4, 22); - this.OptionsRenderTabPage.Name = "OptionsRenderTabPage"; - this.OptionsRenderTabPage.Size = new System.Drawing.Size(200, 482); - this.OptionsRenderTabPage.TabIndex = 3; - this.OptionsRenderTabPage.Text = "Render"; - this.OptionsRenderTabPage.UseVisualStyleBackColor = true; + StatusStrip.SuspendLayout(); + ToolsPanel.SuspendLayout(); + ToolsTabControl.SuspendLayout(); + ViewTabPage.SuspendLayout(); + ViewTabControl.SuspendLayout(); + ViewWorldTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)WorldDetailDistTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)WorldLodDistTrackBar).BeginInit(); + ViewYmapsTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)DetailTrackBar).BeginInit(); + ViewModelTabPage.SuspendLayout(); + MarkersTabPage.SuspendLayout(); + SelectionTabPage.SuspendLayout(); + SelectionTabControl.SuspendLayout(); + SelectionEntityTabPage.SuspendLayout(); + SelectionArchetypeTabPage.SuspendLayout(); + SelectionDrawableTabPage.SuspendLayout(); + tabControl3.SuspendLayout(); + tabPage11.SuspendLayout(); + tabPage12.SuspendLayout(); + tabPage13.SuspendLayout(); + SelectionExtensionTabPage.SuspendLayout(); + OptionsTabPage.SuspendLayout(); + OptionsTabControl.SuspendLayout(); + OptionsGeneralTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)MapViewDetailTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)CollisionMeshRangeTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)FieldOfViewTrackBar).BeginInit(); + OptionsRenderTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)AntiAliasingTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)FarClipUpDown).BeginInit(); + ((System.ComponentModel.ISupportInitialize)NearClipUpDown).BeginInit(); + OptionsHelpersTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)SnapAngleUpDown).BeginInit(); + ((System.ComponentModel.ISupportInitialize)SnapGridSizeUpDown).BeginInit(); + ((System.ComponentModel.ISupportInitialize)BoundsRangeTrackBar).BeginInit(); + OptionsLightingTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)CloudParamTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TimeSpeedTrackBar).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TimeOfDayTrackBar).BeginInit(); + ConsolePanel.SuspendLayout(); + SelectedMarkerPanel.SuspendLayout(); + ToolsMenu.SuspendLayout(); + Toolbar.SuspendLayout(); + ToolbarPanel.SuspendLayout(); + SuspendLayout(); // // label34 // label34.AutoSize = true; - label34.Location = new System.Drawing.Point(7, 253); + label34.Location = new System.Drawing.Point(8, 292); + label34.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); label34.Name = "label34"; - label34.Size = new System.Drawing.Size(64, 13); + label34.Size = new System.Drawing.Size(76, 15); label34.TabIndex = 63; label34.Text = "Anti-Aliasing"; // - // AntiAliasingTrackBar - // - this.AntiAliasingTrackBar.LargeChange = 1; - this.AntiAliasingTrackBar.Location = new System.Drawing.Point(10, 269); - this.AntiAliasingTrackBar.Maximum = 8; - this.AntiAliasingTrackBar.Minimum = 1; - this.AntiAliasingTrackBar.Name = "AntiAliasingTrackBar"; - this.AntiAliasingTrackBar.Size = new System.Drawing.Size(184, 45); - this.AntiAliasingTrackBar.TabIndex = 62; - this.AntiAliasingTrackBar.Value = 1; - this.AntiAliasingTrackBar.ValueChanged += new System.EventHandler(this.AntiAliasingTrackBar_ValueChanged); - // - // FarClipUpDown - // - this.FarClipUpDown.Increment = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.FarClipUpDown.Location = new System.Drawing.Point(80, 346); - this.FarClipUpDown.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.FarClipUpDown.Minimum = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.FarClipUpDown.Name = "FarClipUpDown"; - this.FarClipUpDown.Size = new System.Drawing.Size(114, 20); - this.FarClipUpDown.TabIndex = 61; - this.FarClipUpDown.Value = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.FarClipUpDown.ValueChanged += new System.EventHandler(this.FarClipUpDown_ValueChanged); - // - // label32 - // - this.label32.AutoSize = true; - this.label32.Location = new System.Drawing.Point(4, 348); - this.label32.Name = "label32"; - this.label32.Size = new System.Drawing.Size(45, 13); - this.label32.TabIndex = 60; - this.label32.Text = "Far Clip:"; - // - // NearClipUpDown - // - this.NearClipUpDown.DecimalPlaces = 3; - this.NearClipUpDown.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.NearClipUpDown.Location = new System.Drawing.Point(80, 320); - this.NearClipUpDown.Maximum = new decimal(new int[] { - 10, - 0, - 0, - 0}); - this.NearClipUpDown.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 196608}); - this.NearClipUpDown.Name = "NearClipUpDown"; - this.NearClipUpDown.Size = new System.Drawing.Size(114, 20); - this.NearClipUpDown.TabIndex = 59; - this.NearClipUpDown.Value = new decimal(new int[] { - 1, - 0, - 0, - 131072}); - this.NearClipUpDown.ValueChanged += new System.EventHandler(this.NearClipUpDown_ValueChanged); - // - // label31 - // - this.label31.AutoSize = true; - this.label31.Location = new System.Drawing.Point(4, 322); - this.label31.Name = "label31"; - this.label31.Size = new System.Drawing.Size(53, 13); - this.label31.TabIndex = 58; - this.label31.Text = "Near Clip:"; - // - // HDTexturesCheckBox - // - this.HDTexturesCheckBox.AutoSize = true; - this.HDTexturesCheckBox.Checked = true; - this.HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.HDTexturesCheckBox.Location = new System.Drawing.Point(10, 231); - this.HDTexturesCheckBox.Name = "HDTexturesCheckBox"; - this.HDTexturesCheckBox.Size = new System.Drawing.Size(82, 17); - this.HDTexturesCheckBox.TabIndex = 57; - this.HDTexturesCheckBox.Text = "HD textures"; - this.HDTexturesCheckBox.UseVisualStyleBackColor = true; - this.HDTexturesCheckBox.CheckedChanged += new System.EventHandler(this.HDTexturesCheckBox_CheckedChanged); - // - // WireframeCheckBox - // - this.WireframeCheckBox.AutoSize = true; - this.WireframeCheckBox.Location = new System.Drawing.Point(10, 115); - this.WireframeCheckBox.Name = "WireframeCheckBox"; - this.WireframeCheckBox.Size = new System.Drawing.Size(74, 17); - this.WireframeCheckBox.TabIndex = 49; - this.WireframeCheckBox.Text = "Wireframe"; - this.WireframeCheckBox.UseVisualStyleBackColor = true; - this.WireframeCheckBox.CheckedChanged += new System.EventHandler(this.WireframeCheckBox_CheckedChanged); - // - // RenderModeComboBox - // - this.RenderModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.RenderModeComboBox.FormattingEnabled = true; - this.RenderModeComboBox.Items.AddRange(new object[] { - "Default", - "Single texture", - "Vertex normals", - "Vertex tangents", - "Vertex colour 1", - "Vertex colour 2", - "Texture coord 1", - "Texture coord 2", - "Texture coord 3"}); - this.RenderModeComboBox.Location = new System.Drawing.Point(80, 16); - this.RenderModeComboBox.Name = "RenderModeComboBox"; - this.RenderModeComboBox.Size = new System.Drawing.Size(114, 21); - this.RenderModeComboBox.TabIndex = 46; - this.RenderModeComboBox.SelectedIndexChanged += new System.EventHandler(this.RenderModeComboBox_SelectedIndexChanged); - this.RenderModeComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.RenderModeComboBox_KeyPress); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(4, 46); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(67, 13); - this.label11.TabIndex = 50; - this.label11.Text = "Tex sampler:"; - // - // TextureSamplerComboBox - // - this.TextureSamplerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.TextureSamplerComboBox.Enabled = false; - this.TextureSamplerComboBox.FormattingEnabled = true; - this.TextureSamplerComboBox.Location = new System.Drawing.Point(80, 43); - this.TextureSamplerComboBox.Name = "TextureSamplerComboBox"; - this.TextureSamplerComboBox.Size = new System.Drawing.Size(114, 21); - this.TextureSamplerComboBox.TabIndex = 47; - this.TextureSamplerComboBox.SelectedIndexChanged += new System.EventHandler(this.TextureSamplerComboBox_SelectedIndexChanged); - this.TextureSamplerComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextureSamplerComboBox_KeyPress); - // - // TextureCoordsComboBox - // - this.TextureCoordsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.TextureCoordsComboBox.Enabled = false; - this.TextureCoordsComboBox.FormattingEnabled = true; - this.TextureCoordsComboBox.Items.AddRange(new object[] { - "Texture coord 1", - "Texture coord 2", - "Texture coord 3"}); - this.TextureCoordsComboBox.Location = new System.Drawing.Point(80, 70); - this.TextureCoordsComboBox.Name = "TextureCoordsComboBox"; - this.TextureCoordsComboBox.Size = new System.Drawing.Size(114, 21); - this.TextureCoordsComboBox.TabIndex = 48; - this.TextureCoordsComboBox.SelectedIndexChanged += new System.EventHandler(this.TextureCoordsComboBox_SelectedIndexChanged); - this.TextureCoordsComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextureCoordsComboBox_KeyPress); - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(4, 19); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(74, 13); - this.label10.TabIndex = 48; - this.label10.Text = "Render mode:"; - // - // AnisotropicFilteringCheckBox - // - this.AnisotropicFilteringCheckBox.AutoSize = true; - this.AnisotropicFilteringCheckBox.Checked = true; - this.AnisotropicFilteringCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.AnisotropicFilteringCheckBox.Location = new System.Drawing.Point(10, 138); - this.AnisotropicFilteringCheckBox.Name = "AnisotropicFilteringCheckBox"; - this.AnisotropicFilteringCheckBox.Size = new System.Drawing.Size(114, 17); - this.AnisotropicFilteringCheckBox.TabIndex = 50; - this.AnisotropicFilteringCheckBox.Text = "Anisotropic filtering"; - this.AnisotropicFilteringCheckBox.UseVisualStyleBackColor = true; - this.AnisotropicFilteringCheckBox.CheckedChanged += new System.EventHandler(this.AnisotropicFilteringCheckBox_CheckedChanged); - // - // ProxiesCheckBox - // - this.ProxiesCheckBox.AutoSize = true; - this.ProxiesCheckBox.Location = new System.Drawing.Point(10, 199); - this.ProxiesCheckBox.Name = "ProxiesCheckBox"; - this.ProxiesCheckBox.Size = new System.Drawing.Size(89, 17); - this.ProxiesCheckBox.TabIndex = 52; - this.ProxiesCheckBox.Text = "Show proxies"; - this.ProxiesCheckBox.UseVisualStyleBackColor = true; - this.ProxiesCheckBox.CheckedChanged += new System.EventHandler(this.ProxiesCheckBox_CheckedChanged); - // - // WaitForChildrenCheckBox - // - this.WaitForChildrenCheckBox.AutoSize = true; - this.WaitForChildrenCheckBox.Checked = true; - this.WaitForChildrenCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WaitForChildrenCheckBox.Location = new System.Drawing.Point(10, 161); - this.WaitForChildrenCheckBox.Name = "WaitForChildrenCheckBox"; - this.WaitForChildrenCheckBox.Size = new System.Drawing.Size(138, 17); - this.WaitForChildrenCheckBox.TabIndex = 51; - this.WaitForChildrenCheckBox.Text = "Wait for children to load"; - this.WaitForChildrenCheckBox.UseVisualStyleBackColor = true; - this.WaitForChildrenCheckBox.CheckedChanged += new System.EventHandler(this.WaitForChildrenCheckBox_CheckedChanged); - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(4, 73); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(63, 13); - this.label14.TabIndex = 56; - this.label14.Text = "Tex coords:"; - // - // OptionsHelpersTabPage - // - this.OptionsHelpersTabPage.Controls.Add(this.SnapAngleUpDown); - this.OptionsHelpersTabPage.Controls.Add(this.label33); - this.OptionsHelpersTabPage.Controls.Add(this.SnapGridSizeUpDown); - this.OptionsHelpersTabPage.Controls.Add(this.label26); - this.OptionsHelpersTabPage.Controls.Add(this.SkeletonsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.AudioOuterBoundsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.PopZonesCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.NavMeshesCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.TrainPathsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.PathsDepthClipCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.PathBoundsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.SelectionWidgetCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.MarkerStyleComboBox); - this.OptionsHelpersTabPage.Controls.Add(this.label4); - this.OptionsHelpersTabPage.Controls.Add(this.LocatorStyleComboBox); - this.OptionsHelpersTabPage.Controls.Add(this.label5); - this.OptionsHelpersTabPage.Controls.Add(this.MarkerDepthClipCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.label9); - this.OptionsHelpersTabPage.Controls.Add(this.PathsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.SelectionBoundsCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.BoundsDepthClipCheckBox); - this.OptionsHelpersTabPage.Controls.Add(this.BoundsRangeTrackBar); - this.OptionsHelpersTabPage.Controls.Add(this.BoundsStyleComboBox); - this.OptionsHelpersTabPage.Controls.Add(this.label8); - this.OptionsHelpersTabPage.Location = new System.Drawing.Point(4, 22); - this.OptionsHelpersTabPage.Name = "OptionsHelpersTabPage"; - this.OptionsHelpersTabPage.Padding = new System.Windows.Forms.Padding(3); - this.OptionsHelpersTabPage.Size = new System.Drawing.Size(200, 482); - this.OptionsHelpersTabPage.TabIndex = 1; - this.OptionsHelpersTabPage.Text = "Helpers"; - this.OptionsHelpersTabPage.UseVisualStyleBackColor = true; - // - // SnapAngleUpDown - // - this.SnapAngleUpDown.DecimalPlaces = 1; - this.SnapAngleUpDown.Location = new System.Drawing.Point(98, 279); - this.SnapAngleUpDown.Maximum = new decimal(new int[] { - 180, - 0, - 0, - 0}); - this.SnapAngleUpDown.Name = "SnapAngleUpDown"; - this.SnapAngleUpDown.Size = new System.Drawing.Size(96, 20); - this.SnapAngleUpDown.TabIndex = 32; - this.SnapAngleUpDown.Value = new decimal(new int[] { - 50, - 0, - 0, - 65536}); - this.SnapAngleUpDown.ValueChanged += new System.EventHandler(this.SnapAngleUpDown_ValueChanged); - // - // label33 - // - this.label33.AutoSize = true; - this.label33.Location = new System.Drawing.Point(4, 281); - this.label33.Name = "label33"; - this.label33.Size = new System.Drawing.Size(91, 13); - this.label33.TabIndex = 31; - this.label33.Text = "Snap angle (deg):"; - // - // SnapGridSizeUpDown - // - this.SnapGridSizeUpDown.DecimalPlaces = 2; - this.SnapGridSizeUpDown.Location = new System.Drawing.Point(98, 253); - this.SnapGridSizeUpDown.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.SnapGridSizeUpDown.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 131072}); - this.SnapGridSizeUpDown.Name = "SnapGridSizeUpDown"; - this.SnapGridSizeUpDown.Size = new System.Drawing.Size(96, 20); - this.SnapGridSizeUpDown.TabIndex = 30; - this.SnapGridSizeUpDown.Value = new decimal(new int[] { - 100, - 0, - 0, - 131072}); - this.SnapGridSizeUpDown.ValueChanged += new System.EventHandler(this.SnapGridSizeUpDown_ValueChanged); - // - // label26 - // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(4, 255); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(76, 13); - this.label26.TabIndex = 29; - this.label26.Text = "Snap grid size:"; - // - // SkeletonsCheckBox - // - this.SkeletonsCheckBox.AutoSize = true; - this.SkeletonsCheckBox.Location = new System.Drawing.Point(10, 411); - this.SkeletonsCheckBox.Name = "SkeletonsCheckBox"; - this.SkeletonsCheckBox.Size = new System.Drawing.Size(101, 17); - this.SkeletonsCheckBox.TabIndex = 38; - this.SkeletonsCheckBox.Text = "Show skeletons"; - this.SkeletonsCheckBox.UseVisualStyleBackColor = true; - this.SkeletonsCheckBox.CheckedChanged += new System.EventHandler(this.SkeletonsCheckBox_CheckedChanged); - // - // AudioOuterBoundsCheckBox - // - this.AudioOuterBoundsCheckBox.AutoSize = true; - this.AudioOuterBoundsCheckBox.Checked = true; - this.AudioOuterBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.AudioOuterBoundsCheckBox.Location = new System.Drawing.Point(10, 457); - this.AudioOuterBoundsCheckBox.Name = "AudioOuterBoundsCheckBox"; - this.AudioOuterBoundsCheckBox.Size = new System.Drawing.Size(147, 17); - this.AudioOuterBoundsCheckBox.TabIndex = 40; - this.AudioOuterBoundsCheckBox.Text = "Show audio outer bounds"; - this.AudioOuterBoundsCheckBox.UseVisualStyleBackColor = true; - this.AudioOuterBoundsCheckBox.CheckedChanged += new System.EventHandler(this.AudioOuterBoundsCheckBox_CheckedChanged); - // - // PopZonesCheckBox - // - this.PopZonesCheckBox.AutoSize = true; - this.PopZonesCheckBox.Location = new System.Drawing.Point(10, 388); - this.PopZonesCheckBox.Name = "PopZonesCheckBox"; - this.PopZonesCheckBox.Size = new System.Drawing.Size(136, 17); - this.PopZonesCheckBox.TabIndex = 37; - this.PopZonesCheckBox.Text = "Show population zones"; - this.PopZonesCheckBox.UseVisualStyleBackColor = true; - this.PopZonesCheckBox.CheckedChanged += new System.EventHandler(this.PopZonesCheckBox_CheckedChanged); - // - // NavMeshesCheckBox - // - this.NavMeshesCheckBox.AutoSize = true; - this.NavMeshesCheckBox.Location = new System.Drawing.Point(10, 365); - this.NavMeshesCheckBox.Name = "NavMeshesCheckBox"; - this.NavMeshesCheckBox.Size = new System.Drawing.Size(113, 17); - this.NavMeshesCheckBox.TabIndex = 36; - this.NavMeshesCheckBox.Text = "Show nav meshes"; - this.NavMeshesCheckBox.UseVisualStyleBackColor = true; - this.NavMeshesCheckBox.CheckedChanged += new System.EventHandler(this.NavMeshesCheckBox_CheckedChanged); - // - // TrainPathsCheckBox - // - this.TrainPathsCheckBox.AutoSize = true; - this.TrainPathsCheckBox.Location = new System.Drawing.Point(10, 342); - this.TrainPathsCheckBox.Name = "TrainPathsCheckBox"; - this.TrainPathsCheckBox.Size = new System.Drawing.Size(105, 17); - this.TrainPathsCheckBox.TabIndex = 35; - this.TrainPathsCheckBox.Text = "Show train paths"; - this.TrainPathsCheckBox.UseVisualStyleBackColor = true; - this.TrainPathsCheckBox.CheckedChanged += new System.EventHandler(this.TrainPathsCheckBox_CheckedChanged); - // - // PathsDepthClipCheckBox - // - this.PathsDepthClipCheckBox.AutoSize = true; - this.PathsDepthClipCheckBox.Checked = true; - this.PathsDepthClipCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.PathsDepthClipCheckBox.Location = new System.Drawing.Point(10, 434); - this.PathsDepthClipCheckBox.Name = "PathsDepthClipCheckBox"; - this.PathsDepthClipCheckBox.Size = new System.Drawing.Size(102, 17); - this.PathsDepthClipCheckBox.TabIndex = 39; - this.PathsDepthClipCheckBox.Text = "Paths depth clip"; - this.PathsDepthClipCheckBox.UseVisualStyleBackColor = true; - this.PathsDepthClipCheckBox.CheckedChanged += new System.EventHandler(this.PathsDepthClipCheckBox_CheckedChanged); - // - // PathBoundsCheckBox - // - this.PathBoundsCheckBox.AutoSize = true; - this.PathBoundsCheckBox.Checked = true; - this.PathBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.PathBoundsCheckBox.Location = new System.Drawing.Point(98, 319); - this.PathBoundsCheckBox.Name = "PathBoundsCheckBox"; - this.PathBoundsCheckBox.Size = new System.Drawing.Size(86, 17); - this.PathBoundsCheckBox.TabIndex = 34; - this.PathBoundsCheckBox.Text = "Path bounds"; - this.PathBoundsCheckBox.UseVisualStyleBackColor = true; - this.PathBoundsCheckBox.CheckedChanged += new System.EventHandler(this.PathBoundsCheckBox_CheckedChanged); - // - // SelectionWidgetCheckBox - // - this.SelectionWidgetCheckBox.AutoSize = true; - this.SelectionWidgetCheckBox.Checked = true; - this.SelectionWidgetCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.SelectionWidgetCheckBox.Location = new System.Drawing.Point(10, 231); - this.SelectionWidgetCheckBox.Name = "SelectionWidgetCheckBox"; - this.SelectionWidgetCheckBox.Size = new System.Drawing.Size(87, 17); - this.SelectionWidgetCheckBox.TabIndex = 28; - this.SelectionWidgetCheckBox.Text = "Show widget"; - this.SelectionWidgetCheckBox.UseVisualStyleBackColor = true; - this.SelectionWidgetCheckBox.CheckedChanged += new System.EventHandler(this.SelectionWidgetCheckBox_CheckedChanged); - // - // MarkerStyleComboBox - // - this.MarkerStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.MarkerStyleComboBox.FormattingEnabled = true; - this.MarkerStyleComboBox.Location = new System.Drawing.Point(80, 6); - this.MarkerStyleComboBox.Name = "MarkerStyleComboBox"; - this.MarkerStyleComboBox.Size = new System.Drawing.Size(114, 21); - this.MarkerStyleComboBox.TabIndex = 18; - this.MarkerStyleComboBox.SelectedIndexChanged += new System.EventHandler(this.MarkerStyleComboBox_SelectedIndexChanged); - this.MarkerStyleComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.MarkerStyleComboBox_KeyPress); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(4, 9); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(67, 13); - this.label4.TabIndex = 17; - this.label4.Text = "Marker style:"; - // - // LocatorStyleComboBox - // - this.LocatorStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.LocatorStyleComboBox.FormattingEnabled = true; - this.LocatorStyleComboBox.Location = new System.Drawing.Point(80, 33); - this.LocatorStyleComboBox.Name = "LocatorStyleComboBox"; - this.LocatorStyleComboBox.Size = new System.Drawing.Size(114, 21); - this.LocatorStyleComboBox.TabIndex = 20; - this.LocatorStyleComboBox.SelectedIndexChanged += new System.EventHandler(this.LocatorStyleComboBox_SelectedIndexChanged); - this.LocatorStyleComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.LocatorStyleComboBox_KeyPress); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(4, 36); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(70, 13); - this.label5.TabIndex = 19; - this.label5.Text = "Locator style:"; - // - // MarkerDepthClipCheckBox - // - this.MarkerDepthClipCheckBox.AutoSize = true; - this.MarkerDepthClipCheckBox.Location = new System.Drawing.Point(10, 60); - this.MarkerDepthClipCheckBox.Name = "MarkerDepthClipCheckBox"; - this.MarkerDepthClipCheckBox.Size = new System.Drawing.Size(108, 17); - this.MarkerDepthClipCheckBox.TabIndex = 21; - this.MarkerDepthClipCheckBox.Text = "Marker depth clip"; - this.MarkerDepthClipCheckBox.UseVisualStyleBackColor = true; - this.MarkerDepthClipCheckBox.Visible = false; - this.MarkerDepthClipCheckBox.CheckedChanged += new System.EventHandler(this.MarkerDepthClipCheckBox_CheckedChanged); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(4, 136); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(76, 13); - this.label9.TabIndex = 25; - this.label9.Text = "Bounds range:"; - // - // PathsCheckBox - // - this.PathsCheckBox.AutoSize = true; - this.PathsCheckBox.Location = new System.Drawing.Point(10, 319); - this.PathsCheckBox.Name = "PathsCheckBox"; - this.PathsCheckBox.Size = new System.Drawing.Size(82, 17); - this.PathsCheckBox.TabIndex = 33; - this.PathsCheckBox.Text = "Show paths"; - this.PathsCheckBox.UseVisualStyleBackColor = true; - this.PathsCheckBox.CheckedChanged += new System.EventHandler(this.PathsCheckBox_CheckedChanged); - // - // SelectionBoundsCheckBox - // - this.SelectionBoundsCheckBox.AutoSize = true; - this.SelectionBoundsCheckBox.Checked = true; - this.SelectionBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.SelectionBoundsCheckBox.Location = new System.Drawing.Point(10, 194); - this.SelectionBoundsCheckBox.Name = "SelectionBoundsCheckBox"; - this.SelectionBoundsCheckBox.Size = new System.Drawing.Size(136, 17); - this.SelectionBoundsCheckBox.TabIndex = 27; - this.SelectionBoundsCheckBox.Text = "Show selection bounds"; - this.SelectionBoundsCheckBox.UseVisualStyleBackColor = true; - this.SelectionBoundsCheckBox.CheckedChanged += new System.EventHandler(this.SelectionBoundsCheckBox_CheckedChanged); - // - // BoundsDepthClipCheckBox - // - this.BoundsDepthClipCheckBox.AutoSize = true; - this.BoundsDepthClipCheckBox.Checked = true; - this.BoundsDepthClipCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.BoundsDepthClipCheckBox.Location = new System.Drawing.Point(10, 114); - this.BoundsDepthClipCheckBox.Name = "BoundsDepthClipCheckBox"; - this.BoundsDepthClipCheckBox.Size = new System.Drawing.Size(111, 17); - this.BoundsDepthClipCheckBox.TabIndex = 24; - this.BoundsDepthClipCheckBox.Text = "Bounds depth clip"; - this.BoundsDepthClipCheckBox.UseVisualStyleBackColor = true; - this.BoundsDepthClipCheckBox.CheckedChanged += new System.EventHandler(this.BoundsDepthClipCheckBox_CheckedChanged); - // - // BoundsRangeTrackBar - // - this.BoundsRangeTrackBar.AutoSize = false; - this.BoundsRangeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.BoundsRangeTrackBar.LargeChange = 10; - this.BoundsRangeTrackBar.Location = new System.Drawing.Point(6, 152); - this.BoundsRangeTrackBar.Maximum = 100; - this.BoundsRangeTrackBar.Minimum = 1; - this.BoundsRangeTrackBar.Name = "BoundsRangeTrackBar"; - this.BoundsRangeTrackBar.Size = new System.Drawing.Size(188, 33); - this.BoundsRangeTrackBar.TabIndex = 26; - this.BoundsRangeTrackBar.TickFrequency = 10; - this.BoundsRangeTrackBar.Value = 100; - this.BoundsRangeTrackBar.Scroll += new System.EventHandler(this.BoundsRangeTrackBar_Scroll); - // - // BoundsStyleComboBox - // - this.BoundsStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.BoundsStyleComboBox.FormattingEnabled = true; - this.BoundsStyleComboBox.Items.AddRange(new object[] { - "None", - "Boxes", - "Spheres"}); - this.BoundsStyleComboBox.Location = new System.Drawing.Point(80, 87); - this.BoundsStyleComboBox.Name = "BoundsStyleComboBox"; - this.BoundsStyleComboBox.Size = new System.Drawing.Size(114, 21); - this.BoundsStyleComboBox.TabIndex = 23; - this.BoundsStyleComboBox.SelectedIndexChanged += new System.EventHandler(this.BoundsStyleComboBox_SelectedIndexChanged); - this.BoundsStyleComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.BoundsStyleComboBox_KeyPress); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(4, 90); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(70, 13); - this.label8.TabIndex = 22; - this.label8.Text = "Bounds style:"; - // - // OptionsLightingTabPage - // - this.OptionsLightingTabPage.Controls.Add(this.HDLightsCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.DeferredShadingCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.WeatherRegionComboBox); - this.OptionsLightingTabPage.Controls.Add(this.label29); - this.OptionsLightingTabPage.Controls.Add(this.CloudParamTrackBar); - this.OptionsLightingTabPage.Controls.Add(this.CloudParamComboBox); - this.OptionsLightingTabPage.Controls.Add(this.label23); - this.OptionsLightingTabPage.Controls.Add(this.CloudsComboBox); - this.OptionsLightingTabPage.Controls.Add(this.label21); - this.OptionsLightingTabPage.Controls.Add(this.TimeSpeedLabel); - this.OptionsLightingTabPage.Controls.Add(this.label20); - this.OptionsLightingTabPage.Controls.Add(this.TimeSpeedTrackBar); - this.OptionsLightingTabPage.Controls.Add(this.TimeStartStopButton); - this.OptionsLightingTabPage.Controls.Add(this.ArtificialAmbientLightCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.NaturalAmbientLightCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.LODLightsCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.HDRRenderingCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.ControlTimeOfDayCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.TimeOfDayLabel); - this.OptionsLightingTabPage.Controls.Add(this.label19); - this.OptionsLightingTabPage.Controls.Add(this.TimeOfDayTrackBar); - this.OptionsLightingTabPage.Controls.Add(this.WeatherComboBox); - this.OptionsLightingTabPage.Controls.Add(this.label17); - this.OptionsLightingTabPage.Controls.Add(this.ControlLightDirectionCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.SkydomeCheckBox); - this.OptionsLightingTabPage.Controls.Add(this.ShadowsCheckBox); - this.OptionsLightingTabPage.Location = new System.Drawing.Point(4, 22); - this.OptionsLightingTabPage.Name = "OptionsLightingTabPage"; - this.OptionsLightingTabPage.Size = new System.Drawing.Size(200, 482); - this.OptionsLightingTabPage.TabIndex = 2; - this.OptionsLightingTabPage.Text = "Lighting"; - this.OptionsLightingTabPage.UseVisualStyleBackColor = true; - // - // HDLightsCheckBox - // - this.HDLightsCheckBox.AutoSize = true; - this.HDLightsCheckBox.Checked = true; - this.HDLightsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.HDLightsCheckBox.Location = new System.Drawing.Point(10, 93); - this.HDLightsCheckBox.Name = "HDLightsCheckBox"; - this.HDLightsCheckBox.Size = new System.Drawing.Size(69, 17); - this.HDLightsCheckBox.TabIndex = 34; - this.HDLightsCheckBox.Text = "HD lights"; - this.HDLightsCheckBox.UseVisualStyleBackColor = true; - this.HDLightsCheckBox.CheckedChanged += new System.EventHandler(this.HDLightsCheckBox_CheckedChanged); - // - // DeferredShadingCheckBox - // - this.DeferredShadingCheckBox.AutoSize = true; - this.DeferredShadingCheckBox.Checked = true; - this.DeferredShadingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.DeferredShadingCheckBox.Location = new System.Drawing.Point(10, 5); - this.DeferredShadingCheckBox.Name = "DeferredShadingCheckBox"; - this.DeferredShadingCheckBox.Size = new System.Drawing.Size(107, 17); - this.DeferredShadingCheckBox.TabIndex = 30; - this.DeferredShadingCheckBox.Text = "Deferred shading"; - this.DeferredShadingCheckBox.UseVisualStyleBackColor = true; - this.DeferredShadingCheckBox.CheckedChanged += new System.EventHandler(this.DeferredShadingCheckBox_CheckedChanged); - // - // WeatherRegionComboBox - // - this.WeatherRegionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.WeatherRegionComboBox.FormattingEnabled = true; - this.WeatherRegionComboBox.Items.AddRange(new object[] { - "GLOBAL", - "URBAN"}); - this.WeatherRegionComboBox.Location = new System.Drawing.Point(61, 355); - this.WeatherRegionComboBox.Name = "WeatherRegionComboBox"; - this.WeatherRegionComboBox.Size = new System.Drawing.Size(133, 21); - this.WeatherRegionComboBox.TabIndex = 50; - this.WeatherRegionComboBox.SelectedIndexChanged += new System.EventHandler(this.WeatherRegionComboBox_SelectedIndexChanged); - this.WeatherRegionComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.WeatherRegionComboBox_KeyPress); - // - // label29 - // - this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(4, 358); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(44, 13); - this.label29.TabIndex = 49; - this.label29.Text = "Region:"; - // - // CloudParamTrackBar - // - this.CloudParamTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CloudParamTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.CloudParamTrackBar.LargeChange = 10; - this.CloudParamTrackBar.Location = new System.Drawing.Point(6, 436); - this.CloudParamTrackBar.Maximum = 200; - this.CloudParamTrackBar.Name = "CloudParamTrackBar"; - this.CloudParamTrackBar.Size = new System.Drawing.Size(188, 45); - this.CloudParamTrackBar.TabIndex = 55; - this.CloudParamTrackBar.TickFrequency = 10; - this.CloudParamTrackBar.Value = 100; - this.CloudParamTrackBar.Scroll += new System.EventHandler(this.CloudParamTrackBar_Scroll); - // - // CloudParamComboBox - // - this.CloudParamComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CloudParamComboBox.FormattingEnabled = true; - this.CloudParamComboBox.Items.AddRange(new object[] { - ""}); - this.CloudParamComboBox.Location = new System.Drawing.Point(78, 409); - this.CloudParamComboBox.Name = "CloudParamComboBox"; - this.CloudParamComboBox.Size = new System.Drawing.Size(116, 21); - this.CloudParamComboBox.TabIndex = 54; - this.CloudParamComboBox.SelectedIndexChanged += new System.EventHandler(this.CloudParamComboBox_SelectedIndexChanged); - this.CloudParamComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CloudParamComboBox_KeyPress); - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(4, 412); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(69, 13); - this.label23.TabIndex = 53; - this.label23.Text = "Cloud param:"; - // - // CloudsComboBox - // - this.CloudsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CloudsComboBox.FormattingEnabled = true; - this.CloudsComboBox.Items.AddRange(new object[] { - ""}); - this.CloudsComboBox.Location = new System.Drawing.Point(61, 382); - this.CloudsComboBox.Name = "CloudsComboBox"; - this.CloudsComboBox.Size = new System.Drawing.Size(133, 21); - this.CloudsComboBox.TabIndex = 52; - this.CloudsComboBox.SelectedIndexChanged += new System.EventHandler(this.CloudsComboBox_SelectedIndexChanged); - this.CloudsComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CloudsComboBox_KeyPress); - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(4, 385); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(42, 13); - this.label21.TabIndex = 51; - this.label21.Text = "Clouds:"; - // - // TimeSpeedLabel - // - this.TimeSpeedLabel.AutoSize = true; - this.TimeSpeedLabel.Location = new System.Drawing.Point(78, 263); - this.TimeSpeedLabel.Name = "TimeSpeedLabel"; - this.TimeSpeedLabel.Size = new System.Drawing.Size(63, 13); - this.TimeSpeedLabel.TabIndex = 44; - this.TimeSpeedLabel.Text = "0.5 min/sec"; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(3, 263); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(65, 13); - this.label20.TabIndex = 43; - this.label20.Text = "Time speed:"; - // - // TimeSpeedTrackBar - // - this.TimeSpeedTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TimeSpeedTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.TimeSpeedTrackBar.Location = new System.Drawing.Point(61, 279); - this.TimeSpeedTrackBar.Maximum = 100; - this.TimeSpeedTrackBar.Minimum = 40; - this.TimeSpeedTrackBar.Name = "TimeSpeedTrackBar"; - this.TimeSpeedTrackBar.Size = new System.Drawing.Size(133, 45); - this.TimeSpeedTrackBar.TabIndex = 46; - this.TimeSpeedTrackBar.TickFrequency = 5; - this.TimeSpeedTrackBar.Value = 50; - this.TimeSpeedTrackBar.Scroll += new System.EventHandler(this.TimeSpeedTrackBar_Scroll); - // - // TimeStartStopButton - // - this.TimeStartStopButton.Location = new System.Drawing.Point(10, 279); - this.TimeStartStopButton.Name = "TimeStartStopButton"; - this.TimeStartStopButton.Size = new System.Drawing.Size(45, 23); - this.TimeStartStopButton.TabIndex = 45; - this.TimeStartStopButton.Text = "Start"; - this.TimeStartStopButton.UseVisualStyleBackColor = true; - this.TimeStartStopButton.Click += new System.EventHandler(this.TimeStartStopButton_Click); - // - // ArtificialAmbientLightCheckBox - // - this.ArtificialAmbientLightCheckBox.AutoSize = true; - this.ArtificialAmbientLightCheckBox.Checked = true; - this.ArtificialAmbientLightCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.ArtificialAmbientLightCheckBox.Location = new System.Drawing.Point(10, 137); - this.ArtificialAmbientLightCheckBox.Name = "ArtificialAmbientLightCheckBox"; - this.ArtificialAmbientLightCheckBox.Size = new System.Drawing.Size(124, 17); - this.ArtificialAmbientLightCheckBox.TabIndex = 37; - this.ArtificialAmbientLightCheckBox.Text = "Artificial ambient light"; - this.ArtificialAmbientLightCheckBox.UseVisualStyleBackColor = true; - this.ArtificialAmbientLightCheckBox.CheckedChanged += new System.EventHandler(this.ArtificialAmbientLightCheckBox_CheckedChanged); - // - // NaturalAmbientLightCheckBox - // - this.NaturalAmbientLightCheckBox.AutoSize = true; - this.NaturalAmbientLightCheckBox.Checked = true; - this.NaturalAmbientLightCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.NaturalAmbientLightCheckBox.Location = new System.Drawing.Point(10, 115); - this.NaturalAmbientLightCheckBox.Name = "NaturalAmbientLightCheckBox"; - this.NaturalAmbientLightCheckBox.Size = new System.Drawing.Size(122, 17); - this.NaturalAmbientLightCheckBox.TabIndex = 36; - this.NaturalAmbientLightCheckBox.Text = "Natural ambient light"; - this.NaturalAmbientLightCheckBox.UseVisualStyleBackColor = true; - this.NaturalAmbientLightCheckBox.CheckedChanged += new System.EventHandler(this.NaturalAmbientLightCheckBox_CheckedChanged); - // - // LODLightsCheckBox - // - this.LODLightsCheckBox.AutoSize = true; - this.LODLightsCheckBox.Checked = true; - this.LODLightsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.LODLightsCheckBox.Location = new System.Drawing.Point(89, 93); - this.LODLightsCheckBox.Name = "LODLightsCheckBox"; - this.LODLightsCheckBox.Size = new System.Drawing.Size(75, 17); - this.LODLightsCheckBox.TabIndex = 35; - this.LODLightsCheckBox.Text = "LOD lights"; - this.LODLightsCheckBox.UseVisualStyleBackColor = true; - this.LODLightsCheckBox.CheckedChanged += new System.EventHandler(this.LODLightsCheckBox_CheckedChanged); - // - // HDRRenderingCheckBox - // - this.HDRRenderingCheckBox.AutoSize = true; - this.HDRRenderingCheckBox.Checked = true; - this.HDRRenderingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.HDRRenderingCheckBox.Location = new System.Drawing.Point(10, 27); - this.HDRRenderingCheckBox.Name = "HDRRenderingCheckBox"; - this.HDRRenderingCheckBox.Size = new System.Drawing.Size(97, 17); - this.HDRRenderingCheckBox.TabIndex = 31; - this.HDRRenderingCheckBox.Text = "HDR rendering"; - this.HDRRenderingCheckBox.UseVisualStyleBackColor = true; - this.HDRRenderingCheckBox.CheckedChanged += new System.EventHandler(this.HDRRenderingCheckBox_CheckedChanged); - // - // ControlTimeOfDayCheckBox - // - this.ControlTimeOfDayCheckBox.AutoSize = true; - this.ControlTimeOfDayCheckBox.Checked = true; - this.ControlTimeOfDayCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.ControlTimeOfDayCheckBox.Location = new System.Drawing.Point(10, 181); - this.ControlTimeOfDayCheckBox.Name = "ControlTimeOfDayCheckBox"; - this.ControlTimeOfDayCheckBox.Size = new System.Drawing.Size(166, 17); - this.ControlTimeOfDayCheckBox.TabIndex = 39; - this.ControlTimeOfDayCheckBox.Text = "Control time of day (right-drag)"; - this.ControlTimeOfDayCheckBox.UseVisualStyleBackColor = true; - this.ControlTimeOfDayCheckBox.CheckedChanged += new System.EventHandler(this.ControlTimeOfDayCheckBox_CheckedChanged); - // - // TimeOfDayLabel - // - this.TimeOfDayLabel.AutoSize = true; - this.TimeOfDayLabel.Location = new System.Drawing.Point(75, 208); - this.TimeOfDayLabel.Name = "TimeOfDayLabel"; - this.TimeOfDayLabel.Size = new System.Drawing.Size(34, 13); - this.TimeOfDayLabel.TabIndex = 41; - this.TimeOfDayLabel.Text = "12:00"; - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(4, 208); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(65, 13); - this.label19.TabIndex = 40; - this.label19.Text = "Time of day:"; - // - // TimeOfDayTrackBar - // - this.TimeOfDayTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TimeOfDayTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.TimeOfDayTrackBar.LargeChange = 60; - this.TimeOfDayTrackBar.Location = new System.Drawing.Point(6, 224); - this.TimeOfDayTrackBar.Maximum = 1440; - this.TimeOfDayTrackBar.Name = "TimeOfDayTrackBar"; - this.TimeOfDayTrackBar.Size = new System.Drawing.Size(188, 45); - this.TimeOfDayTrackBar.TabIndex = 42; - this.TimeOfDayTrackBar.TickFrequency = 60; - this.TimeOfDayTrackBar.Value = 720; - this.TimeOfDayTrackBar.Scroll += new System.EventHandler(this.TimeOfDayTrackBar_Scroll); - // - // WeatherComboBox - // - this.WeatherComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.WeatherComboBox.FormattingEnabled = true; - this.WeatherComboBox.Items.AddRange(new object[] { - ""}); - this.WeatherComboBox.Location = new System.Drawing.Point(61, 328); - this.WeatherComboBox.Name = "WeatherComboBox"; - this.WeatherComboBox.Size = new System.Drawing.Size(133, 21); - this.WeatherComboBox.TabIndex = 48; - this.WeatherComboBox.SelectedIndexChanged += new System.EventHandler(this.WeatherComboBox_SelectedIndexChanged); - this.WeatherComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.WeatherComboBox_KeyPress); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(4, 331); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(51, 13); - this.label17.TabIndex = 47; - this.label17.Text = "Weather:"; - // - // ControlLightDirectionCheckBox - // - this.ControlLightDirectionCheckBox.AutoSize = true; - this.ControlLightDirectionCheckBox.Location = new System.Drawing.Point(10, 159); - this.ControlLightDirectionCheckBox.Name = "ControlLightDirectionCheckBox"; - this.ControlLightDirectionCheckBox.Size = new System.Drawing.Size(177, 17); - this.ControlLightDirectionCheckBox.TabIndex = 38; - this.ControlLightDirectionCheckBox.Text = "Control light direction (right-drag)"; - this.ControlLightDirectionCheckBox.UseVisualStyleBackColor = true; - this.ControlLightDirectionCheckBox.CheckedChanged += new System.EventHandler(this.ControlLightDirectionCheckBox_CheckedChanged); - // - // SkydomeCheckBox - // - this.SkydomeCheckBox.AutoSize = true; - this.SkydomeCheckBox.Checked = true; - this.SkydomeCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.SkydomeCheckBox.Location = new System.Drawing.Point(10, 71); - this.SkydomeCheckBox.Name = "SkydomeCheckBox"; - this.SkydomeCheckBox.Size = new System.Drawing.Size(70, 17); - this.SkydomeCheckBox.TabIndex = 33; - this.SkydomeCheckBox.Text = "Skydome"; - this.SkydomeCheckBox.UseVisualStyleBackColor = true; - this.SkydomeCheckBox.CheckedChanged += new System.EventHandler(this.SkydomeCheckbox_CheckedChanged); - // - // ShadowsCheckBox - // - this.ShadowsCheckBox.AutoSize = true; - this.ShadowsCheckBox.Location = new System.Drawing.Point(10, 49); - this.ShadowsCheckBox.Name = "ShadowsCheckBox"; - this.ShadowsCheckBox.Size = new System.Drawing.Size(70, 17); - this.ShadowsCheckBox.TabIndex = 32; - this.ShadowsCheckBox.Text = "Shadows"; - this.ShadowsCheckBox.UseVisualStyleBackColor = true; - this.ShadowsCheckBox.CheckedChanged += new System.EventHandler(this.ShadowsCheckBox_CheckedChanged); - // - // StatusBarCheckBox - // - this.StatusBarCheckBox.AutoSize = true; - this.StatusBarCheckBox.Checked = true; - this.StatusBarCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.StatusBarCheckBox.Location = new System.Drawing.Point(119, 517); - this.StatusBarCheckBox.Name = "StatusBarCheckBox"; - this.StatusBarCheckBox.Size = new System.Drawing.Size(74, 17); - this.StatusBarCheckBox.TabIndex = 145; - this.StatusBarCheckBox.Text = "Status bar"; - this.StatusBarCheckBox.UseVisualStyleBackColor = true; - this.StatusBarCheckBox.CheckedChanged += new System.EventHandler(this.StatusBarCheckBox_CheckedChanged); - // - // QuitButton - // - this.QuitButton.Location = new System.Drawing.Point(105, 569); - this.QuitButton.Name = "QuitButton"; - this.QuitButton.Size = new System.Drawing.Size(93, 23); - this.QuitButton.TabIndex = 149; - this.QuitButton.Text = "Quit"; - this.QuitButton.UseVisualStyleBackColor = true; - this.QuitButton.Click += new System.EventHandler(this.QuitButton_Click); - // - // ReloadSettingsButton - // - this.ReloadSettingsButton.Enabled = false; - this.ReloadSettingsButton.Location = new System.Drawing.Point(6, 540); - this.ReloadSettingsButton.Name = "ReloadSettingsButton"; - this.ReloadSettingsButton.Size = new System.Drawing.Size(93, 23); - this.ReloadSettingsButton.TabIndex = 146; - this.ReloadSettingsButton.Text = "Reload settings"; - this.ReloadSettingsButton.UseVisualStyleBackColor = true; - this.ReloadSettingsButton.Visible = false; - this.ReloadSettingsButton.Click += new System.EventHandler(this.ReloadSettingsButton_Click); - // - // SaveSettingsButton - // - this.SaveSettingsButton.Location = new System.Drawing.Point(105, 540); - this.SaveSettingsButton.Name = "SaveSettingsButton"; - this.SaveSettingsButton.Size = new System.Drawing.Size(93, 23); - this.SaveSettingsButton.TabIndex = 147; - this.SaveSettingsButton.Text = "Save settings"; - this.SaveSettingsButton.UseVisualStyleBackColor = true; - this.SaveSettingsButton.Click += new System.EventHandler(this.SaveSettingsButton_Click); - // - // ReloadShadersButton - // - this.ReloadShadersButton.Location = new System.Drawing.Point(6, 569); - this.ReloadShadersButton.Name = "ReloadShadersButton"; - this.ReloadShadersButton.Size = new System.Drawing.Size(93, 23); - this.ReloadShadersButton.TabIndex = 148; - this.ReloadShadersButton.Text = "Reload shaders"; - this.ReloadShadersButton.UseVisualStyleBackColor = true; - this.ReloadShadersButton.Click += new System.EventHandler(this.ReloadShadersButton_Click); - // - // ErrorConsoleCheckBox - // - this.ErrorConsoleCheckBox.AutoSize = true; - this.ErrorConsoleCheckBox.Location = new System.Drawing.Point(14, 517); - this.ErrorConsoleCheckBox.Name = "ErrorConsoleCheckBox"; - this.ErrorConsoleCheckBox.Size = new System.Drawing.Size(88, 17); - this.ErrorConsoleCheckBox.TabIndex = 144; - this.ErrorConsoleCheckBox.Text = "Error console"; - this.ErrorConsoleCheckBox.UseVisualStyleBackColor = true; - this.ErrorConsoleCheckBox.CheckedChanged += new System.EventHandler(this.ErrorConsoleCheckBox_CheckedChanged); - // - // ToolsPanelHideButton - // - this.ToolsPanelHideButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsPanelHideButton.Location = new System.Drawing.Point(185, 3); - this.ToolsPanelHideButton.Name = "ToolsPanelHideButton"; - this.ToolsPanelHideButton.Size = new System.Drawing.Size(30, 23); - this.ToolsPanelHideButton.TabIndex = 4; - this.ToolsPanelHideButton.Text = ">>"; - this.ToolsPanelHideButton.UseVisualStyleBackColor = true; - this.ToolsPanelHideButton.Click += new System.EventHandler(this.ToolsPanelHideButton_Click); - // - // ToolsPanelShowButton - // - this.ToolsPanelShowButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsPanelShowButton.Location = new System.Drawing.Point(939, 15); - this.ToolsPanelShowButton.Name = "ToolsPanelShowButton"; - this.ToolsPanelShowButton.Size = new System.Drawing.Size(30, 23); - this.ToolsPanelShowButton.TabIndex = 0; - this.ToolsPanelShowButton.Text = "<<"; - this.ToolsPanelShowButton.UseVisualStyleBackColor = true; - this.ToolsPanelShowButton.Click += new System.EventHandler(this.ToolsPanelShowButton_Click); - // - // ConsolePanel - // - this.ConsolePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ConsolePanel.BackColor = System.Drawing.SystemColors.Control; - this.ConsolePanel.Controls.Add(this.ConsoleTextBox); - this.ConsolePanel.Location = new System.Drawing.Point(12, 576); - this.ConsolePanel.Name = "ConsolePanel"; - this.ConsolePanel.Size = new System.Drawing.Size(736, 101); - this.ConsolePanel.TabIndex = 3; - this.ConsolePanel.Visible = false; - // - // ConsoleTextBox - // - this.ConsoleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ConsoleTextBox.Location = new System.Drawing.Point(3, 3); - this.ConsoleTextBox.Multiline = true; - this.ConsoleTextBox.Name = "ConsoleTextBox"; - this.ConsoleTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.ConsoleTextBox.Size = new System.Drawing.Size(730, 95); - this.ConsoleTextBox.TabIndex = 0; - // - // StatsUpdateTimer - // - this.StatsUpdateTimer.Enabled = true; - this.StatsUpdateTimer.Interval = 500; - this.StatsUpdateTimer.Tick += new System.EventHandler(this.StatsUpdateTimer_Tick); - // - // SelectedMarkerPanel - // - this.SelectedMarkerPanel.BackColor = System.Drawing.Color.White; - this.SelectedMarkerPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.SelectedMarkerPanel.Controls.Add(this.SelectedMarkerPositionTextBox); - this.SelectedMarkerPanel.Controls.Add(this.SelectedMarkerNameTextBox); - this.SelectedMarkerPanel.Location = new System.Drawing.Point(12, 64); - this.SelectedMarkerPanel.Name = "SelectedMarkerPanel"; - this.SelectedMarkerPanel.Size = new System.Drawing.Size(180, 42); - this.SelectedMarkerPanel.TabIndex = 5; - this.SelectedMarkerPanel.Visible = false; - // - // SelectedMarkerPositionTextBox - // - this.SelectedMarkerPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelectedMarkerPositionTextBox.BackColor = System.Drawing.Color.White; - this.SelectedMarkerPositionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.SelectedMarkerPositionTextBox.Location = new System.Drawing.Point(3, 22); - this.SelectedMarkerPositionTextBox.Name = "SelectedMarkerPositionTextBox"; - this.SelectedMarkerPositionTextBox.ReadOnly = true; - this.SelectedMarkerPositionTextBox.Size = new System.Drawing.Size(172, 13); - this.SelectedMarkerPositionTextBox.TabIndex = 1; - // - // SelectedMarkerNameTextBox - // - this.SelectedMarkerNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.SelectedMarkerNameTextBox.BackColor = System.Drawing.Color.White; - this.SelectedMarkerNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.SelectedMarkerNameTextBox.Location = new System.Drawing.Point(3, 3); - this.SelectedMarkerNameTextBox.Name = "SelectedMarkerNameTextBox"; - this.SelectedMarkerNameTextBox.ReadOnly = true; - this.SelectedMarkerNameTextBox.Size = new System.Drawing.Size(172, 13); - this.SelectedMarkerNameTextBox.TabIndex = 0; - // - // ToolsMenu - // - this.ToolsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolsMenuRPFBrowser, - this.ToolsMenuRPFExplorer, - this.ToolsMenuSelectionInfo, - this.ToolsMenuProjectWindow, - this.ToolsMenuCutsceneViewer, - this.ToolsMenuAudioExplorer, - this.ToolsMenuWorldSearch, - this.ToolsMenuBinarySearch, - this.ToolsMenuJenkGen, - this.ToolsMenuJenkInd, - this.ToolsMenuExtractScripts, - this.ToolsMenuExtractTextures, - this.ToolsMenuExtractRawFiles, - this.ToolsMenuExtractShaders, - this.ToolsMenuOptions}); - this.ToolsMenu.Name = "ToolsMenu"; - this.ToolsMenu.Size = new System.Drawing.Size(170, 334); - // - // ToolsMenuRPFBrowser - // - this.ToolsMenuRPFBrowser.Name = "ToolsMenuRPFBrowser"; - this.ToolsMenuRPFBrowser.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuRPFBrowser.Text = "RPF Browser..."; - this.ToolsMenuRPFBrowser.Visible = false; - this.ToolsMenuRPFBrowser.Click += new System.EventHandler(this.ToolsMenuRPFBrowser_Click); - // - // ToolsMenuRPFExplorer - // - this.ToolsMenuRPFExplorer.Name = "ToolsMenuRPFExplorer"; - this.ToolsMenuRPFExplorer.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuRPFExplorer.Text = "RPF Explorer..."; - this.ToolsMenuRPFExplorer.Click += new System.EventHandler(this.ToolsMenuRPFExplorer_Click); - // - // ToolsMenuSelectionInfo - // - this.ToolsMenuSelectionInfo.Name = "ToolsMenuSelectionInfo"; - this.ToolsMenuSelectionInfo.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuSelectionInfo.Text = "Selection info..."; - this.ToolsMenuSelectionInfo.Click += new System.EventHandler(this.ToolsMenuSelectionInfo_Click); - // - // ToolsMenuProjectWindow - // - this.ToolsMenuProjectWindow.Enabled = false; - this.ToolsMenuProjectWindow.Name = "ToolsMenuProjectWindow"; - this.ToolsMenuProjectWindow.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuProjectWindow.Text = "Project window..."; - this.ToolsMenuProjectWindow.Click += new System.EventHandler(this.ToolsMenuProjectWindow_Click); - // - // ToolsMenuCutsceneViewer - // - this.ToolsMenuCutsceneViewer.Enabled = false; - this.ToolsMenuCutsceneViewer.Name = "ToolsMenuCutsceneViewer"; - this.ToolsMenuCutsceneViewer.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuCutsceneViewer.Text = "Cutscene viewer..."; - this.ToolsMenuCutsceneViewer.Click += new System.EventHandler(this.ToolsMenuCutsceneViewer_Click); - // - // ToolsMenuAudioExplorer - // - this.ToolsMenuAudioExplorer.Enabled = false; - this.ToolsMenuAudioExplorer.Name = "ToolsMenuAudioExplorer"; - this.ToolsMenuAudioExplorer.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuAudioExplorer.Text = "Audio explorer..."; - this.ToolsMenuAudioExplorer.Click += new System.EventHandler(this.ToolsMenuAudioExplorer_Click); - // - // ToolsMenuWorldSearch - // - this.ToolsMenuWorldSearch.Name = "ToolsMenuWorldSearch"; - this.ToolsMenuWorldSearch.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuWorldSearch.Text = "World search..."; - this.ToolsMenuWorldSearch.Click += new System.EventHandler(this.ToolsMenuWorldSearch_Click); - // - // ToolsMenuBinarySearch - // - this.ToolsMenuBinarySearch.Enabled = false; - this.ToolsMenuBinarySearch.Name = "ToolsMenuBinarySearch"; - this.ToolsMenuBinarySearch.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuBinarySearch.Text = "Binary search..."; - this.ToolsMenuBinarySearch.Click += new System.EventHandler(this.ToolsMenuBinarySearch_Click); - // - // ToolsMenuJenkGen - // - this.ToolsMenuJenkGen.Name = "ToolsMenuJenkGen"; - this.ToolsMenuJenkGen.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuJenkGen.Text = "JenkGen..."; - this.ToolsMenuJenkGen.Click += new System.EventHandler(this.ToolsMenuJenkGen_Click); - // - // ToolsMenuJenkInd - // - this.ToolsMenuJenkInd.Enabled = false; - this.ToolsMenuJenkInd.Name = "ToolsMenuJenkInd"; - this.ToolsMenuJenkInd.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuJenkInd.Text = "JenkInd..."; - this.ToolsMenuJenkInd.Click += new System.EventHandler(this.ToolsMenuJenkInd_Click); - // - // ToolsMenuExtractScripts - // - this.ToolsMenuExtractScripts.Name = "ToolsMenuExtractScripts"; - this.ToolsMenuExtractScripts.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuExtractScripts.Text = "Extract scripts..."; - this.ToolsMenuExtractScripts.Click += new System.EventHandler(this.ToolsMenuExtractScripts_Click); - // - // ToolsMenuExtractTextures - // - this.ToolsMenuExtractTextures.Name = "ToolsMenuExtractTextures"; - this.ToolsMenuExtractTextures.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuExtractTextures.Text = "Extract textures..."; - this.ToolsMenuExtractTextures.Click += new System.EventHandler(this.ToolsMenuExtractTextures_Click); - // - // ToolsMenuExtractRawFiles - // - this.ToolsMenuExtractRawFiles.Name = "ToolsMenuExtractRawFiles"; - this.ToolsMenuExtractRawFiles.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuExtractRawFiles.Text = "Extract raw files..."; - this.ToolsMenuExtractRawFiles.Click += new System.EventHandler(this.ToolsMenuExtractRawFiles_Click); - // - // ToolsMenuExtractShaders - // - this.ToolsMenuExtractShaders.Name = "ToolsMenuExtractShaders"; - this.ToolsMenuExtractShaders.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuExtractShaders.Text = "Extract shaders..."; - this.ToolsMenuExtractShaders.Click += new System.EventHandler(this.ToolsMenuExtractShaders_Click); - // - // ToolsMenuOptions - // - this.ToolsMenuOptions.Name = "ToolsMenuOptions"; - this.ToolsMenuOptions.Size = new System.Drawing.Size(169, 22); - this.ToolsMenuOptions.Text = "Options..."; - this.ToolsMenuOptions.Click += new System.EventHandler(this.ToolsMenuOptions_Click); - // - // Toolbar - // - this.Toolbar.Dock = System.Windows.Forms.DockStyle.None; - this.Toolbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.Toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarNewButton, - this.ToolbarOpenButton, - this.ToolbarSaveButton, - this.ToolbarSaveAllButton, - this.toolStripSeparator5, - this.ToolbarSelectButton, - this.toolStripSeparator1, - this.ToolbarMoveButton, - this.ToolbarRotateButton, - this.ToolbarScaleButton, - this.ToolbarTransformSpaceButton, - this.ToolbarSnapButton, - this.toolStripSeparator2, - this.ToolbarUndoButton, - this.ToolbarRedoButton, - this.toolStripSeparator3, - this.ToolbarInfoWindowButton, - this.ToolbarProjectWindowButton, - this.toolStripSeparator4, - this.ToolbarAddItemButton, - this.ToolbarDeleteItemButton, - this.toolStripSeparator6, - this.ToolbarCopyButton, - this.ToolbarPasteButton, - this.toolStripSeparator7, - this.ToolbarCameraModeButton}); - this.Toolbar.Location = new System.Drawing.Point(1, 0); - this.Toolbar.Name = "Toolbar"; - this.Toolbar.Size = new System.Drawing.Size(554, 25); - this.Toolbar.TabIndex = 6; - this.Toolbar.Text = "toolStrip1"; - // - // ToolbarNewButton - // - this.ToolbarNewButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarNewButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarNewProjectButton, - this.ToolbarNewYmapButton, - this.ToolbarNewYtypButton, - this.ToolbarNewYbnButton, - this.ToolbarNewYndButton, - this.ToolbarNewTrainsButton, - this.ToolbarNewScenarioButton}); - this.ToolbarNewButton.Enabled = false; - this.ToolbarNewButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarNewButton.Image"))); - this.ToolbarNewButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarNewButton.Name = "ToolbarNewButton"; - this.ToolbarNewButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarNewButton.Text = "New..."; - this.ToolbarNewButton.ToolTipText = "New... (Ctrl+N)"; - this.ToolbarNewButton.ButtonClick += new System.EventHandler(this.ToolbarNewButton_ButtonClick); - // - // ToolbarNewProjectButton - // - this.ToolbarNewProjectButton.Name = "ToolbarNewProjectButton"; - this.ToolbarNewProjectButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewProjectButton.Text = "New Project"; - this.ToolbarNewProjectButton.Click += new System.EventHandler(this.ToolbarNewProjectButton_Click); - // - // ToolbarNewYmapButton - // - this.ToolbarNewYmapButton.Name = "ToolbarNewYmapButton"; - this.ToolbarNewYmapButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewYmapButton.Text = "New Ymap File"; - this.ToolbarNewYmapButton.Click += new System.EventHandler(this.ToolbarNewYmapButton_Click); - // - // ToolbarNewYtypButton - // - this.ToolbarNewYtypButton.Name = "ToolbarNewYtypButton"; - this.ToolbarNewYtypButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewYtypButton.Text = "New Ytyp File"; - this.ToolbarNewYtypButton.Click += new System.EventHandler(this.ToolbarNewYtypButton_Click); - // - // ToolbarNewYbnButton - // - this.ToolbarNewYbnButton.Name = "ToolbarNewYbnButton"; - this.ToolbarNewYbnButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewYbnButton.Text = "New Ybn File"; - this.ToolbarNewYbnButton.Click += new System.EventHandler(this.ToolbarNewYbnButton_Click); - // - // ToolbarNewYndButton - // - this.ToolbarNewYndButton.Name = "ToolbarNewYndButton"; - this.ToolbarNewYndButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewYndButton.Text = "New Ynd File"; - this.ToolbarNewYndButton.Click += new System.EventHandler(this.ToolbarNewYndButton_Click); - // - // ToolbarNewTrainsButton - // - this.ToolbarNewTrainsButton.Name = "ToolbarNewTrainsButton"; - this.ToolbarNewTrainsButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewTrainsButton.Text = "New Trains File"; - this.ToolbarNewTrainsButton.Click += new System.EventHandler(this.ToolbarNewTrainsButton_Click); - // - // ToolbarNewScenarioButton - // - this.ToolbarNewScenarioButton.Name = "ToolbarNewScenarioButton"; - this.ToolbarNewScenarioButton.Size = new System.Drawing.Size(167, 22); - this.ToolbarNewScenarioButton.Text = "New Scenario File"; - this.ToolbarNewScenarioButton.Click += new System.EventHandler(this.ToolbarNewScenarioButton_Click); - // - // ToolbarOpenButton - // - this.ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarOpenProjectButton, - this.ToolbarOpenFilesButton, - this.ToolbarOpenFolderButton}); - this.ToolbarOpenButton.Enabled = false; - this.ToolbarOpenButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarOpenButton.Image"))); - this.ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarOpenButton.Name = "ToolbarOpenButton"; - this.ToolbarOpenButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarOpenButton.Text = "Open..."; - this.ToolbarOpenButton.ToolTipText = "Open... (Ctrl+O)"; - this.ToolbarOpenButton.ButtonClick += new System.EventHandler(this.ToolbarOpenButton_ButtonClick); - // - // ToolbarOpenProjectButton - // - this.ToolbarOpenProjectButton.Name = "ToolbarOpenProjectButton"; - this.ToolbarOpenProjectButton.Size = new System.Drawing.Size(152, 22); - this.ToolbarOpenProjectButton.Text = "Open Project..."; - this.ToolbarOpenProjectButton.Click += new System.EventHandler(this.ToolbarOpenProjectButton_Click); - // - // ToolbarOpenFilesButton - // - this.ToolbarOpenFilesButton.Name = "ToolbarOpenFilesButton"; - this.ToolbarOpenFilesButton.Size = new System.Drawing.Size(152, 22); - this.ToolbarOpenFilesButton.Text = "Open Files..."; - this.ToolbarOpenFilesButton.Click += new System.EventHandler(this.ToolbarOpenFilesButton_Click); - // - // ToolbarOpenFolderButton - // - this.ToolbarOpenFolderButton.Name = "ToolbarOpenFolderButton"; - this.ToolbarOpenFolderButton.Size = new System.Drawing.Size(152, 22); - this.ToolbarOpenFolderButton.Text = "Open Folder..."; - this.ToolbarOpenFolderButton.Click += new System.EventHandler(this.ToolbarOpenFolderButton_Click); - // - // ToolbarSaveButton - // - this.ToolbarSaveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarSaveButton.Enabled = false; - this.ToolbarSaveButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSaveButton.Image"))); - this.ToolbarSaveButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarSaveButton.Name = "ToolbarSaveButton"; - this.ToolbarSaveButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarSaveButton.Text = "Save"; - this.ToolbarSaveButton.ToolTipText = "Save (Ctrl+S)"; - this.ToolbarSaveButton.Click += new System.EventHandler(this.ToolbarSaveButton_Click); - // - // ToolbarSaveAllButton - // - this.ToolbarSaveAllButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarSaveAllButton.Enabled = false; - this.ToolbarSaveAllButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSaveAllButton.Image"))); - this.ToolbarSaveAllButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarSaveAllButton.Name = "ToolbarSaveAllButton"; - this.ToolbarSaveAllButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarSaveAllButton.Text = "Save All"; - this.ToolbarSaveAllButton.ToolTipText = "Save All (Ctrl+Shift+S)"; - this.ToolbarSaveAllButton.Click += new System.EventHandler(this.ToolbarSaveAllButton_Click); - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); - // - // ToolbarSelectButton - // - this.ToolbarSelectButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarSelectButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarSelectEntityButton, - this.ToolbarSelectEntityExtensionButton, - this.ToolbarSelectArchetypeExtensionButton, - this.ToolbarSelectTimeCycleModifierButton, - this.ToolbarSelectCarGeneratorButton, - this.ToolbarSelectGrassButton, - this.ToolbarSelectWaterQuadButton, - this.ToolbarSelectCalmingQuadButton, - this.ToolbarSelectWaveQuadButton, - this.ToolbarSelectCollisionButton, - this.ToolbarSelectNavMeshButton, - this.ToolbarSelectPathButton, - this.ToolbarSelectTrainTrackButton, - this.ToolbarSelectLodLightsButton, - this.ToolbarSelectMloInstanceButton, - this.ToolbarSelectScenarioButton, - this.ToolbarSelectAudioButton, - this.ToolbarSelectOcclusionButton}); - this.ToolbarSelectButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSelectButton.Image"))); - this.ToolbarSelectButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarSelectButton.Name = "ToolbarSelectButton"; - this.ToolbarSelectButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarSelectButton.Text = "Select objects / Exit edit mode"; - this.ToolbarSelectButton.ToolTipText = "Select objects / Exit edit mode (C, Q)"; - this.ToolbarSelectButton.ButtonClick += new System.EventHandler(this.ToolbarSelectButton_ButtonClick); - // - // ToolbarSelectEntityButton - // - this.ToolbarSelectEntityButton.Checked = true; - this.ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked; - this.ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton"; - this.ToolbarSelectEntityButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectEntityButton.Text = "Entity"; - this.ToolbarSelectEntityButton.Click += new System.EventHandler(this.ToolbarSelectEntityButton_Click); - // - // ToolbarSelectEntityExtensionButton - // - this.ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton"; - this.ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectEntityExtensionButton.Text = "Entity Extension"; - this.ToolbarSelectEntityExtensionButton.Click += new System.EventHandler(this.ToolbarSelectEntityExtensionButton_Click); - // - // ToolbarSelectArchetypeExtensionButton - // - this.ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton"; - this.ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension"; - this.ToolbarSelectArchetypeExtensionButton.Click += new System.EventHandler(this.ToolbarSelectArchetypeExtensionButton_Click); - // - // ToolbarSelectTimeCycleModifierButton - // - this.ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton"; - this.ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier"; - this.ToolbarSelectTimeCycleModifierButton.Click += new System.EventHandler(this.ToolbarSelectTimeCycleModifierButton_Click); - // - // ToolbarSelectCarGeneratorButton - // - this.ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton"; - this.ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectCarGeneratorButton.Text = "Car Generator"; - this.ToolbarSelectCarGeneratorButton.Click += new System.EventHandler(this.ToolbarSelectCarGeneratorButton_Click); - // - // ToolbarSelectGrassButton - // - this.ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton"; - this.ToolbarSelectGrassButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectGrassButton.Text = "Grass"; - this.ToolbarSelectGrassButton.Click += new System.EventHandler(this.ToolbarSelectGrassButton_Click); - // - // ToolbarSelectWaterQuadButton - // - this.ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton"; - this.ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectWaterQuadButton.Text = "Water Quad"; - this.ToolbarSelectWaterQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaterQuadButton_Click); - // - // ToolbarSelectCalmingQuadButton - // - this.ToolbarSelectCalmingQuadButton.Name = "ToolbarSelectCalmingQuadButton"; - this.ToolbarSelectCalmingQuadButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectCalmingQuadButton.Text = "Water Calming Quad"; - this.ToolbarSelectCalmingQuadButton.Click += new System.EventHandler(this.ToolbarSelectCalmingQuadButton_Click); - // - // ToolbarSelectWaveQuadButton - // - this.ToolbarSelectWaveQuadButton.Name = "ToolbarSelectWaveQuadButton"; - this.ToolbarSelectWaveQuadButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectWaveQuadButton.Text = "Water Wave Quad"; - this.ToolbarSelectWaveQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaveQuadButton_Click); - // - // ToolbarSelectCollisionButton - // - this.ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton"; - this.ToolbarSelectCollisionButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectCollisionButton.Text = "Collision"; - this.ToolbarSelectCollisionButton.Click += new System.EventHandler(this.ToolbarSelectCollisionButton_Click); - // - // ToolbarSelectNavMeshButton - // - this.ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton"; - this.ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectNavMeshButton.Text = "Nav Mesh"; - this.ToolbarSelectNavMeshButton.Click += new System.EventHandler(this.ToolbarSelectNavMeshButton_Click); - // - // ToolbarSelectPathButton - // - this.ToolbarSelectPathButton.Name = "ToolbarSelectPathButton"; - this.ToolbarSelectPathButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectPathButton.Text = "Traffic Path"; - this.ToolbarSelectPathButton.Click += new System.EventHandler(this.ToolbarSelectPathButton_Click); - // - // ToolbarSelectTrainTrackButton - // - this.ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton"; - this.ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectTrainTrackButton.Text = "Train Track"; - this.ToolbarSelectTrainTrackButton.Click += new System.EventHandler(this.ToolbarSelectTrainTrackButton_Click); - // - // ToolbarSelectLodLightsButton - // - this.ToolbarSelectLodLightsButton.Name = "ToolbarSelectLodLightsButton"; - this.ToolbarSelectLodLightsButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectLodLightsButton.Text = "Lod Lights"; - this.ToolbarSelectLodLightsButton.Click += new System.EventHandler(this.ToolbarSelectLodLightsButton_Click); - // - // ToolbarSelectMloInstanceButton - // - this.ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton"; - this.ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectMloInstanceButton.Text = "Interior Instance"; - this.ToolbarSelectMloInstanceButton.Click += new System.EventHandler(this.ToolbarSelectMloInstanceButton_Click); - // - // ToolbarSelectScenarioButton - // - this.ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton"; - this.ToolbarSelectScenarioButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectScenarioButton.Text = "Scenario"; - this.ToolbarSelectScenarioButton.Click += new System.EventHandler(this.ToolbarSelectScenarioButton_Click); - // - // ToolbarSelectAudioButton - // - this.ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton"; - this.ToolbarSelectAudioButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectAudioButton.Text = "Audio"; - this.ToolbarSelectAudioButton.Click += new System.EventHandler(this.ToolbarSelectAudioButton_Click); - // - // ToolbarSelectOcclusionButton - // - this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton"; - this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(185, 22); - this.ToolbarSelectOcclusionButton.Text = "Occlusion"; - this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // ToolbarMoveButton - // - this.ToolbarMoveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarMoveButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarMoveButton.Image"))); - this.ToolbarMoveButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarMoveButton.Name = "ToolbarMoveButton"; - this.ToolbarMoveButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarMoveButton.Text = "Move"; - this.ToolbarMoveButton.ToolTipText = "Move (W)"; - this.ToolbarMoveButton.Click += new System.EventHandler(this.ToolbarMoveButton_Click); - // - // ToolbarRotateButton - // - this.ToolbarRotateButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarRotateButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarRotateButton.Image"))); - this.ToolbarRotateButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarRotateButton.Name = "ToolbarRotateButton"; - this.ToolbarRotateButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarRotateButton.Text = "Rotate"; - this.ToolbarRotateButton.ToolTipText = "Rotate (E)"; - this.ToolbarRotateButton.Click += new System.EventHandler(this.ToolbarRotateButton_Click); - // - // ToolbarScaleButton - // - this.ToolbarScaleButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarScaleButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarScaleButton.Image"))); - this.ToolbarScaleButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarScaleButton.Name = "ToolbarScaleButton"; - this.ToolbarScaleButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarScaleButton.Text = "Scale"; - this.ToolbarScaleButton.ToolTipText = "Scale (R)"; - this.ToolbarScaleButton.Click += new System.EventHandler(this.ToolbarScaleButton_Click); - // - // ToolbarTransformSpaceButton - // - this.ToolbarTransformSpaceButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarTransformSpaceButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarObjectSpaceButton, - this.ToolbarWorldSpaceButton}); - this.ToolbarTransformSpaceButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarTransformSpaceButton.Image"))); - this.ToolbarTransformSpaceButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarTransformSpaceButton.Name = "ToolbarTransformSpaceButton"; - this.ToolbarTransformSpaceButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarTransformSpaceButton.Text = "Toggle transform space"; - this.ToolbarTransformSpaceButton.ButtonClick += new System.EventHandler(this.ToolbarTransformSpaceButton_ButtonClick); - // - // ToolbarObjectSpaceButton - // - this.ToolbarObjectSpaceButton.Checked = true; - this.ToolbarObjectSpaceButton.CheckState = System.Windows.Forms.CheckState.Checked; - this.ToolbarObjectSpaceButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarObjectSpaceButton.Image"))); - this.ToolbarObjectSpaceButton.Name = "ToolbarObjectSpaceButton"; - this.ToolbarObjectSpaceButton.Size = new System.Drawing.Size(142, 22); - this.ToolbarObjectSpaceButton.Text = "Object space"; - this.ToolbarObjectSpaceButton.Click += new System.EventHandler(this.ToolbarObjectSpaceButton_Click); - // - // ToolbarWorldSpaceButton - // - this.ToolbarWorldSpaceButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarWorldSpaceButton.Image"))); - this.ToolbarWorldSpaceButton.Name = "ToolbarWorldSpaceButton"; - this.ToolbarWorldSpaceButton.Size = new System.Drawing.Size(142, 22); - this.ToolbarWorldSpaceButton.Text = "World space"; - this.ToolbarWorldSpaceButton.Click += new System.EventHandler(this.ToolbarWorldSpaceButton_Click); - // - // ToolbarSnapButton - // - this.ToolbarSnapButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarSnapButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarSnapToGroundButton, - this.ToolbarSnapToGridButton, - this.ToolbarSnapToGroundGridButton, - this.ToolbarSnapGridSizeButton, - this.ToolbarRotationSnappingButton}); - this.ToolbarSnapButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSnapButton.Image"))); - this.ToolbarSnapButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarSnapButton.Name = "ToolbarSnapButton"; - this.ToolbarSnapButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarSnapButton.Text = "Snap to Ground"; - this.ToolbarSnapButton.ToolTipText = "Snap to Ground"; - this.ToolbarSnapButton.ButtonClick += new System.EventHandler(this.ToolbarSnapButton_ButtonClick); - // - // ToolbarSnapToGroundButton - // - this.ToolbarSnapToGroundButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSnapToGroundButton.Image"))); - this.ToolbarSnapToGroundButton.Name = "ToolbarSnapToGroundButton"; - this.ToolbarSnapToGroundButton.Size = new System.Drawing.Size(205, 22); - this.ToolbarSnapToGroundButton.Text = "Snap to Ground"; - this.ToolbarSnapToGroundButton.Click += new System.EventHandler(this.ToolbarSnapToGroundButton_Click); - // - // ToolbarSnapToGridButton - // - this.ToolbarSnapToGridButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSnapToGridButton.Image"))); - this.ToolbarSnapToGridButton.Name = "ToolbarSnapToGridButton"; - this.ToolbarSnapToGridButton.Size = new System.Drawing.Size(205, 22); - this.ToolbarSnapToGridButton.Text = "Snap to Grid"; - this.ToolbarSnapToGridButton.Click += new System.EventHandler(this.ToolbarSnapToGridButton_Click); - // - // ToolbarSnapToGroundGridButton - // - this.ToolbarSnapToGroundGridButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSnapToGroundGridButton.Image"))); - this.ToolbarSnapToGroundGridButton.Name = "ToolbarSnapToGroundGridButton"; - this.ToolbarSnapToGroundGridButton.Size = new System.Drawing.Size(205, 22); - this.ToolbarSnapToGroundGridButton.Text = "Snap to Grid and Ground"; - this.ToolbarSnapToGroundGridButton.Click += new System.EventHandler(this.ToolbarSnapToGroundGridButton_Click); - // - // ToolbarSnapGridSizeButton - // - this.ToolbarSnapGridSizeButton.Name = "ToolbarSnapGridSizeButton"; - this.ToolbarSnapGridSizeButton.Size = new System.Drawing.Size(205, 22); - this.ToolbarSnapGridSizeButton.Text = "Grid Size..."; - this.ToolbarSnapGridSizeButton.Click += new System.EventHandler(this.ToolbarSnapGridSizeButton_Click); - // - // ToolbarRotationSnappingButton - // - this.ToolbarRotationSnappingButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarRotationSnappingOffButton, - this.ToolbarRotationSnapping1Button, - this.ToolbarRotationSnapping2Button, - this.ToolbarRotationSnapping5Button, - this.ToolbarRotationSnapping10Button, - this.ToolbarRotationSnapping45Button, - this.ToolbarRotationSnapping90Button, - this.ToolbarRotationSnappingCustomButton}); - this.ToolbarRotationSnappingButton.Name = "ToolbarRotationSnappingButton"; - this.ToolbarRotationSnappingButton.Size = new System.Drawing.Size(205, 22); - this.ToolbarRotationSnappingButton.Text = "Rotation Snapping"; - // - // ToolbarRotationSnappingOffButton - // - this.ToolbarRotationSnappingOffButton.Name = "ToolbarRotationSnappingOffButton"; - this.ToolbarRotationSnappingOffButton.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnappingOffButton.Text = "Off"; - this.ToolbarRotationSnappingOffButton.Click += new System.EventHandler(this.ToolbarRotationSnappingOffButton_Click); - // - // ToolbarRotationSnapping1Button - // - this.ToolbarRotationSnapping1Button.Name = "ToolbarRotationSnapping1Button"; - this.ToolbarRotationSnapping1Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping1Button.Text = "1 Degree"; - this.ToolbarRotationSnapping1Button.Click += new System.EventHandler(this.ToolbarRotationSnapping1Button_Click); - // - // ToolbarRotationSnapping2Button - // - this.ToolbarRotationSnapping2Button.Name = "ToolbarRotationSnapping2Button"; - this.ToolbarRotationSnapping2Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping2Button.Text = "2 Degrees"; - this.ToolbarRotationSnapping2Button.Click += new System.EventHandler(this.ToolbarRotationSnapping2Button_Click); - // - // ToolbarRotationSnapping5Button - // - this.ToolbarRotationSnapping5Button.Checked = true; - this.ToolbarRotationSnapping5Button.CheckState = System.Windows.Forms.CheckState.Checked; - this.ToolbarRotationSnapping5Button.Name = "ToolbarRotationSnapping5Button"; - this.ToolbarRotationSnapping5Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping5Button.Text = "5 Degrees"; - this.ToolbarRotationSnapping5Button.Click += new System.EventHandler(this.ToolbarRotationSnapping5Button_Click); - // - // ToolbarRotationSnapping10Button - // - this.ToolbarRotationSnapping10Button.Name = "ToolbarRotationSnapping10Button"; - this.ToolbarRotationSnapping10Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping10Button.Text = "10 Degrees"; - this.ToolbarRotationSnapping10Button.Click += new System.EventHandler(this.ToolbarRotationSnapping10Button_Click); - // - // ToolbarRotationSnapping45Button - // - this.ToolbarRotationSnapping45Button.Name = "ToolbarRotationSnapping45Button"; - this.ToolbarRotationSnapping45Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping45Button.Text = "45 Degrees"; - this.ToolbarRotationSnapping45Button.Click += new System.EventHandler(this.ToolbarRotationSnapping45Button_Click); - // - // ToolbarRotationSnapping90Button - // - this.ToolbarRotationSnapping90Button.Name = "ToolbarRotationSnapping90Button"; - this.ToolbarRotationSnapping90Button.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnapping90Button.Text = "90 Degrees"; - this.ToolbarRotationSnapping90Button.Click += new System.EventHandler(this.ToolbarRotationSnapping90Button_Click); - // - // ToolbarRotationSnappingCustomButton - // - this.ToolbarRotationSnappingCustomButton.Name = "ToolbarRotationSnappingCustomButton"; - this.ToolbarRotationSnappingCustomButton.Size = new System.Drawing.Size(131, 22); - this.ToolbarRotationSnappingCustomButton.Text = "Custom..."; - this.ToolbarRotationSnappingCustomButton.Click += new System.EventHandler(this.ToolbarRotationSnappingCustomButton_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); - // - // ToolbarUndoButton - // - this.ToolbarUndoButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarUndoButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarUndoListButton}); - this.ToolbarUndoButton.Enabled = false; - this.ToolbarUndoButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarUndoButton.Image"))); - this.ToolbarUndoButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarUndoButton.Name = "ToolbarUndoButton"; - this.ToolbarUndoButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarUndoButton.Text = "Undo"; - this.ToolbarUndoButton.ButtonClick += new System.EventHandler(this.ToolbarUndoButton_ButtonClick); - // - // ToolbarUndoListButton - // - this.ToolbarUndoListButton.Name = "ToolbarUndoListButton"; - this.ToolbarUndoListButton.Size = new System.Drawing.Size(121, 22); - this.ToolbarUndoListButton.Text = "Undo list"; - this.ToolbarUndoListButton.Click += new System.EventHandler(this.ToolbarUndoListButton_Click); - // - // ToolbarRedoButton - // - this.ToolbarRedoButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarRedoButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarRedoListButton}); - this.ToolbarRedoButton.Enabled = false; - this.ToolbarRedoButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarRedoButton.Image"))); - this.ToolbarRedoButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarRedoButton.Name = "ToolbarRedoButton"; - this.ToolbarRedoButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarRedoButton.Text = "Redo"; - this.ToolbarRedoButton.ButtonClick += new System.EventHandler(this.ToolbarRedoButton_ButtonClick); - // - // ToolbarRedoListButton - // - this.ToolbarRedoListButton.Name = "ToolbarRedoListButton"; - this.ToolbarRedoListButton.Size = new System.Drawing.Size(119, 22); - this.ToolbarRedoListButton.Text = "Redo list"; - this.ToolbarRedoListButton.Click += new System.EventHandler(this.ToolbarRedoListButton_Click); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); - // - // ToolbarInfoWindowButton - // - this.ToolbarInfoWindowButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarInfoWindowButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarInfoWindowButton.Image"))); - this.ToolbarInfoWindowButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarInfoWindowButton.Name = "ToolbarInfoWindowButton"; - this.ToolbarInfoWindowButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarInfoWindowButton.Text = "Selection info window"; - this.ToolbarInfoWindowButton.Click += new System.EventHandler(this.ToolbarInfoWindowButton_Click); - // - // ToolbarProjectWindowButton - // - this.ToolbarProjectWindowButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarProjectWindowButton.Enabled = false; - this.ToolbarProjectWindowButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarProjectWindowButton.Image"))); - this.ToolbarProjectWindowButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarProjectWindowButton.Name = "ToolbarProjectWindowButton"; - this.ToolbarProjectWindowButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarProjectWindowButton.Text = "Project window"; - this.ToolbarProjectWindowButton.Click += new System.EventHandler(this.ToolbarProjectWindowButton_Click); - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25); - // - // ToolbarAddItemButton - // - this.ToolbarAddItemButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarAddItemButton.Enabled = false; - this.ToolbarAddItemButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarAddItemButton.Image"))); - this.ToolbarAddItemButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarAddItemButton.Name = "ToolbarAddItemButton"; - this.ToolbarAddItemButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarAddItemButton.Text = "Add entity"; - this.ToolbarAddItemButton.Click += new System.EventHandler(this.ToolbarAddItemButton_Click); - // - // ToolbarDeleteItemButton - // - this.ToolbarDeleteItemButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarDeleteItemButton.Enabled = false; - this.ToolbarDeleteItemButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarDeleteItemButton.Image"))); - this.ToolbarDeleteItemButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarDeleteItemButton.Name = "ToolbarDeleteItemButton"; - this.ToolbarDeleteItemButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarDeleteItemButton.Text = "Delete entity"; - this.ToolbarDeleteItemButton.Click += new System.EventHandler(this.ToolbarDeleteItemButton_Click); - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); - // - // ToolbarCopyButton - // - this.ToolbarCopyButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarCopyButton.Enabled = false; - this.ToolbarCopyButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarCopyButton.Image"))); - this.ToolbarCopyButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarCopyButton.Name = "ToolbarCopyButton"; - this.ToolbarCopyButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarCopyButton.Text = "Copy"; - this.ToolbarCopyButton.ToolTipText = "Copy (Ctrl+C)"; - this.ToolbarCopyButton.Click += new System.EventHandler(this.ToolbarCopyButton_Click); - // - // ToolbarPasteButton - // - this.ToolbarPasteButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarPasteButton.Enabled = false; - this.ToolbarPasteButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarPasteButton.Image"))); - this.ToolbarPasteButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarPasteButton.Name = "ToolbarPasteButton"; - this.ToolbarPasteButton.Size = new System.Drawing.Size(23, 22); - this.ToolbarPasteButton.Text = "Paste"; - this.ToolbarPasteButton.ToolTipText = "Paste (Ctrl+V)"; - this.ToolbarPasteButton.Click += new System.EventHandler(this.ToolbarPasteButton_Click); - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25); - // - // ToolbarCameraModeButton - // - this.ToolbarCameraModeButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ToolbarCameraModeButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarCameraPerspectiveButton, - this.ToolbarCameraMapViewButton, - this.ToolbarCameraOrthographicButton}); - this.ToolbarCameraModeButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarCameraModeButton.Image"))); - this.ToolbarCameraModeButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ToolbarCameraModeButton.Name = "ToolbarCameraModeButton"; - this.ToolbarCameraModeButton.Size = new System.Drawing.Size(32, 22); - this.ToolbarCameraModeButton.Text = "Camera Mode"; - this.ToolbarCameraModeButton.ButtonClick += new System.EventHandler(this.ToolbarCameraModeButton_ButtonClick); - // - // ToolbarCameraPerspectiveButton - // - this.ToolbarCameraPerspectiveButton.Checked = true; - this.ToolbarCameraPerspectiveButton.CheckState = System.Windows.Forms.CheckState.Checked; - this.ToolbarCameraPerspectiveButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarCameraPerspectiveButton.Image"))); - this.ToolbarCameraPerspectiveButton.Name = "ToolbarCameraPerspectiveButton"; - this.ToolbarCameraPerspectiveButton.Size = new System.Drawing.Size(145, 22); - this.ToolbarCameraPerspectiveButton.Text = "Perspective"; - this.ToolbarCameraPerspectiveButton.Click += new System.EventHandler(this.ToolbarCameraPerspectiveButton_Click); - // - // ToolbarCameraMapViewButton - // - this.ToolbarCameraMapViewButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarCameraMapViewButton.Image"))); - this.ToolbarCameraMapViewButton.Name = "ToolbarCameraMapViewButton"; - this.ToolbarCameraMapViewButton.Size = new System.Drawing.Size(145, 22); - this.ToolbarCameraMapViewButton.Text = "Map View"; - this.ToolbarCameraMapViewButton.Click += new System.EventHandler(this.ToolbarCameraMapViewButton_Click); - // - // ToolbarCameraOrthographicButton - // - this.ToolbarCameraOrthographicButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarCameraOrthographicButton.Image"))); - this.ToolbarCameraOrthographicButton.Name = "ToolbarCameraOrthographicButton"; - this.ToolbarCameraOrthographicButton.Size = new System.Drawing.Size(145, 22); - this.ToolbarCameraOrthographicButton.Text = "Orthographic"; - this.ToolbarCameraOrthographicButton.Click += new System.EventHandler(this.ToolbarCameraOrthographicButton_Click); - // - // ToolbarPanel - // - this.ToolbarPanel.BackColor = System.Drawing.SystemColors.Control; - this.ToolbarPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.ToolbarPanel.Controls.Add(this.Toolbar); - this.ToolbarPanel.Location = new System.Drawing.Point(12, 12); - this.ToolbarPanel.Name = "ToolbarPanel"; - this.ToolbarPanel.Size = new System.Drawing.Size(557, 26); - this.ToolbarPanel.TabIndex = 7; - this.ToolbarPanel.Visible = false; - // - // SubtitleLabel - // - this.SubtitleLabel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.SubtitleLabel.AutoSize = true; - this.SubtitleLabel.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.SubtitleLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.SubtitleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.SubtitleLabel.Location = new System.Drawing.Point(455, 555); - this.SubtitleLabel.Name = "SubtitleLabel"; - this.SubtitleLabel.Size = new System.Drawing.Size(83, 18); - this.SubtitleLabel.TabIndex = 8; - this.SubtitleLabel.Text = "Test Subtitle"; - this.SubtitleLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.SubtitleLabel.Visible = false; - this.SubtitleLabel.SizeChanged += new System.EventHandler(this.SubtitleLabel_SizeChanged); - // - // SubtitleTimer - // - this.SubtitleTimer.Tick += new System.EventHandler(this.SubtitleTimer_Tick); + // StatusStrip + // + StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { StatusLabel, MousedLabel, StatsLabel }); + StatusStrip.Location = new System.Drawing.Point(0, 798); + StatusStrip.Name = "StatusStrip"; + StatusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0); + StatusStrip.Size = new System.Drawing.Size(1148, 22); + StatusStrip.TabIndex = 0; + StatusStrip.Text = "statusStrip1"; + // + // StatusLabel + // + StatusLabel.BackColor = System.Drawing.SystemColors.Control; + StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + StatusLabel.Name = "StatusLabel"; + StatusLabel.Size = new System.Drawing.Size(1040, 17); + StatusLabel.Spring = true; + StatusLabel.Text = "Initialising"; + StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MousedLabel + // + MousedLabel.BackColor = System.Drawing.SystemColors.Control; + MousedLabel.Name = "MousedLabel"; + MousedLabel.Size = new System.Drawing.Size(16, 17); + MousedLabel.Text = " "; + // + // StatsLabel + // + StatsLabel.BackColor = System.Drawing.SystemColors.Control; + StatsLabel.DoubleClickEnabled = true; + StatsLabel.Name = "StatsLabel"; + StatsLabel.Size = new System.Drawing.Size(75, 17); + StatsLabel.Text = "0 geometries"; + StatsLabel.DoubleClick += StatsLabel_DoubleClick; + // + // ModelComboBox + // + ModelComboBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ModelComboBox.FormattingEnabled = true; + ModelComboBox.Items.AddRange(new object[] { "dt1_lod_slod3", "dt1_tc_dufo_core", "dt1_tc_ufocore", "ex_office_citymodel_01", "id1_30_build3_dtl2", "imp_prop_ship_01a", "prop_alien_egg_01", "prop_fruit_stand_02", "prop_fruit_stand_03", "dune", "dune2", "dune2_hi", "adder", "adder_hi", "kuruma2", "kuruma2_hi", "infernus", "infernus_hi", "buzzard", "buzzard_hi", "rhino", "rhino_hi", "lazer", "lazer_hi", "duster", "duster_hi", "marquis", "marquis_hi", "submersible", "submersible_hi", "cargobob", "cargobob_hi", "sanchez", "sanchez_hi" }); + ModelComboBox.Location = new System.Drawing.Point(51, 8); + ModelComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ModelComboBox.Name = "ModelComboBox"; + ModelComboBox.Size = new System.Drawing.Size(174, 23); + ModelComboBox.TabIndex = 11; + ModelComboBox.SelectedIndexChanged += ModelComboBox_SelectedIndexChanged; + ModelComboBox.TextUpdate += ModelComboBox_TextUpdate; + // + // ToolsPanel + // + ToolsPanel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + ToolsPanel.BackColor = System.Drawing.SystemColors.ControlDark; + ToolsPanel.Controls.Add(ToolsDragPanel); + ToolsPanel.Controls.Add(AboutButton); + ToolsPanel.Controls.Add(ToolsButton); + ToolsPanel.Controls.Add(ToolsPanelExpandButton); + ToolsPanel.Controls.Add(ToolsTabControl); + ToolsPanel.Controls.Add(ToolsPanelHideButton); + ToolsPanel.Location = new System.Drawing.Point(880, 14); + ToolsPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanel.Name = "ToolsPanel"; + ToolsPanel.Size = new System.Drawing.Size(254, 767); + ToolsPanel.TabIndex = 2; + ToolsPanel.Visible = false; + // + // ToolsDragPanel + // + ToolsDragPanel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ToolsDragPanel.Cursor = System.Windows.Forms.Cursors.VSplit; + ToolsDragPanel.Location = new System.Drawing.Point(0, 0); + ToolsDragPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsDragPanel.Name = "ToolsDragPanel"; + ToolsDragPanel.Size = new System.Drawing.Size(5, 767); + ToolsDragPanel.TabIndex = 16; + ToolsDragPanel.MouseDown += ToolsDragPanel_MouseDown; + ToolsDragPanel.MouseMove += ToolsDragPanel_MouseMove; + ToolsDragPanel.MouseUp += ToolsDragPanel_MouseUp; + // + // AboutButton + // + AboutButton.Location = new System.Drawing.Point(75, 3); + AboutButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AboutButton.Name = "AboutButton"; + AboutButton.Size = new System.Drawing.Size(64, 27); + AboutButton.TabIndex = 15; + AboutButton.Text = "About..."; + AboutButton.UseVisualStyleBackColor = true; + AboutButton.Click += AboutButton_Click; + // + // ToolsButton + // + ToolsButton.Location = new System.Drawing.Point(4, 3); + ToolsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsButton.Name = "ToolsButton"; + ToolsButton.Size = new System.Drawing.Size(64, 27); + ToolsButton.TabIndex = 14; + ToolsButton.Text = "Tools..."; + ToolsButton.UseVisualStyleBackColor = true; + ToolsButton.Click += ToolsButton_Click; + // + // ToolsPanelExpandButton + // + ToolsPanelExpandButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + ToolsPanelExpandButton.Location = new System.Drawing.Point(174, 3); + ToolsPanelExpandButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanelExpandButton.Name = "ToolsPanelExpandButton"; + ToolsPanelExpandButton.Size = new System.Drawing.Size(35, 27); + ToolsPanelExpandButton.TabIndex = 13; + ToolsPanelExpandButton.Text = "<<"; + ToolsPanelExpandButton.UseVisualStyleBackColor = true; + ToolsPanelExpandButton.Click += ToolsPanelExpandButton_Click; + // + // ToolsTabControl + // + ToolsTabControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ToolsTabControl.Controls.Add(ViewTabPage); + ToolsTabControl.Controls.Add(MarkersTabPage); + ToolsTabControl.Controls.Add(SelectionTabPage); + ToolsTabControl.Controls.Add(OptionsTabPage); + ToolsTabControl.Location = new System.Drawing.Point(4, 35); + ToolsTabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsTabControl.Name = "ToolsTabControl"; + ToolsTabControl.SelectedIndex = 0; + ToolsTabControl.Size = new System.Drawing.Size(248, 729); + ToolsTabControl.TabIndex = 12; + // + // ViewTabPage + // + ViewTabPage.Controls.Add(ViewTabControl); + ViewTabPage.Controls.Add(label3); + ViewTabPage.Controls.Add(ViewModeComboBox); + ViewTabPage.Controls.Add(ShowToolbarCheckBox); + ViewTabPage.Location = new System.Drawing.Point(4, 24); + ViewTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewTabPage.Name = "ViewTabPage"; + ViewTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewTabPage.Size = new System.Drawing.Size(240, 701); + ViewTabPage.TabIndex = 0; + ViewTabPage.Text = "View"; + ViewTabPage.UseVisualStyleBackColor = true; + // + // ViewTabControl + // + ViewTabControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ViewTabControl.Controls.Add(ViewWorldTabPage); + ViewTabControl.Controls.Add(ViewYmapsTabPage); + ViewTabControl.Controls.Add(ViewModelTabPage); + ViewTabControl.Location = new System.Drawing.Point(0, 37); + ViewTabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewTabControl.Name = "ViewTabControl"; + ViewTabControl.SelectedIndex = 0; + ViewTabControl.Size = new System.Drawing.Size(236, 632); + ViewTabControl.TabIndex = 12; + // + // ViewWorldTabPage + // + ViewWorldTabPage.Controls.Add(EnableModsCheckBox); + ViewWorldTabPage.Controls.Add(label30); + ViewWorldTabPage.Controls.Add(DlcLevelComboBox); + ViewWorldTabPage.Controls.Add(EnableDlcCheckBox); + ViewWorldTabPage.Controls.Add(WorldYmapWeatherFilterCheckBox); + ViewWorldTabPage.Controls.Add(WorldYmapTimeFilterCheckBox); + ViewWorldTabPage.Controls.Add(WorldScriptedYmapsCheckBox); + ViewWorldTabPage.Controls.Add(WorldDetailDistLabel); + ViewWorldTabPage.Controls.Add(label18); + ViewWorldTabPage.Controls.Add(WorldDetailDistTrackBar); + ViewWorldTabPage.Controls.Add(WorldLodDistLabel); + ViewWorldTabPage.Controls.Add(label16); + ViewWorldTabPage.Controls.Add(WorldLodDistTrackBar); + ViewWorldTabPage.Controls.Add(label15); + ViewWorldTabPage.Controls.Add(WorldMaxLodComboBox); + ViewWorldTabPage.Location = new System.Drawing.Point(4, 24); + ViewWorldTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewWorldTabPage.Name = "ViewWorldTabPage"; + ViewWorldTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewWorldTabPage.Size = new System.Drawing.Size(228, 604); + ViewWorldTabPage.TabIndex = 0; + ViewWorldTabPage.Text = "World"; + ViewWorldTabPage.UseVisualStyleBackColor = true; + // + // EnableModsCheckBox + // + EnableModsCheckBox.AutoSize = true; + EnableModsCheckBox.Enabled = false; + EnableModsCheckBox.Location = new System.Drawing.Point(7, 323); + EnableModsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + EnableModsCheckBox.Name = "EnableModsCheckBox"; + EnableModsCheckBox.Size = new System.Drawing.Size(94, 19); + EnableModsCheckBox.TabIndex = 68; + EnableModsCheckBox.Text = "Enable Mods"; + EnableModsCheckBox.UseVisualStyleBackColor = true; + EnableModsCheckBox.CheckedChanged += EnableModsCheckBox_CheckedChanged; + // + // label30 + // + label30.AutoSize = true; + label30.Location = new System.Drawing.Point(1, 389); + label30.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label30.Name = "label30"; + label30.Size = new System.Drawing.Size(62, 15); + label30.TabIndex = 70; + label30.Text = "DLC Level:"; + // + // DlcLevelComboBox + // + DlcLevelComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + DlcLevelComboBox.Enabled = false; + DlcLevelComboBox.FormattingEnabled = true; + DlcLevelComboBox.Items.AddRange(new object[] { "" }); + DlcLevelComboBox.Location = new System.Drawing.Point(72, 385); + DlcLevelComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DlcLevelComboBox.Name = "DlcLevelComboBox"; + DlcLevelComboBox.Size = new System.Drawing.Size(146, 23); + DlcLevelComboBox.TabIndex = 70; + DlcLevelComboBox.SelectedIndexChanged += DlcLevelComboBox_SelectedIndexChanged; + DlcLevelComboBox.KeyPress += DlcLevelComboBox_KeyPress; + // + // EnableDlcCheckBox + // + EnableDlcCheckBox.AutoSize = true; + EnableDlcCheckBox.Enabled = false; + EnableDlcCheckBox.Location = new System.Drawing.Point(7, 359); + EnableDlcCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + EnableDlcCheckBox.Name = "EnableDlcCheckBox"; + EnableDlcCheckBox.Size = new System.Drawing.Size(86, 19); + EnableDlcCheckBox.TabIndex = 69; + EnableDlcCheckBox.Text = "Enable DLC"; + EnableDlcCheckBox.UseVisualStyleBackColor = true; + EnableDlcCheckBox.CheckedChanged += EnableDlcCheckBox_CheckedChanged; + // + // WorldYmapWeatherFilterCheckBox + // + WorldYmapWeatherFilterCheckBox.AutoSize = true; + WorldYmapWeatherFilterCheckBox.Checked = true; + WorldYmapWeatherFilterCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + WorldYmapWeatherFilterCheckBox.Location = new System.Drawing.Point(7, 273); + WorldYmapWeatherFilterCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldYmapWeatherFilterCheckBox.Name = "WorldYmapWeatherFilterCheckBox"; + WorldYmapWeatherFilterCheckBox.Size = new System.Drawing.Size(151, 19); + WorldYmapWeatherFilterCheckBox.TabIndex = 67; + WorldYmapWeatherFilterCheckBox.Text = "Filter ymaps by weather"; + WorldYmapWeatherFilterCheckBox.UseVisualStyleBackColor = true; + WorldYmapWeatherFilterCheckBox.CheckedChanged += WorldYmapWeatherFilterCheckBox_CheckedChanged; + // + // WorldYmapTimeFilterCheckBox + // + WorldYmapTimeFilterCheckBox.AutoSize = true; + WorldYmapTimeFilterCheckBox.Checked = true; + WorldYmapTimeFilterCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + WorldYmapTimeFilterCheckBox.Location = new System.Drawing.Point(7, 247); + WorldYmapTimeFilterCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldYmapTimeFilterCheckBox.Name = "WorldYmapTimeFilterCheckBox"; + WorldYmapTimeFilterCheckBox.Size = new System.Drawing.Size(169, 19); + WorldYmapTimeFilterCheckBox.TabIndex = 66; + WorldYmapTimeFilterCheckBox.Text = "Filter ymaps by time of day"; + WorldYmapTimeFilterCheckBox.UseVisualStyleBackColor = true; + WorldYmapTimeFilterCheckBox.CheckedChanged += WorldYmapTimeFilterCheckBox_CheckedChanged; + // + // WorldScriptedYmapsCheckBox + // + WorldScriptedYmapsCheckBox.AutoSize = true; + WorldScriptedYmapsCheckBox.Checked = true; + WorldScriptedYmapsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + WorldScriptedYmapsCheckBox.Location = new System.Drawing.Point(7, 210); + WorldScriptedYmapsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldScriptedYmapsCheckBox.Name = "WorldScriptedYmapsCheckBox"; + WorldScriptedYmapsCheckBox.Size = new System.Drawing.Size(138, 19); + WorldScriptedYmapsCheckBox.TabIndex = 65; + WorldScriptedYmapsCheckBox.Text = "Show scripted ymaps"; + WorldScriptedYmapsCheckBox.UseVisualStyleBackColor = true; + WorldScriptedYmapsCheckBox.CheckedChanged += WorldScriptedYmapsCheckBox_CheckedChanged; + // + // WorldDetailDistLabel + // + WorldDetailDistLabel.AutoSize = true; + WorldDetailDistLabel.Location = new System.Drawing.Point(102, 108); + WorldDetailDistLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + WorldDetailDistLabel.Name = "WorldDetailDistLabel"; + WorldDetailDistLabel.Size = new System.Drawing.Size(22, 15); + WorldDetailDistLabel.TabIndex = 64; + WorldDetailDistLabel.Text = "1.0"; + // + // label18 + // + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(1, 108); + label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(87, 15); + label18.TabIndex = 63; + label18.Text = "Detail distance:"; + // + // WorldDetailDistTrackBar + // + WorldDetailDistTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + WorldDetailDistTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + WorldDetailDistTrackBar.LargeChange = 10; + WorldDetailDistTrackBar.Location = new System.Drawing.Point(7, 127); + WorldDetailDistTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldDetailDistTrackBar.Maximum = 50; + WorldDetailDistTrackBar.Name = "WorldDetailDistTrackBar"; + WorldDetailDistTrackBar.Size = new System.Drawing.Size(212, 45); + WorldDetailDistTrackBar.TabIndex = 62; + WorldDetailDistTrackBar.TickFrequency = 2; + WorldDetailDistTrackBar.Value = 10; + WorldDetailDistTrackBar.Scroll += WorldDetailDistTrackBar_Scroll; + // + // WorldLodDistLabel + // + WorldLodDistLabel.AutoSize = true; + WorldLodDistLabel.Location = new System.Drawing.Point(96, 45); + WorldLodDistLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + WorldLodDistLabel.Name = "WorldLodDistLabel"; + WorldLodDistLabel.Size = new System.Drawing.Size(22, 15); + WorldLodDistLabel.TabIndex = 61; + WorldLodDistLabel.Text = "1.0"; + WorldLodDistLabel.Visible = false; + // + // label16 + // + label16.AutoSize = true; + label16.Location = new System.Drawing.Point(1, 45); + label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label16.Name = "label16"; + label16.Size = new System.Drawing.Size(80, 15); + label16.TabIndex = 60; + label16.Text = "LOD distance:"; + label16.Visible = false; + // + // WorldLodDistTrackBar + // + WorldLodDistTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + WorldLodDistTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + WorldLodDistTrackBar.LargeChange = 10; + WorldLodDistTrackBar.Location = new System.Drawing.Point(7, 63); + WorldLodDistTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldLodDistTrackBar.Maximum = 30; + WorldLodDistTrackBar.Name = "WorldLodDistTrackBar"; + WorldLodDistTrackBar.Size = new System.Drawing.Size(212, 45); + WorldLodDistTrackBar.TabIndex = 59; + WorldLodDistTrackBar.TickFrequency = 2; + WorldLodDistTrackBar.Value = 10; + WorldLodDistTrackBar.Visible = false; + WorldLodDistTrackBar.Scroll += WorldLodDistTrackBar_Scroll; + // + // label15 + // + label15.AutoSize = true; + label15.Location = new System.Drawing.Point(1, 10); + label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label15.Name = "label15"; + label15.Size = new System.Drawing.Size(59, 15); + label15.TabIndex = 58; + label15.Text = "Max LOD:"; + // + // WorldMaxLodComboBox + // + WorldMaxLodComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + WorldMaxLodComboBox.FormattingEnabled = true; + WorldMaxLodComboBox.Items.AddRange(new object[] { "ORPHANHD", "HD", "LOD", "SLOD1", "SLOD2", "SLOD3", "SLOD4" }); + WorldMaxLodComboBox.Location = new System.Drawing.Point(72, 7); + WorldMaxLodComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WorldMaxLodComboBox.Name = "WorldMaxLodComboBox"; + WorldMaxLodComboBox.Size = new System.Drawing.Size(146, 23); + WorldMaxLodComboBox.TabIndex = 57; + WorldMaxLodComboBox.SelectedIndexChanged += WorldMaxLodComboBox_SelectedIndexChanged; + WorldMaxLodComboBox.KeyPress += WorldMaxLodComboBox_KeyPress; + // + // ViewYmapsTabPage + // + ViewYmapsTabPage.Controls.Add(ShowYmapChildrenCheckBox); + ViewYmapsTabPage.Controls.Add(label2); + ViewYmapsTabPage.Controls.Add(DetailTrackBar); + ViewYmapsTabPage.Controls.Add(DynamicLODCheckBox); + ViewYmapsTabPage.Controls.Add(YmapsTextBox); + ViewYmapsTabPage.Location = new System.Drawing.Point(4, 24); + ViewYmapsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewYmapsTabPage.Name = "ViewYmapsTabPage"; + ViewYmapsTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewYmapsTabPage.Size = new System.Drawing.Size(228, 604); + ViewYmapsTabPage.TabIndex = 1; + ViewYmapsTabPage.Text = "Ymaps"; + ViewYmapsTabPage.UseVisualStyleBackColor = true; + // + // ShowYmapChildrenCheckBox + // + ShowYmapChildrenCheckBox.AutoSize = true; + ShowYmapChildrenCheckBox.Enabled = false; + ShowYmapChildrenCheckBox.Location = new System.Drawing.Point(7, 68); + ShowYmapChildrenCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShowYmapChildrenCheckBox.Name = "ShowYmapChildrenCheckBox"; + ShowYmapChildrenCheckBox.Size = new System.Drawing.Size(101, 19); + ShowYmapChildrenCheckBox.TabIndex = 35; + ShowYmapChildrenCheckBox.Text = "Show children"; + ShowYmapChildrenCheckBox.UseVisualStyleBackColor = true; + ShowYmapChildrenCheckBox.CheckedChanged += ShowYmapChildrenCheckBox_CheckedChanged; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(4, 102); + label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(85, 15); + label2.TabIndex = 8; + label2.Text = "Ymaps to load:"; + // + // DetailTrackBar + // + DetailTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + DetailTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + DetailTrackBar.Location = new System.Drawing.Point(7, 28); + DetailTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DetailTrackBar.Maximum = 20; + DetailTrackBar.Name = "DetailTrackBar"; + DetailTrackBar.Size = new System.Drawing.Size(212, 45); + DetailTrackBar.TabIndex = 34; + DetailTrackBar.Value = 5; + DetailTrackBar.Scroll += DetailTrackBar_Scroll; + // + // DynamicLODCheckBox + // + DynamicLODCheckBox.AutoSize = true; + DynamicLODCheckBox.Checked = true; + DynamicLODCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + DynamicLODCheckBox.Location = new System.Drawing.Point(7, 7); + DynamicLODCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DynamicLODCheckBox.Name = "DynamicLODCheckBox"; + DynamicLODCheckBox.Size = new System.Drawing.Size(99, 19); + DynamicLODCheckBox.TabIndex = 33; + DynamicLODCheckBox.Text = "Dynamic LOD"; + DynamicLODCheckBox.UseVisualStyleBackColor = true; + DynamicLODCheckBox.CheckedChanged += DynamicLODCheckBox_CheckedChanged; + // + // YmapsTextBox + // + YmapsTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + YmapsTextBox.Location = new System.Drawing.Point(0, 120); + YmapsTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + YmapsTextBox.Multiline = true; + YmapsTextBox.Name = "YmapsTextBox"; + YmapsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + YmapsTextBox.Size = new System.Drawing.Size(226, 479); + YmapsTextBox.TabIndex = 36; + YmapsTextBox.Text = resources.GetString("YmapsTextBox.Text"); + YmapsTextBox.TextChanged += YmapsTextBox_TextChanged; + // + // ViewModelTabPage + // + ViewModelTabPage.Controls.Add(label1); + ViewModelTabPage.Controls.Add(ModelComboBox); + ViewModelTabPage.Location = new System.Drawing.Point(4, 24); + ViewModelTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewModelTabPage.Name = "ViewModelTabPage"; + ViewModelTabPage.Size = new System.Drawing.Size(228, 604); + ViewModelTabPage.TabIndex = 2; + ViewModelTabPage.Text = "Model"; + ViewModelTabPage.UseVisualStyleBackColor = true; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(-1, 12); + label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(44, 15); + label1.TabIndex = 5; + label1.Text = "Model:"; + // + // label3 + // + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(4, 9); + label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(41, 15); + label3.TabIndex = 11; + label3.Text = "Mode:"; + // + // ViewModeComboBox + // + ViewModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + ViewModeComboBox.FormattingEnabled = true; + ViewModeComboBox.Items.AddRange(new object[] { "World view", "Ymap view", "Model view" }); + ViewModeComboBox.Location = new System.Drawing.Point(56, 6); + ViewModeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ViewModeComboBox.Name = "ViewModeComboBox"; + ViewModeComboBox.Size = new System.Drawing.Size(129, 23); + ViewModeComboBox.TabIndex = 10; + ViewModeComboBox.SelectedIndexChanged += ViewModeComboBox_SelectedIndexChanged; + ViewModeComboBox.KeyPress += ViewModeComboBox_KeyPress; + // + // ShowToolbarCheckBox + // + ShowToolbarCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ShowToolbarCheckBox.AutoSize = true; + ShowToolbarCheckBox.Location = new System.Drawing.Point(12, 677); + ShowToolbarCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShowToolbarCheckBox.Name = "ShowToolbarCheckBox"; + ShowToolbarCheckBox.Size = new System.Drawing.Size(114, 19); + ShowToolbarCheckBox.TabIndex = 47; + ShowToolbarCheckBox.Text = "Show Toolbar (T)"; + ShowToolbarCheckBox.UseVisualStyleBackColor = true; + ShowToolbarCheckBox.CheckedChanged += ShowToolbarCheckBox_CheckedChanged; + // + // MarkersTabPage + // + MarkersTabPage.Controls.Add(label27); + MarkersTabPage.Controls.Add(CameraPositionTextBox); + MarkersTabPage.Controls.Add(AddSelectionMarkerButton); + MarkersTabPage.Controls.Add(AddCurrentPositonMarkerButton); + MarkersTabPage.Controls.Add(ResetMarkersButton); + MarkersTabPage.Controls.Add(ClearMarkersButton); + MarkersTabPage.Controls.Add(GoToButton); + MarkersTabPage.Controls.Add(ShowLocatorCheckBox); + MarkersTabPage.Controls.Add(label6); + MarkersTabPage.Controls.Add(LocateTextBox); + MarkersTabPage.Controls.Add(label7); + MarkersTabPage.Controls.Add(AddMarkersButton); + MarkersTabPage.Controls.Add(MultiFindTextBox); + MarkersTabPage.Location = new System.Drawing.Point(4, 24); + MarkersTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MarkersTabPage.Name = "MarkersTabPage"; + MarkersTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + MarkersTabPage.Size = new System.Drawing.Size(240, 701); + MarkersTabPage.TabIndex = 1; + MarkersTabPage.Text = "Markers"; + MarkersTabPage.UseVisualStyleBackColor = true; + // + // label27 + // + label27.AutoSize = true; + label27.Location = new System.Drawing.Point(-2, 58); + label27.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label27.Name = "label27"; + label27.Size = new System.Drawing.Size(138, 15); + label27.TabIndex = 22; + label27.Text = "Current camera position:"; + // + // CameraPositionTextBox + // + CameraPositionTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CameraPositionTextBox.Location = new System.Drawing.Point(0, 77); + CameraPositionTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CameraPositionTextBox.Name = "CameraPositionTextBox"; + CameraPositionTextBox.Size = new System.Drawing.Size(238, 23); + CameraPositionTextBox.TabIndex = 16; + CameraPositionTextBox.Text = "0, 0, 0"; + // + // AddSelectionMarkerButton + // + AddSelectionMarkerButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + AddSelectionMarkerButton.Location = new System.Drawing.Point(0, 618); + AddSelectionMarkerButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AddSelectionMarkerButton.Name = "AddSelectionMarkerButton"; + AddSelectionMarkerButton.Size = new System.Drawing.Size(113, 27); + AddSelectionMarkerButton.TabIndex = 22; + AddSelectionMarkerButton.Text = "Add selection"; + AddSelectionMarkerButton.UseVisualStyleBackColor = true; + AddSelectionMarkerButton.Click += AddSelectionMarkerButton_Click; + // + // AddCurrentPositonMarkerButton + // + AddCurrentPositonMarkerButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + AddCurrentPositonMarkerButton.Location = new System.Drawing.Point(0, 585); + AddCurrentPositonMarkerButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AddCurrentPositonMarkerButton.Name = "AddCurrentPositonMarkerButton"; + AddCurrentPositonMarkerButton.Size = new System.Drawing.Size(113, 27); + AddCurrentPositonMarkerButton.TabIndex = 20; + AddCurrentPositonMarkerButton.Text = "Add current pos"; + AddCurrentPositonMarkerButton.UseVisualStyleBackColor = true; + AddCurrentPositonMarkerButton.Click += AddCurrentPositonMarkerButton_Click; + // + // ResetMarkersButton + // + ResetMarkersButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ResetMarkersButton.Location = new System.Drawing.Point(126, 585); + ResetMarkersButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ResetMarkersButton.Name = "ResetMarkersButton"; + ResetMarkersButton.Size = new System.Drawing.Size(113, 27); + ResetMarkersButton.TabIndex = 21; + ResetMarkersButton.Text = "Default markers"; + ResetMarkersButton.UseVisualStyleBackColor = true; + ResetMarkersButton.Click += ResetMarkersButton_Click; + // + // ClearMarkersButton + // + ClearMarkersButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + ClearMarkersButton.Location = new System.Drawing.Point(126, 552); + ClearMarkersButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ClearMarkersButton.Name = "ClearMarkersButton"; + ClearMarkersButton.Size = new System.Drawing.Size(113, 27); + ClearMarkersButton.TabIndex = 19; + ClearMarkersButton.Text = "Clear markers"; + ClearMarkersButton.UseVisualStyleBackColor = true; + ClearMarkersButton.Click += ClearMarkersButton_Click; + // + // GoToButton + // + GoToButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + GoToButton.Location = new System.Drawing.Point(189, 28); + GoToButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + GoToButton.Name = "GoToButton"; + GoToButton.Size = new System.Drawing.Size(50, 25); + GoToButton.TabIndex = 15; + GoToButton.Text = "Go to"; + GoToButton.UseVisualStyleBackColor = true; + GoToButton.Click += GoToButton_Click; + // + // ShowLocatorCheckBox + // + ShowLocatorCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + ShowLocatorCheckBox.AutoSize = true; + ShowLocatorCheckBox.Location = new System.Drawing.Point(126, 9); + ShowLocatorCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShowLocatorCheckBox.Name = "ShowLocatorCheckBox"; + ShowLocatorCheckBox.Size = new System.Drawing.Size(95, 19); + ShowLocatorCheckBox.TabIndex = 13; + ShowLocatorCheckBox.Text = "Show marker"; + ShowLocatorCheckBox.UseVisualStyleBackColor = true; + ShowLocatorCheckBox.CheckedChanged += ShowLocatorCheckBox_CheckedChanged; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(-2, 9); + label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(81, 15); + label6.TabIndex = 13; + label6.Text = "Locate: X, Y, Z"; + // + // LocateTextBox + // + LocateTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + LocateTextBox.Location = new System.Drawing.Point(0, 29); + LocateTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + LocateTextBox.Name = "LocateTextBox"; + LocateTextBox.Size = new System.Drawing.Size(181, 23); + LocateTextBox.TabIndex = 14; + LocateTextBox.Text = "0, 0, 0"; + LocateTextBox.TextChanged += LocateTextBox_TextChanged; + // + // label7 + // + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(-2, 117); + label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(138, 15); + label7.TabIndex = 11; + label7.Text = "Multi-find: X, Y, Z, Name"; + // + // AddMarkersButton + // + AddMarkersButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; + AddMarkersButton.Location = new System.Drawing.Point(0, 552); + AddMarkersButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AddMarkersButton.Name = "AddMarkersButton"; + AddMarkersButton.Size = new System.Drawing.Size(113, 27); + AddMarkersButton.TabIndex = 18; + AddMarkersButton.Text = "Add markers"; + AddMarkersButton.UseVisualStyleBackColor = true; + AddMarkersButton.Click += AddMarkersButton_Click; + // + // MultiFindTextBox + // + MultiFindTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + MultiFindTextBox.Location = new System.Drawing.Point(0, 135); + MultiFindTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MultiFindTextBox.MaxLength = 1048576; + MultiFindTextBox.Multiline = true; + MultiFindTextBox.Name = "MultiFindTextBox"; + MultiFindTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + MultiFindTextBox.Size = new System.Drawing.Size(238, 409); + MultiFindTextBox.TabIndex = 17; + // + // SelectionTabPage + // + SelectionTabPage.Controls.Add(label25); + SelectionTabPage.Controls.Add(SelectionModeComboBox); + SelectionTabPage.Controls.Add(SelectionNameTextBox); + SelectionTabPage.Controls.Add(SelectionTabControl); + SelectionTabPage.Controls.Add(MouseSelectCheckBox); + SelectionTabPage.Location = new System.Drawing.Point(4, 24); + SelectionTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionTabPage.Name = "SelectionTabPage"; + SelectionTabPage.Size = new System.Drawing.Size(240, 701); + SelectionTabPage.TabIndex = 2; + SelectionTabPage.Text = "Selection"; + SelectionTabPage.UseVisualStyleBackColor = true; + // + // label25 + // + label25.AutoSize = true; + label25.Location = new System.Drawing.Point(7, 38); + label25.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label25.Name = "label25"; + label25.Size = new System.Drawing.Size(41, 15); + label25.TabIndex = 28; + label25.Text = "Mode:"; + // + // SelectionModeComboBox + // + SelectionModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + SelectionModeComboBox.FormattingEnabled = true; + SelectionModeComboBox.Items.AddRange(new object[] { "Entity", "Entity Extension", "Archetype Extension", "Time Cycle Modifier", "Car Generator", "Grass", "Water Quad", "Water Calming Quad", "Water Wave Quad", "Collision", "Nav Mesh", "Path", "Train Track", "Lod Lights", "Mlo Instance", "Scenario", "Audio", "Occlusion" }); + SelectionModeComboBox.Location = new System.Drawing.Point(59, 35); + SelectionModeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionModeComboBox.Name = "SelectionModeComboBox"; + SelectionModeComboBox.Size = new System.Drawing.Size(140, 23); + SelectionModeComboBox.TabIndex = 23; + SelectionModeComboBox.SelectedIndexChanged += SelectionModeComboBox_SelectedIndexChanged; + SelectionModeComboBox.KeyPress += SelectionModeComboBox_KeyPress; + // + // SelectionNameTextBox + // + SelectionNameTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelectionNameTextBox.BackColor = System.Drawing.Color.White; + SelectionNameTextBox.Location = new System.Drawing.Point(4, 76); + SelectionNameTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionNameTextBox.Name = "SelectionNameTextBox"; + SelectionNameTextBox.ReadOnly = true; + SelectionNameTextBox.Size = new System.Drawing.Size(231, 23); + SelectionNameTextBox.TabIndex = 26; + SelectionNameTextBox.Text = "Nothing selected"; + // + // SelectionTabControl + // + SelectionTabControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelectionTabControl.Controls.Add(SelectionEntityTabPage); + SelectionTabControl.Controls.Add(SelectionArchetypeTabPage); + SelectionTabControl.Controls.Add(SelectionDrawableTabPage); + SelectionTabControl.Controls.Add(SelectionExtensionTabPage); + SelectionTabControl.Location = new System.Drawing.Point(0, 110); + SelectionTabControl.Margin = new System.Windows.Forms.Padding(0); + SelectionTabControl.Name = "SelectionTabControl"; + SelectionTabControl.SelectedIndex = 0; + SelectionTabControl.Size = new System.Drawing.Size(239, 590); + SelectionTabControl.TabIndex = 28; + // + // SelectionEntityTabPage + // + SelectionEntityTabPage.Controls.Add(SelEntityPropertyGrid); + SelectionEntityTabPage.Location = new System.Drawing.Point(4, 24); + SelectionEntityTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionEntityTabPage.Name = "SelectionEntityTabPage"; + SelectionEntityTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionEntityTabPage.Size = new System.Drawing.Size(231, 562); + SelectionEntityTabPage.TabIndex = 0; + SelectionEntityTabPage.Text = "Entity"; + SelectionEntityTabPage.UseVisualStyleBackColor = true; + // + // SelEntityPropertyGrid + // + SelEntityPropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelEntityPropertyGrid.HelpVisible = false; + SelEntityPropertyGrid.Location = new System.Drawing.Point(0, 7); + SelEntityPropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelEntityPropertyGrid.Name = "SelEntityPropertyGrid"; + SelEntityPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; + SelEntityPropertyGrid.ReadOnly = true; + SelEntityPropertyGrid.Size = new System.Drawing.Size(230, 547); + SelEntityPropertyGrid.TabIndex = 35; + SelEntityPropertyGrid.ToolbarVisible = false; + // + // SelectionArchetypeTabPage + // + SelectionArchetypeTabPage.Controls.Add(SelArchetypePropertyGrid); + SelectionArchetypeTabPage.Location = new System.Drawing.Point(4, 24); + SelectionArchetypeTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionArchetypeTabPage.Name = "SelectionArchetypeTabPage"; + SelectionArchetypeTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionArchetypeTabPage.Size = new System.Drawing.Size(231, 562); + SelectionArchetypeTabPage.TabIndex = 1; + SelectionArchetypeTabPage.Text = "Archetype"; + SelectionArchetypeTabPage.UseVisualStyleBackColor = true; + // + // SelArchetypePropertyGrid + // + SelArchetypePropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelArchetypePropertyGrid.HelpVisible = false; + SelArchetypePropertyGrid.Location = new System.Drawing.Point(0, 7); + SelArchetypePropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelArchetypePropertyGrid.Name = "SelArchetypePropertyGrid"; + SelArchetypePropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; + SelArchetypePropertyGrid.ReadOnly = true; + SelArchetypePropertyGrid.Size = new System.Drawing.Size(230, 547); + SelArchetypePropertyGrid.TabIndex = 36; + SelArchetypePropertyGrid.ToolbarVisible = false; + // + // SelectionDrawableTabPage + // + SelectionDrawableTabPage.Controls.Add(tabControl3); + SelectionDrawableTabPage.Location = new System.Drawing.Point(4, 24); + SelectionDrawableTabPage.Margin = new System.Windows.Forms.Padding(0); + SelectionDrawableTabPage.Name = "SelectionDrawableTabPage"; + SelectionDrawableTabPage.Size = new System.Drawing.Size(231, 562); + SelectionDrawableTabPage.TabIndex = 2; + SelectionDrawableTabPage.Text = "Drawable"; + SelectionDrawableTabPage.UseVisualStyleBackColor = true; + // + // tabControl3 + // + tabControl3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + tabControl3.Controls.Add(tabPage11); + tabControl3.Controls.Add(tabPage12); + tabControl3.Controls.Add(tabPage13); + tabControl3.Location = new System.Drawing.Point(-5, 8); + tabControl3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tabControl3.Name = "tabControl3"; + tabControl3.SelectedIndex = 0; + tabControl3.Size = new System.Drawing.Size(239, 549); + tabControl3.TabIndex = 28; + // + // tabPage11 + // + tabPage11.Controls.Add(SelDrawablePropertyGrid); + tabPage11.Location = new System.Drawing.Point(4, 24); + tabPage11.Margin = new System.Windows.Forms.Padding(0); + tabPage11.Name = "tabPage11"; + tabPage11.Size = new System.Drawing.Size(231, 521); + tabPage11.TabIndex = 0; + tabPage11.Text = "Info"; + tabPage11.UseVisualStyleBackColor = true; + // + // SelDrawablePropertyGrid + // + SelDrawablePropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelDrawablePropertyGrid.HelpVisible = false; + SelDrawablePropertyGrid.Location = new System.Drawing.Point(0, 0); + SelDrawablePropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelDrawablePropertyGrid.Name = "SelDrawablePropertyGrid"; + SelDrawablePropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; + SelDrawablePropertyGrid.ReadOnly = true; + SelDrawablePropertyGrid.Size = new System.Drawing.Size(230, 517); + SelDrawablePropertyGrid.TabIndex = 37; + SelDrawablePropertyGrid.ToolbarVisible = false; + // + // tabPage12 + // + tabPage12.Controls.Add(SelDrawableModelsTreeView); + tabPage12.Location = new System.Drawing.Point(4, 24); + tabPage12.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tabPage12.Name = "tabPage12"; + tabPage12.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + tabPage12.Size = new System.Drawing.Size(231, 521); + tabPage12.TabIndex = 1; + tabPage12.Text = "Models"; + tabPage12.UseVisualStyleBackColor = true; + // + // SelDrawableModelsTreeView + // + SelDrawableModelsTreeView.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelDrawableModelsTreeView.CheckBoxes = true; + SelDrawableModelsTreeView.Location = new System.Drawing.Point(0, 0); + SelDrawableModelsTreeView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelDrawableModelsTreeView.Name = "SelDrawableModelsTreeView"; + SelDrawableModelsTreeView.ShowRootLines = false; + SelDrawableModelsTreeView.Size = new System.Drawing.Size(229, 519); + SelDrawableModelsTreeView.TabIndex = 39; + SelDrawableModelsTreeView.AfterCheck += SelDrawableModelsTreeView_AfterCheck; + SelDrawableModelsTreeView.NodeMouseDoubleClick += SelDrawableModelsTreeView_NodeMouseDoubleClick; + SelDrawableModelsTreeView.KeyPress += SelDrawableModelsTreeView_KeyPress; + // + // tabPage13 + // + tabPage13.Controls.Add(SelDrawableTexturesTreeView); + tabPage13.Location = new System.Drawing.Point(4, 24); + tabPage13.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tabPage13.Name = "tabPage13"; + tabPage13.Size = new System.Drawing.Size(231, 521); + tabPage13.TabIndex = 2; + tabPage13.Text = "Textures"; + tabPage13.UseVisualStyleBackColor = true; + // + // SelDrawableTexturesTreeView + // + SelDrawableTexturesTreeView.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelDrawableTexturesTreeView.Location = new System.Drawing.Point(0, 0); + SelDrawableTexturesTreeView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelDrawableTexturesTreeView.Name = "SelDrawableTexturesTreeView"; + SelDrawableTexturesTreeView.ShowRootLines = false; + SelDrawableTexturesTreeView.Size = new System.Drawing.Size(229, 519); + SelDrawableTexturesTreeView.TabIndex = 40; + // + // SelectionExtensionTabPage + // + SelectionExtensionTabPage.Controls.Add(SelExtensionPropertyGrid); + SelectionExtensionTabPage.Location = new System.Drawing.Point(4, 24); + SelectionExtensionTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionExtensionTabPage.Name = "SelectionExtensionTabPage"; + SelectionExtensionTabPage.Size = new System.Drawing.Size(231, 562); + SelectionExtensionTabPage.TabIndex = 3; + SelectionExtensionTabPage.Text = "Ext"; + SelectionExtensionTabPage.UseVisualStyleBackColor = true; + // + // SelExtensionPropertyGrid + // + SelExtensionPropertyGrid.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelExtensionPropertyGrid.HelpVisible = false; + SelExtensionPropertyGrid.Location = new System.Drawing.Point(0, 7); + SelExtensionPropertyGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelExtensionPropertyGrid.Name = "SelExtensionPropertyGrid"; + SelExtensionPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.NoSort; + SelExtensionPropertyGrid.ReadOnly = true; + SelExtensionPropertyGrid.Size = new System.Drawing.Size(230, 547); + SelExtensionPropertyGrid.TabIndex = 36; + SelExtensionPropertyGrid.ToolbarVisible = false; + // + // MouseSelectCheckBox + // + MouseSelectCheckBox.AutoSize = true; + MouseSelectCheckBox.Location = new System.Drawing.Point(9, 8); + MouseSelectCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MouseSelectCheckBox.Name = "MouseSelectCheckBox"; + MouseSelectCheckBox.Size = new System.Drawing.Size(158, 19); + MouseSelectCheckBox.TabIndex = 22; + MouseSelectCheckBox.Text = "Mouse select (right click)"; + MouseSelectCheckBox.UseVisualStyleBackColor = true; + MouseSelectCheckBox.CheckedChanged += MouseSelectCheckBox_CheckedChanged; + // + // OptionsTabPage + // + OptionsTabPage.Controls.Add(OptionsTabControl); + OptionsTabPage.Controls.Add(StatusBarCheckBox); + OptionsTabPage.Controls.Add(QuitButton); + OptionsTabPage.Controls.Add(ReloadSettingsButton); + OptionsTabPage.Controls.Add(SaveSettingsButton); + OptionsTabPage.Controls.Add(ReloadShadersButton); + OptionsTabPage.Controls.Add(ErrorConsoleCheckBox); + OptionsTabPage.Location = new System.Drawing.Point(4, 24); + OptionsTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsTabPage.Name = "OptionsTabPage"; + OptionsTabPage.Size = new System.Drawing.Size(240, 701); + OptionsTabPage.TabIndex = 3; + OptionsTabPage.Text = "Options"; + OptionsTabPage.UseVisualStyleBackColor = true; + // + // OptionsTabControl + // + OptionsTabControl.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + OptionsTabControl.Controls.Add(OptionsGeneralTabPage); + OptionsTabControl.Controls.Add(OptionsRenderTabPage); + OptionsTabControl.Controls.Add(OptionsHelpersTabPage); + OptionsTabControl.Controls.Add(OptionsLightingTabPage); + OptionsTabControl.Location = new System.Drawing.Point(0, 3); + OptionsTabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsTabControl.Name = "OptionsTabControl"; + OptionsTabControl.SelectedIndex = 0; + OptionsTabControl.Size = new System.Drawing.Size(243, 586); + OptionsTabControl.TabIndex = 50; + // + // OptionsGeneralTabPage + // + OptionsGeneralTabPage.Controls.Add(CarGeneratorsCheckBox); + OptionsGeneralTabPage.Controls.Add(RenderEntitiesCheckBox); + OptionsGeneralTabPage.Controls.Add(AdvancedSettingsButton); + OptionsGeneralTabPage.Controls.Add(ControlSettingsButton); + OptionsGeneralTabPage.Controls.Add(MapViewDetailLabel); + OptionsGeneralTabPage.Controls.Add(label28); + OptionsGeneralTabPage.Controls.Add(MapViewDetailTrackBar); + OptionsGeneralTabPage.Controls.Add(CameraModeComboBox); + OptionsGeneralTabPage.Controls.Add(label24); + OptionsGeneralTabPage.Controls.Add(WaterQuadsCheckBox); + OptionsGeneralTabPage.Controls.Add(FieldOfViewLabel); + OptionsGeneralTabPage.Controls.Add(label22); + OptionsGeneralTabPage.Controls.Add(TimedEntitiesAlwaysOnCheckBox); + OptionsGeneralTabPage.Controls.Add(GrassCheckBox); + OptionsGeneralTabPage.Controls.Add(InteriorsCheckBox); + OptionsGeneralTabPage.Controls.Add(CollisionMeshLayerDrawableCheckBox); + OptionsGeneralTabPage.Controls.Add(CollisionMeshLayer2CheckBox); + OptionsGeneralTabPage.Controls.Add(CollisionMeshLayer1CheckBox); + OptionsGeneralTabPage.Controls.Add(label13); + OptionsGeneralTabPage.Controls.Add(CollisionMeshLayer0CheckBox); + OptionsGeneralTabPage.Controls.Add(label12); + OptionsGeneralTabPage.Controls.Add(CollisionMeshRangeTrackBar); + OptionsGeneralTabPage.Controls.Add(CollisionMeshesCheckBox); + OptionsGeneralTabPage.Controls.Add(FullScreenCheckBox); + OptionsGeneralTabPage.Controls.Add(TimedEntitiesCheckBox); + OptionsGeneralTabPage.Controls.Add(FieldOfViewTrackBar); + OptionsGeneralTabPage.Location = new System.Drawing.Point(4, 24); + OptionsGeneralTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsGeneralTabPage.Name = "OptionsGeneralTabPage"; + OptionsGeneralTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsGeneralTabPage.Size = new System.Drawing.Size(235, 558); + OptionsGeneralTabPage.TabIndex = 0; + OptionsGeneralTabPage.Text = "General"; + OptionsGeneralTabPage.UseVisualStyleBackColor = true; + // + // CarGeneratorsCheckBox + // + CarGeneratorsCheckBox.AutoSize = true; + CarGeneratorsCheckBox.Location = new System.Drawing.Point(12, 83); + CarGeneratorsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CarGeneratorsCheckBox.Name = "CarGeneratorsCheckBox"; + CarGeneratorsCheckBox.Size = new System.Drawing.Size(133, 19); + CarGeneratorsCheckBox.TabIndex = 31; + CarGeneratorsCheckBox.Text = "Show car generators"; + CarGeneratorsCheckBox.UseVisualStyleBackColor = true; + CarGeneratorsCheckBox.CheckedChanged += CarGeneratorsCheckBox_CheckedChanged; + // + // RenderEntitiesCheckBox + // + RenderEntitiesCheckBox.AutoSize = true; + RenderEntitiesCheckBox.Checked = true; + RenderEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + RenderEntitiesCheckBox.Location = new System.Drawing.Point(12, 35); + RenderEntitiesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + RenderEntitiesCheckBox.Name = "RenderEntitiesCheckBox"; + RenderEntitiesCheckBox.Size = new System.Drawing.Size(96, 19); + RenderEntitiesCheckBox.TabIndex = 29; + RenderEntitiesCheckBox.Text = "Show entities"; + RenderEntitiesCheckBox.UseVisualStyleBackColor = true; + RenderEntitiesCheckBox.CheckedChanged += RenderEntitiesCheckBox_CheckedChanged; + // + // AdvancedSettingsButton + // + AdvancedSettingsButton.Location = new System.Drawing.Point(118, 526); + AdvancedSettingsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AdvancedSettingsButton.Name = "AdvancedSettingsButton"; + AdvancedSettingsButton.Size = new System.Drawing.Size(108, 27); + AdvancedSettingsButton.TabIndex = 46; + AdvancedSettingsButton.Text = "Advanced..."; + AdvancedSettingsButton.UseVisualStyleBackColor = true; + AdvancedSettingsButton.Click += AdvancedSettingsButton_Click; + // + // ControlSettingsButton + // + ControlSettingsButton.Location = new System.Drawing.Point(2, 526); + ControlSettingsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ControlSettingsButton.Name = "ControlSettingsButton"; + ControlSettingsButton.Size = new System.Drawing.Size(108, 27); + ControlSettingsButton.TabIndex = 45; + ControlSettingsButton.Text = "Controls..."; + ControlSettingsButton.UseVisualStyleBackColor = true; + ControlSettingsButton.Click += ControlSettingsButton_Click; + // + // MapViewDetailLabel + // + MapViewDetailLabel.AutoSize = true; + MapViewDetailLabel.Location = new System.Drawing.Point(110, 451); + MapViewDetailLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + MapViewDetailLabel.Name = "MapViewDetailLabel"; + MapViewDetailLabel.Size = new System.Drawing.Size(22, 15); + MapViewDetailLabel.TabIndex = 66; + MapViewDetailLabel.Text = "1.0"; + // + // label28 + // + label28.AutoSize = true; + label28.Location = new System.Drawing.Point(5, 451); + label28.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label28.Name = "label28"; + label28.Size = new System.Drawing.Size(93, 15); + label28.TabIndex = 65; + label28.Text = "Map view detail:"; + // + // MapViewDetailTrackBar + // + MapViewDetailTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + MapViewDetailTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + MapViewDetailTrackBar.Enabled = false; + MapViewDetailTrackBar.LargeChange = 1; + MapViewDetailTrackBar.Location = new System.Drawing.Point(7, 470); + MapViewDetailTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MapViewDetailTrackBar.Maximum = 30; + MapViewDetailTrackBar.Minimum = 2; + MapViewDetailTrackBar.Name = "MapViewDetailTrackBar"; + MapViewDetailTrackBar.Size = new System.Drawing.Size(219, 45); + MapViewDetailTrackBar.TabIndex = 44; + MapViewDetailTrackBar.TickFrequency = 2; + MapViewDetailTrackBar.Value = 10; + MapViewDetailTrackBar.Scroll += MapViewDetailTrackBar_Scroll; + // + // CameraModeComboBox + // + CameraModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CameraModeComboBox.FormattingEnabled = true; + CameraModeComboBox.Items.AddRange(new object[] { "Perspective", "Orthographic", "2D Map" }); + CameraModeComboBox.Location = new System.Drawing.Point(96, 352); + CameraModeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CameraModeComboBox.Name = "CameraModeComboBox"; + CameraModeComboBox.Size = new System.Drawing.Size(130, 23); + CameraModeComboBox.TabIndex = 42; + CameraModeComboBox.SelectedIndexChanged += CameraModeComboBox_SelectedIndexChanged; + CameraModeComboBox.KeyPress += CameraModeComboBox_KeyPress; + // + // label24 + // + label24.AutoSize = true; + label24.Location = new System.Drawing.Point(5, 355); + label24.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label24.Name = "label24"; + label24.Size = new System.Drawing.Size(85, 15); + label24.TabIndex = 63; + label24.Text = "Camera mode:"; + // + // WaterQuadsCheckBox + // + WaterQuadsCheckBox.AutoSize = true; + WaterQuadsCheckBox.Checked = true; + WaterQuadsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + WaterQuadsCheckBox.Location = new System.Drawing.Point(12, 156); + WaterQuadsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WaterQuadsCheckBox.Name = "WaterQuadsCheckBox"; + WaterQuadsCheckBox.Size = new System.Drawing.Size(122, 19); + WaterQuadsCheckBox.TabIndex = 35; + WaterQuadsCheckBox.Text = "Show water quads"; + WaterQuadsCheckBox.UseVisualStyleBackColor = true; + WaterQuadsCheckBox.CheckedChanged += WaterQuadsCheckBox_CheckedChanged; + // + // FieldOfViewLabel + // + FieldOfViewLabel.AutoSize = true; + FieldOfViewLabel.Location = new System.Drawing.Point(92, 387); + FieldOfViewLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + FieldOfViewLabel.Name = "FieldOfViewLabel"; + FieldOfViewLabel.Size = new System.Drawing.Size(22, 15); + FieldOfViewLabel.TabIndex = 59; + FieldOfViewLabel.Text = "1.0"; + // + // label22 + // + label22.AutoSize = true; + label22.Location = new System.Drawing.Point(5, 387); + label22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label22.Name = "label22"; + label22.Size = new System.Drawing.Size(76, 15); + label22.TabIndex = 58; + label22.Text = "Field of view:"; + // + // TimedEntitiesAlwaysOnCheckBox + // + TimedEntitiesAlwaysOnCheckBox.AutoSize = true; + TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(153, 107); + TimedEntitiesAlwaysOnCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimedEntitiesAlwaysOnCheckBox.Name = "TimedEntitiesAlwaysOnCheckBox"; + TimedEntitiesAlwaysOnCheckBox.Size = new System.Drawing.Size(61, 19); + TimedEntitiesAlwaysOnCheckBox.TabIndex = 33; + TimedEntitiesAlwaysOnCheckBox.Text = "always"; + TimedEntitiesAlwaysOnCheckBox.UseVisualStyleBackColor = true; + TimedEntitiesAlwaysOnCheckBox.CheckedChanged += TimedEntitiesAlwaysOnCheckBox_CheckedChanged; + // + // GrassCheckBox + // + GrassCheckBox.AutoSize = true; + GrassCheckBox.Checked = true; + GrassCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + GrassCheckBox.Location = new System.Drawing.Point(12, 59); + GrassCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + GrassCheckBox.Name = "GrassCheckBox"; + GrassCheckBox.Size = new System.Drawing.Size(85, 19); + GrassCheckBox.TabIndex = 30; + GrassCheckBox.Text = "Show grass"; + GrassCheckBox.UseVisualStyleBackColor = true; + GrassCheckBox.CheckedChanged += GrassCheckBox_CheckedChanged; + // + // InteriorsCheckBox + // + InteriorsCheckBox.AutoSize = true; + InteriorsCheckBox.Checked = true; + InteriorsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + InteriorsCheckBox.Location = new System.Drawing.Point(12, 132); + InteriorsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + InteriorsCheckBox.Name = "InteriorsCheckBox"; + InteriorsCheckBox.Size = new System.Drawing.Size(101, 19); + InteriorsCheckBox.TabIndex = 34; + InteriorsCheckBox.Text = "Show interiors"; + InteriorsCheckBox.UseVisualStyleBackColor = true; + InteriorsCheckBox.CheckedChanged += InteriorsCheckBox_CheckedChanged; + // + // CollisionMeshLayerDrawableCheckBox + // + CollisionMeshLayerDrawableCheckBox.AutoSize = true; + CollisionMeshLayerDrawableCheckBox.Checked = true; + CollisionMeshLayerDrawableCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + CollisionMeshLayerDrawableCheckBox.Location = new System.Drawing.Point(138, 302); + CollisionMeshLayerDrawableCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshLayerDrawableCheckBox.Name = "CollisionMeshLayerDrawableCheckBox"; + CollisionMeshLayerDrawableCheckBox.Size = new System.Drawing.Size(75, 19); + CollisionMeshLayerDrawableCheckBox.TabIndex = 41; + CollisionMeshLayerDrawableCheckBox.Text = "Drawable"; + CollisionMeshLayerDrawableCheckBox.UseVisualStyleBackColor = true; + CollisionMeshLayerDrawableCheckBox.CheckedChanged += CollisionMeshLayerDrawableCheckBox_CheckedChanged; + // + // CollisionMeshLayer2CheckBox + // + CollisionMeshLayer2CheckBox.AutoSize = true; + CollisionMeshLayer2CheckBox.Checked = true; + CollisionMeshLayer2CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + CollisionMeshLayer2CheckBox.Location = new System.Drawing.Point(96, 302); + CollisionMeshLayer2CheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshLayer2CheckBox.Name = "CollisionMeshLayer2CheckBox"; + CollisionMeshLayer2CheckBox.Size = new System.Drawing.Size(32, 19); + CollisionMeshLayer2CheckBox.TabIndex = 40; + CollisionMeshLayer2CheckBox.Text = "2"; + CollisionMeshLayer2CheckBox.UseVisualStyleBackColor = true; + CollisionMeshLayer2CheckBox.CheckedChanged += CollisionMeshLayer2CheckBox_CheckedChanged; + // + // CollisionMeshLayer1CheckBox + // + CollisionMeshLayer1CheckBox.AutoSize = true; + CollisionMeshLayer1CheckBox.Checked = true; + CollisionMeshLayer1CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + CollisionMeshLayer1CheckBox.Location = new System.Drawing.Point(54, 302); + CollisionMeshLayer1CheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshLayer1CheckBox.Name = "CollisionMeshLayer1CheckBox"; + CollisionMeshLayer1CheckBox.Size = new System.Drawing.Size(32, 19); + CollisionMeshLayer1CheckBox.TabIndex = 39; + CollisionMeshLayer1CheckBox.Text = "1"; + CollisionMeshLayer1CheckBox.UseVisualStyleBackColor = true; + CollisionMeshLayer1CheckBox.CheckedChanged += CollisionMeshLayer1CheckBox_CheckedChanged; + // + // label13 + // + label13.AutoSize = true; + label13.Location = new System.Drawing.Point(5, 282); + label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label13.Name = "label13"; + label13.Size = new System.Drawing.Size(121, 15); + label13.TabIndex = 54; + label13.Text = "Collision mesh layers:"; + // + // CollisionMeshLayer0CheckBox + // + CollisionMeshLayer0CheckBox.AutoSize = true; + CollisionMeshLayer0CheckBox.Checked = true; + CollisionMeshLayer0CheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + CollisionMeshLayer0CheckBox.Location = new System.Drawing.Point(12, 302); + CollisionMeshLayer0CheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshLayer0CheckBox.Name = "CollisionMeshLayer0CheckBox"; + CollisionMeshLayer0CheckBox.Size = new System.Drawing.Size(32, 19); + CollisionMeshLayer0CheckBox.TabIndex = 38; + CollisionMeshLayer0CheckBox.Text = "0"; + CollisionMeshLayer0CheckBox.UseVisualStyleBackColor = true; + CollisionMeshLayer0CheckBox.CheckedChanged += CollisionMeshLayer0CheckBox_CheckedChanged; + // + // label12 + // + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(5, 223); + label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(145, 15); + label12.TabIndex = 51; + label12.Text = "Collision/nav mesh range:"; + // + // CollisionMeshRangeTrackBar + // + CollisionMeshRangeTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CollisionMeshRangeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + CollisionMeshRangeTrackBar.LargeChange = 1; + CollisionMeshRangeTrackBar.Location = new System.Drawing.Point(7, 241); + CollisionMeshRangeTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshRangeTrackBar.Maximum = 15; + CollisionMeshRangeTrackBar.Minimum = 1; + CollisionMeshRangeTrackBar.Name = "CollisionMeshRangeTrackBar"; + CollisionMeshRangeTrackBar.Size = new System.Drawing.Size(219, 45); + CollisionMeshRangeTrackBar.TabIndex = 37; + CollisionMeshRangeTrackBar.Value = 6; + CollisionMeshRangeTrackBar.Scroll += CollisionMeshRangeTrackBar_Scroll; + // + // CollisionMeshesCheckBox + // + CollisionMeshesCheckBox.AutoSize = true; + CollisionMeshesCheckBox.Location = new System.Drawing.Point(12, 197); + CollisionMeshesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CollisionMeshesCheckBox.Name = "CollisionMeshesCheckBox"; + CollisionMeshesCheckBox.Size = new System.Drawing.Size(145, 19); + CollisionMeshesCheckBox.TabIndex = 36; + CollisionMeshesCheckBox.Text = "Show collision meshes"; + CollisionMeshesCheckBox.UseVisualStyleBackColor = true; + CollisionMeshesCheckBox.CheckedChanged += CollisionMeshesCheckBox_CheckedChanged; + // + // FullScreenCheckBox + // + FullScreenCheckBox.AutoSize = true; + FullScreenCheckBox.Location = new System.Drawing.Point(12, 10); + FullScreenCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + FullScreenCheckBox.Name = "FullScreenCheckBox"; + FullScreenCheckBox.Size = new System.Drawing.Size(192, 19); + FullScreenCheckBox.TabIndex = 28; + FullScreenCheckBox.Text = "Full screen (borderless window)"; + FullScreenCheckBox.UseVisualStyleBackColor = true; + FullScreenCheckBox.CheckedChanged += FullScreenCheckBox_CheckedChanged; + // + // TimedEntitiesCheckBox + // + TimedEntitiesCheckBox.AutoSize = true; + TimedEntitiesCheckBox.Checked = true; + TimedEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + TimedEntitiesCheckBox.Location = new System.Drawing.Point(12, 107); + TimedEntitiesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimedEntitiesCheckBox.Name = "TimedEntitiesCheckBox"; + TimedEntitiesCheckBox.Size = new System.Drawing.Size(130, 19); + TimedEntitiesCheckBox.TabIndex = 32; + TimedEntitiesCheckBox.Text = "Show timed entities"; + TimedEntitiesCheckBox.UseVisualStyleBackColor = true; + TimedEntitiesCheckBox.CheckedChanged += TimedEntitiesCheckBox_CheckedChanged; + // + // FieldOfViewTrackBar + // + FieldOfViewTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + FieldOfViewTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + FieldOfViewTrackBar.LargeChange = 1; + FieldOfViewTrackBar.Location = new System.Drawing.Point(7, 405); + FieldOfViewTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + FieldOfViewTrackBar.Maximum = 200; + FieldOfViewTrackBar.Minimum = 10; + FieldOfViewTrackBar.Name = "FieldOfViewTrackBar"; + FieldOfViewTrackBar.Size = new System.Drawing.Size(219, 45); + FieldOfViewTrackBar.TabIndex = 43; + FieldOfViewTrackBar.TickFrequency = 10; + FieldOfViewTrackBar.Value = 100; + FieldOfViewTrackBar.Scroll += FieldOfViewTrackBar_Scroll; + // + // OptionsRenderTabPage + // + OptionsRenderTabPage.Controls.Add(AntiAliasingValue); + OptionsRenderTabPage.Controls.Add(label34); + OptionsRenderTabPage.Controls.Add(AntiAliasingTrackBar); + OptionsRenderTabPage.Controls.Add(FarClipUpDown); + OptionsRenderTabPage.Controls.Add(label32); + OptionsRenderTabPage.Controls.Add(NearClipUpDown); + OptionsRenderTabPage.Controls.Add(label31); + OptionsRenderTabPage.Controls.Add(HDTexturesCheckBox); + OptionsRenderTabPage.Controls.Add(WireframeCheckBox); + OptionsRenderTabPage.Controls.Add(RenderModeComboBox); + OptionsRenderTabPage.Controls.Add(label11); + OptionsRenderTabPage.Controls.Add(TextureSamplerComboBox); + OptionsRenderTabPage.Controls.Add(TextureCoordsComboBox); + OptionsRenderTabPage.Controls.Add(label10); + OptionsRenderTabPage.Controls.Add(AnisotropicFilteringCheckBox); + OptionsRenderTabPage.Controls.Add(ProxiesCheckBox); + OptionsRenderTabPage.Controls.Add(WaitForChildrenCheckBox); + OptionsRenderTabPage.Controls.Add(label14); + OptionsRenderTabPage.Location = new System.Drawing.Point(4, 24); + OptionsRenderTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsRenderTabPage.Name = "OptionsRenderTabPage"; + OptionsRenderTabPage.Size = new System.Drawing.Size(235, 558); + OptionsRenderTabPage.TabIndex = 3; + OptionsRenderTabPage.Text = "Render"; + OptionsRenderTabPage.UseVisualStyleBackColor = true; // // AntiAliasingValue // - this.AntiAliasingValue.AutoSize = true; - this.AntiAliasingValue.Location = new System.Drawing.Point(147, 253); - this.AntiAliasingValue.Name = "AntiAliasingValue"; - this.AntiAliasingValue.Size = new System.Drawing.Size(13, 13); - this.AntiAliasingValue.TabIndex = 64; - this.AntiAliasingValue.Text = "1"; + AntiAliasingValue.AutoSize = true; + AntiAliasingValue.Location = new System.Drawing.Point(172, 292); + AntiAliasingValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + AntiAliasingValue.Name = "AntiAliasingValue"; + AntiAliasingValue.Size = new System.Drawing.Size(13, 15); + AntiAliasingValue.TabIndex = 64; + AntiAliasingValue.Text = "1"; + // + // AntiAliasingTrackBar + // + AntiAliasingTrackBar.LargeChange = 1; + AntiAliasingTrackBar.Location = new System.Drawing.Point(12, 310); + AntiAliasingTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AntiAliasingTrackBar.Maximum = 8; + AntiAliasingTrackBar.Minimum = 1; + AntiAliasingTrackBar.Name = "AntiAliasingTrackBar"; + AntiAliasingTrackBar.Size = new System.Drawing.Size(215, 45); + AntiAliasingTrackBar.TabIndex = 62; + AntiAliasingTrackBar.Value = 1; + AntiAliasingTrackBar.ValueChanged += AntiAliasingTrackBar_ValueChanged; + // + // FarClipUpDown + // + FarClipUpDown.Increment = new decimal(new int[] { 100, 0, 0, 0 }); + FarClipUpDown.Location = new System.Drawing.Point(93, 399); + FarClipUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + FarClipUpDown.Maximum = new decimal(new int[] { 100000, 0, 0, 0 }); + FarClipUpDown.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); + FarClipUpDown.Name = "FarClipUpDown"; + FarClipUpDown.Size = new System.Drawing.Size(133, 23); + FarClipUpDown.TabIndex = 61; + FarClipUpDown.Value = new decimal(new int[] { 100000, 0, 0, 0 }); + FarClipUpDown.ValueChanged += FarClipUpDown_ValueChanged; + // + // label32 + // + label32.AutoSize = true; + label32.Location = new System.Drawing.Point(5, 402); + label32.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label32.Name = "label32"; + label32.Size = new System.Drawing.Size(50, 15); + label32.TabIndex = 60; + label32.Text = "Far Clip:"; + // + // NearClipUpDown + // + NearClipUpDown.DecimalPlaces = 3; + NearClipUpDown.Increment = new decimal(new int[] { 1, 0, 0, 65536 }); + NearClipUpDown.Location = new System.Drawing.Point(93, 369); + NearClipUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + NearClipUpDown.Maximum = new decimal(new int[] { 10, 0, 0, 0 }); + NearClipUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 196608 }); + NearClipUpDown.Name = "NearClipUpDown"; + NearClipUpDown.Size = new System.Drawing.Size(133, 23); + NearClipUpDown.TabIndex = 59; + NearClipUpDown.Value = new decimal(new int[] { 1, 0, 0, 131072 }); + NearClipUpDown.ValueChanged += NearClipUpDown_ValueChanged; + // + // label31 + // + label31.AutoSize = true; + label31.Location = new System.Drawing.Point(5, 372); + label31.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label31.Name = "label31"; + label31.Size = new System.Drawing.Size(59, 15); + label31.TabIndex = 58; + label31.Text = "Near Clip:"; + // + // HDTexturesCheckBox + // + HDTexturesCheckBox.AutoSize = true; + HDTexturesCheckBox.Checked = true; + HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + HDTexturesCheckBox.Location = new System.Drawing.Point(12, 267); + HDTexturesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDTexturesCheckBox.Name = "HDTexturesCheckBox"; + HDTexturesCheckBox.Size = new System.Drawing.Size(88, 19); + HDTexturesCheckBox.TabIndex = 57; + HDTexturesCheckBox.Text = "HD textures"; + HDTexturesCheckBox.UseVisualStyleBackColor = true; + HDTexturesCheckBox.CheckedChanged += HDTexturesCheckBox_CheckedChanged; + // + // WireframeCheckBox + // + WireframeCheckBox.AutoSize = true; + WireframeCheckBox.Location = new System.Drawing.Point(12, 133); + WireframeCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WireframeCheckBox.Name = "WireframeCheckBox"; + WireframeCheckBox.Size = new System.Drawing.Size(81, 19); + WireframeCheckBox.TabIndex = 49; + WireframeCheckBox.Text = "Wireframe"; + WireframeCheckBox.UseVisualStyleBackColor = true; + WireframeCheckBox.CheckedChanged += WireframeCheckBox_CheckedChanged; + // + // RenderModeComboBox + // + RenderModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + RenderModeComboBox.FormattingEnabled = true; + RenderModeComboBox.Items.AddRange(new object[] { "Default", "Single texture", "Vertex normals", "Vertex tangents", "Vertex colour 1", "Vertex colour 2", "Texture coord 1", "Texture coord 2", "Texture coord 3" }); + RenderModeComboBox.Location = new System.Drawing.Point(93, 18); + RenderModeComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + RenderModeComboBox.Name = "RenderModeComboBox"; + RenderModeComboBox.Size = new System.Drawing.Size(132, 23); + RenderModeComboBox.TabIndex = 46; + RenderModeComboBox.SelectedIndexChanged += RenderModeComboBox_SelectedIndexChanged; + RenderModeComboBox.KeyPress += RenderModeComboBox_KeyPress; + // + // label11 + // + label11.AutoSize = true; + label11.Location = new System.Drawing.Point(5, 53); + label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(72, 15); + label11.TabIndex = 50; + label11.Text = "Tex sampler:"; + // + // TextureSamplerComboBox + // + TextureSamplerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + TextureSamplerComboBox.Enabled = false; + TextureSamplerComboBox.FormattingEnabled = true; + TextureSamplerComboBox.Location = new System.Drawing.Point(93, 50); + TextureSamplerComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureSamplerComboBox.Name = "TextureSamplerComboBox"; + TextureSamplerComboBox.Size = new System.Drawing.Size(132, 23); + TextureSamplerComboBox.TabIndex = 47; + TextureSamplerComboBox.SelectedIndexChanged += TextureSamplerComboBox_SelectedIndexChanged; + TextureSamplerComboBox.KeyPress += TextureSamplerComboBox_KeyPress; + // + // TextureCoordsComboBox + // + TextureCoordsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + TextureCoordsComboBox.Enabled = false; + TextureCoordsComboBox.FormattingEnabled = true; + TextureCoordsComboBox.Items.AddRange(new object[] { "Texture coord 1", "Texture coord 2", "Texture coord 3" }); + TextureCoordsComboBox.Location = new System.Drawing.Point(93, 81); + TextureCoordsComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TextureCoordsComboBox.Name = "TextureCoordsComboBox"; + TextureCoordsComboBox.Size = new System.Drawing.Size(132, 23); + TextureCoordsComboBox.TabIndex = 48; + TextureCoordsComboBox.SelectedIndexChanged += TextureCoordsComboBox_SelectedIndexChanged; + TextureCoordsComboBox.KeyPress += TextureCoordsComboBox_KeyPress; + // + // label10 + // + label10.AutoSize = true; + label10.Location = new System.Drawing.Point(5, 22); + label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(81, 15); + label10.TabIndex = 48; + label10.Text = "Render mode:"; + // + // AnisotropicFilteringCheckBox + // + AnisotropicFilteringCheckBox.AutoSize = true; + AnisotropicFilteringCheckBox.Checked = true; + AnisotropicFilteringCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + AnisotropicFilteringCheckBox.Location = new System.Drawing.Point(12, 159); + AnisotropicFilteringCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AnisotropicFilteringCheckBox.Name = "AnisotropicFilteringCheckBox"; + AnisotropicFilteringCheckBox.Size = new System.Drawing.Size(131, 19); + AnisotropicFilteringCheckBox.TabIndex = 50; + AnisotropicFilteringCheckBox.Text = "Anisotropic filtering"; + AnisotropicFilteringCheckBox.UseVisualStyleBackColor = true; + AnisotropicFilteringCheckBox.CheckedChanged += AnisotropicFilteringCheckBox_CheckedChanged; + // + // ProxiesCheckBox + // + ProxiesCheckBox.AutoSize = true; + ProxiesCheckBox.Location = new System.Drawing.Point(12, 230); + ProxiesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ProxiesCheckBox.Name = "ProxiesCheckBox"; + ProxiesCheckBox.Size = new System.Drawing.Size(96, 19); + ProxiesCheckBox.TabIndex = 52; + ProxiesCheckBox.Text = "Show proxies"; + ProxiesCheckBox.UseVisualStyleBackColor = true; + ProxiesCheckBox.CheckedChanged += ProxiesCheckBox_CheckedChanged; + // + // WaitForChildrenCheckBox + // + WaitForChildrenCheckBox.AutoSize = true; + WaitForChildrenCheckBox.Checked = true; + WaitForChildrenCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + WaitForChildrenCheckBox.Location = new System.Drawing.Point(12, 186); + WaitForChildrenCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WaitForChildrenCheckBox.Name = "WaitForChildrenCheckBox"; + WaitForChildrenCheckBox.Size = new System.Drawing.Size(154, 19); + WaitForChildrenCheckBox.TabIndex = 51; + WaitForChildrenCheckBox.Text = "Wait for children to load"; + WaitForChildrenCheckBox.UseVisualStyleBackColor = true; + WaitForChildrenCheckBox.CheckedChanged += WaitForChildrenCheckBox_CheckedChanged; + // + // label14 + // + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(5, 84); + label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(66, 15); + label14.TabIndex = 56; + label14.Text = "Tex coords:"; + // + // OptionsHelpersTabPage + // + OptionsHelpersTabPage.Controls.Add(SnapAngleUpDown); + OptionsHelpersTabPage.Controls.Add(label33); + OptionsHelpersTabPage.Controls.Add(SnapGridSizeUpDown); + OptionsHelpersTabPage.Controls.Add(label26); + OptionsHelpersTabPage.Controls.Add(SkeletonsCheckBox); + OptionsHelpersTabPage.Controls.Add(AudioOuterBoundsCheckBox); + OptionsHelpersTabPage.Controls.Add(PopZonesCheckBox); + OptionsHelpersTabPage.Controls.Add(NavMeshesCheckBox); + OptionsHelpersTabPage.Controls.Add(TrainPathsCheckBox); + OptionsHelpersTabPage.Controls.Add(PathsDepthClipCheckBox); + OptionsHelpersTabPage.Controls.Add(PathBoundsCheckBox); + OptionsHelpersTabPage.Controls.Add(SelectionWidgetCheckBox); + OptionsHelpersTabPage.Controls.Add(MarkerStyleComboBox); + OptionsHelpersTabPage.Controls.Add(label4); + OptionsHelpersTabPage.Controls.Add(LocatorStyleComboBox); + OptionsHelpersTabPage.Controls.Add(label5); + OptionsHelpersTabPage.Controls.Add(MarkerDepthClipCheckBox); + OptionsHelpersTabPage.Controls.Add(label9); + OptionsHelpersTabPage.Controls.Add(PathsCheckBox); + OptionsHelpersTabPage.Controls.Add(SelectionBoundsCheckBox); + OptionsHelpersTabPage.Controls.Add(BoundsDepthClipCheckBox); + OptionsHelpersTabPage.Controls.Add(BoundsRangeTrackBar); + OptionsHelpersTabPage.Controls.Add(BoundsStyleComboBox); + OptionsHelpersTabPage.Controls.Add(label8); + OptionsHelpersTabPage.Location = new System.Drawing.Point(4, 24); + OptionsHelpersTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsHelpersTabPage.Name = "OptionsHelpersTabPage"; + OptionsHelpersTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsHelpersTabPage.Size = new System.Drawing.Size(235, 558); + OptionsHelpersTabPage.TabIndex = 1; + OptionsHelpersTabPage.Text = "Helpers"; + OptionsHelpersTabPage.UseVisualStyleBackColor = true; + // + // SnapAngleUpDown + // + SnapAngleUpDown.DecimalPlaces = 1; + SnapAngleUpDown.Location = new System.Drawing.Point(114, 322); + SnapAngleUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SnapAngleUpDown.Maximum = new decimal(new int[] { 180, 0, 0, 0 }); + SnapAngleUpDown.Name = "SnapAngleUpDown"; + SnapAngleUpDown.Size = new System.Drawing.Size(112, 23); + SnapAngleUpDown.TabIndex = 32; + SnapAngleUpDown.Value = new decimal(new int[] { 50, 0, 0, 65536 }); + SnapAngleUpDown.ValueChanged += SnapAngleUpDown_ValueChanged; + // + // label33 + // + label33.AutoSize = true; + label33.Location = new System.Drawing.Point(5, 324); + label33.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label33.Name = "label33"; + label33.Size = new System.Drawing.Size(99, 15); + label33.TabIndex = 31; + label33.Text = "Snap angle (deg):"; + // + // SnapGridSizeUpDown + // + SnapGridSizeUpDown.DecimalPlaces = 2; + SnapGridSizeUpDown.Location = new System.Drawing.Point(114, 292); + SnapGridSizeUpDown.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SnapGridSizeUpDown.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); + SnapGridSizeUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 131072 }); + SnapGridSizeUpDown.Name = "SnapGridSizeUpDown"; + SnapGridSizeUpDown.Size = new System.Drawing.Size(112, 23); + SnapGridSizeUpDown.TabIndex = 30; + SnapGridSizeUpDown.Value = new decimal(new int[] { 100, 0, 0, 131072 }); + SnapGridSizeUpDown.ValueChanged += SnapGridSizeUpDown_ValueChanged; + // + // label26 + // + label26.AutoSize = true; + label26.Location = new System.Drawing.Point(5, 294); + label26.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label26.Name = "label26"; + label26.Size = new System.Drawing.Size(82, 15); + label26.TabIndex = 29; + label26.Text = "Snap grid size:"; + // + // SkeletonsCheckBox + // + SkeletonsCheckBox.AutoSize = true; + SkeletonsCheckBox.Location = new System.Drawing.Point(12, 474); + SkeletonsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SkeletonsCheckBox.Name = "SkeletonsCheckBox"; + SkeletonsCheckBox.Size = new System.Drawing.Size(107, 19); + SkeletonsCheckBox.TabIndex = 38; + SkeletonsCheckBox.Text = "Show skeletons"; + SkeletonsCheckBox.UseVisualStyleBackColor = true; + SkeletonsCheckBox.CheckedChanged += SkeletonsCheckBox_CheckedChanged; + // + // AudioOuterBoundsCheckBox + // + AudioOuterBoundsCheckBox.AutoSize = true; + AudioOuterBoundsCheckBox.Checked = true; + AudioOuterBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + AudioOuterBoundsCheckBox.Location = new System.Drawing.Point(12, 527); + AudioOuterBoundsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + AudioOuterBoundsCheckBox.Name = "AudioOuterBoundsCheckBox"; + AudioOuterBoundsCheckBox.Size = new System.Drawing.Size(162, 19); + AudioOuterBoundsCheckBox.TabIndex = 40; + AudioOuterBoundsCheckBox.Text = "Show audio outer bounds"; + AudioOuterBoundsCheckBox.UseVisualStyleBackColor = true; + AudioOuterBoundsCheckBox.CheckedChanged += AudioOuterBoundsCheckBox_CheckedChanged; + // + // PopZonesCheckBox + // + PopZonesCheckBox.AutoSize = true; + PopZonesCheckBox.Location = new System.Drawing.Point(12, 448); + PopZonesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PopZonesCheckBox.Name = "PopZonesCheckBox"; + PopZonesCheckBox.Size = new System.Drawing.Size(149, 19); + PopZonesCheckBox.TabIndex = 37; + PopZonesCheckBox.Text = "Show population zones"; + PopZonesCheckBox.UseVisualStyleBackColor = true; + PopZonesCheckBox.CheckedChanged += PopZonesCheckBox_CheckedChanged; + // + // NavMeshesCheckBox + // + NavMeshesCheckBox.AutoSize = true; + NavMeshesCheckBox.Location = new System.Drawing.Point(12, 421); + NavMeshesCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + NavMeshesCheckBox.Name = "NavMeshesCheckBox"; + NavMeshesCheckBox.Size = new System.Drawing.Size(120, 19); + NavMeshesCheckBox.TabIndex = 36; + NavMeshesCheckBox.Text = "Show nav meshes"; + NavMeshesCheckBox.UseVisualStyleBackColor = true; + NavMeshesCheckBox.CheckedChanged += NavMeshesCheckBox_CheckedChanged; + // + // TrainPathsCheckBox + // + TrainPathsCheckBox.AutoSize = true; + TrainPathsCheckBox.Location = new System.Drawing.Point(12, 395); + TrainPathsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TrainPathsCheckBox.Name = "TrainPathsCheckBox"; + TrainPathsCheckBox.Size = new System.Drawing.Size(114, 19); + TrainPathsCheckBox.TabIndex = 35; + TrainPathsCheckBox.Text = "Show train paths"; + TrainPathsCheckBox.UseVisualStyleBackColor = true; + TrainPathsCheckBox.CheckedChanged += TrainPathsCheckBox_CheckedChanged; + // + // PathsDepthClipCheckBox + // + PathsDepthClipCheckBox.AutoSize = true; + PathsDepthClipCheckBox.Checked = true; + PathsDepthClipCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + PathsDepthClipCheckBox.Location = new System.Drawing.Point(12, 501); + PathsDepthClipCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PathsDepthClipCheckBox.Name = "PathsDepthClipCheckBox"; + PathsDepthClipCheckBox.Size = new System.Drawing.Size(111, 19); + PathsDepthClipCheckBox.TabIndex = 39; + PathsDepthClipCheckBox.Text = "Paths depth clip"; + PathsDepthClipCheckBox.UseVisualStyleBackColor = true; + PathsDepthClipCheckBox.CheckedChanged += PathsDepthClipCheckBox_CheckedChanged; + // + // PathBoundsCheckBox + // + PathBoundsCheckBox.AutoSize = true; + PathBoundsCheckBox.Checked = true; + PathBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + PathBoundsCheckBox.Location = new System.Drawing.Point(114, 368); + PathBoundsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PathBoundsCheckBox.Name = "PathBoundsCheckBox"; + PathBoundsCheckBox.Size = new System.Drawing.Size(93, 19); + PathBoundsCheckBox.TabIndex = 34; + PathBoundsCheckBox.Text = "Path bounds"; + PathBoundsCheckBox.UseVisualStyleBackColor = true; + PathBoundsCheckBox.CheckedChanged += PathBoundsCheckBox_CheckedChanged; + // + // SelectionWidgetCheckBox + // + SelectionWidgetCheckBox.AutoSize = true; + SelectionWidgetCheckBox.Checked = true; + SelectionWidgetCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + SelectionWidgetCheckBox.Location = new System.Drawing.Point(12, 267); + SelectionWidgetCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionWidgetCheckBox.Name = "SelectionWidgetCheckBox"; + SelectionWidgetCheckBox.Size = new System.Drawing.Size(94, 19); + SelectionWidgetCheckBox.TabIndex = 28; + SelectionWidgetCheckBox.Text = "Show widget"; + SelectionWidgetCheckBox.UseVisualStyleBackColor = true; + SelectionWidgetCheckBox.CheckedChanged += SelectionWidgetCheckBox_CheckedChanged; + // + // MarkerStyleComboBox + // + MarkerStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + MarkerStyleComboBox.FormattingEnabled = true; + MarkerStyleComboBox.Location = new System.Drawing.Point(93, 7); + MarkerStyleComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MarkerStyleComboBox.Name = "MarkerStyleComboBox"; + MarkerStyleComboBox.Size = new System.Drawing.Size(132, 23); + MarkerStyleComboBox.TabIndex = 18; + MarkerStyleComboBox.SelectedIndexChanged += MarkerStyleComboBox_SelectedIndexChanged; + MarkerStyleComboBox.KeyPress += MarkerStyleComboBox_KeyPress; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(5, 10); + label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(74, 15); + label4.TabIndex = 17; + label4.Text = "Marker style:"; + // + // LocatorStyleComboBox + // + LocatorStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + LocatorStyleComboBox.FormattingEnabled = true; + LocatorStyleComboBox.Location = new System.Drawing.Point(93, 38); + LocatorStyleComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + LocatorStyleComboBox.Name = "LocatorStyleComboBox"; + LocatorStyleComboBox.Size = new System.Drawing.Size(132, 23); + LocatorStyleComboBox.TabIndex = 20; + LocatorStyleComboBox.SelectedIndexChanged += LocatorStyleComboBox_SelectedIndexChanged; + LocatorStyleComboBox.KeyPress += LocatorStyleComboBox_KeyPress; + // + // label5 + // + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(5, 42); + label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(77, 15); + label5.TabIndex = 19; + label5.Text = "Locator style:"; + // + // MarkerDepthClipCheckBox + // + MarkerDepthClipCheckBox.AutoSize = true; + MarkerDepthClipCheckBox.Location = new System.Drawing.Point(12, 69); + MarkerDepthClipCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + MarkerDepthClipCheckBox.Name = "MarkerDepthClipCheckBox"; + MarkerDepthClipCheckBox.Size = new System.Drawing.Size(119, 19); + MarkerDepthClipCheckBox.TabIndex = 21; + MarkerDepthClipCheckBox.Text = "Marker depth clip"; + MarkerDepthClipCheckBox.UseVisualStyleBackColor = true; + MarkerDepthClipCheckBox.Visible = false; + MarkerDepthClipCheckBox.CheckedChanged += MarkerDepthClipCheckBox_CheckedChanged; + // + // label9 + // + label9.AutoSize = true; + label9.Location = new System.Drawing.Point(5, 157); + label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(83, 15); + label9.TabIndex = 25; + label9.Text = "Bounds range:"; + // + // PathsCheckBox + // + PathsCheckBox.AutoSize = true; + PathsCheckBox.Location = new System.Drawing.Point(12, 368); + PathsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + PathsCheckBox.Name = "PathsCheckBox"; + PathsCheckBox.Size = new System.Drawing.Size(87, 19); + PathsCheckBox.TabIndex = 33; + PathsCheckBox.Text = "Show paths"; + PathsCheckBox.UseVisualStyleBackColor = true; + PathsCheckBox.CheckedChanged += PathsCheckBox_CheckedChanged; + // + // SelectionBoundsCheckBox + // + SelectionBoundsCheckBox.AutoSize = true; + SelectionBoundsCheckBox.Checked = true; + SelectionBoundsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + SelectionBoundsCheckBox.Location = new System.Drawing.Point(12, 224); + SelectionBoundsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectionBoundsCheckBox.Name = "SelectionBoundsCheckBox"; + SelectionBoundsCheckBox.Size = new System.Drawing.Size(148, 19); + SelectionBoundsCheckBox.TabIndex = 27; + SelectionBoundsCheckBox.Text = "Show selection bounds"; + SelectionBoundsCheckBox.UseVisualStyleBackColor = true; + SelectionBoundsCheckBox.CheckedChanged += SelectionBoundsCheckBox_CheckedChanged; + // + // BoundsDepthClipCheckBox + // + BoundsDepthClipCheckBox.AutoSize = true; + BoundsDepthClipCheckBox.Checked = true; + BoundsDepthClipCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + BoundsDepthClipCheckBox.Location = new System.Drawing.Point(12, 132); + BoundsDepthClipCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BoundsDepthClipCheckBox.Name = "BoundsDepthClipCheckBox"; + BoundsDepthClipCheckBox.Size = new System.Drawing.Size(122, 19); + BoundsDepthClipCheckBox.TabIndex = 24; + BoundsDepthClipCheckBox.Text = "Bounds depth clip"; + BoundsDepthClipCheckBox.UseVisualStyleBackColor = true; + BoundsDepthClipCheckBox.CheckedChanged += BoundsDepthClipCheckBox_CheckedChanged; + // + // BoundsRangeTrackBar + // + BoundsRangeTrackBar.AutoSize = false; + BoundsRangeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + BoundsRangeTrackBar.LargeChange = 10; + BoundsRangeTrackBar.Location = new System.Drawing.Point(7, 175); + BoundsRangeTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BoundsRangeTrackBar.Maximum = 100; + BoundsRangeTrackBar.Minimum = 1; + BoundsRangeTrackBar.Name = "BoundsRangeTrackBar"; + BoundsRangeTrackBar.Size = new System.Drawing.Size(219, 38); + BoundsRangeTrackBar.TabIndex = 26; + BoundsRangeTrackBar.TickFrequency = 10; + BoundsRangeTrackBar.Value = 100; + BoundsRangeTrackBar.Scroll += BoundsRangeTrackBar_Scroll; + // + // BoundsStyleComboBox + // + BoundsStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + BoundsStyleComboBox.FormattingEnabled = true; + BoundsStyleComboBox.Items.AddRange(new object[] { "None", "Boxes", "Spheres" }); + BoundsStyleComboBox.Location = new System.Drawing.Point(93, 100); + BoundsStyleComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + BoundsStyleComboBox.Name = "BoundsStyleComboBox"; + BoundsStyleComboBox.Size = new System.Drawing.Size(132, 23); + BoundsStyleComboBox.TabIndex = 23; + BoundsStyleComboBox.SelectedIndexChanged += BoundsStyleComboBox_SelectedIndexChanged; + BoundsStyleComboBox.KeyPress += BoundsStyleComboBox_KeyPress; + // + // label8 + // + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(5, 104); + label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(77, 15); + label8.TabIndex = 22; + label8.Text = "Bounds style:"; + // + // OptionsLightingTabPage + // + OptionsLightingTabPage.Controls.Add(HDLightsCheckBox); + OptionsLightingTabPage.Controls.Add(DeferredShadingCheckBox); + OptionsLightingTabPage.Controls.Add(WeatherRegionComboBox); + OptionsLightingTabPage.Controls.Add(label29); + OptionsLightingTabPage.Controls.Add(CloudParamTrackBar); + OptionsLightingTabPage.Controls.Add(CloudParamComboBox); + OptionsLightingTabPage.Controls.Add(label23); + OptionsLightingTabPage.Controls.Add(CloudsComboBox); + OptionsLightingTabPage.Controls.Add(label21); + OptionsLightingTabPage.Controls.Add(TimeSpeedLabel); + OptionsLightingTabPage.Controls.Add(label20); + OptionsLightingTabPage.Controls.Add(TimeSpeedTrackBar); + OptionsLightingTabPage.Controls.Add(TimeStartStopButton); + OptionsLightingTabPage.Controls.Add(ArtificialAmbientLightCheckBox); + OptionsLightingTabPage.Controls.Add(NaturalAmbientLightCheckBox); + OptionsLightingTabPage.Controls.Add(LODLightsCheckBox); + OptionsLightingTabPage.Controls.Add(HDRRenderingCheckBox); + OptionsLightingTabPage.Controls.Add(ControlTimeOfDayCheckBox); + OptionsLightingTabPage.Controls.Add(TimeOfDayLabel); + OptionsLightingTabPage.Controls.Add(label19); + OptionsLightingTabPage.Controls.Add(TimeOfDayTrackBar); + OptionsLightingTabPage.Controls.Add(WeatherComboBox); + OptionsLightingTabPage.Controls.Add(label17); + OptionsLightingTabPage.Controls.Add(ControlLightDirectionCheckBox); + OptionsLightingTabPage.Controls.Add(SkydomeCheckBox); + OptionsLightingTabPage.Controls.Add(ShadowsCheckBox); + OptionsLightingTabPage.Location = new System.Drawing.Point(4, 24); + OptionsLightingTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + OptionsLightingTabPage.Name = "OptionsLightingTabPage"; + OptionsLightingTabPage.Size = new System.Drawing.Size(235, 558); + OptionsLightingTabPage.TabIndex = 2; + OptionsLightingTabPage.Text = "Lighting"; + OptionsLightingTabPage.UseVisualStyleBackColor = true; + // + // HDLightsCheckBox + // + HDLightsCheckBox.AutoSize = true; + HDLightsCheckBox.Checked = true; + HDLightsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + HDLightsCheckBox.Location = new System.Drawing.Point(12, 107); + HDLightsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDLightsCheckBox.Name = "HDLightsCheckBox"; + HDLightsCheckBox.Size = new System.Drawing.Size(75, 19); + HDLightsCheckBox.TabIndex = 34; + HDLightsCheckBox.Text = "HD lights"; + HDLightsCheckBox.UseVisualStyleBackColor = true; + HDLightsCheckBox.CheckedChanged += HDLightsCheckBox_CheckedChanged; + // + // DeferredShadingCheckBox + // + DeferredShadingCheckBox.AutoSize = true; + DeferredShadingCheckBox.Checked = true; + DeferredShadingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + DeferredShadingCheckBox.Location = new System.Drawing.Point(12, 6); + DeferredShadingCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + DeferredShadingCheckBox.Name = "DeferredShadingCheckBox"; + DeferredShadingCheckBox.Size = new System.Drawing.Size(116, 19); + DeferredShadingCheckBox.TabIndex = 30; + DeferredShadingCheckBox.Text = "Deferred shading"; + DeferredShadingCheckBox.UseVisualStyleBackColor = true; + DeferredShadingCheckBox.CheckedChanged += DeferredShadingCheckBox_CheckedChanged; + // + // WeatherRegionComboBox + // + WeatherRegionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + WeatherRegionComboBox.FormattingEnabled = true; + WeatherRegionComboBox.Items.AddRange(new object[] { "GLOBAL", "URBAN" }); + WeatherRegionComboBox.Location = new System.Drawing.Point(71, 410); + WeatherRegionComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WeatherRegionComboBox.Name = "WeatherRegionComboBox"; + WeatherRegionComboBox.Size = new System.Drawing.Size(154, 23); + WeatherRegionComboBox.TabIndex = 50; + WeatherRegionComboBox.SelectedIndexChanged += WeatherRegionComboBox_SelectedIndexChanged; + WeatherRegionComboBox.KeyPress += WeatherRegionComboBox_KeyPress; + // + // label29 + // + label29.AutoSize = true; + label29.Location = new System.Drawing.Point(5, 413); + label29.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label29.Name = "label29"; + label29.Size = new System.Drawing.Size(47, 15); + label29.TabIndex = 49; + label29.Text = "Region:"; + // + // CloudParamTrackBar + // + CloudParamTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + CloudParamTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + CloudParamTrackBar.LargeChange = 10; + CloudParamTrackBar.Location = new System.Drawing.Point(7, 503); + CloudParamTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CloudParamTrackBar.Maximum = 200; + CloudParamTrackBar.Name = "CloudParamTrackBar"; + CloudParamTrackBar.Size = new System.Drawing.Size(219, 45); + CloudParamTrackBar.TabIndex = 55; + CloudParamTrackBar.TickFrequency = 10; + CloudParamTrackBar.Value = 100; + CloudParamTrackBar.Scroll += CloudParamTrackBar_Scroll; + // + // CloudParamComboBox + // + CloudParamComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CloudParamComboBox.FormattingEnabled = true; + CloudParamComboBox.Items.AddRange(new object[] { "" }); + CloudParamComboBox.Location = new System.Drawing.Point(91, 472); + CloudParamComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CloudParamComboBox.Name = "CloudParamComboBox"; + CloudParamComboBox.Size = new System.Drawing.Size(135, 23); + CloudParamComboBox.TabIndex = 54; + CloudParamComboBox.SelectedIndexChanged += CloudParamComboBox_SelectedIndexChanged; + CloudParamComboBox.KeyPress += CloudParamComboBox_KeyPress; + // + // label23 + // + label23.AutoSize = true; + label23.Location = new System.Drawing.Point(5, 475); + label23.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label23.Name = "label23"; + label23.Size = new System.Drawing.Size(79, 15); + label23.TabIndex = 53; + label23.Text = "Cloud param:"; + // + // CloudsComboBox + // + CloudsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + CloudsComboBox.FormattingEnabled = true; + CloudsComboBox.Items.AddRange(new object[] { "" }); + CloudsComboBox.Location = new System.Drawing.Point(71, 441); + CloudsComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + CloudsComboBox.Name = "CloudsComboBox"; + CloudsComboBox.Size = new System.Drawing.Size(154, 23); + CloudsComboBox.TabIndex = 52; + CloudsComboBox.SelectedIndexChanged += CloudsComboBox_SelectedIndexChanged; + CloudsComboBox.KeyPress += CloudsComboBox_KeyPress; + // + // label21 + // + label21.AutoSize = true; + label21.Location = new System.Drawing.Point(5, 444); + label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label21.Name = "label21"; + label21.Size = new System.Drawing.Size(47, 15); + label21.TabIndex = 51; + label21.Text = "Clouds:"; + // + // TimeSpeedLabel + // + TimeSpeedLabel.AutoSize = true; + TimeSpeedLabel.Location = new System.Drawing.Point(91, 303); + TimeSpeedLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + TimeSpeedLabel.Name = "TimeSpeedLabel"; + TimeSpeedLabel.Size = new System.Drawing.Size(68, 15); + TimeSpeedLabel.TabIndex = 44; + TimeSpeedLabel.Text = "0.5 min/sec"; + // + // label20 + // + label20.AutoSize = true; + label20.Location = new System.Drawing.Point(4, 303); + label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label20.Name = "label20"; + label20.Size = new System.Drawing.Size(70, 15); + label20.TabIndex = 43; + label20.Text = "Time speed:"; + // + // TimeSpeedTrackBar + // + TimeSpeedTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + TimeSpeedTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + TimeSpeedTrackBar.Location = new System.Drawing.Point(71, 322); + TimeSpeedTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeSpeedTrackBar.Maximum = 100; + TimeSpeedTrackBar.Minimum = 40; + TimeSpeedTrackBar.Name = "TimeSpeedTrackBar"; + TimeSpeedTrackBar.Size = new System.Drawing.Size(155, 45); + TimeSpeedTrackBar.TabIndex = 46; + TimeSpeedTrackBar.TickFrequency = 5; + TimeSpeedTrackBar.Value = 50; + TimeSpeedTrackBar.Scroll += TimeSpeedTrackBar_Scroll; + // + // TimeStartStopButton + // + TimeStartStopButton.Location = new System.Drawing.Point(12, 322); + TimeStartStopButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeStartStopButton.Name = "TimeStartStopButton"; + TimeStartStopButton.Size = new System.Drawing.Size(52, 27); + TimeStartStopButton.TabIndex = 45; + TimeStartStopButton.Text = "Start"; + TimeStartStopButton.UseVisualStyleBackColor = true; + TimeStartStopButton.Click += TimeStartStopButton_Click; + // + // ArtificialAmbientLightCheckBox + // + ArtificialAmbientLightCheckBox.AutoSize = true; + ArtificialAmbientLightCheckBox.Checked = true; + ArtificialAmbientLightCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + ArtificialAmbientLightCheckBox.Location = new System.Drawing.Point(12, 158); + ArtificialAmbientLightCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ArtificialAmbientLightCheckBox.Name = "ArtificialAmbientLightCheckBox"; + ArtificialAmbientLightCheckBox.Size = new System.Drawing.Size(144, 19); + ArtificialAmbientLightCheckBox.TabIndex = 37; + ArtificialAmbientLightCheckBox.Text = "Artificial ambient light"; + ArtificialAmbientLightCheckBox.UseVisualStyleBackColor = true; + ArtificialAmbientLightCheckBox.CheckedChanged += ArtificialAmbientLightCheckBox_CheckedChanged; + // + // NaturalAmbientLightCheckBox + // + NaturalAmbientLightCheckBox.AutoSize = true; + NaturalAmbientLightCheckBox.Checked = true; + NaturalAmbientLightCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + NaturalAmbientLightCheckBox.Location = new System.Drawing.Point(12, 133); + NaturalAmbientLightCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + NaturalAmbientLightCheckBox.Name = "NaturalAmbientLightCheckBox"; + NaturalAmbientLightCheckBox.Size = new System.Drawing.Size(139, 19); + NaturalAmbientLightCheckBox.TabIndex = 36; + NaturalAmbientLightCheckBox.Text = "Natural ambient light"; + NaturalAmbientLightCheckBox.UseVisualStyleBackColor = true; + NaturalAmbientLightCheckBox.CheckedChanged += NaturalAmbientLightCheckBox_CheckedChanged; + // + // LODLightsCheckBox + // + LODLightsCheckBox.AutoSize = true; + LODLightsCheckBox.Checked = true; + LODLightsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + LODLightsCheckBox.Location = new System.Drawing.Point(104, 107); + LODLightsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + LODLightsCheckBox.Name = "LODLightsCheckBox"; + LODLightsCheckBox.Size = new System.Drawing.Size(81, 19); + LODLightsCheckBox.TabIndex = 35; + LODLightsCheckBox.Text = "LOD lights"; + LODLightsCheckBox.UseVisualStyleBackColor = true; + LODLightsCheckBox.CheckedChanged += LODLightsCheckBox_CheckedChanged; + // + // HDRRenderingCheckBox + // + HDRRenderingCheckBox.AutoSize = true; + HDRRenderingCheckBox.Checked = true; + HDRRenderingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + HDRRenderingCheckBox.Location = new System.Drawing.Point(12, 31); + HDRRenderingCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + HDRRenderingCheckBox.Name = "HDRRenderingCheckBox"; + HDRRenderingCheckBox.Size = new System.Drawing.Size(104, 19); + HDRRenderingCheckBox.TabIndex = 31; + HDRRenderingCheckBox.Text = "HDR rendering"; + HDRRenderingCheckBox.UseVisualStyleBackColor = true; + HDRRenderingCheckBox.CheckedChanged += HDRRenderingCheckBox_CheckedChanged; + // + // ControlTimeOfDayCheckBox + // + ControlTimeOfDayCheckBox.AutoSize = true; + ControlTimeOfDayCheckBox.Checked = true; + ControlTimeOfDayCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + ControlTimeOfDayCheckBox.Location = new System.Drawing.Point(12, 209); + ControlTimeOfDayCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ControlTimeOfDayCheckBox.Name = "ControlTimeOfDayCheckBox"; + ControlTimeOfDayCheckBox.Size = new System.Drawing.Size(194, 19); + ControlTimeOfDayCheckBox.TabIndex = 39; + ControlTimeOfDayCheckBox.Text = "Control time of day (right-drag)"; + ControlTimeOfDayCheckBox.UseVisualStyleBackColor = true; + ControlTimeOfDayCheckBox.CheckedChanged += ControlTimeOfDayCheckBox_CheckedChanged; + // + // TimeOfDayLabel + // + TimeOfDayLabel.AutoSize = true; + TimeOfDayLabel.Location = new System.Drawing.Point(88, 240); + TimeOfDayLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + TimeOfDayLabel.Name = "TimeOfDayLabel"; + TimeOfDayLabel.Size = new System.Drawing.Size(34, 15); + TimeOfDayLabel.TabIndex = 41; + TimeOfDayLabel.Text = "12:00"; + // + // label19 + // + label19.AutoSize = true; + label19.Location = new System.Drawing.Point(5, 240); + label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label19.Name = "label19"; + label19.Size = new System.Drawing.Size(72, 15); + label19.TabIndex = 40; + label19.Text = "Time of day:"; + // + // TimeOfDayTrackBar + // + TimeOfDayTrackBar.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + TimeOfDayTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + TimeOfDayTrackBar.LargeChange = 60; + TimeOfDayTrackBar.Location = new System.Drawing.Point(7, 258); + TimeOfDayTrackBar.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + TimeOfDayTrackBar.Maximum = 1440; + TimeOfDayTrackBar.Name = "TimeOfDayTrackBar"; + TimeOfDayTrackBar.Size = new System.Drawing.Size(219, 45); + TimeOfDayTrackBar.TabIndex = 42; + TimeOfDayTrackBar.TickFrequency = 60; + TimeOfDayTrackBar.Value = 720; + TimeOfDayTrackBar.Scroll += TimeOfDayTrackBar_Scroll; + // + // WeatherComboBox + // + WeatherComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + WeatherComboBox.FormattingEnabled = true; + WeatherComboBox.Items.AddRange(new object[] { "" }); + WeatherComboBox.Location = new System.Drawing.Point(71, 378); + WeatherComboBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + WeatherComboBox.Name = "WeatherComboBox"; + WeatherComboBox.Size = new System.Drawing.Size(154, 23); + WeatherComboBox.TabIndex = 48; + WeatherComboBox.SelectedIndexChanged += WeatherComboBox_SelectedIndexChanged; + WeatherComboBox.KeyPress += WeatherComboBox_KeyPress; + // + // label17 + // + label17.AutoSize = true; + label17.Location = new System.Drawing.Point(5, 382); + label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label17.Name = "label17"; + label17.Size = new System.Drawing.Size(54, 15); + label17.TabIndex = 47; + label17.Text = "Weather:"; + // + // ControlLightDirectionCheckBox + // + ControlLightDirectionCheckBox.AutoSize = true; + ControlLightDirectionCheckBox.Location = new System.Drawing.Point(12, 183); + ControlLightDirectionCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ControlLightDirectionCheckBox.Name = "ControlLightDirectionCheckBox"; + ControlLightDirectionCheckBox.Size = new System.Drawing.Size(208, 19); + ControlLightDirectionCheckBox.TabIndex = 38; + ControlLightDirectionCheckBox.Text = "Control light direction (right-drag)"; + ControlLightDirectionCheckBox.UseVisualStyleBackColor = true; + ControlLightDirectionCheckBox.CheckedChanged += ControlLightDirectionCheckBox_CheckedChanged; + // + // SkydomeCheckBox + // + SkydomeCheckBox.AutoSize = true; + SkydomeCheckBox.Checked = true; + SkydomeCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + SkydomeCheckBox.Location = new System.Drawing.Point(12, 82); + SkydomeCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SkydomeCheckBox.Name = "SkydomeCheckBox"; + SkydomeCheckBox.Size = new System.Drawing.Size(75, 19); + SkydomeCheckBox.TabIndex = 33; + SkydomeCheckBox.Text = "Skydome"; + SkydomeCheckBox.UseVisualStyleBackColor = true; + SkydomeCheckBox.CheckedChanged += SkydomeCheckbox_CheckedChanged; + // + // ShadowsCheckBox + // + ShadowsCheckBox.AutoSize = true; + ShadowsCheckBox.Location = new System.Drawing.Point(12, 57); + ShadowsCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ShadowsCheckBox.Name = "ShadowsCheckBox"; + ShadowsCheckBox.Size = new System.Drawing.Size(73, 19); + ShadowsCheckBox.TabIndex = 32; + ShadowsCheckBox.Text = "Shadows"; + ShadowsCheckBox.UseVisualStyleBackColor = true; + ShadowsCheckBox.CheckedChanged += ShadowsCheckBox_CheckedChanged; + // + // StatusBarCheckBox + // + StatusBarCheckBox.AutoSize = true; + StatusBarCheckBox.Checked = true; + StatusBarCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + StatusBarCheckBox.Location = new System.Drawing.Point(139, 597); + StatusBarCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + StatusBarCheckBox.Name = "StatusBarCheckBox"; + StatusBarCheckBox.Size = new System.Drawing.Size(78, 19); + StatusBarCheckBox.TabIndex = 145; + StatusBarCheckBox.Text = "Status bar"; + StatusBarCheckBox.UseVisualStyleBackColor = true; + StatusBarCheckBox.CheckedChanged += StatusBarCheckBox_CheckedChanged; + // + // QuitButton + // + QuitButton.Location = new System.Drawing.Point(122, 657); + QuitButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + QuitButton.Name = "QuitButton"; + QuitButton.Size = new System.Drawing.Size(108, 27); + QuitButton.TabIndex = 149; + QuitButton.Text = "Quit"; + QuitButton.UseVisualStyleBackColor = true; + QuitButton.Click += QuitButton_Click; + // + // ReloadSettingsButton + // + ReloadSettingsButton.Enabled = false; + ReloadSettingsButton.Location = new System.Drawing.Point(7, 623); + ReloadSettingsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ReloadSettingsButton.Name = "ReloadSettingsButton"; + ReloadSettingsButton.Size = new System.Drawing.Size(108, 27); + ReloadSettingsButton.TabIndex = 146; + ReloadSettingsButton.Text = "Reload settings"; + ReloadSettingsButton.UseVisualStyleBackColor = true; + ReloadSettingsButton.Visible = false; + ReloadSettingsButton.Click += ReloadSettingsButton_Click; + // + // SaveSettingsButton + // + SaveSettingsButton.Location = new System.Drawing.Point(122, 623); + SaveSettingsButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SaveSettingsButton.Name = "SaveSettingsButton"; + SaveSettingsButton.Size = new System.Drawing.Size(108, 27); + SaveSettingsButton.TabIndex = 147; + SaveSettingsButton.Text = "Save settings"; + SaveSettingsButton.UseVisualStyleBackColor = true; + SaveSettingsButton.Click += SaveSettingsButton_Click; + // + // ReloadShadersButton + // + ReloadShadersButton.Location = new System.Drawing.Point(7, 657); + ReloadShadersButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ReloadShadersButton.Name = "ReloadShadersButton"; + ReloadShadersButton.Size = new System.Drawing.Size(108, 27); + ReloadShadersButton.TabIndex = 148; + ReloadShadersButton.Text = "Reload shaders"; + ReloadShadersButton.UseVisualStyleBackColor = true; + ReloadShadersButton.Click += ReloadShadersButton_Click; + // + // ErrorConsoleCheckBox + // + ErrorConsoleCheckBox.AutoSize = true; + ErrorConsoleCheckBox.Location = new System.Drawing.Point(16, 597); + ErrorConsoleCheckBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ErrorConsoleCheckBox.Name = "ErrorConsoleCheckBox"; + ErrorConsoleCheckBox.Size = new System.Drawing.Size(95, 19); + ErrorConsoleCheckBox.TabIndex = 144; + ErrorConsoleCheckBox.Text = "Error console"; + ErrorConsoleCheckBox.UseVisualStyleBackColor = true; + ErrorConsoleCheckBox.CheckedChanged += ErrorConsoleCheckBox_CheckedChanged; + // + // ToolsPanelHideButton + // + ToolsPanelHideButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + ToolsPanelHideButton.Location = new System.Drawing.Point(216, 3); + ToolsPanelHideButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanelHideButton.Name = "ToolsPanelHideButton"; + ToolsPanelHideButton.Size = new System.Drawing.Size(35, 27); + ToolsPanelHideButton.TabIndex = 4; + ToolsPanelHideButton.Text = ">>"; + ToolsPanelHideButton.UseVisualStyleBackColor = true; + ToolsPanelHideButton.Click += ToolsPanelHideButton_Click; + // + // ToolsPanelShowButton + // + ToolsPanelShowButton.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right; + ToolsPanelShowButton.Location = new System.Drawing.Point(1096, 17); + ToolsPanelShowButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolsPanelShowButton.Name = "ToolsPanelShowButton"; + ToolsPanelShowButton.Size = new System.Drawing.Size(35, 27); + ToolsPanelShowButton.TabIndex = 0; + ToolsPanelShowButton.Text = "<<"; + ToolsPanelShowButton.UseVisualStyleBackColor = true; + ToolsPanelShowButton.Click += ToolsPanelShowButton_Click; + // + // ConsolePanel + // + ConsolePanel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ConsolePanel.BackColor = System.Drawing.SystemColors.Control; + ConsolePanel.Controls.Add(ConsoleTextBox); + ConsolePanel.Location = new System.Drawing.Point(14, 665); + ConsolePanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ConsolePanel.Name = "ConsolePanel"; + ConsolePanel.Size = new System.Drawing.Size(859, 117); + ConsolePanel.TabIndex = 3; + ConsolePanel.Visible = false; + // + // ConsoleTextBox + // + ConsoleTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ConsoleTextBox.Location = new System.Drawing.Point(4, 3); + ConsoleTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ConsoleTextBox.Multiline = true; + ConsoleTextBox.Name = "ConsoleTextBox"; + ConsoleTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + ConsoleTextBox.Size = new System.Drawing.Size(851, 109); + ConsoleTextBox.TabIndex = 0; + // + // StatsUpdateTimer + // + StatsUpdateTimer.Enabled = true; + StatsUpdateTimer.Interval = 500; + StatsUpdateTimer.Tick += StatsUpdateTimer_Tick; + // + // SelectedMarkerPanel + // + SelectedMarkerPanel.BackColor = System.Drawing.Color.White; + SelectedMarkerPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + SelectedMarkerPanel.Controls.Add(SelectedMarkerPositionTextBox); + SelectedMarkerPanel.Controls.Add(SelectedMarkerNameTextBox); + SelectedMarkerPanel.Location = new System.Drawing.Point(14, 74); + SelectedMarkerPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectedMarkerPanel.Name = "SelectedMarkerPanel"; + SelectedMarkerPanel.Size = new System.Drawing.Size(210, 48); + SelectedMarkerPanel.TabIndex = 5; + SelectedMarkerPanel.Visible = false; + // + // SelectedMarkerPositionTextBox + // + SelectedMarkerPositionTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelectedMarkerPositionTextBox.BackColor = System.Drawing.Color.White; + SelectedMarkerPositionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + SelectedMarkerPositionTextBox.Location = new System.Drawing.Point(4, 25); + SelectedMarkerPositionTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectedMarkerPositionTextBox.Name = "SelectedMarkerPositionTextBox"; + SelectedMarkerPositionTextBox.ReadOnly = true; + SelectedMarkerPositionTextBox.Size = new System.Drawing.Size(201, 16); + SelectedMarkerPositionTextBox.TabIndex = 1; + // + // SelectedMarkerNameTextBox + // + SelectedMarkerNameTextBox.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + SelectedMarkerNameTextBox.BackColor = System.Drawing.Color.White; + SelectedMarkerNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + SelectedMarkerNameTextBox.Location = new System.Drawing.Point(4, 3); + SelectedMarkerNameTextBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + SelectedMarkerNameTextBox.Name = "SelectedMarkerNameTextBox"; + SelectedMarkerNameTextBox.ReadOnly = true; + SelectedMarkerNameTextBox.Size = new System.Drawing.Size(201, 16); + SelectedMarkerNameTextBox.TabIndex = 0; + // + // ToolsMenu + // + ToolsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolsMenuRPFBrowser, ToolsMenuRPFExplorer, ToolsMenuSelectionInfo, ToolsMenuProjectWindow, ToolsMenuCutsceneViewer, ToolsMenuAudioExplorer, ToolsMenuWorldSearch, ToolsMenuBinarySearch, ToolsMenuJenkGen, ToolsMenuJenkInd, ToolsMenuExtractScripts, ToolsMenuExtractTextures, ToolsMenuExtractRawFiles, ToolsMenuExtractShaders, ToolsMenuOptions }); + ToolsMenu.Name = "ToolsMenu"; + ToolsMenu.Size = new System.Drawing.Size(170, 334); + // + // ToolsMenuRPFBrowser + // + ToolsMenuRPFBrowser.Name = "ToolsMenuRPFBrowser"; + ToolsMenuRPFBrowser.Size = new System.Drawing.Size(169, 22); + ToolsMenuRPFBrowser.Text = "RPF Browser..."; + ToolsMenuRPFBrowser.Visible = false; + ToolsMenuRPFBrowser.Click += ToolsMenuRPFBrowser_Click; + // + // ToolsMenuRPFExplorer + // + ToolsMenuRPFExplorer.Name = "ToolsMenuRPFExplorer"; + ToolsMenuRPFExplorer.Size = new System.Drawing.Size(169, 22); + ToolsMenuRPFExplorer.Text = "RPF Explorer..."; + ToolsMenuRPFExplorer.Click += ToolsMenuRPFExplorer_Click; + // + // ToolsMenuSelectionInfo + // + ToolsMenuSelectionInfo.Name = "ToolsMenuSelectionInfo"; + ToolsMenuSelectionInfo.Size = new System.Drawing.Size(169, 22); + ToolsMenuSelectionInfo.Text = "Selection info..."; + ToolsMenuSelectionInfo.Click += ToolsMenuSelectionInfo_Click; + // + // ToolsMenuProjectWindow + // + ToolsMenuProjectWindow.Enabled = false; + ToolsMenuProjectWindow.Name = "ToolsMenuProjectWindow"; + ToolsMenuProjectWindow.Size = new System.Drawing.Size(169, 22); + ToolsMenuProjectWindow.Text = "Project window..."; + ToolsMenuProjectWindow.Click += ToolsMenuProjectWindow_Click; + // + // ToolsMenuCutsceneViewer + // + ToolsMenuCutsceneViewer.Enabled = false; + ToolsMenuCutsceneViewer.Name = "ToolsMenuCutsceneViewer"; + ToolsMenuCutsceneViewer.Size = new System.Drawing.Size(169, 22); + ToolsMenuCutsceneViewer.Text = "Cutscene viewer..."; + ToolsMenuCutsceneViewer.Click += ToolsMenuCutsceneViewer_Click; + // + // ToolsMenuAudioExplorer + // + ToolsMenuAudioExplorer.Enabled = false; + ToolsMenuAudioExplorer.Name = "ToolsMenuAudioExplorer"; + ToolsMenuAudioExplorer.Size = new System.Drawing.Size(169, 22); + ToolsMenuAudioExplorer.Text = "Audio explorer..."; + ToolsMenuAudioExplorer.Click += ToolsMenuAudioExplorer_Click; + // + // ToolsMenuWorldSearch + // + ToolsMenuWorldSearch.Name = "ToolsMenuWorldSearch"; + ToolsMenuWorldSearch.Size = new System.Drawing.Size(169, 22); + ToolsMenuWorldSearch.Text = "World search..."; + ToolsMenuWorldSearch.Click += ToolsMenuWorldSearch_Click; + // + // ToolsMenuBinarySearch + // + ToolsMenuBinarySearch.Enabled = false; + ToolsMenuBinarySearch.Name = "ToolsMenuBinarySearch"; + ToolsMenuBinarySearch.Size = new System.Drawing.Size(169, 22); + ToolsMenuBinarySearch.Text = "Binary search..."; + ToolsMenuBinarySearch.Click += ToolsMenuBinarySearch_Click; + // + // ToolsMenuJenkGen + // + ToolsMenuJenkGen.Name = "ToolsMenuJenkGen"; + ToolsMenuJenkGen.Size = new System.Drawing.Size(169, 22); + ToolsMenuJenkGen.Text = "JenkGen..."; + ToolsMenuJenkGen.Click += ToolsMenuJenkGen_Click; + // + // ToolsMenuJenkInd + // + ToolsMenuJenkInd.Enabled = false; + ToolsMenuJenkInd.Name = "ToolsMenuJenkInd"; + ToolsMenuJenkInd.Size = new System.Drawing.Size(169, 22); + ToolsMenuJenkInd.Text = "JenkInd..."; + ToolsMenuJenkInd.Click += ToolsMenuJenkInd_Click; + // + // ToolsMenuExtractScripts + // + ToolsMenuExtractScripts.Name = "ToolsMenuExtractScripts"; + ToolsMenuExtractScripts.Size = new System.Drawing.Size(169, 22); + ToolsMenuExtractScripts.Text = "Extract scripts..."; + ToolsMenuExtractScripts.Click += ToolsMenuExtractScripts_Click; + // + // ToolsMenuExtractTextures + // + ToolsMenuExtractTextures.Name = "ToolsMenuExtractTextures"; + ToolsMenuExtractTextures.Size = new System.Drawing.Size(169, 22); + ToolsMenuExtractTextures.Text = "Extract textures..."; + ToolsMenuExtractTextures.Click += ToolsMenuExtractTextures_Click; + // + // ToolsMenuExtractRawFiles + // + ToolsMenuExtractRawFiles.Name = "ToolsMenuExtractRawFiles"; + ToolsMenuExtractRawFiles.Size = new System.Drawing.Size(169, 22); + ToolsMenuExtractRawFiles.Text = "Extract raw files..."; + ToolsMenuExtractRawFiles.Click += ToolsMenuExtractRawFiles_Click; + // + // ToolsMenuExtractShaders + // + ToolsMenuExtractShaders.Name = "ToolsMenuExtractShaders"; + ToolsMenuExtractShaders.Size = new System.Drawing.Size(169, 22); + ToolsMenuExtractShaders.Text = "Extract shaders..."; + ToolsMenuExtractShaders.Click += ToolsMenuExtractShaders_Click; + // + // ToolsMenuOptions + // + ToolsMenuOptions.Name = "ToolsMenuOptions"; + ToolsMenuOptions.Size = new System.Drawing.Size(169, 22); + ToolsMenuOptions.Text = "Options..."; + ToolsMenuOptions.Click += ToolsMenuOptions_Click; + // + // Toolbar + // + Toolbar.Dock = System.Windows.Forms.DockStyle.None; + Toolbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + Toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarNewButton, ToolbarOpenButton, ToolbarSaveButton, ToolbarSaveAllButton, toolStripSeparator5, ToolbarSelectButton, toolStripSeparator1, ToolbarMoveButton, ToolbarRotateButton, ToolbarScaleButton, ToolbarTransformSpaceButton, ToolbarSnapButton, toolStripSeparator2, ToolbarUndoButton, ToolbarRedoButton, toolStripSeparator3, ToolbarInfoWindowButton, ToolbarProjectWindowButton, toolStripSeparator4, ToolbarAddItemButton, ToolbarDeleteItemButton, toolStripSeparator6, ToolbarCopyButton, ToolbarPasteButton, toolStripSeparator7, ToolbarCameraModeButton }); + Toolbar.Location = new System.Drawing.Point(1, 0); + Toolbar.Name = "Toolbar"; + Toolbar.Size = new System.Drawing.Size(554, 25); + Toolbar.TabIndex = 6; + Toolbar.Text = "toolStrip1"; + // + // ToolbarNewButton + // + ToolbarNewButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarNewButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarNewProjectButton, ToolbarNewYmapButton, ToolbarNewYtypButton, ToolbarNewYbnButton, ToolbarNewYndButton, ToolbarNewTrainsButton, ToolbarNewScenarioButton }); + ToolbarNewButton.Enabled = false; + ToolbarNewButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarNewButton.Image"); + ToolbarNewButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarNewButton.Name = "ToolbarNewButton"; + ToolbarNewButton.Size = new System.Drawing.Size(32, 22); + ToolbarNewButton.Text = "New..."; + ToolbarNewButton.ToolTipText = "New... (Ctrl+N)"; + ToolbarNewButton.ButtonClick += ToolbarNewButton_ButtonClick; + // + // ToolbarNewProjectButton + // + ToolbarNewProjectButton.Name = "ToolbarNewProjectButton"; + ToolbarNewProjectButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewProjectButton.Text = "New Project"; + ToolbarNewProjectButton.Click += ToolbarNewProjectButton_Click; + // + // ToolbarNewYmapButton + // + ToolbarNewYmapButton.Name = "ToolbarNewYmapButton"; + ToolbarNewYmapButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewYmapButton.Text = "New Ymap File"; + ToolbarNewYmapButton.Click += ToolbarNewYmapButton_Click; + // + // ToolbarNewYtypButton + // + ToolbarNewYtypButton.Name = "ToolbarNewYtypButton"; + ToolbarNewYtypButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewYtypButton.Text = "New Ytyp File"; + ToolbarNewYtypButton.Click += ToolbarNewYtypButton_Click; + // + // ToolbarNewYbnButton + // + ToolbarNewYbnButton.Name = "ToolbarNewYbnButton"; + ToolbarNewYbnButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewYbnButton.Text = "New Ybn File"; + ToolbarNewYbnButton.Click += ToolbarNewYbnButton_Click; + // + // ToolbarNewYndButton + // + ToolbarNewYndButton.Name = "ToolbarNewYndButton"; + ToolbarNewYndButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewYndButton.Text = "New Ynd File"; + ToolbarNewYndButton.Click += ToolbarNewYndButton_Click; + // + // ToolbarNewTrainsButton + // + ToolbarNewTrainsButton.Name = "ToolbarNewTrainsButton"; + ToolbarNewTrainsButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewTrainsButton.Text = "New Trains File"; + ToolbarNewTrainsButton.Click += ToolbarNewTrainsButton_Click; + // + // ToolbarNewScenarioButton + // + ToolbarNewScenarioButton.Name = "ToolbarNewScenarioButton"; + ToolbarNewScenarioButton.Size = new System.Drawing.Size(167, 22); + ToolbarNewScenarioButton.Text = "New Scenario File"; + ToolbarNewScenarioButton.Click += ToolbarNewScenarioButton_Click; + // + // ToolbarOpenButton + // + ToolbarOpenButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarOpenButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarOpenProjectButton, ToolbarOpenFilesButton, ToolbarOpenFolderButton }); + ToolbarOpenButton.Enabled = false; + ToolbarOpenButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarOpenButton.Image"); + ToolbarOpenButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarOpenButton.Name = "ToolbarOpenButton"; + ToolbarOpenButton.Size = new System.Drawing.Size(32, 22); + ToolbarOpenButton.Text = "Open..."; + ToolbarOpenButton.ToolTipText = "Open... (Ctrl+O)"; + ToolbarOpenButton.ButtonClick += ToolbarOpenButton_ButtonClick; + // + // ToolbarOpenProjectButton + // + ToolbarOpenProjectButton.Name = "ToolbarOpenProjectButton"; + ToolbarOpenProjectButton.Size = new System.Drawing.Size(152, 22); + ToolbarOpenProjectButton.Text = "Open Project..."; + ToolbarOpenProjectButton.Click += ToolbarOpenProjectButton_Click; + // + // ToolbarOpenFilesButton + // + ToolbarOpenFilesButton.Name = "ToolbarOpenFilesButton"; + ToolbarOpenFilesButton.Size = new System.Drawing.Size(152, 22); + ToolbarOpenFilesButton.Text = "Open Files..."; + ToolbarOpenFilesButton.Click += ToolbarOpenFilesButton_Click; + // + // ToolbarOpenFolderButton + // + ToolbarOpenFolderButton.Name = "ToolbarOpenFolderButton"; + ToolbarOpenFolderButton.Size = new System.Drawing.Size(152, 22); + ToolbarOpenFolderButton.Text = "Open Folder..."; + ToolbarOpenFolderButton.Click += ToolbarOpenFolderButton_Click; + // + // ToolbarSaveButton + // + ToolbarSaveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarSaveButton.Enabled = false; + ToolbarSaveButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSaveButton.Image"); + ToolbarSaveButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarSaveButton.Name = "ToolbarSaveButton"; + ToolbarSaveButton.Size = new System.Drawing.Size(23, 22); + ToolbarSaveButton.Text = "Save"; + ToolbarSaveButton.ToolTipText = "Save (Ctrl+S)"; + ToolbarSaveButton.Click += ToolbarSaveButton_Click; + // + // ToolbarSaveAllButton + // + ToolbarSaveAllButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarSaveAllButton.Enabled = false; + ToolbarSaveAllButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSaveAllButton.Image"); + ToolbarSaveAllButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarSaveAllButton.Name = "ToolbarSaveAllButton"; + ToolbarSaveAllButton.Size = new System.Drawing.Size(23, 22); + ToolbarSaveAllButton.Text = "Save All"; + ToolbarSaveAllButton.ToolTipText = "Save All (Ctrl+Shift+S)"; + ToolbarSaveAllButton.Click += ToolbarSaveAllButton_Click; + // + // toolStripSeparator5 + // + toolStripSeparator5.Name = "toolStripSeparator5"; + toolStripSeparator5.Size = new System.Drawing.Size(6, 25); + // + // ToolbarSelectButton + // + ToolbarSelectButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarSelectButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarSelectEntityButton, ToolbarSelectEntityExtensionButton, ToolbarSelectArchetypeExtensionButton, ToolbarSelectTimeCycleModifierButton, ToolbarSelectCarGeneratorButton, ToolbarSelectGrassButton, ToolbarSelectWaterQuadButton, ToolbarSelectCalmingQuadButton, ToolbarSelectWaveQuadButton, ToolbarSelectCollisionButton, ToolbarSelectNavMeshButton, ToolbarSelectPathButton, ToolbarSelectTrainTrackButton, ToolbarSelectLodLightsButton, ToolbarSelectMloInstanceButton, ToolbarSelectScenarioButton, ToolbarSelectAudioButton, ToolbarSelectOcclusionButton }); + ToolbarSelectButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSelectButton.Image"); + ToolbarSelectButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarSelectButton.Name = "ToolbarSelectButton"; + ToolbarSelectButton.Size = new System.Drawing.Size(32, 22); + ToolbarSelectButton.Text = "Select objects / Exit edit mode"; + ToolbarSelectButton.ToolTipText = "Select objects / Exit edit mode (C, Q)"; + ToolbarSelectButton.ButtonClick += ToolbarSelectButton_ButtonClick; + // + // ToolbarSelectEntityButton + // + ToolbarSelectEntityButton.Checked = true; + ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked; + ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton"; + ToolbarSelectEntityButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectEntityButton.Text = "Entity"; + ToolbarSelectEntityButton.Click += ToolbarSelectEntityButton_Click; + // + // ToolbarSelectEntityExtensionButton + // + ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton"; + ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectEntityExtensionButton.Text = "Entity Extension"; + ToolbarSelectEntityExtensionButton.Click += ToolbarSelectEntityExtensionButton_Click; + // + // ToolbarSelectArchetypeExtensionButton + // + ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton"; + ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension"; + ToolbarSelectArchetypeExtensionButton.Click += ToolbarSelectArchetypeExtensionButton_Click; + // + // ToolbarSelectTimeCycleModifierButton + // + ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton"; + ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier"; + ToolbarSelectTimeCycleModifierButton.Click += ToolbarSelectTimeCycleModifierButton_Click; + // + // ToolbarSelectCarGeneratorButton + // + ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton"; + ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectCarGeneratorButton.Text = "Car Generator"; + ToolbarSelectCarGeneratorButton.Click += ToolbarSelectCarGeneratorButton_Click; + // + // ToolbarSelectGrassButton + // + ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton"; + ToolbarSelectGrassButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectGrassButton.Text = "Grass"; + ToolbarSelectGrassButton.Click += ToolbarSelectGrassButton_Click; + // + // ToolbarSelectWaterQuadButton + // + ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton"; + ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectWaterQuadButton.Text = "Water Quad"; + ToolbarSelectWaterQuadButton.Click += ToolbarSelectWaterQuadButton_Click; + // + // ToolbarSelectCalmingQuadButton + // + ToolbarSelectCalmingQuadButton.Name = "ToolbarSelectCalmingQuadButton"; + ToolbarSelectCalmingQuadButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectCalmingQuadButton.Text = "Water Calming Quad"; + ToolbarSelectCalmingQuadButton.Click += ToolbarSelectCalmingQuadButton_Click; + // + // ToolbarSelectWaveQuadButton + // + ToolbarSelectWaveQuadButton.Name = "ToolbarSelectWaveQuadButton"; + ToolbarSelectWaveQuadButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectWaveQuadButton.Text = "Water Wave Quad"; + ToolbarSelectWaveQuadButton.Click += ToolbarSelectWaveQuadButton_Click; + // + // ToolbarSelectCollisionButton + // + ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton"; + ToolbarSelectCollisionButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectCollisionButton.Text = "Collision"; + ToolbarSelectCollisionButton.Click += ToolbarSelectCollisionButton_Click; + // + // ToolbarSelectNavMeshButton + // + ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton"; + ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectNavMeshButton.Text = "Nav Mesh"; + ToolbarSelectNavMeshButton.Click += ToolbarSelectNavMeshButton_Click; + // + // ToolbarSelectPathButton + // + ToolbarSelectPathButton.Name = "ToolbarSelectPathButton"; + ToolbarSelectPathButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectPathButton.Text = "Traffic Path"; + ToolbarSelectPathButton.Click += ToolbarSelectPathButton_Click; + // + // ToolbarSelectTrainTrackButton + // + ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton"; + ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectTrainTrackButton.Text = "Train Track"; + ToolbarSelectTrainTrackButton.Click += ToolbarSelectTrainTrackButton_Click; + // + // ToolbarSelectLodLightsButton + // + ToolbarSelectLodLightsButton.Name = "ToolbarSelectLodLightsButton"; + ToolbarSelectLodLightsButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectLodLightsButton.Text = "Lod Lights"; + ToolbarSelectLodLightsButton.Click += ToolbarSelectLodLightsButton_Click; + // + // ToolbarSelectMloInstanceButton + // + ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton"; + ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectMloInstanceButton.Text = "Interior Instance"; + ToolbarSelectMloInstanceButton.Click += ToolbarSelectMloInstanceButton_Click; + // + // ToolbarSelectScenarioButton + // + ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton"; + ToolbarSelectScenarioButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectScenarioButton.Text = "Scenario"; + ToolbarSelectScenarioButton.Click += ToolbarSelectScenarioButton_Click; + // + // ToolbarSelectAudioButton + // + ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton"; + ToolbarSelectAudioButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectAudioButton.Text = "Audio"; + ToolbarSelectAudioButton.Click += ToolbarSelectAudioButton_Click; + // + // ToolbarSelectOcclusionButton + // + ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton"; + ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(185, 22); + ToolbarSelectOcclusionButton.Text = "Occlusion"; + ToolbarSelectOcclusionButton.Click += ToolbarSelectOcclusionButton_Click; + // + // toolStripSeparator1 + // + toolStripSeparator1.Name = "toolStripSeparator1"; + toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // ToolbarMoveButton + // + ToolbarMoveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarMoveButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarMoveButton.Image"); + ToolbarMoveButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarMoveButton.Name = "ToolbarMoveButton"; + ToolbarMoveButton.Size = new System.Drawing.Size(23, 22); + ToolbarMoveButton.Text = "Move"; + ToolbarMoveButton.ToolTipText = "Move (W)"; + ToolbarMoveButton.Click += ToolbarMoveButton_Click; + // + // ToolbarRotateButton + // + ToolbarRotateButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarRotateButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarRotateButton.Image"); + ToolbarRotateButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarRotateButton.Name = "ToolbarRotateButton"; + ToolbarRotateButton.Size = new System.Drawing.Size(23, 22); + ToolbarRotateButton.Text = "Rotate"; + ToolbarRotateButton.ToolTipText = "Rotate (E)"; + ToolbarRotateButton.Click += ToolbarRotateButton_Click; + // + // ToolbarScaleButton + // + ToolbarScaleButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarScaleButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarScaleButton.Image"); + ToolbarScaleButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarScaleButton.Name = "ToolbarScaleButton"; + ToolbarScaleButton.Size = new System.Drawing.Size(23, 22); + ToolbarScaleButton.Text = "Scale"; + ToolbarScaleButton.ToolTipText = "Scale (R)"; + ToolbarScaleButton.Click += ToolbarScaleButton_Click; + // + // ToolbarTransformSpaceButton + // + ToolbarTransformSpaceButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarTransformSpaceButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarObjectSpaceButton, ToolbarWorldSpaceButton }); + ToolbarTransformSpaceButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarTransformSpaceButton.Image"); + ToolbarTransformSpaceButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarTransformSpaceButton.Name = "ToolbarTransformSpaceButton"; + ToolbarTransformSpaceButton.Size = new System.Drawing.Size(32, 22); + ToolbarTransformSpaceButton.Text = "Toggle transform space"; + ToolbarTransformSpaceButton.ButtonClick += ToolbarTransformSpaceButton_ButtonClick; + // + // ToolbarObjectSpaceButton + // + ToolbarObjectSpaceButton.Checked = true; + ToolbarObjectSpaceButton.CheckState = System.Windows.Forms.CheckState.Checked; + ToolbarObjectSpaceButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarObjectSpaceButton.Image"); + ToolbarObjectSpaceButton.Name = "ToolbarObjectSpaceButton"; + ToolbarObjectSpaceButton.Size = new System.Drawing.Size(142, 22); + ToolbarObjectSpaceButton.Text = "Object space"; + ToolbarObjectSpaceButton.Click += ToolbarObjectSpaceButton_Click; + // + // ToolbarWorldSpaceButton + // + ToolbarWorldSpaceButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarWorldSpaceButton.Image"); + ToolbarWorldSpaceButton.Name = "ToolbarWorldSpaceButton"; + ToolbarWorldSpaceButton.Size = new System.Drawing.Size(142, 22); + ToolbarWorldSpaceButton.Text = "World space"; + ToolbarWorldSpaceButton.Click += ToolbarWorldSpaceButton_Click; + // + // ToolbarSnapButton + // + ToolbarSnapButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarSnapButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarSnapToGroundButton, ToolbarSnapToGridButton, ToolbarSnapToGroundGridButton, ToolbarSnapGridSizeButton, ToolbarRotationSnappingButton }); + ToolbarSnapButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSnapButton.Image"); + ToolbarSnapButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarSnapButton.Name = "ToolbarSnapButton"; + ToolbarSnapButton.Size = new System.Drawing.Size(32, 22); + ToolbarSnapButton.Text = "Snap to Ground"; + ToolbarSnapButton.ToolTipText = "Snap to Ground"; + ToolbarSnapButton.ButtonClick += ToolbarSnapButton_ButtonClick; + // + // ToolbarSnapToGroundButton + // + ToolbarSnapToGroundButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSnapToGroundButton.Image"); + ToolbarSnapToGroundButton.Name = "ToolbarSnapToGroundButton"; + ToolbarSnapToGroundButton.Size = new System.Drawing.Size(205, 22); + ToolbarSnapToGroundButton.Text = "Snap to Ground"; + ToolbarSnapToGroundButton.Click += ToolbarSnapToGroundButton_Click; + // + // ToolbarSnapToGridButton + // + ToolbarSnapToGridButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSnapToGridButton.Image"); + ToolbarSnapToGridButton.Name = "ToolbarSnapToGridButton"; + ToolbarSnapToGridButton.Size = new System.Drawing.Size(205, 22); + ToolbarSnapToGridButton.Text = "Snap to Grid"; + ToolbarSnapToGridButton.Click += ToolbarSnapToGridButton_Click; + // + // ToolbarSnapToGroundGridButton + // + ToolbarSnapToGroundGridButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarSnapToGroundGridButton.Image"); + ToolbarSnapToGroundGridButton.Name = "ToolbarSnapToGroundGridButton"; + ToolbarSnapToGroundGridButton.Size = new System.Drawing.Size(205, 22); + ToolbarSnapToGroundGridButton.Text = "Snap to Grid and Ground"; + ToolbarSnapToGroundGridButton.Click += ToolbarSnapToGroundGridButton_Click; + // + // ToolbarSnapGridSizeButton + // + ToolbarSnapGridSizeButton.Name = "ToolbarSnapGridSizeButton"; + ToolbarSnapGridSizeButton.Size = new System.Drawing.Size(205, 22); + ToolbarSnapGridSizeButton.Text = "Grid Size..."; + ToolbarSnapGridSizeButton.Click += ToolbarSnapGridSizeButton_Click; + // + // ToolbarRotationSnappingButton + // + ToolbarRotationSnappingButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarRotationSnappingOffButton, ToolbarRotationSnapping1Button, ToolbarRotationSnapping2Button, ToolbarRotationSnapping5Button, ToolbarRotationSnapping10Button, ToolbarRotationSnapping45Button, ToolbarRotationSnapping90Button, ToolbarRotationSnappingCustomButton }); + ToolbarRotationSnappingButton.Name = "ToolbarRotationSnappingButton"; + ToolbarRotationSnappingButton.Size = new System.Drawing.Size(205, 22); + ToolbarRotationSnappingButton.Text = "Rotation Snapping"; + // + // ToolbarRotationSnappingOffButton + // + ToolbarRotationSnappingOffButton.Name = "ToolbarRotationSnappingOffButton"; + ToolbarRotationSnappingOffButton.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnappingOffButton.Text = "Off"; + ToolbarRotationSnappingOffButton.Click += ToolbarRotationSnappingOffButton_Click; + // + // ToolbarRotationSnapping1Button + // + ToolbarRotationSnapping1Button.Name = "ToolbarRotationSnapping1Button"; + ToolbarRotationSnapping1Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping1Button.Text = "1 Degree"; + ToolbarRotationSnapping1Button.Click += ToolbarRotationSnapping1Button_Click; + // + // ToolbarRotationSnapping2Button + // + ToolbarRotationSnapping2Button.Name = "ToolbarRotationSnapping2Button"; + ToolbarRotationSnapping2Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping2Button.Text = "2 Degrees"; + ToolbarRotationSnapping2Button.Click += ToolbarRotationSnapping2Button_Click; + // + // ToolbarRotationSnapping5Button + // + ToolbarRotationSnapping5Button.Checked = true; + ToolbarRotationSnapping5Button.CheckState = System.Windows.Forms.CheckState.Checked; + ToolbarRotationSnapping5Button.Name = "ToolbarRotationSnapping5Button"; + ToolbarRotationSnapping5Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping5Button.Text = "5 Degrees"; + ToolbarRotationSnapping5Button.Click += ToolbarRotationSnapping5Button_Click; + // + // ToolbarRotationSnapping10Button + // + ToolbarRotationSnapping10Button.Name = "ToolbarRotationSnapping10Button"; + ToolbarRotationSnapping10Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping10Button.Text = "10 Degrees"; + ToolbarRotationSnapping10Button.Click += ToolbarRotationSnapping10Button_Click; + // + // ToolbarRotationSnapping45Button + // + ToolbarRotationSnapping45Button.Name = "ToolbarRotationSnapping45Button"; + ToolbarRotationSnapping45Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping45Button.Text = "45 Degrees"; + ToolbarRotationSnapping45Button.Click += ToolbarRotationSnapping45Button_Click; + // + // ToolbarRotationSnapping90Button + // + ToolbarRotationSnapping90Button.Name = "ToolbarRotationSnapping90Button"; + ToolbarRotationSnapping90Button.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnapping90Button.Text = "90 Degrees"; + ToolbarRotationSnapping90Button.Click += ToolbarRotationSnapping90Button_Click; + // + // ToolbarRotationSnappingCustomButton + // + ToolbarRotationSnappingCustomButton.Name = "ToolbarRotationSnappingCustomButton"; + ToolbarRotationSnappingCustomButton.Size = new System.Drawing.Size(131, 22); + ToolbarRotationSnappingCustomButton.Text = "Custom..."; + ToolbarRotationSnappingCustomButton.Click += ToolbarRotationSnappingCustomButton_Click; + // + // toolStripSeparator2 + // + toolStripSeparator2.Name = "toolStripSeparator2"; + toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // + // ToolbarUndoButton + // + ToolbarUndoButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarUndoButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarUndoListButton }); + ToolbarUndoButton.Enabled = false; + ToolbarUndoButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarUndoButton.Image"); + ToolbarUndoButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarUndoButton.Name = "ToolbarUndoButton"; + ToolbarUndoButton.Size = new System.Drawing.Size(32, 22); + ToolbarUndoButton.Text = "Undo"; + ToolbarUndoButton.ButtonClick += ToolbarUndoButton_ButtonClick; + // + // ToolbarUndoListButton + // + ToolbarUndoListButton.Name = "ToolbarUndoListButton"; + ToolbarUndoListButton.Size = new System.Drawing.Size(121, 22); + ToolbarUndoListButton.Text = "Undo list"; + ToolbarUndoListButton.Click += ToolbarUndoListButton_Click; + // + // ToolbarRedoButton + // + ToolbarRedoButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarRedoButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarRedoListButton }); + ToolbarRedoButton.Enabled = false; + ToolbarRedoButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarRedoButton.Image"); + ToolbarRedoButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarRedoButton.Name = "ToolbarRedoButton"; + ToolbarRedoButton.Size = new System.Drawing.Size(32, 22); + ToolbarRedoButton.Text = "Redo"; + ToolbarRedoButton.ButtonClick += ToolbarRedoButton_ButtonClick; + // + // ToolbarRedoListButton + // + ToolbarRedoListButton.Name = "ToolbarRedoListButton"; + ToolbarRedoListButton.Size = new System.Drawing.Size(119, 22); + ToolbarRedoListButton.Text = "Redo list"; + ToolbarRedoListButton.Click += ToolbarRedoListButton_Click; + // + // toolStripSeparator3 + // + toolStripSeparator3.Name = "toolStripSeparator3"; + toolStripSeparator3.Size = new System.Drawing.Size(6, 25); + // + // ToolbarInfoWindowButton + // + ToolbarInfoWindowButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarInfoWindowButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarInfoWindowButton.Image"); + ToolbarInfoWindowButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarInfoWindowButton.Name = "ToolbarInfoWindowButton"; + ToolbarInfoWindowButton.Size = new System.Drawing.Size(23, 22); + ToolbarInfoWindowButton.Text = "Selection info window"; + ToolbarInfoWindowButton.Click += ToolbarInfoWindowButton_Click; + // + // ToolbarProjectWindowButton + // + ToolbarProjectWindowButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarProjectWindowButton.Enabled = false; + ToolbarProjectWindowButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarProjectWindowButton.Image"); + ToolbarProjectWindowButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarProjectWindowButton.Name = "ToolbarProjectWindowButton"; + ToolbarProjectWindowButton.Size = new System.Drawing.Size(23, 22); + ToolbarProjectWindowButton.Text = "Project window"; + ToolbarProjectWindowButton.Click += ToolbarProjectWindowButton_Click; + // + // toolStripSeparator4 + // + toolStripSeparator4.Name = "toolStripSeparator4"; + toolStripSeparator4.Size = new System.Drawing.Size(6, 25); + // + // ToolbarAddItemButton + // + ToolbarAddItemButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarAddItemButton.Enabled = false; + ToolbarAddItemButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarAddItemButton.Image"); + ToolbarAddItemButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarAddItemButton.Name = "ToolbarAddItemButton"; + ToolbarAddItemButton.Size = new System.Drawing.Size(23, 22); + ToolbarAddItemButton.Text = "Add entity"; + ToolbarAddItemButton.Click += ToolbarAddItemButton_Click; + // + // ToolbarDeleteItemButton + // + ToolbarDeleteItemButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarDeleteItemButton.Enabled = false; + ToolbarDeleteItemButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarDeleteItemButton.Image"); + ToolbarDeleteItemButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarDeleteItemButton.Name = "ToolbarDeleteItemButton"; + ToolbarDeleteItemButton.Size = new System.Drawing.Size(23, 22); + ToolbarDeleteItemButton.Text = "Delete entity"; + ToolbarDeleteItemButton.Click += ToolbarDeleteItemButton_Click; + // + // toolStripSeparator6 + // + toolStripSeparator6.Name = "toolStripSeparator6"; + toolStripSeparator6.Size = new System.Drawing.Size(6, 25); + // + // ToolbarCopyButton + // + ToolbarCopyButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarCopyButton.Enabled = false; + ToolbarCopyButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarCopyButton.Image"); + ToolbarCopyButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarCopyButton.Name = "ToolbarCopyButton"; + ToolbarCopyButton.Size = new System.Drawing.Size(23, 22); + ToolbarCopyButton.Text = "Copy"; + ToolbarCopyButton.ToolTipText = "Copy (Ctrl+C)"; + ToolbarCopyButton.Click += ToolbarCopyButton_Click; + // + // ToolbarPasteButton + // + ToolbarPasteButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarPasteButton.Enabled = false; + ToolbarPasteButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarPasteButton.Image"); + ToolbarPasteButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarPasteButton.Name = "ToolbarPasteButton"; + ToolbarPasteButton.Size = new System.Drawing.Size(23, 22); + ToolbarPasteButton.Text = "Paste"; + ToolbarPasteButton.ToolTipText = "Paste (Ctrl+V)"; + ToolbarPasteButton.Click += ToolbarPasteButton_Click; + // + // toolStripSeparator7 + // + toolStripSeparator7.Name = "toolStripSeparator7"; + toolStripSeparator7.Size = new System.Drawing.Size(6, 25); + // + // ToolbarCameraModeButton + // + ToolbarCameraModeButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + ToolbarCameraModeButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ToolbarCameraPerspectiveButton, ToolbarCameraMapViewButton, ToolbarCameraOrthographicButton }); + ToolbarCameraModeButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarCameraModeButton.Image"); + ToolbarCameraModeButton.ImageTransparentColor = System.Drawing.Color.Magenta; + ToolbarCameraModeButton.Name = "ToolbarCameraModeButton"; + ToolbarCameraModeButton.Size = new System.Drawing.Size(32, 22); + ToolbarCameraModeButton.Text = "Camera Mode"; + ToolbarCameraModeButton.ButtonClick += ToolbarCameraModeButton_ButtonClick; + // + // ToolbarCameraPerspectiveButton + // + ToolbarCameraPerspectiveButton.Checked = true; + ToolbarCameraPerspectiveButton.CheckState = System.Windows.Forms.CheckState.Checked; + ToolbarCameraPerspectiveButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarCameraPerspectiveButton.Image"); + ToolbarCameraPerspectiveButton.Name = "ToolbarCameraPerspectiveButton"; + ToolbarCameraPerspectiveButton.Size = new System.Drawing.Size(145, 22); + ToolbarCameraPerspectiveButton.Text = "Perspective"; + ToolbarCameraPerspectiveButton.Click += ToolbarCameraPerspectiveButton_Click; + // + // ToolbarCameraMapViewButton + // + ToolbarCameraMapViewButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarCameraMapViewButton.Image"); + ToolbarCameraMapViewButton.Name = "ToolbarCameraMapViewButton"; + ToolbarCameraMapViewButton.Size = new System.Drawing.Size(145, 22); + ToolbarCameraMapViewButton.Text = "Map View"; + ToolbarCameraMapViewButton.Click += ToolbarCameraMapViewButton_Click; + // + // ToolbarCameraOrthographicButton + // + ToolbarCameraOrthographicButton.Image = (System.Drawing.Image)resources.GetObject("ToolbarCameraOrthographicButton.Image"); + ToolbarCameraOrthographicButton.Name = "ToolbarCameraOrthographicButton"; + ToolbarCameraOrthographicButton.Size = new System.Drawing.Size(145, 22); + ToolbarCameraOrthographicButton.Text = "Orthographic"; + ToolbarCameraOrthographicButton.Click += ToolbarCameraOrthographicButton_Click; + // + // ToolbarPanel + // + ToolbarPanel.BackColor = System.Drawing.SystemColors.Control; + ToolbarPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + ToolbarPanel.Controls.Add(Toolbar); + ToolbarPanel.Location = new System.Drawing.Point(14, 14); + ToolbarPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + ToolbarPanel.Name = "ToolbarPanel"; + ToolbarPanel.Size = new System.Drawing.Size(650, 30); + ToolbarPanel.TabIndex = 7; + ToolbarPanel.Visible = false; + // + // SubtitleLabel + // + SubtitleLabel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + SubtitleLabel.AutoSize = true; + SubtitleLabel.BackColor = System.Drawing.SystemColors.ControlLightLight; + SubtitleLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + SubtitleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + SubtitleLabel.Location = new System.Drawing.Point(531, 640); + SubtitleLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + SubtitleLabel.Name = "SubtitleLabel"; + SubtitleLabel.Size = new System.Drawing.Size(83, 18); + SubtitleLabel.TabIndex = 8; + SubtitleLabel.Text = "Test Subtitle"; + SubtitleLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter; + SubtitleLabel.Visible = false; + SubtitleLabel.SizeChanged += SubtitleLabel_SizeChanged; + // + // SubtitleTimer + // + SubtitleTimer.Tick += SubtitleTimer_Tick; // // WorldForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.MidnightBlue; - this.ClientSize = new System.Drawing.Size(984, 711); - this.Controls.Add(this.ToolbarPanel); - this.Controls.Add(this.SelectedMarkerPanel); - this.Controls.Add(this.ConsolePanel); - this.Controls.Add(this.ToolsPanel); - this.Controls.Add(this.StatusStrip); - this.Controls.Add(this.ToolsPanelShowButton); - this.Controls.Add(this.SubtitleLabel); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.KeyPreview = true; - this.Name = "WorldForm"; - this.Text = "CodeWalker"; - this.Deactivate += new System.EventHandler(this.WorldForm_Deactivate); - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.WorldForm_FormClosing); - this.Load += new System.EventHandler(this.WorldForm_Load); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WorldForm_KeyDown); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.WorldForm_KeyUp); - this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.WorldForm_MouseDown); - this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.WorldForm_MouseMove); - this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.WorldForm_MouseUp); - this.StatusStrip.ResumeLayout(false); - this.StatusStrip.PerformLayout(); - this.ToolsPanel.ResumeLayout(false); - this.ToolsTabControl.ResumeLayout(false); - this.ViewTabPage.ResumeLayout(false); - this.ViewTabPage.PerformLayout(); - this.ViewTabControl.ResumeLayout(false); - this.ViewWorldTabPage.ResumeLayout(false); - this.ViewWorldTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.WorldDetailDistTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.WorldLodDistTrackBar)).EndInit(); - this.ViewYmapsTabPage.ResumeLayout(false); - this.ViewYmapsTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DetailTrackBar)).EndInit(); - this.ViewModelTabPage.ResumeLayout(false); - this.ViewModelTabPage.PerformLayout(); - this.MarkersTabPage.ResumeLayout(false); - this.MarkersTabPage.PerformLayout(); - this.SelectionTabPage.ResumeLayout(false); - this.SelectionTabPage.PerformLayout(); - this.SelectionTabControl.ResumeLayout(false); - this.SelectionEntityTabPage.ResumeLayout(false); - this.SelectionArchetypeTabPage.ResumeLayout(false); - this.SelectionDrawableTabPage.ResumeLayout(false); - this.tabControl3.ResumeLayout(false); - this.tabPage11.ResumeLayout(false); - this.tabPage12.ResumeLayout(false); - this.tabPage13.ResumeLayout(false); - this.SelectionExtensionTabPage.ResumeLayout(false); - this.OptionsTabPage.ResumeLayout(false); - this.OptionsTabPage.PerformLayout(); - this.OptionsTabControl.ResumeLayout(false); - this.OptionsGeneralTabPage.ResumeLayout(false); - this.OptionsGeneralTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.MapViewDetailTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.CollisionMeshRangeTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.FieldOfViewTrackBar)).EndInit(); - this.OptionsRenderTabPage.ResumeLayout(false); - this.OptionsRenderTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.AntiAliasingTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.FarClipUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NearClipUpDown)).EndInit(); - this.OptionsHelpersTabPage.ResumeLayout(false); - this.OptionsHelpersTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.SnapAngleUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.SnapGridSizeUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.BoundsRangeTrackBar)).EndInit(); - this.OptionsLightingTabPage.ResumeLayout(false); - this.OptionsLightingTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.CloudParamTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.TimeSpeedTrackBar)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).EndInit(); - this.ConsolePanel.ResumeLayout(false); - this.ConsolePanel.PerformLayout(); - this.SelectedMarkerPanel.ResumeLayout(false); - this.SelectedMarkerPanel.PerformLayout(); - this.ToolsMenu.ResumeLayout(false); - this.Toolbar.ResumeLayout(false); - this.Toolbar.PerformLayout(); - this.ToolbarPanel.ResumeLayout(false); - this.ToolbarPanel.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + BackColor = System.Drawing.Color.MidnightBlue; + ClientSize = new System.Drawing.Size(1148, 820); + Controls.Add(ToolbarPanel); + Controls.Add(SelectedMarkerPanel); + Controls.Add(ConsolePanel); + Controls.Add(ToolsPanel); + Controls.Add(StatusStrip); + Controls.Add(ToolsPanelShowButton); + Controls.Add(SubtitleLabel); + Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); + KeyPreview = true; + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "WorldForm"; + Text = "CodeWalker"; + Deactivate += WorldForm_Deactivate; + FormClosing += WorldForm_FormClosing; + Load += WorldForm_Load; + KeyDown += WorldForm_KeyDown; + KeyUp += WorldForm_KeyUp; + MouseDown += WorldForm_MouseDown; + MouseMove += WorldForm_MouseMove; + MouseUp += WorldForm_MouseUp; + StatusStrip.ResumeLayout(false); + StatusStrip.PerformLayout(); + ToolsPanel.ResumeLayout(false); + ToolsTabControl.ResumeLayout(false); + ViewTabPage.ResumeLayout(false); + ViewTabPage.PerformLayout(); + ViewTabControl.ResumeLayout(false); + ViewWorldTabPage.ResumeLayout(false); + ViewWorldTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)WorldDetailDistTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)WorldLodDistTrackBar).EndInit(); + ViewYmapsTabPage.ResumeLayout(false); + ViewYmapsTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)DetailTrackBar).EndInit(); + ViewModelTabPage.ResumeLayout(false); + ViewModelTabPage.PerformLayout(); + MarkersTabPage.ResumeLayout(false); + MarkersTabPage.PerformLayout(); + SelectionTabPage.ResumeLayout(false); + SelectionTabPage.PerformLayout(); + SelectionTabControl.ResumeLayout(false); + SelectionEntityTabPage.ResumeLayout(false); + SelectionArchetypeTabPage.ResumeLayout(false); + SelectionDrawableTabPage.ResumeLayout(false); + tabControl3.ResumeLayout(false); + tabPage11.ResumeLayout(false); + tabPage12.ResumeLayout(false); + tabPage13.ResumeLayout(false); + SelectionExtensionTabPage.ResumeLayout(false); + OptionsTabPage.ResumeLayout(false); + OptionsTabPage.PerformLayout(); + OptionsTabControl.ResumeLayout(false); + OptionsGeneralTabPage.ResumeLayout(false); + OptionsGeneralTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)MapViewDetailTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)CollisionMeshRangeTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)FieldOfViewTrackBar).EndInit(); + OptionsRenderTabPage.ResumeLayout(false); + OptionsRenderTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)AntiAliasingTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)FarClipUpDown).EndInit(); + ((System.ComponentModel.ISupportInitialize)NearClipUpDown).EndInit(); + OptionsHelpersTabPage.ResumeLayout(false); + OptionsHelpersTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)SnapAngleUpDown).EndInit(); + ((System.ComponentModel.ISupportInitialize)SnapGridSizeUpDown).EndInit(); + ((System.ComponentModel.ISupportInitialize)BoundsRangeTrackBar).EndInit(); + OptionsLightingTabPage.ResumeLayout(false); + OptionsLightingTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)CloudParamTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)TimeSpeedTrackBar).EndInit(); + ((System.ComponentModel.ISupportInitialize)TimeOfDayTrackBar).EndInit(); + ConsolePanel.ResumeLayout(false); + ConsolePanel.PerformLayout(); + SelectedMarkerPanel.ResumeLayout(false); + SelectedMarkerPanel.PerformLayout(); + ToolsMenu.ResumeLayout(false); + Toolbar.ResumeLayout(false); + Toolbar.PerformLayout(); + ToolbarPanel.ResumeLayout(false); + ToolbarPanel.PerformLayout(); + ResumeLayout(false); + PerformLayout(); } #endregion diff --git a/CodeWalker/WorldForm.cs b/CodeWalker/WorldForm.cs index f67325e..eb4e12a 100644 --- a/CodeWalker/WorldForm.cs +++ b/CodeWalker/WorldForm.cs @@ -25,16 +25,17 @@ namespace CodeWalker { public partial class WorldForm : Form, DXForm { - public Form Form { get { return this; } } //for DXForm/DXManager use + public Form Form => this; //for DXForm/DXManager use - public Renderer Renderer { + public Renderer Renderer + { get { return renderer ??= new Renderer(this, GameFileCache); } set => renderer = value; } - public object RenderSyncRoot { get { return Renderer.RenderSyncRoot; } } + public SemaphoreSlim RenderSyncRoot => Renderer.RenderSyncRoot; volatile bool formopen = false; volatile bool running = false; @@ -49,24 +50,24 @@ namespace CodeWalker Clouds clouds; private Water water; - Water Water { get => water ??= new Water(); } + Water Water => water ??= new Water(); private Trains trains; - Trains Trains { get => trains ??= new Trains(); } + Trains Trains => trains ??= new Trains(); private Scenarios scenarios; - Scenarios Scenarios { get => scenarios ??= new Scenarios(); } + Scenarios Scenarios => scenarios ??= new Scenarios(); private PopZones popZones; - PopZones PopZones { get => popZones ??= new PopZones(); } + PopZones PopZones => popZones ??= new PopZones(); private Heightmaps heightmaps; - Heightmaps Heightmaps { get => heightmaps ??= new Heightmaps(); } + Heightmaps Heightmaps => heightmaps ??= new Heightmaps(); private Watermaps watermaps; - Watermaps Watermaps { get => watermaps ??= new Watermaps(); } + Watermaps Watermaps => watermaps ??= new Watermaps(); private AudioZones audioZones; - AudioZones AudioZones { get => audioZones ??= new AudioZones(); } + AudioZones AudioZones => audioZones ??= new AudioZones(); public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); - public CancellationToken CancellationToken; + public CancellationToken CancellationToken { get; } - public Space Space { get => space ??= new Space(); } + public Space Space => space ??= new Space(); bool MouseLButtonDown = false; bool MouseRButtonDown = false; @@ -83,10 +84,9 @@ namespace CodeWalker Vector3 prevworldpos = new Vector3(0, 0, 100); //also the start pos + private GameFileCache? _gameFileCache; + public GameFileCache GameFileCache => _gameFileCache ??= GameFileCacheFactory.Instance; - private GameFileCache gameFileCache; - public GameFileCache GameFileCache { get => gameFileCache ??= GameFileCacheFactory.GetInstance(); } - WorldControlMode ControlMode = WorldControlMode.Free; @@ -234,13 +234,16 @@ namespace CodeWalker public WorldForm() { - - Task.Run(() => { - if (!GameFileCache.IsInited) + if (!GameFileCache.IsInited) + { + Task.Run(async () => { - GameFileCache.Init(); - } - }); + if (!GameFileCache.IsInited) + { + await GameFileCache.InitAsync(); + } + }); + } CancellationToken = CancellationTokenSource.Token; InitializeComponent(); @@ -256,7 +259,7 @@ namespace CodeWalker } - private async ValueTask Init() + private ValueTask InitAsync() { //called from WorldForm_Load @@ -265,7 +268,7 @@ namespace CodeWalker if (!initedOk) { Close(); - return; + return ValueTask.CompletedTask; } @@ -274,7 +277,7 @@ namespace CodeWalker if (!GTAFolder.UpdateGTAFolder(true)) { Close(); - return; + return ValueTask.CompletedTask; } Widget.Position = new Vector3(1.0f, 10.0f, 100.0f); @@ -311,9 +314,11 @@ namespace CodeWalker } MarkerStyleComboBox.SelectedItem = MarkerIcon; //LoadSettings will handle this LocatorStyleComboBox.SelectedItem = LocatorIcon; - LocatorMarker = new MapMarker(); - LocatorMarker.Icon = LocatorIcon; - LocatorMarker.IsMovable = true; + LocatorMarker = new MapMarker + { + Icon = LocatorIcon, + IsMovable = true + }; //AddDefaultMarkers(); //some POI to start with ShaderParamNames[] texsamplers = RenderableGeometry.GetTextureSamplerList(); @@ -339,13 +344,32 @@ namespace CodeWalker Renderer.Start(); + + return ValueTask.CompletedTask; } + public static string GetIconFolder() + { + // Directory we're looking for. + var dirToFind = Path.Combine("icons"); + + + if (!FileUtils.TryFindFolder(dirToFind, out var folder)) + { + throw new FileNotFoundException($"Could not find '{dirToFind}' directory."); + } + else + { + return folder; + } + } + private MapIcon AddIcon(string name, string filename, int texw, int texh, float centerx, float centery, float scale) { - string filepath = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName), "icons", filename); + + string filepath = Path.Combine(GetIconFolder(), filename); try { MapIcon mi = new MapIcon(name, filepath, texw, texh, centerx, centery, scale); @@ -386,7 +410,7 @@ namespace CodeWalker } camera.FollowEntity = CamEntity; - CamEntity.Position = (startupviewmode!=2) ? prevworldpos : Vector3.Zero; + CamEntity.Position = (startupviewmode != 2) ? prevworldpos : Vector3.Zero; CamEntity.Orientation = Quaternion.LookAtLH(Vector3.Zero, Vector3.Up, Vector3.ForwardLH); Space.AddPersistentEntity(PedEntity); @@ -403,7 +427,7 @@ namespace CodeWalker frametimer.Start(); } - public void CleanupScene() + public async ValueTask CleanupScene() { using var _ = new DisposableTimer("CleanupScene"); if (!CancellationTokenSource.IsCancellationRequested) @@ -425,7 +449,7 @@ namespace CodeWalker int count = 0; while (running && (count < 5000)) //wait for the content thread to exit gracefully { - Thread.Sleep(1); + await Task.Delay(1); count++; } } @@ -451,11 +475,12 @@ namespace CodeWalker await Task.Delay((int)(0.016666 * elapsed) * 1000, CancellationToken); } - if (Pauserendering) return; + if (Pauserendering) + return; GameFileCache.BeginFrame(); - if (!Monitor.TryEnter(Renderer.RenderSyncRoot, 50)) + if (!Renderer.RenderSyncRoot.Wait(50)) { return; } //couldn't get a lock, try again next time @@ -466,10 +491,7 @@ namespace CodeWalker Space.Update(elapsed); - if (CutsceneForm != null) - { - CutsceneForm.UpdateAnimation(elapsed); - } + CutsceneForm?.UpdateAnimation(elapsed); Renderer.Update(elapsed, MouseLastPoint.X, MouseLastPoint.Y); @@ -523,7 +545,7 @@ namespace CodeWalker } finally { - Monitor.Exit(Renderer.RenderSyncRoot); + Renderer.RenderSyncRoot.Release(); } UpdateMarkerSelectionPanelInvoke(); @@ -749,15 +771,9 @@ namespace CodeWalker spaceEnts = Space.TemporaryEntities; } - if (ProjectForm != null) - { - ProjectForm.GetVisibleYmaps(camera, renderworldVisibleYmapDict); - } + ProjectForm?.GetVisibleYmaps(camera, renderworldVisibleYmapDict); - if (CutsceneForm != null) - { - CutsceneForm.GetVisibleYmaps(camera, renderworldVisibleYmapDict); - } + CutsceneForm?.GetVisibleYmaps(camera, renderworldVisibleYmapDict); Renderer.RenderWorld(renderworldVisibleYmapDict, spaceEnts); @@ -833,7 +849,7 @@ namespace CodeWalker foreach (var item in collisionitems) { YbnFile ybn = GameFileCache.GetYbn(item.Name); - if ((ybn != null) && (ybn.Loaded)) + if (ybn is not null && ybn.Loaded) { collisionybns.Add(ybn); } @@ -891,7 +907,7 @@ namespace CodeWalker ProjectForm?.GetVisibleWaterQuads(camera, renderwaterquadlist); - if(SelectionMode == requiredMode) UpdateMouseHits(renderwaterquadlist); + if (SelectionMode == requiredMode) UpdateMouseHits(renderwaterquadlist); return renderwaterquadlist; } @@ -996,7 +1012,8 @@ namespace CodeWalker private void RenderWorldWatermaps() { - if (!Watermaps.Inited) return; + if (!Watermaps.Inited) + return; //renderwatermaplist.Clear(); //renderwatermaplist.AddRange(watermaps.Watermaps); @@ -1011,7 +1028,8 @@ namespace CodeWalker private void RenderWorldAudioZones() { - if (!AudioZones.Inited) return; + if (!AudioZones.Inited) + return; renderaudfilelist.Clear(); renderaudfilelist.AddRange(GameFileCache.AudioDatRelFiles); @@ -1024,19 +1042,15 @@ namespace CodeWalker renderaudplacementslist.Clear(); AudioZones.GetPlacements(renderaudfilelist, renderaudplacementslist); - - BoundingBox bbox = new BoundingBox(); BoundingSphere bsph = new BoundingSphere(); - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray(camera.MouseRay.Position + camera.Position, camera.MouseRay.Direction); float hitdist = float.MaxValue; MapBox lastHitOuterBox = new MapBox(); MapSphere lastHitOuterSphere = new MapSphere(); - MapBox mb = new MapBox(); - MapSphere ms = new MapSphere(); + //MapBox mb; + //MapSphere ms; for (int i = 0; i < renderaudplacementslist.Count; i++) { @@ -1046,29 +1060,31 @@ namespace CodeWalker case Dat151ZoneShape.Box: case Dat151ZoneShape.Line: - mb.CamRelPos = placement.InnerPos - camera.Position; - mb.BBMin = placement.InnerMin; - mb.BBMax = placement.InnerMax; - mb.Orientation = placement.InnerOri; - mb.Scale = Vector3.One; + var mb = new MapBox( + camRelPos: placement.InnerPos - camera.Position, + bbMin: placement.InnerMin, + bbMax: placement.InnerMax, + orientation: placement.InnerOri, + scale: Vector3.One + ); Renderer.HilightBoxes.Add(mb); if (renderaudioouterbounds) { - mb.CamRelPos = placement.OuterPos - camera.Position; - mb.BBMin = placement.OuterMin; - mb.BBMax = placement.OuterMax; - mb.Orientation = placement.OuterOri; - mb.Scale = Vector3.One; + mb = new MapBox( + placement.OuterPos - camera.Position, + placement.OuterMin, + placement.OuterMax, + placement.OuterOri, + Vector3.One + ); Renderer.BoundingBoxes.Add(mb); } Vector3 hbcamrel = (placement.Position - camera.Position); - Ray mraytrn = new Ray(); - mraytrn.Position = placement.OrientationInv.Multiply(camera.MouseRay.Position - hbcamrel); - mraytrn.Direction = placement.OrientationInv.Multiply(mray.Direction); - bbox.Minimum = placement.HitboxMin; - bbox.Maximum = placement.HitboxMax; + Ray mraytrn = new Ray(placement.OrientationInv.Multiply(camera.MouseRay.Position - hbcamrel), placement.OrientationInv.Multiply(in mray.Direction)); + + bbox = new BoundingBox(placement.HitboxMin, placement.HitboxMax); if (mraytrn.Intersects(ref bbox, out hitdist) && (hitdist < CurMouseHit.HitDist) && (hitdist > 0)) { CurMouseHit.Audio = placement; @@ -1082,19 +1098,16 @@ namespace CodeWalker if ((placement.InnerPos != Vector3.Zero) && (placement.OuterPos != Vector3.Zero)) { - ms.CamRelPos = placement.InnerPos - camera.Position; - ms.Radius = placement.InnerRadius; + var ms = new MapSphere(placement.InnerPos - camera.Position, placement.InnerRadius); Renderer.HilightSpheres.Add(ms); if (renderaudioouterbounds) { - ms.CamRelPos = placement.OuterPos - camera.Position; - ms.Radius = placement.OuterRadius; + ms = new MapSphere(placement.OuterPos - camera.Position, placement.OuterRadius); Renderer.BoundingSpheres.Add(ms); } - bsph.Center = placement.Position; - bsph.Radius = placement.HitSphereRad; + bsph = new BoundingSphere(placement.Position, placement.HitSphereRad); if (mray.Intersects(ref bsph, out hitdist) && (hitdist < CurMouseHit.HitDist) && (hitdist > 0)) { CurMouseHit.Audio = placement; @@ -1105,9 +1118,6 @@ namespace CodeWalker lastHitOuterSphere = ms; //highlight the outer sphere } } - else - { } - break; default: @@ -1139,8 +1149,7 @@ namespace CodeWalker { //start point for model view mode rendering - uint hash = 0;// JenkHash.GenHash(modelname); - if (!uint.TryParse(modelname, out hash)) //try use a hash directly + if (!uint.TryParse(modelname, out var hash)) //try use a hash directly { hash = JenkHash.GenHash(modelname); } @@ -1159,7 +1168,7 @@ namespace CodeWalker else { YmapFile ymap = GameFileCache.GetYmap(hash); - if (ymap != null) + if (ymap is not null) { Renderer.RenderYmap(ymap); } @@ -1167,7 +1176,7 @@ namespace CodeWalker { //not a ymap... see if it's a ydr or yft YdrFile ydr = GameFileCache.GetYdr(hash); - if (ydr != null) + if (ydr is not null) { if (ydr.Loaded) { @@ -1179,11 +1188,11 @@ namespace CodeWalker else { YftFile yft = GameFileCache.GetYft(hash); - if (yft != null) + if (yft is not null) { if (yft.Loaded) { - if (yft.Fragment != null) + if (yft.Fragment is not null) { var f = yft.Fragment; @@ -1203,7 +1212,7 @@ namespace CodeWalker } } - if ((selarch != null) && (seldrwbl == null)) + if ((selarch is not null) && (seldrwbl is null)) { seldrwbl = GameFileCache.TryGetDrawable(selarch); } @@ -1264,8 +1273,10 @@ namespace CodeWalker UpdateMousedLabel(text); } - if(!CurMouseHit.HasHit) - { return; } + if (!CurMouseHit.HasHit) + { + return; + } BoundsShaderMode mode = BoundsShaderMode.Box; @@ -1349,7 +1360,7 @@ namespace CodeWalker var vertexSize = 0.1f; Renderer.RenderSelectionCircle(vpos, vertexSize, 0xFFFFFFFF); } - if (CurMouseHit.CollisionPoly != null) + if (CurMouseHit.CollisionPoly is not null) { Renderer.RenderSelectionCollisionPolyOutline(CurMouseHit.CollisionPoly, 0xFFFFFFFF, CurMouseHit.EntityDef); } @@ -1442,7 +1453,7 @@ namespace CodeWalker bbmax = cg.BBMax; float arrowlen = cg._CCarGen.perpendicularLength; float arrowrad = arrowlen * 0.066f; - Renderer.RenderSelectionArrowOutline(cg.Position, Vector3.UnitX, Vector3.UnitY, ori, arrowlen, arrowrad, cgrn); + Renderer.RenderSelectionArrowOutline(in cg.Position, in Vector3.UnitX, in Vector3.UnitY, in ori, arrowlen, arrowrad, cgrn); if (!Renderer.rendercars)//only render selected car if not already rendering cars.. { @@ -1452,35 +1463,35 @@ namespace CodeWalker Renderer.RenderCar(cg.Position, cgori, cg._CCarGen.carModel, cg._CCarGen.popGroup); } } - if (selectionItem.WaveQuad != null) + if (selectionItem.WaveQuad is not null) { var quad = selectionItem.WaveQuad; Vector3 quadArrowPos = new Vector3(quad.minX + (quad.maxX - quad.minX) * 0.5f, quad.minY + (quad.maxY - quad.minY) * 0.5f, 5); - Quaternion waveOri = quad.WaveOrientation; + ref Quaternion waveOri = ref quad.WaveOrientation; float arrowlen = quad.Amplitude * 50; float arrowrad = arrowlen * 0.066f; - Renderer.RenderSelectionArrowOutline(quadArrowPos, Vector3.UnitX, Vector3.UnitY, waveOri, arrowlen, arrowrad, cgrn); + Renderer.RenderSelectionArrowOutline(in quadArrowPos, in Vector3.UnitX, in Vector3.UnitY, in waveOri, arrowlen, arrowrad, cgrn); } - if (selectionItem.LodLight != null) + if (selectionItem.LodLight is not null) { Renderer.RenderSelectionLodLight(selectionItem.LodLight); - if (selectionItem.LodLight.LodLights != null) + if (selectionItem.LodLight.LodLights is not null) { bbmin = selectionItem.LodLight.LodLights.BBMin; bbmax = selectionItem.LodLight.LodLights.BBMax; } } - if (selectionItem.PathNode != null) + if (selectionItem.PathNode is not null) { camrel = selectionItem.PathNode.Position - camera.Position; } - if (selectionItem.TrainTrackNode != null) + if (selectionItem.TrainTrackNode is not null) { camrel = selectionItem.TrainTrackNode.Position - camera.Position; } - if (selectionItem.ScenarioNode != null) + if (selectionItem.ScenarioNode is not null) { camrel = selectionItem.ScenarioNode.Position - camera.Position; @@ -1490,7 +1501,7 @@ namespace CodeWalker ori = sn.Orientation; float arrowlen = 2.0f; float arrowrad = 0.25f; - Renderer.RenderSelectionArrowOutline(sn.Position, Vector3.UnitY, Vector3.UnitZ, ori, arrowlen, arrowrad, cgrn); + Renderer.RenderSelectionArrowOutline(in sn.Position, in Vector3.UnitY, in Vector3.UnitZ, in ori, arrowlen, arrowrad, cgrn); MCScenarioPoint vpoint = sn.MyPoint ?? sn.ClusterMyPoint; if ((vpoint != null) && (vpoint?.Type?.IsVehicle ?? false)) @@ -1525,7 +1536,7 @@ namespace CodeWalker var se = selectionItem.ScenarioEdge; var sn1 = se.NodeFrom; var sn2 = se.NodeTo; - if ((sn1 != null) && (sn2 != null)) + if (sn1 is not null && sn2 is not null) { var dirp = sn2.Position - sn1.Position; float dl = dirp.Length(); @@ -1533,8 +1544,8 @@ namespace CodeWalker Vector3 dup = Vector3.UnitZ; var aori = Quaternion.Invert(Quaternion.RotationLookAtRH(dir, dup)); float arrowrad = 0.25f; - float arrowlen = Math.Max(dl - arrowrad*5.0f, 0); - Renderer.RenderSelectionArrowOutline(sn1.Position, -Vector3.UnitZ, Vector3.UnitY, aori, arrowlen, arrowrad, cblu); + float arrowlen = Math.Max(dl - arrowrad * 5.0f, 0); + Renderer.RenderSelectionArrowOutline(sn1.Position, -Vector3.UnitZ, in Vector3.UnitY, in aori, arrowlen, arrowrad, cblu); } } if (selectionItem.MloEntityDef != null) @@ -1543,8 +1554,7 @@ namespace CodeWalker bbmax = selectionItem.AABB.Maximum; var mlo = selectionItem.MloEntityDef; var mlop = mlo.Position; - var mloa = mlo.Archetype as MloArchetype; - if (mloa != null) + if (mlo.Archetype is MloArchetype mloa) { VertexTypePC p1 = new VertexTypePC(); VertexTypePC p2 = new VertexTypePC(); @@ -1573,16 +1583,23 @@ namespace CodeWalker } if (mloa.rooms != null) { - MapBox wbox = new MapBox(); - wbox.Scale = Vector3.One; + MapBox wbox = new MapBox + { + Scale = Vector3.One + }; for (int ir = 0; ir < mloa.rooms.Length; ir++) { var room = mloa.rooms[ir]; - wbox.CamRelPos = mlop - camera.Position; - wbox.BBMin = room._Data.bbMin;// + offset; - wbox.BBMax = room._Data.bbMax;// + offset; - wbox.Orientation = mlo.Orientation; + wbox = new MapBox + { + Scale = Vector3.One, + CamRelPos = mlop - camera.Position, + BBMin = room._Data.bbMin,// + offset; + BBMax = room._Data.bbMax,// + offset; + Orientation = mlo.Orientation, + }; + if ((ir == 0) || (room.RoomName == "limbo")) { bbmin = room._Data.bbMin; @@ -1591,8 +1608,14 @@ namespace CodeWalker } else { - wbox.BBMin = room.BBMin_CW; //hack method to use CW calculated room AABBs, - wbox.BBMax = room.BBMax_CW; //R* ones are right size, but wrong position?? + wbox = new MapBox + { + Scale = Vector3.One, + CamRelPos = mlop - camera.Position, + BBMin = room.BBMin_CW,//hack method to use CW calculated room AABBs, + BBMax = room.BBMax_CW,//R* ones are right size, but wrong position?? + Orientation = mlo.Orientation, + }; Renderer.WhiteBoxes.Add(wbox); } } @@ -1671,19 +1694,23 @@ namespace CodeWalker if (selectionItem.Audio.Shape == Dat151ZoneShape.Sphere) { mode = BoundsShaderMode.Sphere; - MapSphere wsph = new MapSphere(); - wsph.CamRelPos = au.OuterPos - camera.Position; - wsph.Radius = au.OuterRadius; + MapSphere wsph = new MapSphere + { + CamRelPos = au.OuterPos - camera.Position, + Radius = au.OuterRadius, + }; Renderer.WhiteSpheres.Add(wsph); } else { - MapBox wbox = new MapBox(); - wbox.CamRelPos = au.OuterPos - camera.Position; - wbox.BBMin = au.OuterMin; - wbox.BBMax = au.OuterMax; - wbox.Orientation = au.OuterOri; - wbox.Scale = scale; + MapBox wbox = new MapBox + { + CamRelPos = au.OuterPos - camera.Position, + BBMin = au.OuterMin, + BBMax = au.OuterMax, + Orientation = au.OuterOri, + Scale = scale, + }; Renderer.WhiteBoxes.Add(wbox); } } @@ -1706,19 +1733,23 @@ namespace CodeWalker if (mode == BoundsShaderMode.Box) { - MapBox box = new MapBox(); - box.CamRelPos = camrel; - box.BBMin = bbmin; - box.BBMax = bbmax; - box.Orientation = ori; - box.Scale = scale; + MapBox box = new MapBox + { + CamRelPos = camrel, + BBMin = bbmin, + BBMax = bbmax, + Orientation = ori, + Scale = scale + }; Renderer.SelectionBoxes.Add(box); } else if (mode == BoundsShaderMode.Sphere) { - MapSphere sph = new MapSphere(); - sph.CamRelPos = camrel; - sph.Radius = bsphrad; + MapSphere sph = new MapSphere + { + CamRelPos = camrel, + Radius = bsphrad + }; Renderer.SelectionSpheres.Add(sph); } @@ -1782,13 +1813,13 @@ namespace CodeWalker float downlimit = 20.0f; Ray ray = new Ray(p, new Vector3(0, 0, -1.0f)); ray.Position.Z += 0.1f; - SpaceRayIntersectResult hit = Space.RayIntersect(ray, downlimit); + SpaceRayIntersectResult hit = Space.RayIntersect(ref ray, downlimit); if (hit.Hit) { return hit.Position; } ray.Position.Z += uplimit; - hit = Space.RayIntersect(ray, downlimit); + hit = Space.RayIntersect(ref ray, downlimit); if (hit.Hit) { return hit.Position; @@ -1972,7 +2003,7 @@ namespace CodeWalker public void UpdateCollisionBoundsGraphics(Bounds b) { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { if (b is BoundBVH bvh) { @@ -2129,7 +2160,7 @@ namespace CodeWalker public Vector3 GetCameraPosition() { //currently used by ProjectForm when creating entities - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { return camera.Position; } @@ -2137,7 +2168,7 @@ namespace CodeWalker public Vector3 GetCameraViewDir() { //currently used by ProjectForm when creating entities - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { return camera.ViewDirection; } @@ -2174,86 +2205,58 @@ namespace CodeWalker MapBox b = new MapBox(); Vector3 pos = Vector3.Zero; float size = 0.5f; - if (ext is MCExtensionDefLightEffect) + switch(ext) { - var le = ext as MCExtensionDefLightEffect; - pos = le.Data.offsetPosition; + case MCExtensionDefLightEffect le: + pos = le.Data.offsetPosition; + break; + case MCExtensionDefSpawnPointOverride spo: + pos = spo.Data.offsetPosition; + size = spo.Data.Radius; + break; + case MCExtensionDefDoor door: + pos = door.Data.offsetPosition; + break; + case Mrage__phVerletClothCustomBounds cb: + if (cb.CollisionData is not null && cb.CollisionData.Length > 0) + { + pos = cb.CollisionData[0].Data.Position; + } + break; + case MCExtensionDefParticleEffect pe: + pos = pe.Data.offsetPosition; + break; + case MCExtensionDefAudioCollisionSettings acs: + pos = acs.Data.offsetPosition; + break; + case MCExtensionDefAudioEmitter ae: + pos = ae.Data.offsetPosition; + break; + case MCExtensionDefSpawnPoint sp: + pos = sp.Data.offsetPosition; + break; + case MCExtensionDefExplosionEffect ee: + pos = ee.Data.offsetPosition; + break; + case MCExtensionDefLadder ld: + pos = ld.Data.offsetPosition; + break; + case MCExtensionDefBuoyancy bu: + pos = bu.Data.offsetPosition; + break; + case MCExtensionDefExpression exp: + pos = exp.Data.offsetPosition; + break; + case MCExtensionDefLightShaft ls: + pos = ls.Data.offsetPosition; + break; + case MCExtensionDefWindDisturbance wd: + pos = wd.Data.offsetPosition; + break; + case MCExtensionDefProcObject po: + pos = po.Data.offsetPosition; + break; } - else if (ext is MCExtensionDefSpawnPointOverride) - { - var spo = ext as MCExtensionDefSpawnPointOverride; - pos = spo.Data.offsetPosition; - size = spo.Data.Radius; - } - else if (ext is MCExtensionDefDoor) - { - var door = ext as MCExtensionDefDoor; - pos = door.Data.offsetPosition; - } - else if (ext is Mrage__phVerletClothCustomBounds) - { - var cb = ext as Mrage__phVerletClothCustomBounds; - if ((cb.CollisionData != null) && (cb.CollisionData.Length > 0)) - { - pos = cb.CollisionData[0].Data.Position; - } - } - else if (ext is MCExtensionDefParticleEffect) - { - var pe = ext as MCExtensionDefParticleEffect; - pos = pe.Data.offsetPosition; - } - else if (ext is MCExtensionDefAudioCollisionSettings) - { - var acs = ext as MCExtensionDefAudioCollisionSettings; - pos = acs.Data.offsetPosition; - } - else if (ext is MCExtensionDefAudioEmitter) - { - var ae = ext as MCExtensionDefAudioEmitter; - pos = ae.Data.offsetPosition; - } - else if (ext is MCExtensionDefSpawnPoint) - { - var sp = ext as MCExtensionDefSpawnPoint; - pos = sp.Data.offsetPosition; - } - else if (ext is MCExtensionDefExplosionEffect) - { - var ee = ext as MCExtensionDefExplosionEffect; - pos = ee.Data.offsetPosition; - } - else if (ext is MCExtensionDefLadder) - { - var ld = ext as MCExtensionDefLadder; - pos = ld.Data.offsetPosition; - } - else if (ext is MCExtensionDefBuoyancy) - { - var bu = ext as MCExtensionDefBuoyancy; - pos = bu.Data.offsetPosition; - } - else if (ext is MCExtensionDefExpression) - { - var exp = ext as MCExtensionDefExpression; - pos = exp.Data.offsetPosition; - } - else if (ext is MCExtensionDefLightShaft) - { - var ls = ext as MCExtensionDefLightShaft; - pos = ls.Data.offsetPosition; - } - else if (ext is MCExtensionDefWindDisturbance) - { - var wd = ext as MCExtensionDefWindDisturbance; - pos = wd.Data.offsetPosition; - } - else if (ext is MCExtensionDefProcObject) - { - var po = ext as MCExtensionDefProcObject; - pos = po.Data.offsetPosition; - } - b.BBMin = pos - size; b.BBMax = pos + size; @@ -2265,7 +2268,8 @@ namespace CodeWalker private void SpawnTestEntity(bool cameraCenter = false) { - if (!Space.Inited) return; + if (!Space.Inited) + return; Vector3 dir = (cameraCenter ? camera.ViewDirection : camera.MouseRay.Direction); Vector3 ofs = (cameraCenter ? Vector3.Zero : camera.MouseRay.Position); @@ -2277,29 +2281,33 @@ namespace CodeWalker if (arch == null) return; - CEntityDef cent = new CEntityDef(); - cent.archetypeName = hash; - cent.rotation = new Vector4(0, 0, 0, 1); - cent.scaleXY = 1.0f; - cent.scaleZ = 1.0f; - cent.flags = 1572872; - cent.parentIndex = -1; - cent.lodDist = 200.0f; - cent.lodLevel = rage__eLodType.LODTYPES_DEPTH_ORPHANHD; - cent.priorityLevel = rage__ePriorityLevel.PRI_REQUIRED; - cent.ambientOcclusionMultiplier = 255; - cent.artificialAmbientOcclusion = 255; - cent.position = pos; + CEntityDef cent = new CEntityDef + { + archetypeName = hash, + rotation = new Vector4(0, 0, 0, 1), + scaleXY = 1.0f, + scaleZ = 1.0f, + flags = 1572872, + parentIndex = -1, + lodDist = 200.0f, + lodLevel = rage__eLodType.LODTYPES_DEPTH_ORPHANHD, + priorityLevel = rage__ePriorityLevel.PRI_REQUIRED, + ambientOcclusionMultiplier = 255, + artificialAmbientOcclusion = 255, + position = pos + }; - YmapEntityDef ent = new YmapEntityDef(null, 0, ref cent); + YmapEntityDef ent = new YmapEntityDef(null, 0, cent); ent.SetArchetype(arch); - Entity e = new Entity(); - e.Position = pos; - e.Velocity = vel; - e.Mass = 10.0f; + Entity e = new Entity + { + Position = pos, + Velocity = vel, + Mass = 10.0f + }; e.Momentum = vel * e.Mass; e.EntityDef = ent; e.Radius = arch.BSRadius * 0.7f; @@ -2307,7 +2315,7 @@ namespace CodeWalker e.Enabled = true; e.Lifetime = 20.0f; - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Space.AddTemporaryEntity(e); } @@ -2321,7 +2329,7 @@ namespace CodeWalker { try { - Invoke(new Action(() => { SetControlMode(mode); })); + Invoke(SetControlMode, mode); } catch (Exception ex) { @@ -2330,7 +2338,8 @@ namespace CodeWalker return; } - if (mode == ControlMode) return; + if (mode == ControlMode) + return; bool wasfree = (ControlMode == WorldControlMode.Free || ControlBrushEnabled); bool isfree = (mode == WorldControlMode.Free || ControlBrushEnabled); @@ -2387,7 +2396,7 @@ namespace CodeWalker //reset variables for beginning the mouse hit test CurMouseHit.Clear(); - + if (Input.CtrlPressed && ProjectForm != null && ProjectForm.CanPaintInstances()) // Get whether or not we can brush from the project form. { ControlBrushEnabled = true; @@ -2418,23 +2427,31 @@ namespace CodeWalker } - + + public void GetSpaceMouseRay(out SpaceRayIntersectResult ret) + { + ret = new SpaceRayIntersectResult(); + if (Space.Inited && Space.BoundsStore != null) + { + Ray mray = new Ray(camera.MouseRay.Position + camera.Position, camera.MouseRay.Direction); + ret = Space.RayIntersect(ref mray, float.MaxValue, collisionmeshlayers); + } + } + public SpaceRayIntersectResult GetSpaceMouseRay() { SpaceRayIntersectResult ret = new SpaceRayIntersectResult(); if (Space.Inited && Space.BoundsStore != null) { - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; - return Space.RayIntersect(mray, float.MaxValue, collisionmeshlayers); + Ray mray = new Ray(camera.MouseRay.Position + camera.Position, camera.MouseRay.Direction); + return Space.RayIntersect(ref mray, float.MaxValue, collisionmeshlayers); } return ret; } - public SpaceRayIntersectResult Raycast(Ray ray) + public SpaceRayIntersectResult Raycast(ref Ray ray) { - return Space.RayIntersect(ray, float.MaxValue, collisionmeshlayers); + return Space.RayIntersect(ref ray, float.MaxValue, collisionmeshlayers); } private void UpdateMouseHits() @@ -2478,7 +2495,7 @@ namespace CodeWalker //if ((SelectionMode == MapSelectionMode.Entity) && !MouseSelectEnabled) return; //performance improvement when not selecting entities... //test the selected entity/archetype for mouse hit. - + //first test the bounding sphere for mouse hit.. Quaternion orinv; Ray mraytrn; @@ -2520,9 +2537,11 @@ namespace CodeWalker { //transform the mouse ray into the entity space. orinv = Quaternion.Invert(orientation); - mraytrn = new Ray(); - mraytrn.Position = orinv.Multiply(camera.MouseRay.Position-camrel); - mraytrn.Direction = orinv.Multiply(camera.MouseRay.Direction); + mraytrn = new Ray + { + Position = orinv.Multiply(camera.MouseRay.Position - camrel), + Direction = orinv.Multiply(camera.MouseRay.Direction) + }; if (SelectionMode == MapSelectionMode.EntityExtension) { @@ -2555,7 +2574,7 @@ namespace CodeWalker } if (SelectionMode == MapSelectionMode.ArchetypeExtension) { - if ((arche != null) && (arche.Extensions != null)) + if (arche is not null && arche.Extensions.Length > 0) { for (int i = 0; i < arche.Extensions.Length; i++) { @@ -2589,7 +2608,9 @@ namespace CodeWalker if (!mousespherehit) - { return; } //no sphere hit, so no entity hit. + { + return; + } //no sphere hit, so no entity hit. @@ -2611,9 +2632,11 @@ namespace CodeWalker //transform the mouse ray into the entity space. orinv = Quaternion.Invert(orientation); - mraytrn = new Ray(); - mraytrn.Position = orinv.Multiply(camera.MouseRay.Position-camrel); - mraytrn.Direction = orinv.Multiply(camera.MouseRay.Direction); + mraytrn = new Ray + { + Position = orinv.Multiply(camera.MouseRay.Position - camrel), + Direction = orinv.Multiply(camera.MouseRay.Direction) + }; hitdist = 0.0f; @@ -2649,7 +2672,7 @@ namespace CodeWalker float r2 = b2.Length() * 0.5f; radsm = (r1 < (r2));// * 0.5f)); } - if ((nearer&&radsm) || radsm) usehit = true; + if ((nearer && radsm) || radsm) usehit = true; } } else if (j == 0) //no hit on model box @@ -2691,7 +2714,7 @@ namespace CodeWalker float r2 = CurMouseHit.Archetype.BSRadius; radsm = (r1 <= (r2));// * 0.5f)); //prefer selecting smaller things } - if ((nearer&&radsm) || radsm) + if ((nearer && radsm) || radsm) { outerhit = true; } @@ -2783,9 +2806,11 @@ namespace CodeWalker //find mouse hits for things like MLOs, time cycle mods, grass batches, and car generators in ymaps. BoundingBox bbox = new BoundingBox(); - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; float hitdist = float.MaxValue; float dmax = Renderer.renderboundsmaxdist; @@ -2797,12 +2822,14 @@ namespace CodeWalker var tcm = ymap.TimeCycleModifiers[i]; if ((((tcm.BBMin + tcm.BBMax) * 0.5f) - camera.Position).Length() > dmax) continue; - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = tcm.BBMin; - mb.BBMax = tcm.BBMax; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = tcm.BBMin, + BBMax = tcm.BBMax, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); bbox.Minimum = mb.BBMin; @@ -2821,18 +2848,22 @@ namespace CodeWalker for (int i = 0; i < ymap.CarGenerators.Length; i++) { var cg = ymap.CarGenerators[i]; - MapBox mb = new MapBox(); - mb.CamRelPos = cg.Position - camera.Position; - mb.BBMin = cg.BBMin; - mb.BBMax = cg.BBMax; - mb.Orientation = cg.Orientation; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = cg.Position - camera.Position, + BBMin = cg.BBMin, + BBMax = cg.BBMax, + Orientation = cg.Orientation, + Scale = Vector3.One, + }; Renderer.BoundingBoxes.Add(mb); Quaternion orinv = Quaternion.Invert(cg.Orientation); - Ray mraytrn = new Ray(); - mraytrn.Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos); - mraytrn.Direction = orinv.Multiply(mray.Direction); + Ray mraytrn = new Ray + { + Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos), + Direction = orinv.Multiply(mray.Direction) + }; bbox.Minimum = mb.BBMin; bbox.Maximum = mb.BBMax; if (mraytrn.Intersects(ref bbox, out hitdist) && (hitdist < CurMouseHit.HitDist) && (hitdist > 0)) @@ -2848,24 +2879,24 @@ namespace CodeWalker } } - if ((SelectionMode == MapSelectionMode.MloInstance) && (ymap.MloEntities != null)) + if ((SelectionMode == MapSelectionMode.MloInstance)) { - for (int i = 0; i < ymap.MloEntities.Length; i++) + foreach(var ent in ymap.MloEntities) { - var ent = ymap.MloEntities[i]; - if (SelectedItem.MloEntityDef == ent) continue; - MapBox mb = new MapBox(); - mb.CamRelPos = ent.Position - camera.Position; - mb.BBMin = /*ent?.BBMin ??*/ new Vector3(-1.5f); - mb.BBMax = /*ent?.BBMax ??*/ new Vector3(1.5f); - mb.Orientation = ent?.Orientation ?? Quaternion.Identity; - mb.Scale = /*ent?.Scale ??*/ Vector3.One; + if (SelectedItem.MloEntityDef == ent) + continue; + MapBox mb = new MapBox + { + CamRelPos = ent.Position - camera.Position, + BBMin = /*ent?.BBMin ??*/ new Vector3(-1.5f), + BBMax = /*ent?.BBMax ??*/ new Vector3(1.5f), + Orientation = ent?.Orientation ?? Quaternion.Identity, + Scale = /*ent?.Scale ??*/ Vector3.One + }; Renderer.BoundingBoxes.Add(mb); Quaternion orinv = Quaternion.Invert(mb.Orientation); - Ray mraytrn = new Ray(); - mraytrn.Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos); - mraytrn.Direction = orinv.Multiply(mray.Direction); + Ray mraytrn = new Ray(orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos), orinv.Multiply(mray.Direction)); bbox.Minimum = mb.BBMin; bbox.Maximum = mb.BBMax; if (mraytrn.Intersects(ref bbox, out hitdist) && (hitdist < CurMouseHit.HitDist) && (hitdist > 0)) @@ -2885,12 +2916,14 @@ namespace CodeWalker var gb = ymap.GrassInstanceBatches[i]; if ((gb.Position - camera.Position).Length() > dmax) continue; - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = gb.AABBMin; - mb.BBMax = gb.AABBMax; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = gb.AABBMin, + BBMax = gb.AABBMax, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); bbox.Minimum = mb.BBMin; @@ -2910,12 +2943,14 @@ namespace CodeWalker if ((((ll.BBMin + ll.BBMax) * 0.5f) - camera.Position).Length() <= dmax) { - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = ll.BBMin; - mb.BBMax = ll.BBMax; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = ll.BBMin, + BBMax = ll.BBMax, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); if (ll.BVH != null) @@ -2929,12 +2964,14 @@ namespace CodeWalker var dll = ymap.DistantLODLights; if ((((dll.BBMin + dll.BBMax) * 0.5f) - camera.Position).Length() <= dmax) { - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = dll.BBMin; - mb.BBMax = dll.BBMax; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = dll.BBMin, + BBMax = dll.BBMax, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); } } @@ -2947,18 +2984,22 @@ namespace CodeWalker Renderer.RenderBasePath(bo); - MapBox mb = new MapBox(); - mb.CamRelPos = bo.Position - camera.Position; - mb.BBMin = bo.BBMin; - mb.BBMax = bo.BBMax; - mb.Orientation = bo.Orientation; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = bo.Position - camera.Position, + BBMin = bo.BBMin, + BBMax = bo.BBMax, + Orientation = bo.Orientation, + Scale = Vector3.One + }; //Renderer.BoundingBoxes.Add(mb); Quaternion orinv = Quaternion.Invert(bo.Orientation); - Ray mraytrn = new Ray(); - mraytrn.Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos); - mraytrn.Direction = orinv.Multiply(mray.Direction); + Ray mraytrn = new Ray + { + Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos), + Direction = orinv.Multiply(mray.Direction) + }; bbox.Minimum = mb.BBMin; bbox.Maximum = mb.BBMax; if (mraytrn.Intersects(ref bbox, out float hd) && (hd < CurMouseHit.HitDist) && (hd > 0)) @@ -2997,26 +3038,30 @@ namespace CodeWalker private void UpdateMouseHits(List waterquads) where T : BaseWaterQuad { BoundingBox bbox = new BoundingBox(); - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; float hitdist; foreach (T quad in waterquads) { - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = new Vector3(quad.minX, quad.minY, quad.z ?? 0); - mb.BBMax = new Vector3(quad.maxX, quad.maxY, quad.z ?? 0); - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = new Vector3(quad.minX, quad.minY, quad.z ?? 0), + BBMax = new Vector3(quad.maxX, quad.maxY, quad.z ?? 0), + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); bbox.Minimum = mb.BBMin; bbox.Maximum = mb.BBMax; - if(mray.Intersects(ref bbox, out hitdist) && hitdist > 0 && hitdist <= CurMouseHit.HitDist) + if (mray.Intersects(ref bbox, out hitdist) && hitdist > 0 && hitdist <= CurMouseHit.HitDist) { float curSize = CurMouseHit.AABB.Size.X * CurMouseHit.AABB.Size.Y; float newSize = bbox.Size.X * bbox.Size.Y; @@ -3037,9 +3082,11 @@ namespace CodeWalker { if (SelectionMode != MapSelectionMode.NavMesh) return; - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; foreach (var ynv in ynvs) { @@ -3048,12 +3095,14 @@ namespace CodeWalker if (ynv.Nav == null) continue; if (ynv.Nav.SectorTree == null) continue; - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = ynv.Nav.SectorTree.AABBMin.XYZ(); - mb.BBMax = ynv.Nav.SectorTree.AABBMax.XYZ(); - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = ynv.Nav.SectorTree.AABBMin.XYZ(), + BBMax = ynv.Nav.SectorTree.AABBMax.XYZ(), + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); } @@ -3064,20 +3113,22 @@ namespace CodeWalker //if ((CurMouseHit.NavPoint != null) || (CurMouseHit.NavPortal != null)) continue; if ((ynv.Nav != null) && (ynv.Vertices != null) && (ynv.Indices != null) && (ynv.Polys != null)) { - UpdateMouseHits(ynv, ynv.Nav.SectorTree, ynv.Nav.SectorTree, ref mray); + UpdateMouseHits(ynv, ynv.Nav.SectorTree, ynv.Nav.SectorTree, in mray); } } } - private void UpdateMouseHits(YnvFile ynv, NavMeshSector navsector, NavMeshSector rootsec, ref Ray mray) + private void UpdateMouseHits(YnvFile ynv, NavMeshSector navsector, NavMeshSector rootsec, in Ray mray) { if (navsector == null) return; float hitdist = float.MaxValue; - BoundingBox bbox = new BoundingBox(); - bbox.Minimum = navsector.AABBMin.XYZ(); - bbox.Maximum = navsector.AABBMax.XYZ(); + BoundingBox bbox = new BoundingBox + { + Minimum = navsector.AABBMin.XYZ(), + Maximum = navsector.AABBMax.XYZ() + }; if (rootsec != null) //apparently the Z values are incorrect :( { @@ -3100,25 +3151,27 @@ namespace CodeWalker if (navsector.SubTree1 != null) { - UpdateMouseHits(ynv, navsector.SubTree1, rootsec, ref mray); + UpdateMouseHits(ynv, navsector.SubTree1, rootsec, in mray); } if (navsector.SubTree2 != null) { - UpdateMouseHits(ynv, navsector.SubTree2, rootsec, ref mray); + UpdateMouseHits(ynv, navsector.SubTree2, rootsec, in mray); } if (navsector.SubTree3 != null) { - UpdateMouseHits(ynv, navsector.SubTree3, rootsec, ref mray); + UpdateMouseHits(ynv, navsector.SubTree3, rootsec, in mray); } if (navsector.SubTree4 != null) { - UpdateMouseHits(ynv, navsector.SubTree4, rootsec, ref mray); + UpdateMouseHits(ynv, navsector.SubTree4, rootsec, in mray); } if ((navsector.Data != null) && (navsector.Data.PolyIDs != null)) { - BoundingBox cbox = new BoundingBox(); - cbox.Minimum = bbox.Minimum - camera.Position; - cbox.Maximum = bbox.Maximum - camera.Position; + BoundingBox cbox = new BoundingBox + { + Minimum = bbox.Minimum - camera.Position, + Maximum = bbox.Maximum - camera.Position + }; var polys = ynv.Polys; var polyids = navsector.Data.PolyIDs; @@ -3176,9 +3229,11 @@ namespace CodeWalker { if (SelectionMode != MapSelectionMode.Path) return; - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; foreach (var ynd in ynds) { @@ -3186,12 +3241,14 @@ namespace CodeWalker { float minz = (ynd.BVH != null) ? ynd.BVH.Box.Minimum.Z : 0.0f; float maxz = (ynd.BVH != null) ? ynd.BVH.Box.Maximum.Z : 0.0f; - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = new Vector3(ynd.BBMin.X, ynd.BBMin.Y, minz); - mb.BBMax = new Vector3(ynd.BBMax.X, ynd.BBMax.Y, maxz); - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = new Vector3(ynd.BBMin.X, ynd.BBMin.Y, minz), + BBMax = new Vector3(ynd.BBMax.X, ynd.BBMax.Y, maxz), + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); } @@ -3258,9 +3315,11 @@ namespace CodeWalker { if (SelectionMode != MapSelectionMode.TrainTrack) return; - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; foreach (var track in tracks) { @@ -3295,12 +3354,15 @@ namespace CodeWalker float dl = dv.Length(); Vector3 dir = dv * (1.0f / dl); Vector3 dup = Vector3.UnitZ; - MapBox mb = new MapBox(); - mb.CamRelPos = n.Position - camera.Position; - mb.BBMin = new Vector3(-linkrad, -linkrad, 0.0f); - mb.BBMax = new Vector3(linkrad, linkrad, dl); - mb.Orientation = Quaternion.Invert(Quaternion.RotationLookAtRH(dir, dup)); - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = n.Position - camera.Position, + BBMin = new Vector3(-linkrad, -linkrad, 0.0f), + BBMax = new Vector3(linkrad, linkrad, dl), + Orientation = Quaternion.Invert(Quaternion.RotationLookAtRH(dir, dup)), + Scale = Vector3.One, + }; + Renderer.BoundingBoxes.Add(mb); } } @@ -3311,9 +3373,11 @@ namespace CodeWalker { if (SelectionMode != MapSelectionMode.Scenario) return; - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; + Ray mray = new Ray + { + Position = camera.MouseRay.Position + camera.Position, + Direction = camera.MouseRay.Direction + }; foreach (var scenario in scenarios) { @@ -3322,12 +3386,14 @@ namespace CodeWalker if (renderscenariobounds) { - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = sr?.BVH?.Box.Minimum ?? Vector3.Zero; - mb.BBMax = sr?.BVH?.Box.Maximum ?? Vector3.Zero; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = sr?.BVH?.Box.Minimum ?? Vector3.Zero, + BBMax = sr?.BVH?.Box.Maximum ?? Vector3.Zero, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; Renderer.BoundingBoxes.Add(mb); } @@ -3368,12 +3434,14 @@ namespace CodeWalker var sr = SelectedItem.ScenarioNode.Ymt.ScenarioRegion; //if (renderscenariobounds) { - MapBox mb = new MapBox(); - mb.CamRelPos = -camera.Position; - mb.BBMin = sr?.BVH?.Box.Minimum ?? Vector3.Zero; - mb.BBMax = sr?.BVH?.Box.Maximum ?? Vector3.Zero; - mb.Orientation = Quaternion.Identity; - mb.Scale = Vector3.One; + MapBox mb = new MapBox + { + CamRelPos = -camera.Position, + BBMin = sr?.BVH?.Box.Minimum ?? Vector3.Zero, + BBMax = sr?.BVH?.Box.Maximum ?? Vector3.Zero, + Orientation = Quaternion.Identity, + Scale = Vector3.One + }; if (renderscenariobounds) { Renderer.HilightBoxes.Add(mb); @@ -3389,12 +3457,15 @@ namespace CodeWalker { //hilight the cluster itself - MapBox mb = new MapBox(); - mb.Scale = Vector3.One; - mb.BBMin = new Vector3(-0.5f); - mb.BBMax = new Vector3(0.5f); - mb.CamRelPos = ncl.Position - camera.Position; - mb.Orientation = Quaternion.Identity; + MapBox mb = new MapBox + { + Scale = Vector3.One, + BBMin = new Vector3(-0.5f), + BBMax = new Vector3(0.5f), + CamRelPos = ncl.Position - camera.Position, + Orientation = Quaternion.Identity, + }; + Renderer.HilightBoxes.Add(mb); @@ -3404,12 +3475,14 @@ namespace CodeWalker foreach (var clpoint in ncl.Points.MyPoints) { if (clpoint == n.ClusterMyPoint) continue; //don't highlight the selected node... - mb = new MapBox(); - mb.Scale = Vector3.One; - mb.BBMin = new Vector3(-0.5f); - mb.BBMax = new Vector3(0.5f); - mb.CamRelPos = clpoint.Position - camera.Position; - mb.Orientation = clpoint.Orientation; + mb = new MapBox + { + Scale = Vector3.One, + BBMin = new Vector3(-0.5f), + BBMax = new Vector3(0.5f), + CamRelPos = clpoint.Position - camera.Position, + Orientation = clpoint.Orientation, + }; Renderer.BoundingBoxes.Add(mb); } } @@ -3423,29 +3496,35 @@ namespace CodeWalker } - private void UpdateMouseHits(PathBVHNode pathbvhnode, ref Ray mray) + private void UpdateMouseHits(PathBVHNode pathbvhnode, in Ray mray) { float nrad = 0.5f; float hitdist = float.MaxValue; - BoundingSphere bsph = new BoundingSphere(); - bsph.Radius = nrad; + BoundingSphere bsph = new BoundingSphere + { + Radius = nrad + }; - BoundingBox bbox = new BoundingBox(); - bbox.Minimum = pathbvhnode.Box.Minimum - nrad; - bbox.Maximum = pathbvhnode.Box.Maximum + nrad; + BoundingBox bbox = new BoundingBox + { + Minimum = pathbvhnode.Box.Minimum - nrad, + Maximum = pathbvhnode.Box.Maximum + nrad + }; - BoundingBox nbox = new BoundingBox(); - nbox.Minimum = new Vector3(-nrad); - nbox.Maximum = new Vector3(nrad); + BoundingBox nbox = new BoundingBox + { + Minimum = new Vector3(-nrad), + Maximum = new Vector3(nrad) + }; float fhd; if (mray.Intersects(ref bbox, out fhd)) //ray intersects this node... check children for hits! { if ((pathbvhnode.Node1 != null) && (pathbvhnode.Node2 != null)) //node is split. recurse { - UpdateMouseHits(pathbvhnode.Node1, ref mray); - UpdateMouseHits(pathbvhnode.Node2, ref mray); + UpdateMouseHits(pathbvhnode.Node1, in mray); + UpdateMouseHits(pathbvhnode.Node2, in mray); } else if (pathbvhnode.Nodes != null) //leaf node. test contaned pathnodes { @@ -3470,9 +3549,9 @@ namespace CodeWalker } } - public void SelectObject(object obj, object parent = null, bool addSelection = false) + public void SelectObject(object? obj, object? parent = null, bool addSelection = false) { - if (obj == null) + if (obj is null) { SelectItem(null, addSelection); return; @@ -3529,7 +3608,7 @@ namespace CodeWalker bool change = false; if (mhit != null) { - change = SelectedItem.CheckForChanges(mhitv); + change = SelectedItem.CheckForChanges(mhitv); } else { @@ -3640,33 +3719,31 @@ namespace CodeWalker return; } - lock (Renderer.RenderSyncRoot) //drawflags is used when rendering.. need that lock + + if (mhit.HasValue) { - if (mhit.HasValue) + SelectedItem = mhitv; + } + else + { + SelectedItem.Clear(); + } + + if (change) + { + if (!addSelection) { - SelectedItem = mhitv; - } - else - { - SelectedItem.Clear(); + UpdateSelectionUI(true); } - if (change) + Widget.Visible = SelectedItem.CanShowWidget; + if (Widget.Visible) { - if (!addSelection) - { - UpdateSelectionUI(true); - } - - Widget.Visible = SelectedItem.CanShowWidget; - if (Widget.Visible) - { - Widget.Position = SelectedItem.WidgetPosition; - Widget.Rotation = SelectedItem.WidgetRotation; - Widget.RotationWidget.EnableAxes = SelectedItem.WidgetRotationAxes; - Widget.ScaleWidget.LockXY = SelectedItem.WidgetScaleLockXY; - Widget.Scale = SelectedItem.WidgetScale; - } + Widget.Position = SelectedItem.WidgetPosition; + Widget.Rotation = SelectedItem.WidgetRotation; + Widget.RotationWidget.EnableAxes = SelectedItem.WidgetRotationAxes; + Widget.ScaleWidget.LockXY = SelectedItem.WidgetScaleLockXY; + Widget.Scale = SelectedItem.WidgetScale; } } if (notifyProject && change && (ProjectForm != null) && (!addSelection || manualSelection)) @@ -3723,11 +3800,11 @@ namespace CodeWalker { if (wait) { - Invoke(new Action(() => { UpdateSelectionUI(wait); })); + Invoke(UpdateSelectionUI, wait); } else { - BeginInvoke(new Action(() => { UpdateSelectionUI(wait); })); + BeginInvoke(UpdateSelectionUI, wait); } } else @@ -3740,7 +3817,9 @@ namespace CodeWalker } } } - catch { } + catch(Exception ex) { + Console.WriteLine(ex); + } } private void SetSelectionUI(MapSelection item) { @@ -4006,7 +4085,8 @@ namespace CodeWalker } private void AddSelectionDrawableModelsTreeNodes(DrawableModel[] models, string prefix, bool check) { - if (models == null) return; + if (models is null) + return; for (int mi = 0; mi < models.Length; mi++) { @@ -4024,7 +4104,8 @@ namespace CodeWalker Renderer.SelectionModelDrawFlags[model] = false; } - if (model.Geometries == null) continue; + if (model.Geometries is null || model.Geometries.Length == 0) + continue; foreach (var geom in model.Geometries) { @@ -4045,12 +4126,10 @@ namespace CodeWalker { var hash = pl.Hashes[ip]; var parm = pl.Parameters[ip]; - var tex = parm.Data as TextureBase; - if (tex != null) + if (parm.Data is TextureBase tex) { - var t = tex as Texture; var tstr = tex.Name.Trim(); - if (t != null) + if (tex is Texture t) { tstr = string.Format("{0} ({1}x{2}, embedded)", tex.Name, t.Width, t.Height); } @@ -4060,7 +4139,7 @@ namespace CodeWalker } tgnode.Expand(); } - + } mnode.Expand(); @@ -4154,7 +4233,7 @@ namespace CodeWalker } ToolbarProjectWindowButton.Checked = true; } - catch(Exception ex) + catch (Exception ex) { Console.WriteLine(ex); } @@ -4227,7 +4306,7 @@ namespace CodeWalker } - private void LoadWorld() + private async ValueTask LoadWorldAsync() { UpdateStatus("Loading timecycles..."); @@ -4252,7 +4331,7 @@ namespace CodeWalker Trains.Init(GameFileCache, UpdateStatus); UpdateStatus("Loading scenarios..."); - Scenarios.Init(GameFileCache, UpdateStatus, timecycle); + await Scenarios.InitAsync(GameFileCache, UpdateStatus, timecycle); UpdateStatus("Loading popzones..."); PopZones.Init(GameFileCache, UpdateStatus); @@ -4267,7 +4346,7 @@ namespace CodeWalker AudioZones.Init(GameFileCache, UpdateStatus); UpdateStatus("Loading world..."); - Space.Init(GameFileCache, UpdateStatus); + await Space.InitAsync(GameFileCache, UpdateStatus); UpdateStatus("World loaded"); @@ -4277,20 +4356,22 @@ namespace CodeWalker private void SetDlcLevel(string dlc, bool enable) { - if (!initialised) return; + if (!initialised) + return; Cursor = Cursors.WaitCursor; - Task.Run(() => + _ = Task.Run(async () => { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { if (GameFileCache.SetDlcLevel(dlc, enable)) { - LoadWorld(); + await LoadWorldAsync(); } } - Invoke(new Action(()=> { + Invoke(() => + { Cursor = Cursors.Default; - })); + }); }); } @@ -4298,25 +4379,26 @@ namespace CodeWalker { if (!initialised) return; Cursor = Cursors.WaitCursor; - Task.Run(() => + _ = Task.Run(async () => { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { if (GameFileCache.SetModsEnabled(enable)) { UpdateDlcListComboBox(GameFileCache.DlcNameList); - LoadWorld(); + await LoadWorldAsync(); } } - Invoke(new Action(() => { + Invoke(new Action(() => + { Cursor = Cursors.Default; })); }); } - private async void ContentThread() + private async Task ContentThread() { try { @@ -4353,7 +4435,7 @@ namespace CodeWalker } if (!GameFileCache.IsInited) { - GameFileCache.Init(); + await GameFileCache.InitAsync(); } UpdateDlcListComboBox(GameFileCache.DlcNameList); @@ -4362,7 +4444,7 @@ namespace CodeWalker - LoadWorld(); + await LoadWorldAsync(); @@ -4380,7 +4462,7 @@ namespace CodeWalker if (!rcItemsPending) { - await Task.Delay(ActiveForm == null ? 50 : 1, CancellationToken).ConfigureAwait(false); + await Task.Delay(ActiveForm == null ? 50 : 2, CancellationToken).ConfigureAwait(false); } } } @@ -4402,7 +4484,7 @@ namespace CodeWalker if (!fcItemsPending) { - await Task.Delay(ActiveForm == null ? 50 : 1, CancellationToken).ConfigureAwait(false); + await Task.Delay(ActiveForm == null ? 50 : 10, CancellationToken).ConfigureAwait(false); } } } @@ -4419,7 +4501,7 @@ namespace CodeWalker Console.WriteLine("GameFileCache ContentThread stopped"); }); } - catch(Exception ex) + catch (Exception ex) { Console.WriteLine($"Exception occured in content thread:\n{ex}"); } @@ -4436,22 +4518,23 @@ namespace CodeWalker private void UpdateStatus(string text) { + var elapsed = lastStatusUpdate.Elapsed; + if (elapsed < updateInterval) + return; + lastStatusUpdate.Restart(); try { - var elapsed = lastStatusUpdate.Elapsed; - if (elapsed < updateInterval) - return; - lastStatusUpdate.Restart(); if (InvokeRequired) { - BeginInvoke(new Action(() => { doUpdateStatus(text); })); + BeginInvoke(doUpdateStatus, text); } else { doUpdateStatus(text); } } - catch(Exception ex) { + catch (Exception ex) + { Console.WriteLine(ex); } } @@ -4461,7 +4544,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateMousedLabel(text); })); + BeginInvoke(UpdateMousedLabel, text); } else { @@ -4479,7 +4562,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateWeatherTypesComboBox(weather); })); + BeginInvoke(UpdateWeatherTypesComboBox, weather); } else { @@ -4508,7 +4591,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateCloudTypesComboBox(clouds); })); + BeginInvoke(UpdateCloudTypesComboBox, clouds); } else { @@ -4539,7 +4622,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateDlcListComboBox(dlcnames); })); + BeginInvoke(UpdateDlcListComboBox, dlcnames); } else { @@ -4568,7 +4651,7 @@ namespace CodeWalker { if (InvokeRequired) { - Invoke(new Action(() => { LogError(text); })); + Invoke(LogError, text); } else { @@ -4577,7 +4660,9 @@ namespace CodeWalker //MessageBox.Show(text); } } - catch (Exception ex) { Console.WriteLine(ex); } + catch (Exception ex) { + Console.WriteLine(ex); + } } @@ -4589,14 +4674,16 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { UpdateMarkerSelectionPanel(); })); + BeginInvoke(UpdateMarkerSelectionPanel); } else { UpdateMarkerSelectionPanel(); } } - catch (Exception ex) { Console.WriteLine(ex); } + catch (Exception ex) { + Console.WriteLine(ex); + } } private void UpdateMarkerSelectionPanel() { @@ -4820,10 +4907,10 @@ namespace CodeWalker Renderer.individualcloudfrag = s.Clouds; NaturalAmbientLightCheckBox.Checked = s.NatrualAmbientLight; ArtificialAmbientLightCheckBox.Checked = s.ArtificialAmbientLight; - + SetTimeOfDay(s.TimeOfDay); Renderer.SetWeatherType(s.Weather); - + EnableModsCheckBox.Checked = s.EnableMods; DlcLevelComboBox.Text = s.DLC; @@ -4907,7 +4994,8 @@ namespace CodeWalker private void MarkUndoStart(Widget w) { - if (!SelectedItem.CanMarkUndo()) return; + if (!SelectedItem.CanMarkUndo()) + return; if (Widget is TransformWidget) { UndoStartPosition = Widget.Position; @@ -4918,9 +5006,8 @@ namespace CodeWalker private void MarkUndoEnd(Widget w) { if (!SelectedItem.CanMarkUndo()) return; - TransformWidget tw = Widget as TransformWidget; UndoStep s = null; - if (tw != null) + if (Widget is TransformWidget tw) { s = SelectedItem.CreateUndoStep(tw.Mode, UndoStartPosition, UndoStartRotation, UndoStartScale, this, EditEntityPivot); } @@ -4995,7 +5082,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { EnableCacheDependentUI(); })); + BeginInvoke(EnableCacheDependentUI); } else { @@ -5017,7 +5104,7 @@ namespace CodeWalker { if (InvokeRequired) { - BeginInvoke(new Action(() => { EnableDLCModsUI(); })); + BeginInvoke(EnableDLCModsUI); } else { @@ -5026,7 +5113,9 @@ namespace CodeWalker DlcLevelComboBox.Enabled = true; } } - catch (Exception ex) { Console.WriteLine(ex); } + catch (Exception ex) { + Console.WriteLine(ex); + } } @@ -5119,91 +5208,91 @@ namespace CodeWalker } - private void New() + private async ValueTask New() { ShowProjectForm(); if (ProjectForm.IsProjectLoaded) { - ProjectForm.NewYmap(); + await ProjectForm.NewYmap(); } else { - ProjectForm.NewProject(); + await ProjectForm.NewProjectAsync(); } } - private void NewProject() + private async ValueTask NewProject() { ShowProjectForm(); - ProjectForm.NewProject(); + await ProjectForm.NewProjectAsync(); } - private void NewYmap() + private async ValueTask NewYmap() { ShowProjectForm(); - ProjectForm.NewYmap(); + await ProjectForm.NewYmap(); } - private void NewYtyp() + private async ValueTask NewYtyp() { ShowProjectForm(); - ProjectForm.NewYtyp(); + await ProjectForm.NewYtyp(); } - private void NewYbn() + private async ValueTask NewYbn() { ShowProjectForm(); - ProjectForm.NewYbn(); + await ProjectForm.NewYbn(); } - private void NewYnd() + private async ValueTask NewYnd() { ShowProjectForm(); - ProjectForm.NewYnd(); + await ProjectForm.NewYnd(); } - private void NewTrainTrack() + private async ValueTask NewTrainTrack() { ShowProjectForm(); - ProjectForm.NewTrainTrack(); + await ProjectForm.NewTrainTrack(); } - private void NewScenario() + private async ValueTask NewScenario() { ShowProjectForm(); - ProjectForm.NewScenario(); + await ProjectForm.NewScenario(); } - private void Open() + private async ValueTask Open() { ShowProjectForm(); if (ProjectForm.IsProjectLoaded) { - ProjectForm.OpenFiles(); + await ProjectForm.OpenFiles(); } else { - ProjectForm.OpenProject(); + await ProjectForm.OpenProject(); } } - private void OpenProject() + private async ValueTask OpenProject() { ShowProjectForm(); - ProjectForm.OpenProject(); + await ProjectForm.OpenProject(); } - private void OpenFiles() + private async ValueTask OpenFiles() { ShowProjectForm(); - ProjectForm.OpenFiles(); + await ProjectForm.OpenFiles(); } - private void OpenFolder() + private async ValueTask OpenFolder() { ShowProjectForm(); - ProjectForm.OpenFolder(); + await ProjectForm.OpenFolder(); } - private void Save() + private async ValueTask Save() { if (ProjectForm == null) return; - ProjectForm.Save(); + await ProjectForm.Save(); } - private void SaveAll() + private async ValueTask SaveAll() { if (ProjectForm == null) return; - ProjectForm.SaveAll(); + await ProjectForm.SaveAll(); } @@ -5580,7 +5669,7 @@ namespace CodeWalker ToolbarRotateButton.Checked = false; ToolbarScaleButton.Checked = false; - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { switch (mode) { @@ -5611,14 +5700,13 @@ namespace CodeWalker { foreach (var child in ToolbarTransformSpaceButton.DropDownItems) { - var childi = child as ToolStripMenuItem; - if (childi != null) + if (child is ToolStripMenuItem childi) { childi.Checked = false; } } - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { switch (space) { @@ -5679,8 +5767,7 @@ namespace CodeWalker foreach (var child in ToolbarSelectButton.DropDownItems) { - var childi = child as ToolStripMenuItem; - if (childi != null) + if (child is ToolStripMenuItem childi) { childi.Checked = false; } @@ -5784,8 +5871,7 @@ namespace CodeWalker { foreach (var child in ToolbarSnapButton.DropDownItems) { - var childi = child as ToolStripMenuItem; - if (childi != null) + if (child is ToolStripMenuItem childi) { childi.Checked = false; } @@ -5829,8 +5915,7 @@ namespace CodeWalker foreach (var child in ToolbarRotationSnappingButton.DropDownItems) { - var childi = child as ToolStripMenuItem; - if (childi != null) + if (child is ToolStripMenuItem childi) { childi.Checked = false; } @@ -5881,8 +5966,7 @@ namespace CodeWalker { foreach (var child in ToolbarCameraModeButton.DropDownItems) { - var childi = child as ToolStripMenuItem; - if (childi != null) + if (child is ToolStripMenuItem childi) { childi.Checked = false; } @@ -5943,9 +6027,11 @@ namespace CodeWalker { try { - BeginInvoke(new Action(() => { ShowSubtitle(text, duration); })); + BeginInvoke(ShowSubtitle, text, duration); + } + catch (Exception ex) { + Console.WriteLine(ex); } - catch (Exception ex) { Console.WriteLine(ex); } return; } @@ -5963,7 +6049,7 @@ namespace CodeWalker { float hour = minute / 60.0f; UpdateTimeOfDayLabel(); - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Renderer.SetTimeOfDay(hour); } @@ -6069,7 +6155,7 @@ namespace CodeWalker private bool isRenderedLoaded = false; private async void WorldForm_Load(object sender, EventArgs e) { - await Init(); + await InitAsync(); } private void WorldForm_FormClosing(object sender, FormClosingEventArgs e) @@ -6129,7 +6215,8 @@ namespace CodeWalker MessageBox.Show("You cannot clone multiple path nodes at once", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); GrabbedWidget.IsDragging = false; GrabbedWidget = null; - } else + } + else { CloneItem(); } @@ -6614,7 +6701,7 @@ namespace CodeWalker private void WireframeCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.wireframe = WireframeCheckBox.Checked; + Renderer.Shaders.wireframe = WireframeCheckBox.Checked; } private void GrassCheckBox_CheckedChanged(object sender, EventArgs e) @@ -6691,7 +6778,7 @@ namespace CodeWalker private void PathsDepthClipCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.PathsDepthClip = PathsDepthClipCheckBox.Checked; + Renderer.Shaders.PathsDepthClip = PathsDepthClipCheckBox.Checked; } private void ErrorConsoleCheckBox_CheckedChanged(object sender, EventArgs e) @@ -6722,7 +6809,7 @@ namespace CodeWalker Cursor = Cursors.WaitCursor; Pauserendering = true; - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { try { @@ -6827,9 +6914,12 @@ namespace CodeWalker private void ShadowsCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + if (Renderer.Shaders is null) + return; + + using (Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.shadows = ShadowsCheckBox.Checked; + Renderer.Shaders.shadows = ShadowsCheckBox.Checked; } } @@ -7068,42 +7158,42 @@ namespace CodeWalker { default: case "Default": - Renderer.shaders.RenderMode = WorldRenderMode.Default; + Renderer.Shaders.RenderMode = WorldRenderMode.Default; break; case "Single texture": - Renderer.shaders.RenderMode = WorldRenderMode.SingleTexture; + Renderer.Shaders.RenderMode = WorldRenderMode.SingleTexture; TextureSamplerComboBox.Enabled = true; TextureCoordsComboBox.Enabled = true; break; case "Vertex normals": - Renderer.shaders.RenderMode = WorldRenderMode.VertexNormals; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexNormals; break; case "Vertex tangents": - Renderer.shaders.RenderMode = WorldRenderMode.VertexTangents; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexTangents; break; case "Vertex colour 1": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 1; break; case "Vertex colour 2": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 2; break; case "Vertex colour 3": - Renderer.shaders.RenderMode = WorldRenderMode.VertexColour; - Renderer.shaders.RenderVertexColourIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.VertexColour; + Renderer.Shaders.RenderVertexColourIndex = 3; break; case "Texture coord 1": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 1; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 1; break; case "Texture coord 2": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 2; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 2; break; case "Texture coord 3": - Renderer.shaders.RenderMode = WorldRenderMode.TextureCoord; - Renderer.shaders.RenderTextureCoordIndex = 3; + Renderer.Shaders.RenderMode = WorldRenderMode.TextureCoord; + Renderer.Shaders.RenderTextureCoordIndex = 3; break; } } @@ -7112,7 +7202,7 @@ namespace CodeWalker { if (TextureSamplerComboBox.SelectedItem is ShaderParamNames) { - Renderer.shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; + Renderer.Shaders.RenderTextureSampler = (ShaderParamNames)TextureSamplerComboBox.SelectedItem; } } @@ -7122,13 +7212,13 @@ namespace CodeWalker { default: case "Texture coord 1": - Renderer.shaders.RenderTextureSamplerCoord = 1; + Renderer.Shaders.RenderTextureSamplerCoord = 1; break; case "Texture coord 2": - Renderer.shaders.RenderTextureSamplerCoord = 2; + Renderer.Shaders.RenderTextureSamplerCoord = 2; break; case "Texture coord 3": - Renderer.shaders.RenderTextureSamplerCoord = 3; + Renderer.Shaders.RenderTextureSamplerCoord = 3; break; } @@ -7190,23 +7280,32 @@ namespace CodeWalker private void DeferredShadingCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.deferred = DeferredShadingCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.deferred = DeferredShadingCheckBox.Checked; } } private void HDRRenderingCheckBox_CheckedChanged(object sender, EventArgs e) { - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { - Renderer.shaders.hdr = HDRRenderingCheckBox.Checked; + if (Renderer.Shaders is null) + return; + Renderer.Shaders.hdr = HDRRenderingCheckBox.Checked; } } private void AnisotropicFilteringCheckBox_CheckedChanged(object sender, EventArgs e) { - Renderer.shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; + using (Renderer.RenderSyncRoot.WaitDisposable()) + { + if (Renderer.Shaders is null) + return; + Renderer.Shaders.AnisotropicFiltering = AnisotropicFilteringCheckBox.Checked; + } } private void WorldMaxLodComboBox_SelectedIndexChanged(object sender, EventArgs e) @@ -7275,7 +7374,7 @@ namespace CodeWalker MessageBox.Show("Please close the Project Window before enabling or disabling mods."); return; } - + SetModsEnabled(EnableModsCheckBox.Checked); } @@ -7284,7 +7383,11 @@ namespace CodeWalker if (!initialised) return; if (ProjectForm != null) { - MessageBox.Show("Please close the Project Window before enabling or disabling DLC."); + if (EnableDlcCheckBox.Checked != GameFileCache.EnableDlc) + { + EnableDlcCheckBox.Checked = GameFileCache.EnableDlc; + MessageBox.Show("Please close the Project Window before enabling or disabling DLC."); + } return; } @@ -7296,7 +7399,11 @@ namespace CodeWalker if (!initialised) return; if (ProjectForm != null) { - MessageBox.Show("Please close the Project Window before changing the DLC level."); + if (DlcLevelComboBox.SelectedIndex != DlcLevelComboBox.Items.IndexOf(GameFileCache.SelectedDlc)) + { + DlcLevelComboBox.SelectedIndex = DlcLevelComboBox.Items.IndexOf(GameFileCache.SelectedDlc); + MessageBox.Show("Please close the Project Window before changing the DLC level."); + } return; } @@ -7374,7 +7481,7 @@ namespace CodeWalker { float det = ((float)MapViewDetailTrackBar.Value) * 0.1f; MapViewDetailLabel.Text = det.ToString("0.0#"); - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { Renderer.MapViewDetail = det; } @@ -7384,7 +7491,7 @@ namespace CodeWalker { float fov = FieldOfViewTrackBar.Value * 0.01f; FieldOfViewLabel.Text = fov.ToString("0.0#"); - lock (Renderer.RenderSyncRoot) + using (Renderer.RenderSyncRoot.WaitDisposable()) { camera.FieldOfView = fov; camera.UpdateProj = true; @@ -7393,8 +7500,7 @@ namespace CodeWalker private void CloudParamComboBox_SelectedIndexChanged(object sender, EventArgs e) { - CloudAnimSetting setting = CloudParamComboBox.SelectedItem as CloudAnimSetting; - if (setting != null) + if (CloudParamComboBox.SelectedItem is CloudAnimSetting setting) { float rng = setting.MaxValue - setting.MinValue; float cval = (setting.CurrentValue - setting.MinValue) / rng; @@ -7406,8 +7512,7 @@ namespace CodeWalker private void CloudParamTrackBar_Scroll(object sender, EventArgs e) { - CloudAnimSetting setting = CloudParamComboBox.SelectedItem as CloudAnimSetting; - if (setting != null) + if (CloudParamComboBox.SelectedItem is CloudAnimSetting setting) { float rng = setting.MaxValue - setting.MinValue; float fval = CloudParamTrackBar.Value / 200.0f; @@ -7493,34 +7598,34 @@ namespace CodeWalker NewScenario(); } - private void ToolbarOpenButton_ButtonClick(object sender, EventArgs e) + private async void ToolbarOpenButton_ButtonClick(object sender, EventArgs e) { - Open(); + await Open(); } - private void ToolbarOpenProjectButton_Click(object sender, EventArgs e) + private async void ToolbarOpenProjectButton_Click(object sender, EventArgs e) { - OpenProject(); + await OpenProject(); } - private void ToolbarOpenFilesButton_Click(object sender, EventArgs e) + private async void ToolbarOpenFilesButton_Click(object sender, EventArgs e) { - OpenFiles(); + await OpenFiles(); } - private void ToolbarOpenFolderButton_Click(object sender, EventArgs e) + private async void ToolbarOpenFolderButton_Click(object sender, EventArgs e) { - OpenFolder(); + await OpenFolder(); } - private void ToolbarSaveButton_Click(object sender, EventArgs e) + private async void ToolbarSaveButton_Click(object sender, EventArgs e) { - Save(); + await Save(); } - private void ToolbarSaveAllButton_Click(object sender, EventArgs e) + private async void ToolbarSaveAllButton_Click(object sender, EventArgs e) { - SaveAll(); + await SaveAll(); } private void ToolbarSelectButton_ButtonClick(object sender, EventArgs e) @@ -7752,10 +7857,8 @@ namespace CodeWalker private void ToolbarUndoListButton_Click(object sender, EventArgs e) { - var tsi = sender as ToolStripItem; - if (tsi == null) return; - var step = tsi.Tag as UndoStep; - if (step == null) return; + if (sender is not ToolStripItem tsi) return; + if (tsi.Tag is not UndoStep step) return; if (UndoSteps.Count == 0) return; var cstep = UndoSteps.Peek(); while (cstep != null) @@ -7774,10 +7877,8 @@ namespace CodeWalker private void ToolbarRedoListButton_Click(object sender, EventArgs e) { - var tsi = sender as ToolStripItem; - if (tsi == null) return; - var step = tsi.Tag as UndoStep; - if (step == null) return; + if (sender is not ToolStripItem tsi) return; + if (tsi.Tag is not UndoStep step) return; if (RedoSteps.Count == 0) return; var cstep = RedoSteps.Peek(); while (cstep != null) diff --git a/CodeWalker/WorldForm.resx b/CodeWalker/WorldForm.resx index e1d97d2..3cab3b7 100644 --- a/CodeWalker/WorldForm.resx +++ b/CodeWalker/WorldForm.resx @@ -1,17 +1,17 @@  - @@ -117,12 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 182, 17 - False + + 182, 17 + dt1_lod hw1_lod @@ -240,20 +240,12 @@ ufo YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhP3ZC7DcAgDEQZKTMwHOvSIFriS7BlEB+HMic9 QJbvFThLUkpXzjkSpaeuzMPlEELx3jdsBauyCHBY6UWYPQI93KEljQD3jL6EGzN6x0bASyNYwkKU8Udm gd6TMnIikDJyIqjVNz8T7FgKrAwFX6lVinM3aJ05lWDPRRcAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2 - CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f - wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg== iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vQAADr0BR/uQrQAAAHRJREFUOE/tk0EKgCAQRedIncGrGZ602lowuFW/kM1ElLYLEh668D1dKO2DmYcQ + vAAADrwBlbxySQAAAHRJREFUOE/tk0EKgCAQRedIncGrGZ602lowuFW/kM1ElLYLEh668D1dKO2DmYcQ gs/EHpTsnIvGmGZKQMrWjnH12y3ztJR9NfBGxiwD6lpPQEYMaxU4n3aF3PcHPh/AY8Ljy67vDkgZ36AG WlEyBgKdHDIRJSPcKxCRg0UPAAAAAElFTkSuQmCC @@ -261,7 +253,7 @@ ufo iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vgAADr4B6kKxwAAAAThJREFUOE+dk01ugzAQhTlBj+MDIJC4A1yEa7DMnlWaSiAu0ZI7BNi0XaRpF7Bg + vAAADrwBlbxySQAAAThJREFUOE+dk01ugzAQhTlBj+MDIJC4A1yEa7DMnlWaSiAu0ZI7BNi0XaRpF7Bg 4/pzbMsQ0qod6SX2zHvPP4yDdUzTJBR2CieF2YAxOWFot6GKDwrlMAyyKAqZZZkMw1AjTVOdowYHrpFd w4if67p2os/L1wI2DwfuwkRNSitu2+NdA1szJqUVC7ZGYb9/dOQtA/6bptFjcxyBwY7zkfwL0KDF4ESC 7bHCx/miCf7qYJ1jjjYYx3Fm0nfDXfJWzhjMzuBweJJvr++b5K1dOQN7hP9AH0H96EvM83zh7q+2zsH1 @@ -269,13 +261,12 @@ ufo WBXYx9R1nV75RuyHKrrnzCcGjE1u9ZyD4BugoZigQ9xrngAAAABJRU5ErkJggg== - + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACtSURBVDhPrZBBEsIgEAR5Gy/wFV55T/wHr+KgHuCKNsVY - ZI2JiU7VVIVlp7OL+1mllIr7cb8Ie++PQwQYITnnM24NWxoBgsQYm/l+gk699bMsRA4h1JTSPsg0Xert - em/mGwh3vW1Z7MvIABSWqXG3+iZHAEw1m4wD49oVANgVOL/VeSgeDAiX1mpWeKy9BIQiI+OxWQF77tG5 - 2Fc729BmeElf/3lNhORe+oecewDObEqX49RqCgAAAABJRU5ErkJggg== + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2 + CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f + wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg== @@ -291,7 +282,7 @@ ufo iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vQAADr0BR/uQrQAAAH5JREFUOE+9kEEKwCAMBH2bL+hPfI/9ooe2B71aVpKS5iBB0i4MyCZZjcFdrbUu + vAAADrwBlbxySQAAAH5JREFUOE+9kEEKwCAMBH2bL+hPfI/9ooe2B71aVpKS5iBB0i4MyCZZjcFdrbUu IdsuDMUYB/8H1Fo3HQCPynOhsZTSU0pPAM7wpiG4hcFAzns/j2uAMzzZo3ntDHiYkTWNXwCztAJr+ROl 0IhU+UTzMEsHkG2XS4CE7K8Uwg0o2F4o9CrlEwAAAABJRU5ErkJggg== @@ -304,6 +295,15 @@ ufo EcMw2DzPDMEke9AsYBrHs10vN4I1QqImwwDcFyMjQGaBHr5Bo8nEoYCnCQTGzVeI4oj6fIi+KHgoPBhC 4knCjTww9vxfbIUQNDEyiGIZ8t6tW/k0vC/AOpuiueNOLwVkUeylvju9FJCg8E1vM/2PlTv5UoervVTJ uQAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACtSURBVDhPrZBBEsIgEAR5Gy/wFV55T/wHr+KgHuCKNsVY + ZI2JiU7VVIVlp7OL+1mllIr7cb8Ie++PQwQYITnnM24NWxoBgsQYm/l+gk699bMsRA4h1JTSPsg0Xert + em/mGwh3vW1Z7MvIABSWqXG3+iZHAEw1m4wD49oVANgVOL/VeSgeDAiX1mpWeKy9BIQiI+OxWQF77tG5 + 2Fc729BmeElf/3lNhORe+oecewDObEqX49RqCgAAAABJRU5ErkJggg== @@ -389,17 +389,6 @@ ufo 4BJN+IjGo5O8ZJndGVhKxpjWWts551aih0fre+0BLaVchRAezPB2NXSSV/gVwXGYPJiVUt6ns1ghCDjn UQG86w3FToVgDcWCWS9Fvi/Ao0RVAcwUjwpyhzmf4n8BFApS5HZRwRuONGMbrIJ1JIN8O2QAAAAASUVO RK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG - WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM - TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G - UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC - ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2 - 5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII= @@ -435,6 +424,17 @@ ufo rp3fhGJScIRLzKMLFTC9cMIu3nCDVUyjB6WkYA93mEWbAyH9cMImPuA+rWMA31YwBU82kF6BS32Er/aO M8zAh+OEghpcwQ2bg3uwBW8ewFd7xQkm0IA4oaAS7bh2KHjBIZbhV/D6GJkFphrdcIP8lFrAGPwPOjCO QdQiTqrAWNICd7gPnUj+xBKaU9dxfhTkjwV/FxU+AbsiGnc46OYIAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG + WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM + TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G + UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC + ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2 + 5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII= diff --git a/Shaders/BasicPS.cso b/Shaders/BasicPS.cso index 266b52d..81a2c9d 100644 Binary files a/Shaders/BasicPS.cso and b/Shaders/BasicPS.cso differ diff --git a/Shaders/BasicPS_Deferred.cso b/Shaders/BasicPS_Deferred.cso index dd7ffd0..eb5b8ee 100644 Binary files a/Shaders/BasicPS_Deferred.cso and b/Shaders/BasicPS_Deferred.cso differ diff --git a/Shaders/BasicVS_Box.cso b/Shaders/BasicVS_Box.cso index 88de5a1..d1ab544 100644 Binary files a/Shaders/BasicVS_Box.cso and b/Shaders/BasicVS_Box.cso differ diff --git a/Shaders/BasicVS_Capsule.cso b/Shaders/BasicVS_Capsule.cso index 8d5830f..1525032 100644 Binary files a/Shaders/BasicVS_Capsule.cso and b/Shaders/BasicVS_Capsule.cso differ diff --git a/Shaders/BasicVS_Cylinder.cso b/Shaders/BasicVS_Cylinder.cso index b9934be..db65074 100644 Binary files a/Shaders/BasicVS_Cylinder.cso and b/Shaders/BasicVS_Cylinder.cso differ diff --git a/Shaders/BasicVS_PBBNCCT.cso b/Shaders/BasicVS_PBBNCCT.cso index 263e3ac..9fcf8e0 100644 Binary files a/Shaders/BasicVS_PBBNCCT.cso and b/Shaders/BasicVS_PBBNCCT.cso differ diff --git a/Shaders/BasicVS_PBBNCCTTX.cso b/Shaders/BasicVS_PBBNCCTTX.cso index a8281ff..039ca2f 100644 Binary files a/Shaders/BasicVS_PBBNCCTTX.cso and b/Shaders/BasicVS_PBBNCCTTX.cso differ diff --git a/Shaders/BasicVS_PBBNCCTX.cso b/Shaders/BasicVS_PBBNCCTX.cso index b599dfc..9accd29 100644 Binary files a/Shaders/BasicVS_PBBNCCTX.cso and b/Shaders/BasicVS_PBBNCCTX.cso differ diff --git a/Shaders/BasicVS_PBBNCT.cso b/Shaders/BasicVS_PBBNCT.cso index 869717d..05c08a2 100644 Binary files a/Shaders/BasicVS_PBBNCT.cso and b/Shaders/BasicVS_PBBNCT.cso differ diff --git a/Shaders/BasicVS_PBBNCTT.cso b/Shaders/BasicVS_PBBNCTT.cso index a0d28f4..eee7af6 100644 Binary files a/Shaders/BasicVS_PBBNCTT.cso and b/Shaders/BasicVS_PBBNCTT.cso differ diff --git a/Shaders/BasicVS_PBBNCTTT.cso b/Shaders/BasicVS_PBBNCTTT.cso index d122132..9eb6d45 100644 Binary files a/Shaders/BasicVS_PBBNCTTT.cso and b/Shaders/BasicVS_PBBNCTTT.cso differ diff --git a/Shaders/BasicVS_PBBNCTTX.cso b/Shaders/BasicVS_PBBNCTTX.cso index bf97c16..e27c64a 100644 Binary files a/Shaders/BasicVS_PBBNCTTX.cso and b/Shaders/BasicVS_PBBNCTTX.cso differ diff --git a/Shaders/BasicVS_PBBNCTX.cso b/Shaders/BasicVS_PBBNCTX.cso index be70565..fdd2111 100644 Binary files a/Shaders/BasicVS_PBBNCTX.cso and b/Shaders/BasicVS_PBBNCTX.cso differ diff --git a/Shaders/BasicVS_PNCCT.cso b/Shaders/BasicVS_PNCCT.cso index c54e405..6c90212 100644 Binary files a/Shaders/BasicVS_PNCCT.cso and b/Shaders/BasicVS_PNCCT.cso differ diff --git a/Shaders/BasicVS_PNCCTT.cso b/Shaders/BasicVS_PNCCTT.cso index dcbaf37..768aaa2 100644 Binary files a/Shaders/BasicVS_PNCCTT.cso and b/Shaders/BasicVS_PNCCTT.cso differ diff --git a/Shaders/BasicVS_PNCCTTT.cso b/Shaders/BasicVS_PNCCTTT.cso index 16342c8..cb01a3a 100644 Binary files a/Shaders/BasicVS_PNCCTTT.cso and b/Shaders/BasicVS_PNCCTTT.cso differ diff --git a/Shaders/BasicVS_PNCCTTTX.cso b/Shaders/BasicVS_PNCCTTTX.cso index b82fe3b..05bf0e5 100644 Binary files a/Shaders/BasicVS_PNCCTTTX.cso and b/Shaders/BasicVS_PNCCTTTX.cso differ diff --git a/Shaders/BasicVS_PNCCTTX.cso b/Shaders/BasicVS_PNCCTTX.cso index ebf7ff0..b57c0cf 100644 Binary files a/Shaders/BasicVS_PNCCTTX.cso and b/Shaders/BasicVS_PNCCTTX.cso differ diff --git a/Shaders/BasicVS_PNCCTX.cso b/Shaders/BasicVS_PNCCTX.cso index 1766649..2efcc59 100644 Binary files a/Shaders/BasicVS_PNCCTX.cso and b/Shaders/BasicVS_PNCCTX.cso differ diff --git a/Shaders/BasicVS_PNCT.cso b/Shaders/BasicVS_PNCT.cso index 8d98aac..317018e 100644 Binary files a/Shaders/BasicVS_PNCT.cso and b/Shaders/BasicVS_PNCT.cso differ diff --git a/Shaders/BasicVS_PNCTT.cso b/Shaders/BasicVS_PNCTT.cso index ae93506..695bdd0 100644 Binary files a/Shaders/BasicVS_PNCTT.cso and b/Shaders/BasicVS_PNCTT.cso differ diff --git a/Shaders/BasicVS_PNCTTT.cso b/Shaders/BasicVS_PNCTTT.cso index 3f02917..92bf64a 100644 Binary files a/Shaders/BasicVS_PNCTTT.cso and b/Shaders/BasicVS_PNCTTT.cso differ diff --git a/Shaders/BasicVS_PNCTTTX.cso b/Shaders/BasicVS_PNCTTTX.cso index dfa7e88..c871a05 100644 Binary files a/Shaders/BasicVS_PNCTTTX.cso and b/Shaders/BasicVS_PNCTTTX.cso differ diff --git a/Shaders/BasicVS_PNCTTX.cso b/Shaders/BasicVS_PNCTTX.cso index 749efcd..fbff087 100644 Binary files a/Shaders/BasicVS_PNCTTX.cso and b/Shaders/BasicVS_PNCTTX.cso differ diff --git a/Shaders/BasicVS_PNCTX.cso b/Shaders/BasicVS_PNCTX.cso index 887657e..8409437 100644 Binary files a/Shaders/BasicVS_PNCTX.cso and b/Shaders/BasicVS_PNCTX.cso differ diff --git a/Shaders/BasicVS_Sphere.cso b/Shaders/BasicVS_Sphere.cso index c02ae1b..fe94eee 100644 Binary files a/Shaders/BasicVS_Sphere.cso and b/Shaders/BasicVS_Sphere.cso differ diff --git a/Shaders/BoundingBoxVS.cso b/Shaders/BoundingBoxVS.cso index 15ffed5..1e61930 100644 Binary files a/Shaders/BoundingBoxVS.cso and b/Shaders/BoundingBoxVS.cso differ diff --git a/Shaders/BoundingSphereVS.cso b/Shaders/BoundingSphereVS.cso index d2e6dab..d7512be 100644 Binary files a/Shaders/BoundingSphereVS.cso and b/Shaders/BoundingSphereVS.cso differ diff --git a/Shaders/BoundsPS.cso b/Shaders/BoundsPS.cso index 3c4ad34..1a8ba43 100644 Binary files a/Shaders/BoundsPS.cso and b/Shaders/BoundsPS.cso differ diff --git a/Shaders/CablePS.cso b/Shaders/CablePS.cso index 4793090..23003e5 100644 Binary files a/Shaders/CablePS.cso and b/Shaders/CablePS.cso differ diff --git a/Shaders/CablePS_Deferred.cso b/Shaders/CablePS_Deferred.cso index c1c91ae..486273a 100644 Binary files a/Shaders/CablePS_Deferred.cso and b/Shaders/CablePS_Deferred.cso differ diff --git a/Shaders/CableVS.cso b/Shaders/CableVS.cso index 0f93b2a..21767a1 100644 Binary files a/Shaders/CableVS.cso and b/Shaders/CableVS.cso differ diff --git a/Shaders/CloudsPS.cso b/Shaders/CloudsPS.cso index 66e1549..188f531 100644 Binary files a/Shaders/CloudsPS.cso and b/Shaders/CloudsPS.cso differ diff --git a/Shaders/CloudsVS.cso b/Shaders/CloudsVS.cso index b835dec..0a7b9bd 100644 Binary files a/Shaders/CloudsVS.cso and b/Shaders/CloudsVS.cso differ diff --git a/Shaders/DirLightPS.cso b/Shaders/DirLightPS.cso index 9accb64..e800876 100644 Binary files a/Shaders/DirLightPS.cso and b/Shaders/DirLightPS.cso differ diff --git a/Shaders/DirLightPS_MS.cso b/Shaders/DirLightPS_MS.cso index 40884c6..5652e11 100644 Binary files a/Shaders/DirLightPS_MS.cso and b/Shaders/DirLightPS_MS.cso differ diff --git a/Shaders/DirLightVS.cso b/Shaders/DirLightVS.cso index 90659d2..d9d2f8c 100644 Binary files a/Shaders/DirLightVS.cso and b/Shaders/DirLightVS.cso differ diff --git a/Shaders/DistantLightsPS.cso b/Shaders/DistantLightsPS.cso index 14a55b3..593d1f4 100644 Binary files a/Shaders/DistantLightsPS.cso and b/Shaders/DistantLightsPS.cso differ diff --git a/Shaders/DistantLightsVS.cso b/Shaders/DistantLightsVS.cso index 3c51c1e..da222b1 100644 Binary files a/Shaders/DistantLightsVS.cso and b/Shaders/DistantLightsVS.cso differ diff --git a/Shaders/LightPS.cso b/Shaders/LightPS.cso index 0f0d80f..d408fb6 100644 Binary files a/Shaders/LightPS.cso and b/Shaders/LightPS.cso differ diff --git a/Shaders/LightPS_MS.cso b/Shaders/LightPS_MS.cso index 2cfa88c..58b58e7 100644 Binary files a/Shaders/LightPS_MS.cso and b/Shaders/LightPS_MS.cso differ diff --git a/Shaders/LightVS.cso b/Shaders/LightVS.cso index c8d42a6..0224b4d 100644 Binary files a/Shaders/LightVS.cso and b/Shaders/LightVS.cso differ diff --git a/Shaders/LodLightsPS.cso b/Shaders/LodLightsPS.cso index 220072d..30ba6b6 100644 Binary files a/Shaders/LodLightsPS.cso and b/Shaders/LodLightsPS.cso differ diff --git a/Shaders/LodLightsPS_MS.cso b/Shaders/LodLightsPS_MS.cso index ae20c04..5d9a8b8 100644 Binary files a/Shaders/LodLightsPS_MS.cso and b/Shaders/LodLightsPS_MS.cso differ diff --git a/Shaders/LodLightsVS.cso b/Shaders/LodLightsVS.cso index 16c1341..f89061e 100644 Binary files a/Shaders/LodLightsVS.cso and b/Shaders/LodLightsVS.cso differ diff --git a/Shaders/MarkerPS.cso b/Shaders/MarkerPS.cso index 0c8f856..c2415e7 100644 Binary files a/Shaders/MarkerPS.cso and b/Shaders/MarkerPS.cso differ diff --git a/Shaders/MarkerVS.cso b/Shaders/MarkerVS.cso index 23f7f3a..7b828c2 100644 Binary files a/Shaders/MarkerVS.cso and b/Shaders/MarkerVS.cso differ diff --git a/Shaders/PPBloomFilterBPHCS.cso b/Shaders/PPBloomFilterBPHCS.cso index 4d92d58..0e91455 100644 Binary files a/Shaders/PPBloomFilterBPHCS.cso and b/Shaders/PPBloomFilterBPHCS.cso differ diff --git a/Shaders/PPBloomFilterVCS.cso b/Shaders/PPBloomFilterVCS.cso index b2f529e..e3a6b29 100644 Binary files a/Shaders/PPBloomFilterVCS.cso and b/Shaders/PPBloomFilterVCS.cso differ diff --git a/Shaders/PPCopyPixelsPS.cso b/Shaders/PPCopyPixelsPS.cso index cf9474f..6df4e99 100644 Binary files a/Shaders/PPCopyPixelsPS.cso and b/Shaders/PPCopyPixelsPS.cso differ diff --git a/Shaders/PPFinalPassPS.cso b/Shaders/PPFinalPassPS.cso index 1fe266d..37c1120 100644 Binary files a/Shaders/PPFinalPassPS.cso and b/Shaders/PPFinalPassPS.cso differ diff --git a/Shaders/PPFinalPassVS.cso b/Shaders/PPFinalPassVS.cso index 693aa95..8d417f0 100644 Binary files a/Shaders/PPFinalPassVS.cso and b/Shaders/PPFinalPassVS.cso differ diff --git a/Shaders/PPLumBlendCS.cso b/Shaders/PPLumBlendCS.cso index c0918ad..bf001d0 100644 Binary files a/Shaders/PPLumBlendCS.cso and b/Shaders/PPLumBlendCS.cso differ diff --git a/Shaders/PPReduceTo0DCS.cso b/Shaders/PPReduceTo0DCS.cso index f26d3b5..88ac3ad 100644 Binary files a/Shaders/PPReduceTo0DCS.cso and b/Shaders/PPReduceTo0DCS.cso differ diff --git a/Shaders/PPReduceTo1DCS.cso b/Shaders/PPReduceTo1DCS.cso index c84bc72..2df1be5 100644 Binary files a/Shaders/PPReduceTo1DCS.cso and b/Shaders/PPReduceTo1DCS.cso differ diff --git a/Shaders/PPSSAAPS.cso b/Shaders/PPSSAAPS.cso index 96e450a..2888fc6 100644 Binary files a/Shaders/PPSSAAPS.cso and b/Shaders/PPSSAAPS.cso differ diff --git a/Shaders/PathBoxPS.cso b/Shaders/PathBoxPS.cso index 9d729ea..98d0e54 100644 Binary files a/Shaders/PathBoxPS.cso and b/Shaders/PathBoxPS.cso differ diff --git a/Shaders/PathBoxVS.cso b/Shaders/PathBoxVS.cso index 2f93a0e..80cf9a1 100644 Binary files a/Shaders/PathBoxVS.cso and b/Shaders/PathBoxVS.cso differ diff --git a/Shaders/PathDynVS.cso b/Shaders/PathDynVS.cso index c95932f..faf43a9 100644 Binary files a/Shaders/PathDynVS.cso and b/Shaders/PathDynVS.cso differ diff --git a/Shaders/PathPS.cso b/Shaders/PathPS.cso index a073089..92aaf51 100644 Binary files a/Shaders/PathPS.cso and b/Shaders/PathPS.cso differ diff --git a/Shaders/PathVS.cso b/Shaders/PathVS.cso index c0fe1e2..e313dd9 100644 Binary files a/Shaders/PathVS.cso and b/Shaders/PathVS.cso differ diff --git a/Shaders/ShadowPS.cso b/Shaders/ShadowPS.cso index 8b046e5..c8873c4 100644 Binary files a/Shaders/ShadowPS.cso and b/Shaders/ShadowPS.cso differ diff --git a/Shaders/ShadowVS.cso b/Shaders/ShadowVS.cso index f15cfe4..e6a4352 100644 Binary files a/Shaders/ShadowVS.cso and b/Shaders/ShadowVS.cso differ diff --git a/Shaders/ShadowVS_Skin.cso b/Shaders/ShadowVS_Skin.cso index 2e76539..b20892a 100644 Binary files a/Shaders/ShadowVS_Skin.cso and b/Shaders/ShadowVS_Skin.cso differ diff --git a/Shaders/SkyMoonPS.cso b/Shaders/SkyMoonPS.cso index 2d0e2c8..87b918a 100644 Binary files a/Shaders/SkyMoonPS.cso and b/Shaders/SkyMoonPS.cso differ diff --git a/Shaders/SkyMoonVS.cso b/Shaders/SkyMoonVS.cso index 4d5bb70..bb99aad 100644 Binary files a/Shaders/SkyMoonVS.cso and b/Shaders/SkyMoonVS.cso differ diff --git a/Shaders/SkySunPS.cso b/Shaders/SkySunPS.cso index bc40e67..fb6d431 100644 Binary files a/Shaders/SkySunPS.cso and b/Shaders/SkySunPS.cso differ diff --git a/Shaders/SkySunVS.cso b/Shaders/SkySunVS.cso index 09fb786..c00765b 100644 Binary files a/Shaders/SkySunVS.cso and b/Shaders/SkySunVS.cso differ diff --git a/Shaders/SkydomePS.cso b/Shaders/SkydomePS.cso index 402ba7b..cc78e1e 100644 Binary files a/Shaders/SkydomePS.cso and b/Shaders/SkydomePS.cso differ diff --git a/Shaders/SkydomeVS.cso b/Shaders/SkydomeVS.cso index eac8abe..64780f1 100644 Binary files a/Shaders/SkydomeVS.cso and b/Shaders/SkydomeVS.cso differ diff --git a/Shaders/TerrainPS.cso b/Shaders/TerrainPS.cso index 4629d7d..17ca367 100644 Binary files a/Shaders/TerrainPS.cso and b/Shaders/TerrainPS.cso differ diff --git a/Shaders/TerrainPS_Deferred.cso b/Shaders/TerrainPS_Deferred.cso index b007a86..166bcd6 100644 Binary files a/Shaders/TerrainPS_Deferred.cso and b/Shaders/TerrainPS_Deferred.cso differ diff --git a/Shaders/TerrainVS_PNCCT.cso b/Shaders/TerrainVS_PNCCT.cso index 97924d3..ec27b3b 100644 Binary files a/Shaders/TerrainVS_PNCCT.cso and b/Shaders/TerrainVS_PNCCT.cso differ diff --git a/Shaders/TerrainVS_PNCCTT.cso b/Shaders/TerrainVS_PNCCTT.cso index 6e41f29..4285c5a 100644 Binary files a/Shaders/TerrainVS_PNCCTT.cso and b/Shaders/TerrainVS_PNCCTT.cso differ diff --git a/Shaders/TerrainVS_PNCCTTTX.cso b/Shaders/TerrainVS_PNCCTTTX.cso index 2ad21bc..f924c9e 100644 Binary files a/Shaders/TerrainVS_PNCCTTTX.cso and b/Shaders/TerrainVS_PNCCTTTX.cso differ diff --git a/Shaders/TerrainVS_PNCCTTX.cso b/Shaders/TerrainVS_PNCCTTX.cso index 77641ed..af75cff 100644 Binary files a/Shaders/TerrainVS_PNCCTTX.cso and b/Shaders/TerrainVS_PNCCTTX.cso differ diff --git a/Shaders/TerrainVS_PNCCTX.cso b/Shaders/TerrainVS_PNCCTX.cso index 9639d3b..dcfb0ea 100644 Binary files a/Shaders/TerrainVS_PNCCTX.cso and b/Shaders/TerrainVS_PNCCTX.cso differ diff --git a/Shaders/TerrainVS_PNCTTTX.cso b/Shaders/TerrainVS_PNCTTTX.cso index 293ade2..ceea02c 100644 Binary files a/Shaders/TerrainVS_PNCTTTX.cso and b/Shaders/TerrainVS_PNCTTTX.cso differ diff --git a/Shaders/TerrainVS_PNCTTX.cso b/Shaders/TerrainVS_PNCTTX.cso index ae60076..6643682 100644 Binary files a/Shaders/TerrainVS_PNCTTX.cso and b/Shaders/TerrainVS_PNCTTX.cso differ diff --git a/Shaders/TreesLodPS.cso b/Shaders/TreesLodPS.cso index 7ec8c6e..e589351 100644 Binary files a/Shaders/TreesLodPS.cso and b/Shaders/TreesLodPS.cso differ diff --git a/Shaders/TreesLodPS_Deferred.cso b/Shaders/TreesLodPS_Deferred.cso index 679f296..d730e78 100644 Binary files a/Shaders/TreesLodPS_Deferred.cso and b/Shaders/TreesLodPS_Deferred.cso differ diff --git a/Shaders/TreesLodVS.cso b/Shaders/TreesLodVS.cso index d3b15fa..bb3cc75 100644 Binary files a/Shaders/TreesLodVS.cso and b/Shaders/TreesLodVS.cso differ diff --git a/Shaders/WaterPS.cso b/Shaders/WaterPS.cso index 3257588..9373af9 100644 Binary files a/Shaders/WaterPS.cso and b/Shaders/WaterPS.cso differ diff --git a/Shaders/WaterPS_Deferred.cso b/Shaders/WaterPS_Deferred.cso index 43c391c..682212f 100644 Binary files a/Shaders/WaterPS_Deferred.cso and b/Shaders/WaterPS_Deferred.cso differ diff --git a/Shaders/WaterVS_PCT.cso b/Shaders/WaterVS_PCT.cso index 93720ef..74c6615 100644 Binary files a/Shaders/WaterVS_PCT.cso and b/Shaders/WaterVS_PCT.cso differ diff --git a/Shaders/WaterVS_PNCT.cso b/Shaders/WaterVS_PNCT.cso index 0f8a8fa..63db442 100644 Binary files a/Shaders/WaterVS_PNCT.cso and b/Shaders/WaterVS_PNCT.cso differ diff --git a/Shaders/WaterVS_PNCTX.cso b/Shaders/WaterVS_PNCTX.cso index e088fef..702327e 100644 Binary files a/Shaders/WaterVS_PNCTX.cso and b/Shaders/WaterVS_PNCTX.cso differ diff --git a/Shaders/WaterVS_PT.cso b/Shaders/WaterVS_PT.cso index 8c14e8c..316c1db 100644 Binary files a/Shaders/WaterVS_PT.cso and b/Shaders/WaterVS_PT.cso differ diff --git a/Shaders/WidgetPS.cso b/Shaders/WidgetPS.cso index 82b5cde..ff00f11 100644 Binary files a/Shaders/WidgetPS.cso and b/Shaders/WidgetPS.cso differ diff --git a/Shaders/WidgetVS.cso b/Shaders/WidgetVS.cso index 95db8a5..6f3bd11 100644 Binary files a/Shaders/WidgetVS.cso and b/Shaders/WidgetVS.cso differ